From 4826f63f00f8305b9735232c21d4bee6aaf37e69 Mon Sep 17 00:00:00 2001 From: HavenDV Date: Wed, 28 Aug 2024 23:52:19 +0400 Subject: [PATCH] test: Added ai21, huggingface, cohere specs. --- OpenApiGenerator.sln | 3 + specs/ai21.yaml | 2895 ++++ specs/cohere.yaml | 12089 ++++++++++++++++ specs/huggingface.yaml | 171 + .../Tests.Ai21_Diagnostics.verified.txt | 1 + .../NewtonsoftJson/_#AllOf.1.g.verified.cs | 115 + .../NewtonsoftJson/_#AnyOf.2.g.verified.cs | 166 + ...#G.Api.Authorizations.Bearer.g.verified.cs | 23 + .../_#G.Api.Constructors.Bearer.g.verified.cs | 18 + ...StudioV1ChatFilesConvertPost.g.verified.cs | 118 + .../_#G.Api.V1Answer.g.verified.cs | 131 + .../_#G.Api.V1ConversationalRag.g.verified.cs | 152 + .../_#G.Api.V1Embed.g.verified.cs | 123 + .../Ai21/NewtonsoftJson/_#G.Api.g.verified.cs | 121 + ..._#G.ChatClient.V1J2UltraChat.g.verified.cs | 178 + .../_#G.ChatClient.g.verified.cs | 60 + ...ionClient.V1J2GrandeComplete.g.verified.cs | 184 + ...1J2GrandeCustomModelComplete.g.verified.cs | 193 + ...t.V1J2GrandeInstructComplete.g.verified.cs | 184 + ...tionClient.V1J2JumboComplete.g.verified.cs | 184 + ...ionClient.V1J2JumboComplete2.g.verified.cs | 193 + ...nt.V1J2JumboInstructComplete.g.verified.cs | 184 + ...tionClient.V1J2LargeComplete.g.verified.cs | 184 + ...V1J2LargeCustomModelComplete.g.verified.cs | 193 + ...nt.V1J2LargeInstructComplete.g.verified.cs | 184 + ...tionClient.V1J2LightComplete.g.verified.cs | 184 + ...V1J2LightCustomModelComplete.g.verified.cs | 193 + ...letionClient.V1J2MidComplete.g.verified.cs | 184 + ...t.V1J2MidCustomModelComplete.g.verified.cs | 193 + ...tionClient.V1J2UltraComplete.g.verified.cs | 184 + ...ionClient.V1J2UltraComplete2.g.verified.cs | 193 + .../_#G.CompletionClient.g.verified.cs | 60 + ...lsClient.V1CreateCustomModel.g.verified.cs | 132 + ...odelsClient.V1GetCustomModel.g.verified.cs | 90 + ...delsClient.V1GetCustomModels.g.verified.cs | 92 + ...lsClient.V1UpdateCustomModel.g.verified.cs | 127 + .../_#G.CustomModelsClient.g.verified.cs | 60 + ...tasetsClient.V1DeleteDataset.g.verified.cs | 90 + ....DatasetsClient.V1GetDataset.g.verified.cs | 90 + ...ient.V1GetDatasetDownloadUrl.g.verified.cs | 96 + ...DatasetsClient.V1GetDatasets.g.verified.cs | 84 + ...tasetsClient.V1UploadDataset.g.verified.cs | 171 + .../_#G.DatasetsClient.g.verified.cs | 60 + ...rectionsClient.V1Corrections.g.verified.cs | 118 + ...aticalErrorCorrectionsClient.g.verified.cs | 60 + ...ompleteClient.V1ChatComplete.g.verified.cs | 187 + .../_#G.JambaCompleteClient.g.verified.cs | 60 + ...gementClient.V1LibraryDelete.g.verified.cs | 93 + ...ntClient.V1LibraryManagement.g.verified.cs | 136 + ...tClient.V1LibraryManagement2.g.verified.cs | 98 + ...tClient.V1LibraryManagement3.g.verified.cs | 153 + ...gementClient.V1LibraryUpload.g.verified.cs | 176 + .../_#G.LibraryManagementClient.g.verified.cs | 60 + .../_#G.Models.AnswerBody.g.verified.cs | 42 + .../_#G.Models.AnswerLength.g.verified.cs | 62 + .../_#G.Models.AssistantMessage.g.verified.cs | 46 + ....Models.AssistantMessageRole.g.verified.cs | 58 + ...StudioV1ChatFilesConvertPost.g.verified.cs | 24 + ...G.Models.BodyV1LibraryUpload.g.verified.cs | 54 + ...G.Models.BodyV1UploadDataset.g.verified.cs | 60 + .../_#G.Models.ChatCompletion.g.verified.cs | 44 + ...#G.Models.ChatCompletionMeta.g.verified.cs | 19 + ...ChatCompletionResponseChoice.g.verified.cs | 48 + ...ompletionResponseDeltaChoice.g.verified.cs | 50 + ...mpletionVllmStreamingMessage.g.verified.cs | 44 + ...tionVllmStreamingMessageMeta.g.verified.cs | 19 + .../_#G.Models.ChatMessage.g.verified.cs | 30 + .../_#G.Models.ChatOutput.g.verified.cs | 36 + .../_#G.Models.ChatResponse.g.verified.cs | 32 + ...ls.ChatStreamingContentDelta.g.verified.cs | 24 + ...dels.ChatStreamingFirstDelta.g.verified.cs | 33 + ....ChatStreamingFirstDeltaRole.g.verified.cs | 78 + .../_#G.Models.CompletionBody.g.verified.cs | 104 + ...dels.CompletionBodyLogitBias.g.verified.cs | 19 + ...rsationalRagFlowPublicFields.g.verified.cs | 72 + ...ublicFieldsRetrievalStrategy.g.verified.cs | 69 + ...dels.ConversationalRagResult.g.verified.cs | 56 + ...dels.ConversationalRagSource.g.verified.cs | 60 + ...ChatFilesConvertPostResponse.g.verified.cs | 19 + .../_#G.Models.Correction.g.verified.cs | 48 + .../_#G.Models.CorrectionType.g.verified.cs | 83 + .../_#G.Models.CorrectionsBody.g.verified.cs | 24 + ...G.Models.CorrectionsResponse.g.verified.cs | 32 + .../_#G.Models.CustomModelInput.g.verified.cs | 48 + .../_#G.Models.CustomModelType.g.verified.cs | 83 + ...Models.CustomModelUpdateBody.g.verified.cs | 24 + .../_#G.Models.DocumentSchema.g.verified.cs | 38 + ...odels.DocumentSchemaMetadata.g.verified.cs | 19 + .../_#G.Models.DocumentType.g.verified.cs | 55 + .../_#G.Models.EmbedType.g.verified.cs | 55 + .../_#G.Models.EmbeddingsBody.g.verified.cs | 32 + ...#G.Models.FileDeleteResponse.g.verified.cs | 32 + .../_#G.Models.FileResponse.g.verified.cs | 101 + .../_#G.Models.FileStatus.g.verified.cs | 76 + ...#G.Models.FileUploadResponse.g.verified.cs | 34 + ...#G.Models.FilesUpdateRequest.g.verified.cs | 33 + .../_#G.Models.FinishReason.g.verified.cs | 36 + ...odels.FunctionToolDefinition.g.verified.cs | 36 + ...G.Models.HTTPValidationError.g.verified.cs | 24 + .../_#G.Models.Highlight.g.verified.cs | 36 + ...rverDataTypesChatChatRequest.g.verified.cs | 97 + ...erDataTypesJ2ChatChatRequest.g.verified.cs | 92 + ....Models.LibraryAnswerRequest.g.verified.cs | 80 + ...Models.LibraryAnswerResponse.g.verified.cs | 44 + ....Models.LibrarySearchRequest.g.verified.cs | 74 + ...Models.LibrarySearchResponse.g.verified.cs | 32 + ...G.Models.LibrarySearchResult.g.verified.cs | 60 + .../_#G.Models.Logprobs.g.verified.cs | 24 + .../_#G.Models.LogprobsData.g.verified.cs | 36 + .../_#G.Models.Message.g.verified.cs | 39 + .../_#G.Models.MessageRole.g.verified.cs | 64 + ...#G.Models.MockResponseConfig.g.verified.cs | 30 + .../_#G.Models.Mode.g.verified.cs | 55 + .../_#G.Models.ModelName.g.verified.cs | 90 + .../_#G.Models.ParaphraseBody.g.verified.cs | 44 + .../_#G.Models.Penalty.g.verified.cs | 54 + .../_#G.Models.ResponseFormat.g.verified.cs | 24 + ...#G.Models.ResponseFormatType.g.verified.cs | 55 + ...#G.Models.RetrievalStrategy3.g.verified.cs | 62 + .../_#G.Models.RoleType.g.verified.cs | 55 + .../_#G.Models.Segment.g.verified.cs | 30 + .../_#G.Models.SegmentSummary.g.verified.cs | 54 + .../_#G.Models.SegmentationBody.g.verified.cs | 30 + ....Models.SegmentationResponse.g.verified.cs | 32 + ....Models.SegmentedSummaryBody.g.verified.cs | 36 + .../_#G.Models.SourceDocument.g.verified.cs | 48 + .../_#G.Models.StyleType.g.verified.cs | 76 + ...Models.SummarizationResponse.g.verified.cs | 32 + .../_#G.Models.SummarizeBody.g.verified.cs | 42 + ...s.SummarizeBySegmentResponse.g.verified.cs | 32 + .../_#G.Models.SummaryMethod.g.verified.cs | 62 + .../_#G.Models.SystemMessage.g.verified.cs | 40 + ..._#G.Models.SystemMessageRole.g.verified.cs | 58 + .../_#G.Models.TokenizeBody.g.verified.cs | 24 + .../_#G.Models.ToolCall.g.verified.cs | 38 + .../_#G.Models.ToolCallType.g.verified.cs | 48 + .../_#G.Models.ToolDefinition.g.verified.cs | 30 + ...#G.Models.ToolDefinitionType.g.verified.cs | 48 + .../_#G.Models.ToolFunction.g.verified.cs | 30 + .../_#G.Models.ToolMessage.g.verified.cs | 46 + .../_#G.Models.ToolMessageRole.g.verified.cs | 58 + .../_#G.Models.ToolParameters.g.verified.cs | 37 + ...els.ToolParametersProperties.g.verified.cs | 19 + ...#G.Models.ToolParametersType.g.verified.cs | 49 + .../_#G.Models.TopLogprobsData.g.verified.cs | 30 + .../_#G.Models.UsageInfo.g.verified.cs | 40 + .../_#G.Models.UserMessage.g.verified.cs | 40 + .../_#G.Models.UserMessageRole.g.verified.cs | 58 + .../_#G.Models.V1AnswerResponse.g.verified.cs | 19 + ....V1CreateCustomModelResponse.g.verified.cs | 19 + ...dels.V1DeleteDatasetResponse.g.verified.cs | 19 + .../_#G.Models.V1EmbedResponse.g.verified.cs | 19 + ...els.V1GetCustomModelResponse.g.verified.cs | 19 + ...ls.V1GetCustomModelsResponse.g.verified.cs | 19 + ...etDatasetDownloadUrlResponse.g.verified.cs | 19 + ....Models.V1GetDatasetResponse.g.verified.cs | 19 + ...Models.V1GetDatasetsResponse.g.verified.cs | 19 + ...s.V1J2GrandeCompleteResponse.g.verified.cs | 19 + ...eCustomModelCompleteResponse.g.verified.cs | 19 + ...andeInstructCompleteResponse.g.verified.cs | 19 + ...ls.V1J2JumboCompleteResponse.g.verified.cs | 19 + ...s.V1J2JumboCompleteResponse2.g.verified.cs | 19 + ...umboInstructCompleteResponse.g.verified.cs | 19 + ...ls.V1J2LargeCompleteResponse.g.verified.cs | 19 + ...eCustomModelCompleteResponse.g.verified.cs | 19 + ...argeInstructCompleteResponse.g.verified.cs | 19 + ...ls.V1J2LightCompleteResponse.g.verified.cs | 19 + ...tCustomModelCompleteResponse.g.verified.cs | 19 + ...dels.V1J2MidCompleteResponse.g.verified.cs | 19 + ...dCustomModelCompleteResponse.g.verified.cs | 19 + ...ls.V1J2UltraCompleteResponse.g.verified.cs | 19 + ...s.V1J2UltraCompleteResponse2.g.verified.cs | 19 + ....V1LibraryManagementResponse.g.verified.cs | 19 + ....Models.V1ParaphrazeResponse.g.verified.cs | 19 + ...#G.Models.V1TokenizeResponse.g.verified.cs | 19 + ....V1UpdateCustomModelResponse.g.verified.cs | 19 + ...dels.V1UploadDatasetResponse.g.verified.cs | 19 + .../_#G.Models.ValidationError.g.verified.cs | 38 + ...araphraseClient.V1Paraphraze.g.verified.cs | 131 + .../_#G.ParaphraseClient.g.verified.cs | 60 + .../_#G.Polyfills.g.verified.cs | 54 + ...EngineClient.V1LibraryAnswer.g.verified.cs | 151 + ...eClient.V1LibraryManagement4.g.verified.cs | 90 + ...EngineClient.V1LibrarySearch.g.verified.cs | 146 + .../_#G.RAGEngineClient.g.verified.cs | 60 + ...ntationClient.V1Segmentation.g.verified.cs | 123 + .../_#G.SegmentationClient.g.verified.cs | 60 + ....SummarizeClient.V1Summarize.g.verified.cs | 131 + ...eClient.V1SummarizeBySegment.g.verified.cs | 126 + .../_#G.SummarizeClient.g.verified.cs | 60 + ...#G.TokenizeClient.V1Tokenize.g.verified.cs | 118 + .../_#G.TokenizeClient.g.verified.cs | 60 + .../NewtonsoftJson/_#OneOf.4.g.verified.cs | 248 + .../Tests.Ai21_Diagnostics.verified.txt | 1 + .../SystemTextJson/_#AllOf.1.g.verified.cs | 115 + .../SystemTextJson/_#AnyOf.2.g.verified.cs | 166 + ...#G.Api.Authorizations.Bearer.g.verified.cs | 23 + .../_#G.Api.Constructors.Bearer.g.verified.cs | 18 + ...StudioV1ChatFilesConvertPost.g.verified.cs | 118 + .../_#G.Api.V1Answer.g.verified.cs | 131 + .../_#G.Api.V1ConversationalRag.g.verified.cs | 152 + .../_#G.Api.V1Embed.g.verified.cs | 123 + .../Ai21/SystemTextJson/_#G.Api.g.verified.cs | 177 + ..._#G.ChatClient.V1J2UltraChat.g.verified.cs | 178 + .../_#G.ChatClient.g.verified.cs | 60 + ...ionClient.V1J2GrandeComplete.g.verified.cs | 184 + ...1J2GrandeCustomModelComplete.g.verified.cs | 193 + ...t.V1J2GrandeInstructComplete.g.verified.cs | 184 + ...tionClient.V1J2JumboComplete.g.verified.cs | 184 + ...ionClient.V1J2JumboComplete2.g.verified.cs | 193 + ...nt.V1J2JumboInstructComplete.g.verified.cs | 184 + ...tionClient.V1J2LargeComplete.g.verified.cs | 184 + ...V1J2LargeCustomModelComplete.g.verified.cs | 193 + ...nt.V1J2LargeInstructComplete.g.verified.cs | 184 + ...tionClient.V1J2LightComplete.g.verified.cs | 184 + ...V1J2LightCustomModelComplete.g.verified.cs | 193 + ...letionClient.V1J2MidComplete.g.verified.cs | 184 + ...t.V1J2MidCustomModelComplete.g.verified.cs | 193 + ...tionClient.V1J2UltraComplete.g.verified.cs | 184 + ...ionClient.V1J2UltraComplete2.g.verified.cs | 193 + .../_#G.CompletionClient.g.verified.cs | 60 + ...lsClient.V1CreateCustomModel.g.verified.cs | 132 + ...odelsClient.V1GetCustomModel.g.verified.cs | 90 + ...delsClient.V1GetCustomModels.g.verified.cs | 92 + ...lsClient.V1UpdateCustomModel.g.verified.cs | 127 + .../_#G.CustomModelsClient.g.verified.cs | 60 + ...tasetsClient.V1DeleteDataset.g.verified.cs | 90 + ....DatasetsClient.V1GetDataset.g.verified.cs | 90 + ...ient.V1GetDatasetDownloadUrl.g.verified.cs | 96 + ...DatasetsClient.V1GetDatasets.g.verified.cs | 84 + ...tasetsClient.V1UploadDataset.g.verified.cs | 171 + .../_#G.DatasetsClient.g.verified.cs | 60 + ...rectionsClient.V1Corrections.g.verified.cs | 118 + ...aticalErrorCorrectionsClient.g.verified.cs | 60 + ...ompleteClient.V1ChatComplete.g.verified.cs | 187 + .../_#G.JambaCompleteClient.g.verified.cs | 60 + ...gementClient.V1LibraryDelete.g.verified.cs | 93 + ...ntClient.V1LibraryManagement.g.verified.cs | 127 + ...tClient.V1LibraryManagement2.g.verified.cs | 98 + ...tClient.V1LibraryManagement3.g.verified.cs | 153 + ...gementClient.V1LibraryUpload.g.verified.cs | 176 + .../_#G.LibraryManagementClient.g.verified.cs | 60 + .../_#G.Models.AnswerBody.g.verified.cs | 46 + .../_#G.Models.AnswerLength.g.verified.cs | 58 + .../_#G.Models.AssistantMessage.g.verified.cs | 47 + ....Models.AssistantMessageRole.g.verified.cs | 56 + ...StudioV1ChatFilesConvertPost.g.verified.cs | 25 + ...G.Models.BodyV1LibraryUpload.g.verified.cs | 56 + ...G.Models.BodyV1UploadDataset.g.verified.cs | 63 + .../_#G.Models.ChatCompletion.g.verified.cs | 47 + ...#G.Models.ChatCompletionMeta.g.verified.cs | 19 + ...ChatCompletionResponseChoice.g.verified.cs | 50 + ...ompletionResponseDeltaChoice.g.verified.cs | 53 + ...mpletionVllmStreamingMessage.g.verified.cs | 46 + ...tionVllmStreamingMessageMeta.g.verified.cs | 19 + .../_#G.Models.ChatMessage.g.verified.cs | 33 + .../_#G.Models.ChatOutput.g.verified.cs | 40 + .../_#G.Models.ChatResponse.g.verified.cs | 34 + ...ls.ChatStreamingContentDelta.g.verified.cs | 25 + ...dels.ChatStreamingFirstDelta.g.verified.cs | 35 + ....ChatStreamingFirstDeltaRole.g.verified.cs | 73 + .../_#G.Models.CompletionBody.g.verified.cs | 108 + ...dels.CompletionBodyLogitBias.g.verified.cs | 19 + ...rsationalRagFlowPublicFields.g.verified.cs | 74 + ...ublicFieldsRetrievalStrategy.g.verified.cs | 64 + ...dels.ConversationalRagResult.g.verified.cs | 61 + ...dels.ConversationalRagSource.g.verified.cs | 64 + ...ChatFilesConvertPostResponse.g.verified.cs | 19 + .../_#G.Models.Correction.g.verified.cs | 54 + .../_#G.Models.CorrectionType.g.verified.cs | 76 + .../_#G.Models.CorrectionsBody.g.verified.cs | 25 + ...G.Models.CorrectionsResponse.g.verified.cs | 34 + .../_#G.Models.CustomModelInput.g.verified.cs | 52 + .../_#G.Models.CustomModelType.g.verified.cs | 76 + ...Models.CustomModelUpdateBody.g.verified.cs | 24 + .../_#G.Models.DocumentSchema.g.verified.cs | 39 + ...odels.DocumentSchemaMetadata.g.verified.cs | 19 + .../_#G.Models.DocumentType.g.verified.cs | 52 + .../_#G.Models.EmbedType.g.verified.cs | 52 + .../_#G.Models.EmbeddingsBody.g.verified.cs | 34 + ...#G.Models.FileDeleteResponse.g.verified.cs | 34 + .../_#G.Models.FileResponse.g.verified.cs | 109 + .../_#G.Models.FileStatus.g.verified.cs | 70 + ...#G.Models.FileUploadResponse.g.verified.cs | 36 + ...#G.Models.FilesUpdateRequest.g.verified.cs | 33 + .../_#G.Models.FinishReason.g.verified.cs | 37 + ...odels.FunctionToolDefinition.g.verified.cs | 37 + ...G.Models.HTTPValidationError.g.verified.cs | 24 + .../_#G.Models.Highlight.g.verified.cs | 39 + ...rverDataTypesChatChatRequest.g.verified.cs | 102 + ...erDataTypesJ2ChatChatRequest.g.verified.cs | 97 + ....Models.LibraryAnswerRequest.g.verified.cs | 84 + ...Models.LibraryAnswerResponse.g.verified.cs | 46 + ....Models.LibrarySearchRequest.g.verified.cs | 76 + ...Models.LibrarySearchResponse.g.verified.cs | 34 + ...G.Models.LibrarySearchResult.g.verified.cs | 64 + .../_#G.Models.Logprobs.g.verified.cs | 25 + .../_#G.Models.LogprobsData.g.verified.cs | 38 + .../_#G.Models.Message.g.verified.cs | 42 + .../_#G.Models.MessageRole.g.verified.cs | 61 + ...#G.Models.MockResponseConfig.g.verified.cs | 30 + .../_#G.Models.Mode.g.verified.cs | 52 + .../_#G.Models.ModelName.g.verified.cs | 82 + .../_#G.Models.ParaphraseBody.g.verified.cs | 46 + .../_#G.Models.Penalty.g.verified.cs | 55 + .../_#G.Models.ResponseFormat.g.verified.cs | 26 + ...#G.Models.ResponseFormatType.g.verified.cs | 52 + ...#G.Models.RetrievalStrategy3.g.verified.cs | 58 + .../_#G.Models.RoleType.g.verified.cs | 52 + .../_#G.Models.Segment.g.verified.cs | 32 + .../_#G.Models.SegmentSummary.g.verified.cs | 58 + .../_#G.Models.SegmentationBody.g.verified.cs | 33 + ....Models.SegmentationResponse.g.verified.cs | 34 + ....Models.SegmentedSummaryBody.g.verified.cs | 39 + .../_#G.Models.SourceDocument.g.verified.cs | 51 + .../_#G.Models.StyleType.g.verified.cs | 70 + ...Models.SummarizationResponse.g.verified.cs | 34 + .../_#G.Models.SummarizeBody.g.verified.cs | 46 + ...s.SummarizeBySegmentResponse.g.verified.cs | 34 + .../_#G.Models.SummaryMethod.g.verified.cs | 58 + .../_#G.Models.SystemMessage.g.verified.cs | 42 + ..._#G.Models.SystemMessageRole.g.verified.cs | 56 + .../_#G.Models.TokenizeBody.g.verified.cs | 25 + .../_#G.Models.ToolCall.g.verified.cs | 41 + .../_#G.Models.ToolCallType.g.verified.cs | 46 + .../_#G.Models.ToolDefinition.g.verified.cs | 32 + ...#G.Models.ToolDefinitionType.g.verified.cs | 46 + .../_#G.Models.ToolFunction.g.verified.cs | 32 + .../_#G.Models.ToolMessage.g.verified.cs | 49 + .../_#G.Models.ToolMessageRole.g.verified.cs | 56 + .../_#G.Models.ToolParameters.g.verified.cs | 39 + ...els.ToolParametersProperties.g.verified.cs | 19 + ...#G.Models.ToolParametersType.g.verified.cs | 47 + .../_#G.Models.TopLogprobsData.g.verified.cs | 32 + .../_#G.Models.UsageInfo.g.verified.cs | 43 + .../_#G.Models.UserMessage.g.verified.cs | 42 + .../_#G.Models.UserMessageRole.g.verified.cs | 56 + .../_#G.Models.V1AnswerResponse.g.verified.cs | 19 + ....V1CreateCustomModelResponse.g.verified.cs | 19 + ...dels.V1DeleteDatasetResponse.g.verified.cs | 19 + .../_#G.Models.V1EmbedResponse.g.verified.cs | 19 + ...els.V1GetCustomModelResponse.g.verified.cs | 19 + ...ls.V1GetCustomModelsResponse.g.verified.cs | 19 + ...etDatasetDownloadUrlResponse.g.verified.cs | 19 + ....Models.V1GetDatasetResponse.g.verified.cs | 19 + ...Models.V1GetDatasetsResponse.g.verified.cs | 19 + ...s.V1J2GrandeCompleteResponse.g.verified.cs | 19 + ...eCustomModelCompleteResponse.g.verified.cs | 19 + ...andeInstructCompleteResponse.g.verified.cs | 19 + ...ls.V1J2JumboCompleteResponse.g.verified.cs | 19 + ...s.V1J2JumboCompleteResponse2.g.verified.cs | 19 + ...umboInstructCompleteResponse.g.verified.cs | 19 + ...ls.V1J2LargeCompleteResponse.g.verified.cs | 19 + ...eCustomModelCompleteResponse.g.verified.cs | 19 + ...argeInstructCompleteResponse.g.verified.cs | 19 + ...ls.V1J2LightCompleteResponse.g.verified.cs | 19 + ...tCustomModelCompleteResponse.g.verified.cs | 19 + ...dels.V1J2MidCompleteResponse.g.verified.cs | 19 + ...dCustomModelCompleteResponse.g.verified.cs | 19 + ...ls.V1J2UltraCompleteResponse.g.verified.cs | 19 + ...s.V1J2UltraCompleteResponse2.g.verified.cs | 19 + ....V1LibraryManagementResponse.g.verified.cs | 19 + ....Models.V1ParaphrazeResponse.g.verified.cs | 19 + ...#G.Models.V1TokenizeResponse.g.verified.cs | 19 + ....V1UpdateCustomModelResponse.g.verified.cs | 19 + ...dels.V1UploadDatasetResponse.g.verified.cs | 19 + .../_#G.Models.ValidationError.g.verified.cs | 41 + ...araphraseClient.V1Paraphraze.g.verified.cs | 131 + .../_#G.ParaphraseClient.g.verified.cs | 60 + .../_#G.Polyfills.g.verified.cs | 54 + ...EngineClient.V1LibraryAnswer.g.verified.cs | 151 + ...eClient.V1LibraryManagement4.g.verified.cs | 90 + ...EngineClient.V1LibrarySearch.g.verified.cs | 146 + .../_#G.RAGEngineClient.g.verified.cs | 60 + ...ntationClient.V1Segmentation.g.verified.cs | 123 + .../_#G.SegmentationClient.g.verified.cs | 60 + ....SummarizeClient.V1Summarize.g.verified.cs | 131 + ...eClient.V1SummarizeBySegment.g.verified.cs | 126 + .../_#G.SummarizeClient.g.verified.cs | 60 + ...#G.TokenizeClient.V1Tokenize.g.verified.cs | 118 + .../_#G.TokenizeClient.g.verified.cs | 60 + .../_#JsonConverters.AllOf1.g.verified.cs | 54 + ...JsonConverters.AllOfFactory1.g.verified.cs | 26 + ...#JsonConverters.AnswerLength.g.verified.cs | 50 + ...verters.AnswerLengthNullable.g.verified.cs | 57 + .../_#JsonConverters.AnyOf2.g.verified.cs | 73 + ...JsonConverters.AnyOfFactory2.g.verified.cs | 26 + ...verters.AssistantMessageRole.g.verified.cs | 50 + ...AssistantMessageRoleNullable.g.verified.cs | 57 + ....ChatStreamingFirstDeltaRole.g.verified.cs | 50 + ...eamingFirstDeltaRoleNullable.g.verified.cs | 57 + ...ublicFieldsRetrievalStrategy.g.verified.cs | 50 + ...ldsRetrievalStrategyNullable.g.verified.cs | 57 + ...sonConverters.CorrectionType.g.verified.cs | 50 + ...rters.CorrectionTypeNullable.g.verified.cs | 57 + ...onConverters.CustomModelType.g.verified.cs | 50 + ...ters.CustomModelTypeNullable.g.verified.cs | 57 + ...#JsonConverters.DocumentType.g.verified.cs | 50 + ...verters.DocumentTypeNullable.g.verified.cs | 57 + .../_#JsonConverters.EmbedType.g.verified.cs | 50 + ...Converters.EmbedTypeNullable.g.verified.cs | 57 + .../_#JsonConverters.FileStatus.g.verified.cs | 50 + ...onverters.FileStatusNullable.g.verified.cs | 57 + ..._#JsonConverters.MessageRole.g.verified.cs | 50 + ...nverters.MessageRoleNullable.g.verified.cs | 57 + .../_#JsonConverters.Mode.g.verified.cs | 50 + ...#JsonConverters.ModeNullable.g.verified.cs | 57 + .../_#JsonConverters.ModelName.g.verified.cs | 50 + ...Converters.ModelNameNullable.g.verified.cs | 57 + .../_#JsonConverters.OneOf4.g.verified.cs | 111 + ...JsonConverters.OneOfFactory4.g.verified.cs | 26 + ...onverters.ResponseFormatType.g.verified.cs | 50 + ...s.ResponseFormatTypeNullable.g.verified.cs | 57 + ...onverters.RetrievalStrategy3.g.verified.cs | 50 + ...s.RetrievalStrategy3Nullable.g.verified.cs | 57 + .../_#JsonConverters.RoleType.g.verified.cs | 50 + ...nConverters.RoleTypeNullable.g.verified.cs | 57 + .../_#JsonConverters.StyleType.g.verified.cs | 50 + ...Converters.StyleTypeNullable.g.verified.cs | 57 + ...JsonConverters.SummaryMethod.g.verified.cs | 50 + ...erters.SummaryMethodNullable.g.verified.cs | 57 + ...Converters.SystemMessageRole.g.verified.cs | 50 + ...rs.SystemMessageRoleNullable.g.verified.cs | 57 + ...#JsonConverters.ToolCallType.g.verified.cs | 50 + ...verters.ToolCallTypeNullable.g.verified.cs | 57 + ...onverters.ToolDefinitionType.g.verified.cs | 50 + ...s.ToolDefinitionTypeNullable.g.verified.cs | 57 + ...onConverters.ToolMessageRole.g.verified.cs | 50 + ...ters.ToolMessageRoleNullable.g.verified.cs | 57 + ...onverters.ToolParametersType.g.verified.cs | 50 + ...s.ToolParametersTypeNullable.g.verified.cs | 57 + ...onConverters.UserMessageRole.g.verified.cs | 50 + ...ters.UserMessageRoleNullable.g.verified.cs | 57 + .../SystemTextJson/_#OneOf.4.g.verified.cs | 248 + .../Tests.Cohere_Diagnostics.verified.txt | 1 + ...#G.Api.Authorizations.Bearer.g.verified.cs | 23 + .../NewtonsoftJson/_#G.Api.Chat.g.verified.cs | 332 + .../_#G.Api.Chatv2.g.verified.cs | 200 + .../_#G.Api.CheckAPIKey.g.verified.cs | 91 + .../_#G.Api.Classify.g.verified.cs | 160 + .../_#G.Api.Constructors.Bearer.g.verified.cs | 18 + .../_#G.Api.Detokenize.g.verified.cs | 136 + .../_#G.Api.Embed.g.verified.cs | 176 + .../_#G.Api.Generate.g.verified.cs | 245 + .../_#G.Api.Rerank.g.verified.cs | 167 + .../_#G.Api.Summarize.g.verified.cs | 171 + .../_#G.Api.Tokenize.g.verified.cs | 136 + .../NewtonsoftJson/_#G.Api.g.verified.cs | 88 + ...ectorsClient.CreateConnector.g.verified.cs | 164 + ...ectorsClient.DeleteConnector.g.verified.cs | 97 + ...onnectorsClient.GetConnector.g.verified.cs | 97 + ...nectorsClient.ListConnectors.g.verified.cs | 107 + ...ient.OAuthAuthorizeConnector.g.verified.cs | 103 + ...ectorsClient.UpdateConnector.g.verified.cs | 166 + .../_#G.ConnectorsClient.g.verified.cs | 61 + ...DatasetsClient.CreateDataset.g.verified.cs | 302 + ...DatasetsClient.DeleteDataset.g.verified.cs | 97 + ...#G.DatasetsClient.GetDataset.g.verified.cs | 97 + ...tasetsClient.GetDatasetUsage.g.verified.cs | 91 + ....DatasetsClient.ListDatasets.g.verified.cs | 139 + .../_#G.DatasetsClient.g.verified.cs | 61 + ...bedJobsClient.CancelEmbedJob.g.verified.cs | 97 + ...bedJobsClient.CreateEmbedJob.g.verified.cs | 172 + ....EmbedJobsClient.GetEmbedJob.g.verified.cs | 97 + ...mbedJobsClient.ListEmbedJobs.g.verified.cs | 91 + .../_#G.EmbedJobsClient.g.verified.cs | 61 + ...gClient.CreateFinetunedModel.g.verified.cs | 184 + ...gClient.DeleteFinetunedModel.g.verified.cs | 96 + ...ningClient.GetFinetunedModel.g.verified.cs | 96 + ....FinetuningClient.ListEvents.g.verified.cs | 114 + ...ngClient.ListFinetunedModels.g.verified.cs | 108 + ...ient.ListTrainingStepMetrics.g.verified.cs | 108 + ...gClient.UpdateFinetunedModel.g.verified.cs | 188 + .../_#G.FinetuningClient.g.verified.cs | 61 + .../_#G.Models.ApiMeta.g.verified.cs | 42 + ..._#G.Models.ApiMetaApiVersion.g.verified.cs | 36 + ...#G.Models.ApiMetaBilledUnits.g.verified.cs | 42 + .../_#G.Models.ApiMetaTokens.g.verified.cs | 30 + .../_#G.Models.AssistantMessage.g.verified.cs | 50 + ...els.AssistantMessageResponse.g.verified.cs | 50 + ...AssistantMessageResponseRole.g.verified.cs | 48 + ....Models.AssistantMessageRole.g.verified.cs | 48 + .../_#G.Models.AuthTokenType.g.verified.cs | 63 + .../_#G.Models.BaseModel.g.verified.cs | 52 + .../_#G.Models.BaseType.g.verified.cs | 82 + ...odels.CancelEmbedJobResponse.g.verified.cs | 24 + ...els.CancelEmbedJobResponse10.g.verified.cs | 24 + ...els.CancelEmbedJobResponse11.g.verified.cs | 24 + ...els.CancelEmbedJobResponse12.g.verified.cs | 24 + ...dels.CancelEmbedJobResponse2.g.verified.cs | 24 + ...dels.CancelEmbedJobResponse3.g.verified.cs | 24 + ...dels.CancelEmbedJobResponse4.g.verified.cs | 24 + ...dels.CancelEmbedJobResponse5.g.verified.cs | 24 + ...dels.CancelEmbedJobResponse6.g.verified.cs | 24 + ...dels.CancelEmbedJobResponse7.g.verified.cs | 24 + ...dels.CancelEmbedJobResponse8.g.verified.cs | 24 + ...dels.CancelEmbedJobResponse9.g.verified.cs | 24 + .../_#G.Models.ChatCitation.g.verified.cs | 42 + ....ChatCitationGenerationEvent.g.verified.cs | 167 + ...ationGenerationEventVariant2.g.verified.cs | 24 + .../_#G.Models.ChatConnector.g.verified.cs | 44 + ....Models.ChatConnectorOptions.g.verified.cs | 20 + ...Models.ChatContentDeltaEvent.g.verified.cs | 167 + ...hatContentDeltaEventVariant2.g.verified.cs | 30 + ...ntentDeltaEventVariant2Delta.g.verified.cs | 24 + ...ltaEventVariant2DeltaMessage.g.verified.cs | 24 + ...tVariant2DeltaMessageContent.g.verified.cs | 24 + ...G.Models.ChatContentEndEvent.g.verified.cs | 167 + ....ChatContentEndEventVariant2.g.verified.cs | 24 + ...Models.ChatContentStartEvent.g.verified.cs | 167 + ...hatContentStartEventVariant2.g.verified.cs | 30 + ...ntentStartEventVariant2Delta.g.verified.cs | 24 + ...artEventVariant2DeltaMessage.g.verified.cs | 24 + ...tVariant2DeltaMessageContent.g.verified.cs | 30 + ...iant2DeltaMessageContentType.g.verified.cs | 48 + .../_#G.Models.ChatDataMetrics.g.verified.cs | 36 + .../_#G.Models.ChatDocument.g.verified.cs | 27 + .../_#G.Models.ChatFinishReason.g.verified.cs | 90 + .../_#G.Models.ChatMessage.g.verified.cs | 37 + .../_#G.Models.ChatMessage2.g.verified.cs | 249 + ...G.Models.ChatMessageEndEvent.g.verified.cs | 167 + ....ChatMessageEndEventVariant2.g.verified.cs | 30 + ...MessageEndEventVariant2Delta.g.verified.cs | 30 + ...Models.ChatMessageStartEvent.g.verified.cs | 167 + ...hatMessageStartEventVariant2.g.verified.cs | 30 + ...ssageStartEventVariant2Delta.g.verified.cs | 24 + ...artEventVariant2DeltaMessage.g.verified.cs | 24 + ...ventVariant2DeltaMessageRole.g.verified.cs | 48 + .../_#G.Models.ChatRequest.g.verified.cs | 246 + ...s.ChatRequestCitationQuality.g.verified.cs | 64 + ....ChatRequestPromptTruncation.g.verified.cs | 67 + .../_#G.Models.ChatResponse10.g.verified.cs | 24 + .../_#G.Models.ChatResponse11.g.verified.cs | 24 + .../_#G.Models.ChatResponse12.g.verified.cs | 24 + .../_#G.Models.ChatResponse13.g.verified.cs | 24 + .../_#G.Models.ChatResponse2.g.verified.cs | 24 + .../_#G.Models.ChatResponse3.g.verified.cs | 24 + .../_#G.Models.ChatResponse4.g.verified.cs | 24 + .../_#G.Models.ChatResponse5.g.verified.cs | 24 + .../_#G.Models.ChatResponse6.g.verified.cs | 24 + .../_#G.Models.ChatResponse7.g.verified.cs | 24 + .../_#G.Models.ChatResponse8.g.verified.cs | 24 + .../_#G.Models.ChatResponse9.g.verified.cs | 24 + .../_#G.Models.ChatRole.g.verified.cs | 69 + ...SearchQueriesGenerationEvent.g.verified.cs | 167 + ...eriesGenerationEventVariant2.g.verified.cs | 24 + .../_#G.Models.ChatSearchQuery.g.verified.cs | 30 + .../_#G.Models.ChatSearchResult.g.verified.cs | 48 + ...ls.ChatSearchResultConnector.g.verified.cs | 24 + ...odels.ChatSearchResultsEvent.g.verified.cs | 167 + ...atSearchResultsEventVariant2.g.verified.cs | 30 + ...#G.Models.ChatStreamEndEvent.g.verified.cs | 167 + ...s.ChatStreamEndEventVariant2.g.verified.cs | 34 + ...EndEventVariant2FinishReason.g.verified.cs | 80 + .../_#G.Models.ChatStreamEvent.g.verified.cs | 24 + ...els.ChatStreamEventEventType.g.verified.cs | 83 + ...G.Models.ChatStreamEventType.g.verified.cs | 24 + ...dels.ChatStreamEventTypeType.g.verified.cs | 118 + ....Models.ChatStreamStartEvent.g.verified.cs | 167 + ...ChatStreamStartEventVariant2.g.verified.cs | 24 + ...dels.ChatTextGenerationEvent.g.verified.cs | 167 + ...tTextGenerationEventVariant2.g.verified.cs | 24 + ...odels.ChatToolCallDeltaEvent.g.verified.cs | 167 + ...atToolCallDeltaEventVariant2.g.verified.cs | 30 + ...lCallDeltaEventVariant2Delta.g.verified.cs | 24 + ...taEventVariant2DeltaToolCall.g.verified.cs | 24 + ...ariant2DeltaToolCallFunction.g.verified.cs | 24 + ....Models.ChatToolCallEndEvent.g.verified.cs | 167 + ...ChatToolCallEndEventVariant2.g.verified.cs | 24 + ...odels.ChatToolCallStartEvent.g.verified.cs | 167 + ...atToolCallStartEventVariant2.g.verified.cs | 30 + ...lCallStartEventVariant2Delta.g.verified.cs | 24 + ...rtEventVariant2DeltaToolCall.g.verified.cs | 36 + ...ariant2DeltaToolCallFunction.g.verified.cs | 30 + ...entVariant2DeltaToolCallType.g.verified.cs | 48 + ...dels.ChatToolCallsChunkEvent.g.verified.cs | 167 + ...tToolCallsChunkEventVariant2.g.verified.cs | 24 + ...ChatToolCallsGenerationEvent.g.verified.cs | 167 + ...CallsGenerationEventVariant2.g.verified.cs | 30 + ...odels.ChatToolPlanDeltaEvent.g.verified.cs | 167 + ...atToolPlanDeltaEventVariant2.g.verified.cs | 24 + ...lPlanDeltaEventVariant2Delta.g.verified.cs | 24 + .../_#G.Models.Chatv2Request.g.verified.cs | 114 + ...ls.Chatv2RequestCitationMode.g.verified.cs | 63 + .../_#G.Models.Chatv2Response10.g.verified.cs | 24 + .../_#G.Models.Chatv2Response11.g.verified.cs | 24 + .../_#G.Models.Chatv2Response12.g.verified.cs | 24 + .../_#G.Models.Chatv2Response13.g.verified.cs | 24 + .../_#G.Models.Chatv2Response2.g.verified.cs | 24 + .../_#G.Models.Chatv2Response3.g.verified.cs | 24 + .../_#G.Models.Chatv2Response4.g.verified.cs | 24 + .../_#G.Models.Chatv2Response5.g.verified.cs | 24 + .../_#G.Models.Chatv2Response6.g.verified.cs | 24 + .../_#G.Models.Chatv2Response7.g.verified.cs | 24 + .../_#G.Models.Chatv2Response8.g.verified.cs | 24 + .../_#G.Models.Chatv2Response9.g.verified.cs | 24 + ...G.Models.CheckAPIKeyResponse.g.verified.cs | 36 + ...Models.CheckAPIKeyResponse10.g.verified.cs | 24 + ...Models.CheckAPIKeyResponse11.g.verified.cs | 24 + ...Models.CheckAPIKeyResponse12.g.verified.cs | 24 + ...Models.CheckAPIKeyResponse13.g.verified.cs | 24 + ....Models.CheckAPIKeyResponse2.g.verified.cs | 24 + ....Models.CheckAPIKeyResponse3.g.verified.cs | 24 + ....Models.CheckAPIKeyResponse4.g.verified.cs | 24 + ....Models.CheckAPIKeyResponse5.g.verified.cs | 24 + ....Models.CheckAPIKeyResponse6.g.verified.cs | 24 + ....Models.CheckAPIKeyResponse7.g.verified.cs | 24 + ....Models.CheckAPIKeyResponse8.g.verified.cs | 24 + ....Models.CheckAPIKeyResponse9.g.verified.cs | 24 + .../_#G.Models.Citation.g.verified.cs | 42 + .../_#G.Models.CitationEndEvent.g.verified.cs | 167 + ...els.CitationEndEventVariant2.g.verified.cs | 24 + ...#G.Models.CitationStartEvent.g.verified.cs | 167 + ...s.CitationStartEventVariant2.g.verified.cs | 30 + ...ationStartEventVariant2Delta.g.verified.cs | 24 + ...artEventVariant2DeltaMessage.g.verified.cs | 24 + ...G.Models.ClassifyDataMetrics.g.verified.cs | 24 + .../_#G.Models.ClassifyExample.g.verified.cs | 30 + .../_#G.Models.ClassifyRequest.g.verified.cs | 55 + ...dels.ClassifyRequestTruncate.g.verified.cs | 65 + .../_#G.Models.ClassifyResponse.g.verified.cs | 36 + ...#G.Models.ClassifyResponse10.g.verified.cs | 24 + ...#G.Models.ClassifyResponse11.g.verified.cs | 24 + ...#G.Models.ClassifyResponse12.g.verified.cs | 24 + ...#G.Models.ClassifyResponse13.g.verified.cs | 24 + ..._#G.Models.ClassifyResponse2.g.verified.cs | 24 + ..._#G.Models.ClassifyResponse3.g.verified.cs | 24 + ..._#G.Models.ClassifyResponse4.g.verified.cs | 24 + ..._#G.Models.ClassifyResponse5.g.verified.cs | 24 + ..._#G.Models.ClassifyResponse6.g.verified.cs | 24 + ..._#G.Models.ClassifyResponse7.g.verified.cs | 24 + ..._#G.Models.ClassifyResponse8.g.verified.cs | 24 + ..._#G.Models.ClassifyResponse9.g.verified.cs | 24 + ...assifyResponseClassification.g.verified.cs | 68 + ...sificationClassificationType.g.verified.cs | 55 + ...ResponseClassificationLabels.g.verified.cs | 19 + .../_#G.Models.Cluster.g.verified.cs | 48 + ...#G.Models.CompatibleEndpoint.g.verified.cs | 90 + .../_#G.Models.Connector.g.verified.cs | 99 + ...G.Models.ConnectorAuthStatus.g.verified.cs | 55 + .../_#G.Models.ConnectorLog.g.verified.cs | 72 + .../_#G.Models.ConnectorOAuth.g.verified.cs | 48 + .../_#G.Models.Content.g.verified.cs | 116 + ...dels.CreateClusterJobRequest.g.verified.cs | 57 + ...els.CreateClusterJobResponse.g.verified.cs | 24 + ....Models.CreateConnectorOAuth.g.verified.cs | 48 + ...odels.CreateConnectorRequest.g.verified.cs | 68 + ...dels.CreateConnectorResponse.g.verified.cs | 25 + ...ls.CreateConnectorResponse10.g.verified.cs | 24 + ...ls.CreateConnectorResponse11.g.verified.cs | 24 + ...ls.CreateConnectorResponse12.g.verified.cs | 24 + ...ls.CreateConnectorResponse13.g.verified.cs | 24 + ...els.CreateConnectorResponse2.g.verified.cs | 24 + ...els.CreateConnectorResponse3.g.verified.cs | 24 + ...els.CreateConnectorResponse4.g.verified.cs | 24 + ...els.CreateConnectorResponse5.g.verified.cs | 24 + ...els.CreateConnectorResponse6.g.verified.cs | 24 + ...els.CreateConnectorResponse7.g.verified.cs | 24 + ...els.CreateConnectorResponse8.g.verified.cs | 24 + ...els.CreateConnectorResponse9.g.verified.cs | 24 + ...s.CreateConnectorServiceAuth.g.verified.cs | 31 + ....Models.CreateDatasetRequest.g.verified.cs | 42 + ...Models.CreateDatasetResponse.g.verified.cs | 24 + ...dels.CreateDatasetResponse10.g.verified.cs | 24 + ...dels.CreateDatasetResponse11.g.verified.cs | 24 + ...dels.CreateDatasetResponse12.g.verified.cs | 24 + ...dels.CreateDatasetResponse13.g.verified.cs | 24 + ...odels.CreateDatasetResponse2.g.verified.cs | 24 + ...odels.CreateDatasetResponse3.g.verified.cs | 24 + ...odels.CreateDatasetResponse4.g.verified.cs | 24 + ...odels.CreateDatasetResponse5.g.verified.cs | 24 + ...odels.CreateDatasetResponse6.g.verified.cs | 24 + ...odels.CreateDatasetResponse7.g.verified.cs | 24 + ...odels.CreateDatasetResponse8.g.verified.cs | 24 + ...odels.CreateDatasetResponse9.g.verified.cs | 24 + ...Models.CreateEmbedJobRequest.g.verified.cs | 70 + ...reateEmbedJobRequestTruncate.g.verified.cs | 57 + ...odels.CreateEmbedJobResponse.g.verified.cs | 30 + ...els.CreateEmbedJobResponse10.g.verified.cs | 24 + ...els.CreateEmbedJobResponse11.g.verified.cs | 24 + ...els.CreateEmbedJobResponse12.g.verified.cs | 24 + ...els.CreateEmbedJobResponse13.g.verified.cs | 24 + ...dels.CreateEmbedJobResponse2.g.verified.cs | 24 + ...dels.CreateEmbedJobResponse3.g.verified.cs | 24 + ...dels.CreateEmbedJobResponse4.g.verified.cs | 24 + ...dels.CreateEmbedJobResponse5.g.verified.cs | 24 + ...dels.CreateEmbedJobResponse6.g.verified.cs | 24 + ...dels.CreateEmbedJobResponse7.g.verified.cs | 24 + ...dels.CreateEmbedJobResponse8.g.verified.cs | 24 + ...dels.CreateEmbedJobResponse9.g.verified.cs | 24 + ...CreateFinetunedModelResponse.g.verified.cs | 24 + .../_#G.Models.Dataset.g.verified.cs | 102 + .../_#G.Models.DatasetPart.g.verified.cs | 66 + .../_#G.Models.DatasetType.g.verified.cs | 97 + ...dels.DatasetValidationStatus.g.verified.cs | 83 + ...dels.DeleteConnectorResponse.g.verified.cs | 19 + ...ls.DeleteConnectorResponse10.g.verified.cs | 24 + ...ls.DeleteConnectorResponse11.g.verified.cs | 24 + ...ls.DeleteConnectorResponse12.g.verified.cs | 24 + ...ls.DeleteConnectorResponse13.g.verified.cs | 24 + ...els.DeleteConnectorResponse2.g.verified.cs | 24 + ...els.DeleteConnectorResponse3.g.verified.cs | 24 + ...els.DeleteConnectorResponse4.g.verified.cs | 24 + ...els.DeleteConnectorResponse5.g.verified.cs | 24 + ...els.DeleteConnectorResponse6.g.verified.cs | 24 + ...els.DeleteConnectorResponse7.g.verified.cs | 24 + ...els.DeleteConnectorResponse8.g.verified.cs | 24 + ...els.DeleteConnectorResponse9.g.verified.cs | 24 + ...Models.DeleteDatasetResponse.g.verified.cs | 19 + ...dels.DeleteDatasetResponse10.g.verified.cs | 24 + ...dels.DeleteDatasetResponse11.g.verified.cs | 24 + ...dels.DeleteDatasetResponse12.g.verified.cs | 24 + ...dels.DeleteDatasetResponse13.g.verified.cs | 24 + ...odels.DeleteDatasetResponse2.g.verified.cs | 24 + ...odels.DeleteDatasetResponse3.g.verified.cs | 24 + ...odels.DeleteDatasetResponse4.g.verified.cs | 24 + ...odels.DeleteDatasetResponse5.g.verified.cs | 24 + ...odels.DeleteDatasetResponse6.g.verified.cs | 24 + ...odels.DeleteDatasetResponse7.g.verified.cs | 24 + ...odels.DeleteDatasetResponse8.g.verified.cs | 24 + ...odels.DeleteDatasetResponse9.g.verified.cs | 24 + ...DeleteFinetunedModelResponse.g.verified.cs | 19 + ..._#G.Models.DetokenizeRequest.g.verified.cs | 30 + ...#G.Models.DetokenizeResponse.g.verified.cs | 30 + ....Models.DetokenizeResponse10.g.verified.cs | 24 + ....Models.DetokenizeResponse11.g.verified.cs | 24 + ....Models.DetokenizeResponse12.g.verified.cs | 24 + ....Models.DetokenizeResponse13.g.verified.cs | 24 + ...G.Models.DetokenizeResponse2.g.verified.cs | 24 + ...G.Models.DetokenizeResponse3.g.verified.cs | 24 + ...G.Models.DetokenizeResponse4.g.verified.cs | 24 + ...G.Models.DetokenizeResponse5.g.verified.cs | 24 + ...G.Models.DetokenizeResponse6.g.verified.cs | 24 + ...G.Models.DetokenizeResponse7.g.verified.cs | 24 + ...G.Models.DetokenizeResponse8.g.verified.cs | 24 + ...G.Models.DetokenizeResponse9.g.verified.cs | 24 + .../_#G.Models.DocumentSource.g.verified.cs | 30 + ...odels.DocumentSourceDocument.g.verified.cs | 19 + ...G.Models.EmbedByTypeResponse.g.verified.cs | 48 + ...mbedByTypeResponseEmbeddings.g.verified.cs | 48 + ...edByTypeResponseResponseType.g.verified.cs | 55 + ...G.Models.EmbedFloatsResponse.g.verified.cs | 48 + ...edFloatsResponseResponseType.g.verified.cs | 55 + .../_#G.Models.EmbedInputType.g.verified.cs | 73 + .../_#G.Models.EmbedJob.g.verified.cs | 72 + .../_#G.Models.EmbedJobStatus.g.verified.cs | 76 + .../_#G.Models.EmbedJobTruncate.g.verified.cs | 55 + .../_#G.Models.EmbedRequest.g.verified.cs | 69 + ....Models.EmbedRequestTruncate.g.verified.cs | 65 + .../_#G.Models.EmbedResponse10.g.verified.cs | 24 + .../_#G.Models.EmbedResponse11.g.verified.cs | 24 + .../_#G.Models.EmbedResponse12.g.verified.cs | 24 + .../_#G.Models.EmbedResponse13.g.verified.cs | 24 + .../_#G.Models.EmbedResponse2.g.verified.cs | 24 + .../_#G.Models.EmbedResponse3.g.verified.cs | 24 + .../_#G.Models.EmbedResponse4.g.verified.cs | 24 + .../_#G.Models.EmbedResponse5.g.verified.cs | 24 + .../_#G.Models.EmbedResponse6.g.verified.cs | 24 + .../_#G.Models.EmbedResponse7.g.verified.cs | 24 + .../_#G.Models.EmbedResponse8.g.verified.cs | 24 + .../_#G.Models.EmbedResponse9.g.verified.cs | 24 + .../_#G.Models.EmbeddingType.g.verified.cs | 76 + .../_#G.Models.Error.g.verified.cs | 24 + .../_#G.Models.Event.g.verified.cs | 46 + ...odels.FinetuneDatasetMetrics.g.verified.cs | 72 + .../_#G.Models.FinetunedModel.g.verified.cs | 88 + .../_#G.Models.FinishReason.g.verified.cs | 90 + .../_#G.Models.GenerateRequest.g.verified.cs | 148 + ...rateRequestReturnLikelihoods.g.verified.cs | 65 + ...dels.GenerateRequestTruncate.g.verified.cs | 65 + .../_#G.Models.GenerateResponse.g.verified.cs | 24 + ...#G.Models.GenerateResponse10.g.verified.cs | 24 + ...#G.Models.GenerateResponse11.g.verified.cs | 24 + ...#G.Models.GenerateResponse12.g.verified.cs | 24 + ..._#G.Models.GenerateResponse2.g.verified.cs | 24 + ..._#G.Models.GenerateResponse3.g.verified.cs | 24 + ..._#G.Models.GenerateResponse4.g.verified.cs | 24 + ..._#G.Models.GenerateResponse5.g.verified.cs | 24 + ..._#G.Models.GenerateResponse6.g.verified.cs | 24 + ..._#G.Models.GenerateResponse7.g.verified.cs | 24 + ..._#G.Models.GenerateResponse8.g.verified.cs | 24 + ..._#G.Models.GenerateResponse9.g.verified.cs | 24 + ..._#G.Models.GenerateStreamEnd.g.verified.cs | 167 + ...ls.GenerateStreamEndVariant2.g.verified.cs | 36 + ...ateStreamEndVariant2Response.g.verified.cs | 36 + ...G.Models.GenerateStreamError.g.verified.cs | 167 + ....GenerateStreamErrorVariant2.g.verified.cs | 42 + ...G.Models.GenerateStreamEvent.g.verified.cs | 24 + ...GenerateStreamEventEventType.g.verified.cs | 62 + ...#G.Models.GenerateStreamText.g.verified.cs | 167 + ...s.GenerateStreamTextVariant2.g.verified.cs | 36 + ...els.GenerateStreamedResponse.g.verified.cs | 208 + .../_#G.Models.Generation.g.verified.cs | 42 + ...Models.GetClusterJobResponse.g.verified.cs | 102 + ....GetClusterJobResponseStatus.g.verified.cs | 76 + ....Models.GetConnectorResponse.g.verified.cs | 25 + ...odels.GetConnectorResponse10.g.verified.cs | 24 + ...odels.GetConnectorResponse11.g.verified.cs | 24 + ...odels.GetConnectorResponse12.g.verified.cs | 24 + ...odels.GetConnectorResponse13.g.verified.cs | 24 + ...Models.GetConnectorResponse2.g.verified.cs | 24 + ...Models.GetConnectorResponse3.g.verified.cs | 24 + ...Models.GetConnectorResponse4.g.verified.cs | 24 + ...Models.GetConnectorResponse5.g.verified.cs | 24 + ...Models.GetConnectorResponse6.g.verified.cs | 24 + ...Models.GetConnectorResponse7.g.verified.cs | 24 + ...Models.GetConnectorResponse8.g.verified.cs | 24 + ...Models.GetConnectorResponse9.g.verified.cs | 24 + ...ls.GetConnectorsLogsResponse.g.verified.cs | 30 + ...#G.Models.GetDatasetResponse.g.verified.cs | 24 + ....Models.GetDatasetResponse10.g.verified.cs | 24 + ....Models.GetDatasetResponse11.g.verified.cs | 24 + ....Models.GetDatasetResponse12.g.verified.cs | 24 + ....Models.GetDatasetResponse13.g.verified.cs | 24 + ...G.Models.GetDatasetResponse2.g.verified.cs | 24 + ...G.Models.GetDatasetResponse3.g.verified.cs | 24 + ...G.Models.GetDatasetResponse4.g.verified.cs | 24 + ...G.Models.GetDatasetResponse5.g.verified.cs | 24 + ...G.Models.GetDatasetResponse6.g.verified.cs | 24 + ...G.Models.GetDatasetResponse7.g.verified.cs | 24 + ...G.Models.GetDatasetResponse8.g.verified.cs | 24 + ...G.Models.GetDatasetResponse9.g.verified.cs | 24 + ...dels.GetDatasetUsageResponse.g.verified.cs | 24 + ...ls.GetDatasetUsageResponse10.g.verified.cs | 24 + ...ls.GetDatasetUsageResponse11.g.verified.cs | 24 + ...ls.GetDatasetUsageResponse12.g.verified.cs | 24 + ...ls.GetDatasetUsageResponse13.g.verified.cs | 24 + ...els.GetDatasetUsageResponse2.g.verified.cs | 24 + ...els.GetDatasetUsageResponse3.g.verified.cs | 24 + ...els.GetDatasetUsageResponse4.g.verified.cs | 24 + ...els.GetDatasetUsageResponse5.g.verified.cs | 24 + ...els.GetDatasetUsageResponse6.g.verified.cs | 24 + ...els.GetDatasetUsageResponse7.g.verified.cs | 24 + ...els.GetDatasetUsageResponse8.g.verified.cs | 24 + ...els.GetDatasetUsageResponse9.g.verified.cs | 24 + ...G.Models.GetEmbedJobResponse.g.verified.cs | 24 + ...Models.GetEmbedJobResponse10.g.verified.cs | 24 + ...Models.GetEmbedJobResponse11.g.verified.cs | 24 + ...Models.GetEmbedJobResponse12.g.verified.cs | 24 + ....Models.GetEmbedJobResponse2.g.verified.cs | 24 + ....Models.GetEmbedJobResponse3.g.verified.cs | 24 + ....Models.GetEmbedJobResponse4.g.verified.cs | 24 + ....Models.GetEmbedJobResponse5.g.verified.cs | 24 + ....Models.GetEmbedJobResponse6.g.verified.cs | 24 + ....Models.GetEmbedJobResponse7.g.verified.cs | 24 + ....Models.GetEmbedJobResponse8.g.verified.cs | 24 + ....Models.GetEmbedJobResponse9.g.verified.cs | 24 + ...ls.GetFinetunedModelResponse.g.verified.cs | 24 + .../_#G.Models.GetModelResponse.g.verified.cs | 54 + ...#G.Models.GetModelResponse10.g.verified.cs | 24 + ...#G.Models.GetModelResponse11.g.verified.cs | 24 + ...#G.Models.GetModelResponse12.g.verified.cs | 24 + ...#G.Models.GetModelResponse13.g.verified.cs | 24 + ..._#G.Models.GetModelResponse2.g.verified.cs | 24 + ..._#G.Models.GetModelResponse3.g.verified.cs | 24 + ..._#G.Models.GetModelResponse4.g.verified.cs | 24 + ..._#G.Models.GetModelResponse5.g.verified.cs | 24 + ..._#G.Models.GetModelResponse6.g.verified.cs | 24 + ..._#G.Models.GetModelResponse7.g.verified.cs | 24 + ..._#G.Models.GetModelResponse8.g.verified.cs | 24 + ..._#G.Models.GetModelResponse9.g.verified.cs | 24 + .../_#G.Models.Hyperparameters.g.verified.cs | 50 + ...#G.Models.JSONResponseFormat.g.verified.cs | 43 + ...G.Models.JSONResponseFormat2.g.verified.cs | 43 + ...SONResponseFormat2JsonSchema.g.verified.cs | 31 + ...els.JSONResponseFormatSchema.g.verified.cs | 31 + .../_#G.Models.LabelMetric.g.verified.cs | 36 + ...dels.ListClusterJobsResponse.g.verified.cs | 36 + ...odels.ListConnectorsResponse.g.verified.cs | 30 + ...els.ListConnectorsResponse10.g.verified.cs | 24 + ...els.ListConnectorsResponse11.g.verified.cs | 24 + ...els.ListConnectorsResponse12.g.verified.cs | 24 + ...els.ListConnectorsResponse13.g.verified.cs | 24 + ...dels.ListConnectorsResponse2.g.verified.cs | 24 + ...dels.ListConnectorsResponse3.g.verified.cs | 24 + ...dels.ListConnectorsResponse4.g.verified.cs | 24 + ...dels.ListConnectorsResponse5.g.verified.cs | 24 + ...dels.ListConnectorsResponse6.g.verified.cs | 24 + ...dels.ListConnectorsResponse7.g.verified.cs | 24 + ...dels.ListConnectorsResponse8.g.verified.cs | 24 + ...dels.ListConnectorsResponse9.g.verified.cs | 24 + ....Models.ListDatasetsResponse.g.verified.cs | 24 + ...odels.ListDatasetsResponse10.g.verified.cs | 24 + ...odels.ListDatasetsResponse11.g.verified.cs | 24 + ...odels.ListDatasetsResponse12.g.verified.cs | 24 + ...odels.ListDatasetsResponse13.g.verified.cs | 24 + ...Models.ListDatasetsResponse2.g.verified.cs | 24 + ...Models.ListDatasetsResponse3.g.verified.cs | 24 + ...Models.ListDatasetsResponse4.g.verified.cs | 24 + ...Models.ListDatasetsResponse5.g.verified.cs | 24 + ...Models.ListDatasetsResponse6.g.verified.cs | 24 + ...Models.ListDatasetsResponse7.g.verified.cs | 24 + ...Models.ListDatasetsResponse8.g.verified.cs | 24 + ...Models.ListDatasetsResponse9.g.verified.cs | 24 + ....Models.ListEmbedJobResponse.g.verified.cs | 24 + ...Models.ListEmbedJobsResponse.g.verified.cs | 24 + ...dels.ListEmbedJobsResponse10.g.verified.cs | 24 + ...dels.ListEmbedJobsResponse11.g.verified.cs | 24 + ...dels.ListEmbedJobsResponse12.g.verified.cs | 24 + ...odels.ListEmbedJobsResponse2.g.verified.cs | 24 + ...odels.ListEmbedJobsResponse3.g.verified.cs | 24 + ...odels.ListEmbedJobsResponse4.g.verified.cs | 24 + ...odels.ListEmbedJobsResponse5.g.verified.cs | 24 + ...odels.ListEmbedJobsResponse6.g.verified.cs | 24 + ...odels.ListEmbedJobsResponse7.g.verified.cs | 24 + ...odels.ListEmbedJobsResponse8.g.verified.cs | 24 + ...odels.ListEmbedJobsResponse9.g.verified.cs | 24 + ...#G.Models.ListEventsResponse.g.verified.cs | 37 + ....ListFinetunedModelsResponse.g.verified.cs | 37 + ...#G.Models.ListModelsResponse.g.verified.cs | 30 + ....Models.ListModelsResponse10.g.verified.cs | 24 + ....Models.ListModelsResponse11.g.verified.cs | 24 + ....Models.ListModelsResponse12.g.verified.cs | 24 + ....Models.ListModelsResponse13.g.verified.cs | 24 + ...G.Models.ListModelsResponse2.g.verified.cs | 24 + ...G.Models.ListModelsResponse3.g.verified.cs | 24 + ...G.Models.ListModelsResponse4.g.verified.cs | 24 + ...G.Models.ListModelsResponse5.g.verified.cs | 24 + ...G.Models.ListModelsResponse6.g.verified.cs | 24 + ...G.Models.ListModelsResponse7.g.verified.cs | 24 + ...G.Models.ListModelsResponse8.g.verified.cs | 24 + ...G.Models.ListModelsResponse9.g.verified.cs | 24 + ...tTrainingStepMetricsResponse.g.verified.cs | 31 + ...Models.LogLikelihoodResponse.g.verified.cs | 48 + .../_#G.Models.Message.g.verified.cs | 167 + .../_#G.Models.Metrics.g.verified.cs | 24 + ...dels.NonStreamedChatResponse.g.verified.cs | 84 + ...els.NonStreamedChatResponse2.g.verified.cs | 42 + ...thAuthorizeConnectorResponse.g.verified.cs | 24 + ...AuthorizeConnectorResponse10.g.verified.cs | 24 + ...AuthorizeConnectorResponse11.g.verified.cs | 24 + ...AuthorizeConnectorResponse12.g.verified.cs | 24 + ...hAuthorizeConnectorResponse2.g.verified.cs | 24 + ...hAuthorizeConnectorResponse3.g.verified.cs | 24 + ...hAuthorizeConnectorResponse4.g.verified.cs | 24 + ...hAuthorizeConnectorResponse5.g.verified.cs | 24 + ...hAuthorizeConnectorResponse6.g.verified.cs | 24 + ...hAuthorizeConnectorResponse7.g.verified.cs | 24 + ...hAuthorizeConnectorResponse8.g.verified.cs | 24 + ...hAuthorizeConnectorResponse9.g.verified.cs | 24 + ...odels.OAuthAuthorizeResponse.g.verified.cs | 24 + .../_#G.Models.ParseInfo.g.verified.cs | 30 + .../_#G.Models.RerankDocument.g.verified.cs | 24 + .../_#G.Models.RerankRequest.g.verified.cs | 68 + .../_#G.Models.RerankResponse.g.verified.cs | 36 + .../_#G.Models.RerankResponse10.g.verified.cs | 24 + .../_#G.Models.RerankResponse11.g.verified.cs | 24 + .../_#G.Models.RerankResponse12.g.verified.cs | 24 + .../_#G.Models.RerankResponse13.g.verified.cs | 24 + .../_#G.Models.RerankResponse2.g.verified.cs | 24 + .../_#G.Models.RerankResponse3.g.verified.cs | 24 + .../_#G.Models.RerankResponse4.g.verified.cs | 24 + .../_#G.Models.RerankResponse5.g.verified.cs | 24 + .../_#G.Models.RerankResponse6.g.verified.cs | 24 + .../_#G.Models.RerankResponse7.g.verified.cs | 24 + .../_#G.Models.RerankResponse8.g.verified.cs | 24 + .../_#G.Models.RerankResponse9.g.verified.cs | 24 + ....Models.RerankResponseResult.g.verified.cs | 36 + ...RerankResponseResultDocument.g.verified.cs | 24 + ...G.Models.RerankerDataMetrics.g.verified.cs | 54 + .../_#G.Models.ResponseFormat.g.verified.cs | 171 + .../_#G.Models.ResponseFormat2.g.verified.cs | 171 + ...#G.Models.ResponseFormatType.g.verified.cs | 56 + .../_#G.Models.Settings.g.verified.cs | 48 + .../_#G.Models.SingleGeneration.g.verified.cs | 48 + ...els.SingleGenerationInStream.g.verified.cs | 42 + ...gleGenerationTokenLikelihood.g.verified.cs | 30 + .../_#G.Models.Source.g.verified.cs | 167 + .../_#G.Models.Status.g.verified.cs | 114 + .../_#G.Models.Strategy.g.verified.cs | 66 + ....Models.StreamedChatResponse.g.verified.cs | 413 + ...Models.StreamedChatResponse2.g.verified.cs | 454 + .../_#G.Models.SummarizeRequest.g.verified.cs | 64 + ...mmarizeRequestExtractiveness.g.verified.cs | 63 + ...odels.SummarizeRequestFormat.g.verified.cs | 56 + ...odels.SummarizeRequestLength.g.verified.cs | 63 + ..._#G.Models.SummarizeResponse.g.verified.cs | 36 + ...G.Models.SummarizeResponse10.g.verified.cs | 24 + ...G.Models.SummarizeResponse11.g.verified.cs | 24 + ...G.Models.SummarizeResponse12.g.verified.cs | 24 + ...G.Models.SummarizeResponse13.g.verified.cs | 24 + ...#G.Models.SummarizeResponse2.g.verified.cs | 24 + ...#G.Models.SummarizeResponse3.g.verified.cs | 24 + ...#G.Models.SummarizeResponse4.g.verified.cs | 24 + ...#G.Models.SummarizeResponse5.g.verified.cs | 24 + ...#G.Models.SummarizeResponse6.g.verified.cs | 24 + ...#G.Models.SummarizeResponse7.g.verified.cs | 24 + ...#G.Models.SummarizeResponse8.g.verified.cs | 24 + ...#G.Models.SummarizeResponse9.g.verified.cs | 24 + .../_#G.Models.SystemMessage.g.verified.cs | 32 + ..._#G.Models.SystemMessageRole.g.verified.cs | 48 + .../_#G.Models.TextContent.g.verified.cs | 30 + .../_#G.Models.TextContentType.g.verified.cs | 48 + ...#G.Models.TextResponseFormat.g.verified.cs | 25 + .../_#G.Models.TokenLikelihood.g.verified.cs | 36 + .../_#G.Models.TokenizeRequest.g.verified.cs | 30 + .../_#G.Models.TokenizeResponse.g.verified.cs | 36 + ...#G.Models.TokenizeResponse10.g.verified.cs | 24 + ...#G.Models.TokenizeResponse11.g.verified.cs | 24 + ...#G.Models.TokenizeResponse12.g.verified.cs | 24 + ...#G.Models.TokenizeResponse13.g.verified.cs | 24 + ..._#G.Models.TokenizeResponse2.g.verified.cs | 24 + ..._#G.Models.TokenizeResponse3.g.verified.cs | 24 + ..._#G.Models.TokenizeResponse4.g.verified.cs | 24 + ..._#G.Models.TokenizeResponse5.g.verified.cs | 24 + ..._#G.Models.TokenizeResponse6.g.verified.cs | 24 + ..._#G.Models.TokenizeResponse7.g.verified.cs | 24 + ..._#G.Models.TokenizeResponse8.g.verified.cs | 24 + ..._#G.Models.TokenizeResponse9.g.verified.cs | 24 + .../_#G.Models.Tool.g.verified.cs | 45 + .../_#G.Models.Tool2.g.verified.cs | 30 + .../_#G.Models.Tool2Function.g.verified.cs | 36 + ...dels.Tool2FunctionParameters.g.verified.cs | 19 + .../_#G.Models.Tool2Type.g.verified.cs | 48 + .../_#G.Models.ToolCall.g.verified.cs | 30 + .../_#G.Models.ToolCall2.g.verified.cs | 36 + ..._#G.Models.ToolCall2Function.g.verified.cs | 30 + .../_#G.Models.ToolCall2Type.g.verified.cs | 48 + .../_#G.Models.ToolCallDelta.g.verified.cs | 42 + ...#G.Models.ToolCallParameters.g.verified.cs | 19 + .../_#G.Models.ToolContent.g.verified.cs | 30 + ..._#G.Models.ToolContentOutput.g.verified.cs | 19 + .../_#G.Models.ToolContentType.g.verified.cs | 48 + .../_#G.Models.ToolMessage.g.verified.cs | 30 + .../_#G.Models.ToolMessage2.g.verified.cs | 38 + .../_#G.Models.ToolMessage2Role.g.verified.cs | 48 + ...els.ToolParameterDefinitions.g.verified.cs | 28 + .../_#G.Models.ToolResult.g.verified.cs | 30 + .../_#G.Models.ToolResultOutput.g.verified.cs | 19 + .../_#G.Models.ToolSource.g.verified.cs | 30 + ....Models.ToolSourceToolOutput.g.verified.cs | 19 + ...G.Models.TrainingStepMetrics.g.verified.cs | 36 + ...s.TrainingStepMetricsMetrics.g.verified.cs | 19 + ...dels.UpdateClusterJobRequest.g.verified.cs | 60 + ...bRequestInputTrackingMetrics.g.verified.cs | 19 + ...RequestOutputTrackingMetrics.g.verified.cs | 19 + ...pdateClusterJobRequestStatus.g.verified.cs | 76 + ...els.UpdateClusterJobResponse.g.verified.cs | 24 + ...odels.UpdateConnectorRequest.g.verified.cs | 60 + ...dels.UpdateConnectorResponse.g.verified.cs | 25 + ...ls.UpdateConnectorResponse10.g.verified.cs | 24 + ...ls.UpdateConnectorResponse11.g.verified.cs | 24 + ...ls.UpdateConnectorResponse12.g.verified.cs | 24 + ...ls.UpdateConnectorResponse13.g.verified.cs | 24 + ...els.UpdateConnectorResponse2.g.verified.cs | 24 + ...els.UpdateConnectorResponse3.g.verified.cs | 24 + ...els.UpdateConnectorResponse4.g.verified.cs | 24 + ...els.UpdateConnectorResponse5.g.verified.cs | 24 + ...els.UpdateConnectorResponse6.g.verified.cs | 24 + ...els.UpdateConnectorResponse7.g.verified.cs | 24 + ...els.UpdateConnectorResponse8.g.verified.cs | 24 + ...els.UpdateConnectorResponse9.g.verified.cs | 24 + ....UpdateFinetunedModelRequest.g.verified.cs | 82 + ...UpdateFinetunedModelResponse.g.verified.cs | 24 + .../_#G.Models.Usage.g.verified.cs | 30 + .../_#G.Models.UsageBilledUnits.g.verified.cs | 42 + .../_#G.Models.UsageTokens.g.verified.cs | 30 + .../_#G.Models.UserMessage.g.verified.cs | 39 + .../_#G.Models.UserMessageRole.g.verified.cs | 48 + .../_#G.Models.WandbConfig.g.verified.cs | 36 + .../_#G.ModelsClient.GetModel.g.verified.cs | 99 + .../_#G.ModelsClient.ListModels.g.verified.cs | 122 + .../_#G.ModelsClient.g.verified.cs | 60 + .../_#G.Polyfills.g.verified.cs | 54 + .../NewtonsoftJson/_#OneOf.1.g.verified.cs | 115 + .../NewtonsoftJson/_#OneOf.2.g.verified.cs | 166 + .../Tests.Cohere_Diagnostics.verified.txt | 1 + ...#G.Api.Authorizations.Bearer.g.verified.cs | 23 + .../SystemTextJson/_#G.Api.Chat.g.verified.cs | 332 + .../_#G.Api.Chatv2.g.verified.cs | 200 + .../_#G.Api.CheckAPIKey.g.verified.cs | 91 + .../_#G.Api.Classify.g.verified.cs | 160 + .../_#G.Api.Constructors.Bearer.g.verified.cs | 18 + .../_#G.Api.Detokenize.g.verified.cs | 136 + .../_#G.Api.Embed.g.verified.cs | 176 + .../_#G.Api.Generate.g.verified.cs | 245 + .../_#G.Api.Rerank.g.verified.cs | 167 + .../_#G.Api.Summarize.g.verified.cs | 171 + .../_#G.Api.Tokenize.g.verified.cs | 136 + .../SystemTextJson/_#G.Api.g.verified.cs | 224 + ...ectorsClient.CreateConnector.g.verified.cs | 164 + ...ectorsClient.DeleteConnector.g.verified.cs | 97 + ...onnectorsClient.GetConnector.g.verified.cs | 97 + ...nectorsClient.ListConnectors.g.verified.cs | 107 + ...ient.OAuthAuthorizeConnector.g.verified.cs | 103 + ...ectorsClient.UpdateConnector.g.verified.cs | 166 + .../_#G.ConnectorsClient.g.verified.cs | 61 + ...DatasetsClient.CreateDataset.g.verified.cs | 290 + ...DatasetsClient.DeleteDataset.g.verified.cs | 97 + ...#G.DatasetsClient.GetDataset.g.verified.cs | 97 + ...tasetsClient.GetDatasetUsage.g.verified.cs | 91 + ....DatasetsClient.ListDatasets.g.verified.cs | 129 + .../_#G.DatasetsClient.g.verified.cs | 61 + ...bedJobsClient.CancelEmbedJob.g.verified.cs | 97 + ...bedJobsClient.CreateEmbedJob.g.verified.cs | 172 + ....EmbedJobsClient.GetEmbedJob.g.verified.cs | 97 + ...mbedJobsClient.ListEmbedJobs.g.verified.cs | 91 + .../_#G.EmbedJobsClient.g.verified.cs | 61 + ...gClient.CreateFinetunedModel.g.verified.cs | 184 + ...gClient.DeleteFinetunedModel.g.verified.cs | 96 + ...ningClient.GetFinetunedModel.g.verified.cs | 96 + ....FinetuningClient.ListEvents.g.verified.cs | 114 + ...ngClient.ListFinetunedModels.g.verified.cs | 108 + ...ient.ListTrainingStepMetrics.g.verified.cs | 108 + ...gClient.UpdateFinetunedModel.g.verified.cs | 188 + .../_#G.FinetuningClient.g.verified.cs | 61 + .../_#G.Models.ApiMeta.g.verified.cs | 42 + ..._#G.Models.ApiMetaApiVersion.g.verified.cs | 37 + ...#G.Models.ApiMetaBilledUnits.g.verified.cs | 42 + .../_#G.Models.ApiMetaTokens.g.verified.cs | 30 + .../_#G.Models.AssistantMessage.g.verified.cs | 52 + ...els.AssistantMessageResponse.g.verified.cs | 51 + ...AssistantMessageResponseRole.g.verified.cs | 46 + ....Models.AssistantMessageRole.g.verified.cs | 46 + .../_#G.Models.AuthTokenType.g.verified.cs | 59 + .../_#G.Models.BaseModel.g.verified.cs | 55 + .../_#G.Models.BaseType.g.verified.cs | 76 + ...odels.CancelEmbedJobResponse.g.verified.cs | 24 + ...els.CancelEmbedJobResponse10.g.verified.cs | 24 + ...els.CancelEmbedJobResponse11.g.verified.cs | 24 + ...els.CancelEmbedJobResponse12.g.verified.cs | 24 + ...dels.CancelEmbedJobResponse2.g.verified.cs | 24 + ...dels.CancelEmbedJobResponse3.g.verified.cs | 24 + ...dels.CancelEmbedJobResponse4.g.verified.cs | 24 + ...dels.CancelEmbedJobResponse5.g.verified.cs | 24 + ...dels.CancelEmbedJobResponse6.g.verified.cs | 24 + ...dels.CancelEmbedJobResponse7.g.verified.cs | 24 + ...dels.CancelEmbedJobResponse8.g.verified.cs | 24 + ...dels.CancelEmbedJobResponse9.g.verified.cs | 24 + .../_#G.Models.ChatCitation.g.verified.cs | 46 + ....ChatCitationGenerationEvent.g.verified.cs | 167 + ...ationGenerationEventVariant2.g.verified.cs | 25 + .../_#G.Models.ChatConnector.g.verified.cs | 45 + ....Models.ChatConnectorOptions.g.verified.cs | 20 + ...Models.ChatContentDeltaEvent.g.verified.cs | 167 + ...hatContentDeltaEventVariant2.g.verified.cs | 30 + ...ntentDeltaEventVariant2Delta.g.verified.cs | 24 + ...ltaEventVariant2DeltaMessage.g.verified.cs | 24 + ...tVariant2DeltaMessageContent.g.verified.cs | 24 + ...G.Models.ChatContentEndEvent.g.verified.cs | 167 + ....ChatContentEndEventVariant2.g.verified.cs | 24 + ...Models.ChatContentStartEvent.g.verified.cs | 167 + ...hatContentStartEventVariant2.g.verified.cs | 30 + ...ntentStartEventVariant2Delta.g.verified.cs | 24 + ...artEventVariant2DeltaMessage.g.verified.cs | 24 + ...tVariant2DeltaMessageContent.g.verified.cs | 31 + ...iant2DeltaMessageContentType.g.verified.cs | 46 + .../_#G.Models.ChatDataMetrics.g.verified.cs | 36 + .../_#G.Models.ChatDocument.g.verified.cs | 27 + .../_#G.Models.ChatFinishReason.g.verified.cs | 82 + .../_#G.Models.ChatMessage.g.verified.cs | 40 + .../_#G.Models.ChatMessage2.g.verified.cs | 249 + ...G.Models.ChatMessageEndEvent.g.verified.cs | 167 + ....ChatMessageEndEventVariant2.g.verified.cs | 30 + ...MessageEndEventVariant2Delta.g.verified.cs | 31 + ...Models.ChatMessageStartEvent.g.verified.cs | 167 + ...hatMessageStartEventVariant2.g.verified.cs | 30 + ...ssageStartEventVariant2Delta.g.verified.cs | 24 + ...artEventVariant2DeltaMessage.g.verified.cs | 25 + ...ventVariant2DeltaMessageRole.g.verified.cs | 46 + .../_#G.Models.ChatRequest.g.verified.cs | 250 + ...s.ChatRequestCitationQuality.g.verified.cs | 60 + ....ChatRequestPromptTruncation.g.verified.cs | 63 + .../_#G.Models.ChatResponse10.g.verified.cs | 24 + .../_#G.Models.ChatResponse11.g.verified.cs | 24 + .../_#G.Models.ChatResponse12.g.verified.cs | 24 + .../_#G.Models.ChatResponse13.g.verified.cs | 24 + .../_#G.Models.ChatResponse2.g.verified.cs | 24 + .../_#G.Models.ChatResponse3.g.verified.cs | 24 + .../_#G.Models.ChatResponse4.g.verified.cs | 24 + .../_#G.Models.ChatResponse5.g.verified.cs | 24 + .../_#G.Models.ChatResponse6.g.verified.cs | 24 + .../_#G.Models.ChatResponse7.g.verified.cs | 24 + .../_#G.Models.ChatResponse8.g.verified.cs | 24 + .../_#G.Models.ChatResponse9.g.verified.cs | 24 + .../_#G.Models.ChatRole.g.verified.cs | 64 + ...SearchQueriesGenerationEvent.g.verified.cs | 167 + ...eriesGenerationEventVariant2.g.verified.cs | 25 + .../_#G.Models.ChatSearchQuery.g.verified.cs | 32 + .../_#G.Models.ChatSearchResult.g.verified.cs | 50 + ...ls.ChatSearchResultConnector.g.verified.cs | 25 + ...odels.ChatSearchResultsEvent.g.verified.cs | 167 + ...atSearchResultsEventVariant2.g.verified.cs | 30 + ...#G.Models.ChatStreamEndEvent.g.verified.cs | 167 + ...s.ChatStreamEndEventVariant2.g.verified.cs | 37 + ...EndEventVariant2FinishReason.g.verified.cs | 74 + .../_#G.Models.ChatStreamEvent.g.verified.cs | 26 + ...els.ChatStreamEventEventType.g.verified.cs | 76 + ...G.Models.ChatStreamEventType.g.verified.cs | 26 + ...dels.ChatStreamEventTypeType.g.verified.cs | 106 + ....Models.ChatStreamStartEvent.g.verified.cs | 167 + ...ChatStreamStartEventVariant2.g.verified.cs | 25 + ...dels.ChatTextGenerationEvent.g.verified.cs | 167 + ...tTextGenerationEventVariant2.g.verified.cs | 25 + ...odels.ChatToolCallDeltaEvent.g.verified.cs | 167 + ...atToolCallDeltaEventVariant2.g.verified.cs | 30 + ...lCallDeltaEventVariant2Delta.g.verified.cs | 24 + ...taEventVariant2DeltaToolCall.g.verified.cs | 24 + ...ariant2DeltaToolCallFunction.g.verified.cs | 24 + ....Models.ChatToolCallEndEvent.g.verified.cs | 167 + ...ChatToolCallEndEventVariant2.g.verified.cs | 24 + ...odels.ChatToolCallStartEvent.g.verified.cs | 167 + ...atToolCallStartEventVariant2.g.verified.cs | 30 + ...lCallStartEventVariant2Delta.g.verified.cs | 24 + ...rtEventVariant2DeltaToolCall.g.verified.cs | 37 + ...ariant2DeltaToolCallFunction.g.verified.cs | 30 + ...entVariant2DeltaToolCallType.g.verified.cs | 46 + ...dels.ChatToolCallsChunkEvent.g.verified.cs | 167 + ...tToolCallsChunkEventVariant2.g.verified.cs | 25 + ...ChatToolCallsGenerationEvent.g.verified.cs | 167 + ...CallsGenerationEventVariant2.g.verified.cs | 31 + ...odels.ChatToolPlanDeltaEvent.g.verified.cs | 167 + ...atToolPlanDeltaEventVariant2.g.verified.cs | 24 + ...lPlanDeltaEventVariant2Delta.g.verified.cs | 24 + .../_#G.Models.Chatv2Request.g.verified.cs | 118 + ...ls.Chatv2RequestCitationMode.g.verified.cs | 59 + .../_#G.Models.Chatv2Response10.g.verified.cs | 24 + .../_#G.Models.Chatv2Response11.g.verified.cs | 24 + .../_#G.Models.Chatv2Response12.g.verified.cs | 24 + .../_#G.Models.Chatv2Response13.g.verified.cs | 24 + .../_#G.Models.Chatv2Response2.g.verified.cs | 24 + .../_#G.Models.Chatv2Response3.g.verified.cs | 24 + .../_#G.Models.Chatv2Response4.g.verified.cs | 24 + .../_#G.Models.Chatv2Response5.g.verified.cs | 24 + .../_#G.Models.Chatv2Response6.g.verified.cs | 24 + .../_#G.Models.Chatv2Response7.g.verified.cs | 24 + .../_#G.Models.Chatv2Response8.g.verified.cs | 24 + .../_#G.Models.Chatv2Response9.g.verified.cs | 24 + ...G.Models.CheckAPIKeyResponse.g.verified.cs | 37 + ...Models.CheckAPIKeyResponse10.g.verified.cs | 24 + ...Models.CheckAPIKeyResponse11.g.verified.cs | 24 + ...Models.CheckAPIKeyResponse12.g.verified.cs | 24 + ...Models.CheckAPIKeyResponse13.g.verified.cs | 24 + ....Models.CheckAPIKeyResponse2.g.verified.cs | 24 + ....Models.CheckAPIKeyResponse3.g.verified.cs | 24 + ....Models.CheckAPIKeyResponse4.g.verified.cs | 24 + ....Models.CheckAPIKeyResponse5.g.verified.cs | 24 + ....Models.CheckAPIKeyResponse6.g.verified.cs | 24 + ....Models.CheckAPIKeyResponse7.g.verified.cs | 24 + ....Models.CheckAPIKeyResponse8.g.verified.cs | 24 + ....Models.CheckAPIKeyResponse9.g.verified.cs | 24 + .../_#G.Models.Citation.g.verified.cs | 42 + .../_#G.Models.CitationEndEvent.g.verified.cs | 167 + ...els.CitationEndEventVariant2.g.verified.cs | 24 + ...#G.Models.CitationStartEvent.g.verified.cs | 167 + ...s.CitationStartEventVariant2.g.verified.cs | 30 + ...ationStartEventVariant2Delta.g.verified.cs | 24 + ...artEventVariant2DeltaMessage.g.verified.cs | 24 + ...G.Models.ClassifyDataMetrics.g.verified.cs | 24 + .../_#G.Models.ClassifyExample.g.verified.cs | 30 + .../_#G.Models.ClassifyRequest.g.verified.cs | 57 + ...dels.ClassifyRequestTruncate.g.verified.cs | 61 + .../_#G.Models.ClassifyResponse.g.verified.cs | 38 + ...#G.Models.ClassifyResponse10.g.verified.cs | 24 + ...#G.Models.ClassifyResponse11.g.verified.cs | 24 + ...#G.Models.ClassifyResponse12.g.verified.cs | 24 + ...#G.Models.ClassifyResponse13.g.verified.cs | 24 + ..._#G.Models.ClassifyResponse2.g.verified.cs | 24 + ..._#G.Models.ClassifyResponse3.g.verified.cs | 24 + ..._#G.Models.ClassifyResponse4.g.verified.cs | 24 + ..._#G.Models.ClassifyResponse5.g.verified.cs | 24 + ..._#G.Models.ClassifyResponse6.g.verified.cs | 24 + ..._#G.Models.ClassifyResponse7.g.verified.cs | 24 + ..._#G.Models.ClassifyResponse8.g.verified.cs | 24 + ..._#G.Models.ClassifyResponse9.g.verified.cs | 24 + ...assifyResponseClassification.g.verified.cs | 74 + ...sificationClassificationType.g.verified.cs | 52 + ...ResponseClassificationLabels.g.verified.cs | 19 + .../_#G.Models.Cluster.g.verified.cs | 48 + ...#G.Models.CompatibleEndpoint.g.verified.cs | 82 + .../_#G.Models.Connector.g.verified.cs | 104 + ...G.Models.ConnectorAuthStatus.g.verified.cs | 52 + .../_#G.Models.ConnectorLog.g.verified.cs | 80 + .../_#G.Models.ConnectorOAuth.g.verified.cs | 50 + .../_#G.Models.Content.g.verified.cs | 116 + ...dels.CreateClusterJobRequest.g.verified.cs | 58 + ...els.CreateClusterJobResponse.g.verified.cs | 25 + ....Models.CreateConnectorOAuth.g.verified.cs | 48 + ...odels.CreateConnectorRequest.g.verified.cs | 70 + ...dels.CreateConnectorResponse.g.verified.cs | 26 + ...ls.CreateConnectorResponse10.g.verified.cs | 24 + ...ls.CreateConnectorResponse11.g.verified.cs | 24 + ...ls.CreateConnectorResponse12.g.verified.cs | 24 + ...ls.CreateConnectorResponse13.g.verified.cs | 24 + ...els.CreateConnectorResponse2.g.verified.cs | 24 + ...els.CreateConnectorResponse3.g.verified.cs | 24 + ...els.CreateConnectorResponse4.g.verified.cs | 24 + ...els.CreateConnectorResponse5.g.verified.cs | 24 + ...els.CreateConnectorResponse6.g.verified.cs | 24 + ...els.CreateConnectorResponse7.g.verified.cs | 24 + ...els.CreateConnectorResponse8.g.verified.cs | 24 + ...els.CreateConnectorResponse9.g.verified.cs | 24 + ...s.CreateConnectorServiceAuth.g.verified.cs | 34 + ....Models.CreateDatasetRequest.g.verified.cs | 44 + ...Models.CreateDatasetResponse.g.verified.cs | 24 + ...dels.CreateDatasetResponse10.g.verified.cs | 24 + ...dels.CreateDatasetResponse11.g.verified.cs | 24 + ...dels.CreateDatasetResponse12.g.verified.cs | 24 + ...dels.CreateDatasetResponse13.g.verified.cs | 24 + ...odels.CreateDatasetResponse2.g.verified.cs | 24 + ...odels.CreateDatasetResponse3.g.verified.cs | 24 + ...odels.CreateDatasetResponse4.g.verified.cs | 24 + ...odels.CreateDatasetResponse5.g.verified.cs | 24 + ...odels.CreateDatasetResponse6.g.verified.cs | 24 + ...odels.CreateDatasetResponse7.g.verified.cs | 24 + ...odels.CreateDatasetResponse8.g.verified.cs | 24 + ...odels.CreateDatasetResponse9.g.verified.cs | 24 + ...Models.CreateEmbedJobRequest.g.verified.cs | 75 + ...reateEmbedJobRequestTruncate.g.verified.cs | 54 + ...odels.CreateEmbedJobResponse.g.verified.cs | 31 + ...els.CreateEmbedJobResponse10.g.verified.cs | 24 + ...els.CreateEmbedJobResponse11.g.verified.cs | 24 + ...els.CreateEmbedJobResponse12.g.verified.cs | 24 + ...els.CreateEmbedJobResponse13.g.verified.cs | 24 + ...dels.CreateEmbedJobResponse2.g.verified.cs | 24 + ...dels.CreateEmbedJobResponse3.g.verified.cs | 24 + ...dels.CreateEmbedJobResponse4.g.verified.cs | 24 + ...dels.CreateEmbedJobResponse5.g.verified.cs | 24 + ...dels.CreateEmbedJobResponse6.g.verified.cs | 24 + ...dels.CreateEmbedJobResponse7.g.verified.cs | 24 + ...dels.CreateEmbedJobResponse8.g.verified.cs | 24 + ...dels.CreateEmbedJobResponse9.g.verified.cs | 24 + ...CreateFinetunedModelResponse.g.verified.cs | 24 + .../_#G.Models.Dataset.g.verified.cs | 110 + .../_#G.Models.DatasetPart.g.verified.cs | 68 + .../_#G.Models.DatasetType.g.verified.cs | 88 + ...dels.DatasetValidationStatus.g.verified.cs | 76 + ...dels.DeleteConnectorResponse.g.verified.cs | 19 + ...ls.DeleteConnectorResponse10.g.verified.cs | 24 + ...ls.DeleteConnectorResponse11.g.verified.cs | 24 + ...ls.DeleteConnectorResponse12.g.verified.cs | 24 + ...ls.DeleteConnectorResponse13.g.verified.cs | 24 + ...els.DeleteConnectorResponse2.g.verified.cs | 24 + ...els.DeleteConnectorResponse3.g.verified.cs | 24 + ...els.DeleteConnectorResponse4.g.verified.cs | 24 + ...els.DeleteConnectorResponse5.g.verified.cs | 24 + ...els.DeleteConnectorResponse6.g.verified.cs | 24 + ...els.DeleteConnectorResponse7.g.verified.cs | 24 + ...els.DeleteConnectorResponse8.g.verified.cs | 24 + ...els.DeleteConnectorResponse9.g.verified.cs | 24 + ...Models.DeleteDatasetResponse.g.verified.cs | 19 + ...dels.DeleteDatasetResponse10.g.verified.cs | 24 + ...dels.DeleteDatasetResponse11.g.verified.cs | 24 + ...dels.DeleteDatasetResponse12.g.verified.cs | 24 + ...dels.DeleteDatasetResponse13.g.verified.cs | 24 + ...odels.DeleteDatasetResponse2.g.verified.cs | 24 + ...odels.DeleteDatasetResponse3.g.verified.cs | 24 + ...odels.DeleteDatasetResponse4.g.verified.cs | 24 + ...odels.DeleteDatasetResponse5.g.verified.cs | 24 + ...odels.DeleteDatasetResponse6.g.verified.cs | 24 + ...odels.DeleteDatasetResponse7.g.verified.cs | 24 + ...odels.DeleteDatasetResponse8.g.verified.cs | 24 + ...odels.DeleteDatasetResponse9.g.verified.cs | 24 + ...DeleteFinetunedModelResponse.g.verified.cs | 19 + ..._#G.Models.DetokenizeRequest.g.verified.cs | 32 + ...#G.Models.DetokenizeResponse.g.verified.cs | 31 + ....Models.DetokenizeResponse10.g.verified.cs | 24 + ....Models.DetokenizeResponse11.g.verified.cs | 24 + ....Models.DetokenizeResponse12.g.verified.cs | 24 + ....Models.DetokenizeResponse13.g.verified.cs | 24 + ...G.Models.DetokenizeResponse2.g.verified.cs | 24 + ...G.Models.DetokenizeResponse3.g.verified.cs | 24 + ...G.Models.DetokenizeResponse4.g.verified.cs | 24 + ...G.Models.DetokenizeResponse5.g.verified.cs | 24 + ...G.Models.DetokenizeResponse6.g.verified.cs | 24 + ...G.Models.DetokenizeResponse7.g.verified.cs | 24 + ...G.Models.DetokenizeResponse8.g.verified.cs | 24 + ...G.Models.DetokenizeResponse9.g.verified.cs | 24 + .../_#G.Models.DocumentSource.g.verified.cs | 30 + ...odels.DocumentSourceDocument.g.verified.cs | 19 + ...G.Models.EmbedByTypeResponse.g.verified.cs | 52 + ...mbedByTypeResponseEmbeddings.g.verified.cs | 48 + ...edByTypeResponseResponseType.g.verified.cs | 52 + ...G.Models.EmbedFloatsResponse.g.verified.cs | 52 + ...edFloatsResponseResponseType.g.verified.cs | 52 + .../_#G.Models.EmbedInputType.g.verified.cs | 68 + .../_#G.Models.EmbedJob.g.verified.cs | 80 + .../_#G.Models.EmbedJobStatus.g.verified.cs | 70 + .../_#G.Models.EmbedJobTruncate.g.verified.cs | 52 + .../_#G.Models.EmbedRequest.g.verified.cs | 72 + ....Models.EmbedRequestTruncate.g.verified.cs | 61 + .../_#G.Models.EmbedResponse10.g.verified.cs | 24 + .../_#G.Models.EmbedResponse11.g.verified.cs | 24 + .../_#G.Models.EmbedResponse12.g.verified.cs | 24 + .../_#G.Models.EmbedResponse13.g.verified.cs | 24 + .../_#G.Models.EmbedResponse2.g.verified.cs | 24 + .../_#G.Models.EmbedResponse3.g.verified.cs | 24 + .../_#G.Models.EmbedResponse4.g.verified.cs | 24 + .../_#G.Models.EmbedResponse5.g.verified.cs | 24 + .../_#G.Models.EmbedResponse6.g.verified.cs | 24 + .../_#G.Models.EmbedResponse7.g.verified.cs | 24 + .../_#G.Models.EmbedResponse8.g.verified.cs | 24 + .../_#G.Models.EmbedResponse9.g.verified.cs | 24 + .../_#G.Models.EmbeddingType.g.verified.cs | 70 + .../_#G.Models.Error.g.verified.cs | 24 + .../_#G.Models.Event.g.verified.cs | 47 + ...odels.FinetuneDatasetMetrics.g.verified.cs | 72 + .../_#G.Models.FinetunedModel.g.verified.cs | 91 + .../_#G.Models.FinishReason.g.verified.cs | 82 + .../_#G.Models.GenerateRequest.g.verified.cs | 151 + ...rateRequestReturnLikelihoods.g.verified.cs | 61 + ...dels.GenerateRequestTruncate.g.verified.cs | 61 + .../_#G.Models.GenerateResponse.g.verified.cs | 24 + ...#G.Models.GenerateResponse10.g.verified.cs | 24 + ...#G.Models.GenerateResponse11.g.verified.cs | 24 + ...#G.Models.GenerateResponse12.g.verified.cs | 24 + ..._#G.Models.GenerateResponse2.g.verified.cs | 24 + ..._#G.Models.GenerateResponse3.g.verified.cs | 24 + ..._#G.Models.GenerateResponse4.g.verified.cs | 24 + ..._#G.Models.GenerateResponse5.g.verified.cs | 24 + ..._#G.Models.GenerateResponse6.g.verified.cs | 24 + ..._#G.Models.GenerateResponse7.g.verified.cs | 24 + ..._#G.Models.GenerateResponse8.g.verified.cs | 24 + ..._#G.Models.GenerateResponse9.g.verified.cs | 24 + ..._#G.Models.GenerateStreamEnd.g.verified.cs | 167 + ...ls.GenerateStreamEndVariant2.g.verified.cs | 39 + ...ateStreamEndVariant2Response.g.verified.cs | 37 + ...G.Models.GenerateStreamError.g.verified.cs | 167 + ....GenerateStreamErrorVariant2.g.verified.cs | 46 + ...G.Models.GenerateStreamEvent.g.verified.cs | 26 + ...GenerateStreamEventEventType.g.verified.cs | 58 + ...#G.Models.GenerateStreamText.g.verified.cs | 167 + ...s.GenerateStreamTextVariant2.g.verified.cs | 38 + ...els.GenerateStreamedResponse.g.verified.cs | 208 + .../_#G.Models.Generation.g.verified.cs | 44 + ...Models.GetClusterJobResponse.g.verified.cs | 104 + ....GetClusterJobResponseStatus.g.verified.cs | 70 + ....Models.GetConnectorResponse.g.verified.cs | 26 + ...odels.GetConnectorResponse10.g.verified.cs | 24 + ...odels.GetConnectorResponse11.g.verified.cs | 24 + ...odels.GetConnectorResponse12.g.verified.cs | 24 + ...odels.GetConnectorResponse13.g.verified.cs | 24 + ...Models.GetConnectorResponse2.g.verified.cs | 24 + ...Models.GetConnectorResponse3.g.verified.cs | 24 + ...Models.GetConnectorResponse4.g.verified.cs | 24 + ...Models.GetConnectorResponse5.g.verified.cs | 24 + ...Models.GetConnectorResponse6.g.verified.cs | 24 + ...Models.GetConnectorResponse7.g.verified.cs | 24 + ...Models.GetConnectorResponse8.g.verified.cs | 24 + ...Models.GetConnectorResponse9.g.verified.cs | 24 + ...ls.GetConnectorsLogsResponse.g.verified.cs | 32 + ...#G.Models.GetDatasetResponse.g.verified.cs | 25 + ....Models.GetDatasetResponse10.g.verified.cs | 24 + ....Models.GetDatasetResponse11.g.verified.cs | 24 + ....Models.GetDatasetResponse12.g.verified.cs | 24 + ....Models.GetDatasetResponse13.g.verified.cs | 24 + ...G.Models.GetDatasetResponse2.g.verified.cs | 24 + ...G.Models.GetDatasetResponse3.g.verified.cs | 24 + ...G.Models.GetDatasetResponse4.g.verified.cs | 24 + ...G.Models.GetDatasetResponse5.g.verified.cs | 24 + ...G.Models.GetDatasetResponse6.g.verified.cs | 24 + ...G.Models.GetDatasetResponse7.g.verified.cs | 24 + ...G.Models.GetDatasetResponse8.g.verified.cs | 24 + ...G.Models.GetDatasetResponse9.g.verified.cs | 24 + ...dels.GetDatasetUsageResponse.g.verified.cs | 24 + ...ls.GetDatasetUsageResponse10.g.verified.cs | 24 + ...ls.GetDatasetUsageResponse11.g.verified.cs | 24 + ...ls.GetDatasetUsageResponse12.g.verified.cs | 24 + ...ls.GetDatasetUsageResponse13.g.verified.cs | 24 + ...els.GetDatasetUsageResponse2.g.verified.cs | 24 + ...els.GetDatasetUsageResponse3.g.verified.cs | 24 + ...els.GetDatasetUsageResponse4.g.verified.cs | 24 + ...els.GetDatasetUsageResponse5.g.verified.cs | 24 + ...els.GetDatasetUsageResponse6.g.verified.cs | 24 + ...els.GetDatasetUsageResponse7.g.verified.cs | 24 + ...els.GetDatasetUsageResponse8.g.verified.cs | 24 + ...els.GetDatasetUsageResponse9.g.verified.cs | 24 + ...G.Models.GetEmbedJobResponse.g.verified.cs | 24 + ...Models.GetEmbedJobResponse10.g.verified.cs | 24 + ...Models.GetEmbedJobResponse11.g.verified.cs | 24 + ...Models.GetEmbedJobResponse12.g.verified.cs | 24 + ....Models.GetEmbedJobResponse2.g.verified.cs | 24 + ....Models.GetEmbedJobResponse3.g.verified.cs | 24 + ....Models.GetEmbedJobResponse4.g.verified.cs | 24 + ....Models.GetEmbedJobResponse5.g.verified.cs | 24 + ....Models.GetEmbedJobResponse6.g.verified.cs | 24 + ....Models.GetEmbedJobResponse7.g.verified.cs | 24 + ....Models.GetEmbedJobResponse8.g.verified.cs | 24 + ....Models.GetEmbedJobResponse9.g.verified.cs | 24 + ...ls.GetFinetunedModelResponse.g.verified.cs | 24 + .../_#G.Models.GetModelResponse.g.verified.cs | 54 + ...#G.Models.GetModelResponse10.g.verified.cs | 24 + ...#G.Models.GetModelResponse11.g.verified.cs | 24 + ...#G.Models.GetModelResponse12.g.verified.cs | 24 + ...#G.Models.GetModelResponse13.g.verified.cs | 24 + ..._#G.Models.GetModelResponse2.g.verified.cs | 24 + ..._#G.Models.GetModelResponse3.g.verified.cs | 24 + ..._#G.Models.GetModelResponse4.g.verified.cs | 24 + ..._#G.Models.GetModelResponse5.g.verified.cs | 24 + ..._#G.Models.GetModelResponse6.g.verified.cs | 24 + ..._#G.Models.GetModelResponse7.g.verified.cs | 24 + ..._#G.Models.GetModelResponse8.g.verified.cs | 24 + ..._#G.Models.GetModelResponse9.g.verified.cs | 24 + .../_#G.Models.Hyperparameters.g.verified.cs | 50 + ...#G.Models.JSONResponseFormat.g.verified.cs | 45 + ...G.Models.JSONResponseFormat2.g.verified.cs | 45 + ...SONResponseFormat2JsonSchema.g.verified.cs | 31 + ...els.JSONResponseFormatSchema.g.verified.cs | 31 + .../_#G.Models.LabelMetric.g.verified.cs | 36 + ...dels.ListClusterJobsResponse.g.verified.cs | 37 + ...odels.ListConnectorsResponse.g.verified.cs | 31 + ...els.ListConnectorsResponse10.g.verified.cs | 24 + ...els.ListConnectorsResponse11.g.verified.cs | 24 + ...els.ListConnectorsResponse12.g.verified.cs | 24 + ...els.ListConnectorsResponse13.g.verified.cs | 24 + ...dels.ListConnectorsResponse2.g.verified.cs | 24 + ...dels.ListConnectorsResponse3.g.verified.cs | 24 + ...dels.ListConnectorsResponse4.g.verified.cs | 24 + ...dels.ListConnectorsResponse5.g.verified.cs | 24 + ...dels.ListConnectorsResponse6.g.verified.cs | 24 + ...dels.ListConnectorsResponse7.g.verified.cs | 24 + ...dels.ListConnectorsResponse8.g.verified.cs | 24 + ...dels.ListConnectorsResponse9.g.verified.cs | 24 + ....Models.ListDatasetsResponse.g.verified.cs | 24 + ...odels.ListDatasetsResponse10.g.verified.cs | 24 + ...odels.ListDatasetsResponse11.g.verified.cs | 24 + ...odels.ListDatasetsResponse12.g.verified.cs | 24 + ...odels.ListDatasetsResponse13.g.verified.cs | 24 + ...Models.ListDatasetsResponse2.g.verified.cs | 24 + ...Models.ListDatasetsResponse3.g.verified.cs | 24 + ...Models.ListDatasetsResponse4.g.verified.cs | 24 + ...Models.ListDatasetsResponse5.g.verified.cs | 24 + ...Models.ListDatasetsResponse6.g.verified.cs | 24 + ...Models.ListDatasetsResponse7.g.verified.cs | 24 + ...Models.ListDatasetsResponse8.g.verified.cs | 24 + ...Models.ListDatasetsResponse9.g.verified.cs | 24 + ....Models.ListEmbedJobResponse.g.verified.cs | 24 + ...Models.ListEmbedJobsResponse.g.verified.cs | 24 + ...dels.ListEmbedJobsResponse10.g.verified.cs | 24 + ...dels.ListEmbedJobsResponse11.g.verified.cs | 24 + ...dels.ListEmbedJobsResponse12.g.verified.cs | 24 + ...odels.ListEmbedJobsResponse2.g.verified.cs | 24 + ...odels.ListEmbedJobsResponse3.g.verified.cs | 24 + ...odels.ListEmbedJobsResponse4.g.verified.cs | 24 + ...odels.ListEmbedJobsResponse5.g.verified.cs | 24 + ...odels.ListEmbedJobsResponse6.g.verified.cs | 24 + ...odels.ListEmbedJobsResponse7.g.verified.cs | 24 + ...odels.ListEmbedJobsResponse8.g.verified.cs | 24 + ...odels.ListEmbedJobsResponse9.g.verified.cs | 24 + ...#G.Models.ListEventsResponse.g.verified.cs | 37 + ....ListFinetunedModelsResponse.g.verified.cs | 37 + ...#G.Models.ListModelsResponse.g.verified.cs | 31 + ....Models.ListModelsResponse10.g.verified.cs | 24 + ....Models.ListModelsResponse11.g.verified.cs | 24 + ....Models.ListModelsResponse12.g.verified.cs | 24 + ....Models.ListModelsResponse13.g.verified.cs | 24 + ...G.Models.ListModelsResponse2.g.verified.cs | 24 + ...G.Models.ListModelsResponse3.g.verified.cs | 24 + ...G.Models.ListModelsResponse4.g.verified.cs | 24 + ...G.Models.ListModelsResponse5.g.verified.cs | 24 + ...G.Models.ListModelsResponse6.g.verified.cs | 24 + ...G.Models.ListModelsResponse7.g.verified.cs | 24 + ...G.Models.ListModelsResponse8.g.verified.cs | 24 + ...G.Models.ListModelsResponse9.g.verified.cs | 24 + ...tTrainingStepMetricsResponse.g.verified.cs | 31 + ...Models.LogLikelihoodResponse.g.verified.cs | 52 + .../_#G.Models.Message.g.verified.cs | 167 + .../_#G.Models.Metrics.g.verified.cs | 24 + ...dels.NonStreamedChatResponse.g.verified.cs | 86 + ...els.NonStreamedChatResponse2.g.verified.cs | 45 + ...thAuthorizeConnectorResponse.g.verified.cs | 24 + ...AuthorizeConnectorResponse10.g.verified.cs | 24 + ...AuthorizeConnectorResponse11.g.verified.cs | 24 + ...AuthorizeConnectorResponse12.g.verified.cs | 24 + ...hAuthorizeConnectorResponse2.g.verified.cs | 24 + ...hAuthorizeConnectorResponse3.g.verified.cs | 24 + ...hAuthorizeConnectorResponse4.g.verified.cs | 24 + ...hAuthorizeConnectorResponse5.g.verified.cs | 24 + ...hAuthorizeConnectorResponse6.g.verified.cs | 24 + ...hAuthorizeConnectorResponse7.g.verified.cs | 24 + ...hAuthorizeConnectorResponse8.g.verified.cs | 24 + ...hAuthorizeConnectorResponse9.g.verified.cs | 24 + ...odels.OAuthAuthorizeResponse.g.verified.cs | 24 + .../_#G.Models.ParseInfo.g.verified.cs | 30 + .../_#G.Models.RerankDocument.g.verified.cs | 25 + .../_#G.Models.RerankRequest.g.verified.cs | 70 + .../_#G.Models.RerankResponse.g.verified.cs | 37 + .../_#G.Models.RerankResponse10.g.verified.cs | 24 + .../_#G.Models.RerankResponse11.g.verified.cs | 24 + .../_#G.Models.RerankResponse12.g.verified.cs | 24 + .../_#G.Models.RerankResponse13.g.verified.cs | 24 + .../_#G.Models.RerankResponse2.g.verified.cs | 24 + .../_#G.Models.RerankResponse3.g.verified.cs | 24 + .../_#G.Models.RerankResponse4.g.verified.cs | 24 + .../_#G.Models.RerankResponse5.g.verified.cs | 24 + .../_#G.Models.RerankResponse6.g.verified.cs | 24 + .../_#G.Models.RerankResponse7.g.verified.cs | 24 + .../_#G.Models.RerankResponse8.g.verified.cs | 24 + .../_#G.Models.RerankResponse9.g.verified.cs | 24 + ....Models.RerankResponseResult.g.verified.cs | 38 + ...RerankResponseResultDocument.g.verified.cs | 25 + ...G.Models.RerankerDataMetrics.g.verified.cs | 54 + .../_#G.Models.ResponseFormat.g.verified.cs | 171 + .../_#G.Models.ResponseFormat2.g.verified.cs | 171 + ...#G.Models.ResponseFormatType.g.verified.cs | 53 + .../_#G.Models.Settings.g.verified.cs | 50 + .../_#G.Models.SingleGeneration.g.verified.cs | 50 + ...els.SingleGenerationInStream.g.verified.cs | 46 + ...gleGenerationTokenLikelihood.g.verified.cs | 32 + .../_#G.Models.Source.g.verified.cs | 167 + .../_#G.Models.Status.g.verified.cs | 104 + .../_#G.Models.Strategy.g.verified.cs | 62 + ....Models.StreamedChatResponse.g.verified.cs | 413 + ...Models.StreamedChatResponse2.g.verified.cs | 454 + .../_#G.Models.SummarizeRequest.g.verified.cs | 68 + ...mmarizeRequestExtractiveness.g.verified.cs | 59 + ...odels.SummarizeRequestFormat.g.verified.cs | 53 + ...odels.SummarizeRequestLength.g.verified.cs | 59 + ..._#G.Models.SummarizeResponse.g.verified.cs | 36 + ...G.Models.SummarizeResponse10.g.verified.cs | 24 + ...G.Models.SummarizeResponse11.g.verified.cs | 24 + ...G.Models.SummarizeResponse12.g.verified.cs | 24 + ...G.Models.SummarizeResponse13.g.verified.cs | 24 + ...#G.Models.SummarizeResponse2.g.verified.cs | 24 + ...#G.Models.SummarizeResponse3.g.verified.cs | 24 + ...#G.Models.SummarizeResponse4.g.verified.cs | 24 + ...#G.Models.SummarizeResponse5.g.verified.cs | 24 + ...#G.Models.SummarizeResponse6.g.verified.cs | 24 + ...#G.Models.SummarizeResponse7.g.verified.cs | 24 + ...#G.Models.SummarizeResponse8.g.verified.cs | 24 + ...#G.Models.SummarizeResponse9.g.verified.cs | 24 + .../_#G.Models.SystemMessage.g.verified.cs | 35 + ..._#G.Models.SystemMessageRole.g.verified.cs | 46 + .../_#G.Models.TextContent.g.verified.cs | 32 + .../_#G.Models.TextContentType.g.verified.cs | 46 + ...#G.Models.TextResponseFormat.g.verified.cs | 27 + .../_#G.Models.TokenLikelihood.g.verified.cs | 36 + .../_#G.Models.TokenizeRequest.g.verified.cs | 32 + .../_#G.Models.TokenizeResponse.g.verified.cs | 38 + ...#G.Models.TokenizeResponse10.g.verified.cs | 24 + ...#G.Models.TokenizeResponse11.g.verified.cs | 24 + ...#G.Models.TokenizeResponse12.g.verified.cs | 24 + ...#G.Models.TokenizeResponse13.g.verified.cs | 24 + ..._#G.Models.TokenizeResponse2.g.verified.cs | 24 + ..._#G.Models.TokenizeResponse3.g.verified.cs | 24 + ..._#G.Models.TokenizeResponse4.g.verified.cs | 24 + ..._#G.Models.TokenizeResponse5.g.verified.cs | 24 + ..._#G.Models.TokenizeResponse6.g.verified.cs | 24 + ..._#G.Models.TokenizeResponse7.g.verified.cs | 24 + ..._#G.Models.TokenizeResponse8.g.verified.cs | 24 + ..._#G.Models.TokenizeResponse9.g.verified.cs | 24 + .../_#G.Models.Tool.g.verified.cs | 47 + .../_#G.Models.Tool2.g.verified.cs | 31 + .../_#G.Models.Tool2Function.g.verified.cs | 36 + ...dels.Tool2FunctionParameters.g.verified.cs | 19 + .../_#G.Models.Tool2Type.g.verified.cs | 46 + .../_#G.Models.ToolCall.g.verified.cs | 32 + .../_#G.Models.ToolCall2.g.verified.cs | 37 + ..._#G.Models.ToolCall2Function.g.verified.cs | 30 + .../_#G.Models.ToolCall2Type.g.verified.cs | 46 + .../_#G.Models.ToolCallDelta.g.verified.cs | 42 + ...#G.Models.ToolCallParameters.g.verified.cs | 19 + .../_#G.Models.ToolContent.g.verified.cs | 32 + ..._#G.Models.ToolContentOutput.g.verified.cs | 19 + .../_#G.Models.ToolContentType.g.verified.cs | 46 + .../_#G.Models.ToolMessage.g.verified.cs | 32 + .../_#G.Models.ToolMessage2.g.verified.cs | 41 + .../_#G.Models.ToolMessage2Role.g.verified.cs | 46 + ...els.ToolParameterDefinitions.g.verified.cs | 28 + .../_#G.Models.ToolResult.g.verified.cs | 32 + .../_#G.Models.ToolResultOutput.g.verified.cs | 19 + .../_#G.Models.ToolSource.g.verified.cs | 30 + ....Models.ToolSourceToolOutput.g.verified.cs | 19 + ...G.Models.TrainingStepMetrics.g.verified.cs | 36 + ...s.TrainingStepMetricsMetrics.g.verified.cs | 19 + ...dels.UpdateClusterJobRequest.g.verified.cs | 61 + ...bRequestInputTrackingMetrics.g.verified.cs | 19 + ...RequestOutputTrackingMetrics.g.verified.cs | 19 + ...pdateClusterJobRequestStatus.g.verified.cs | 70 + ...els.UpdateClusterJobResponse.g.verified.cs | 25 + ...odels.UpdateConnectorRequest.g.verified.cs | 60 + ...dels.UpdateConnectorResponse.g.verified.cs | 26 + ...ls.UpdateConnectorResponse10.g.verified.cs | 24 + ...ls.UpdateConnectorResponse11.g.verified.cs | 24 + ...ls.UpdateConnectorResponse12.g.verified.cs | 24 + ...ls.UpdateConnectorResponse13.g.verified.cs | 24 + ...els.UpdateConnectorResponse2.g.verified.cs | 24 + ...els.UpdateConnectorResponse3.g.verified.cs | 24 + ...els.UpdateConnectorResponse4.g.verified.cs | 24 + ...els.UpdateConnectorResponse5.g.verified.cs | 24 + ...els.UpdateConnectorResponse6.g.verified.cs | 24 + ...els.UpdateConnectorResponse7.g.verified.cs | 24 + ...els.UpdateConnectorResponse8.g.verified.cs | 24 + ...els.UpdateConnectorResponse9.g.verified.cs | 24 + ....UpdateFinetunedModelRequest.g.verified.cs | 85 + ...UpdateFinetunedModelResponse.g.verified.cs | 24 + .../_#G.Models.Usage.g.verified.cs | 30 + .../_#G.Models.UsageBilledUnits.g.verified.cs | 42 + .../_#G.Models.UsageTokens.g.verified.cs | 30 + .../_#G.Models.UserMessage.g.verified.cs | 42 + .../_#G.Models.UserMessageRole.g.verified.cs | 46 + .../_#G.Models.WandbConfig.g.verified.cs | 38 + .../_#G.ModelsClient.GetModel.g.verified.cs | 99 + .../_#G.ModelsClient.ListModels.g.verified.cs | 111 + .../_#G.ModelsClient.g.verified.cs | 60 + .../_#G.Polyfills.g.verified.cs | 54 + ...AssistantMessageResponseRole.g.verified.cs | 50 + ...tMessageResponseRoleNullable.g.verified.cs | 57 + ...verters.AssistantMessageRole.g.verified.cs | 50 + ...AssistantMessageRoleNullable.g.verified.cs | 57 + ...JsonConverters.AuthTokenType.g.verified.cs | 50 + ...erters.AuthTokenTypeNullable.g.verified.cs | 57 + .../_#JsonConverters.BaseType.g.verified.cs | 50 + ...nConverters.BaseTypeNullable.g.verified.cs | 57 + ....ChatCitationGenerationEvent.g.verified.cs | 74 + ...erters.ChatContentDeltaEvent.g.verified.cs | 74 + ...nverters.ChatContentEndEvent.g.verified.cs | 74 + ...erters.ChatContentStartEvent.g.verified.cs | 74 + ...iant2DeltaMessageContentType.g.verified.cs | 50 + ...taMessageContentTypeNullable.g.verified.cs | 57 + ...nConverters.ChatFinishReason.g.verified.cs | 50 + ...ers.ChatFinishReasonNullable.g.verified.cs | 57 + ...#JsonConverters.ChatMessage2.g.verified.cs | 112 + ...nverters.ChatMessageEndEvent.g.verified.cs | 74 + ...erters.ChatMessageStartEvent.g.verified.cs | 74 + ...ventVariant2DeltaMessageRole.g.verified.cs | 50 + ...ant2DeltaMessageRoleNullable.g.verified.cs | 57 + ...s.ChatRequestCitationQuality.g.verified.cs | 50 + ...questCitationQualityNullable.g.verified.cs | 57 + ....ChatRequestPromptTruncation.g.verified.cs | 50 + ...uestPromptTruncationNullable.g.verified.cs | 57 + .../_#JsonConverters.ChatRole.g.verified.cs | 50 + ...nConverters.ChatRoleNullable.g.verified.cs | 57 + ...SearchQueriesGenerationEvent.g.verified.cs | 74 + ...rters.ChatSearchResultsEvent.g.verified.cs | 74 + ...onverters.ChatStreamEndEvent.g.verified.cs | 74 + ...EndEventVariant2FinishReason.g.verified.cs | 50 + ...Variant2FinishReasonNullable.g.verified.cs | 57 + ...ers.ChatStreamEventEventType.g.verified.cs | 50 + ...StreamEventEventTypeNullable.g.verified.cs | 57 + ...ters.ChatStreamEventTypeType.g.verified.cs | 50 + ...tStreamEventTypeTypeNullable.g.verified.cs | 57 + ...verters.ChatStreamStartEvent.g.verified.cs | 74 + ...ters.ChatTextGenerationEvent.g.verified.cs | 74 + ...rters.ChatToolCallDeltaEvent.g.verified.cs | 74 + ...verters.ChatToolCallEndEvent.g.verified.cs | 74 + ...rters.ChatToolCallStartEvent.g.verified.cs | 74 + ...entVariant2DeltaToolCallType.g.verified.cs | 50 + ...nt2DeltaToolCallTypeNullable.g.verified.cs | 57 + ...ters.ChatToolCallsChunkEvent.g.verified.cs | 74 + ...ChatToolCallsGenerationEvent.g.verified.cs | 74 + ...rters.ChatToolPlanDeltaEvent.g.verified.cs | 74 + ...rs.Chatv2RequestCitationMode.g.verified.cs | 50 + ...2RequestCitationModeNullable.g.verified.cs | 57 + ...nConverters.CitationEndEvent.g.verified.cs | 74 + ...onverters.CitationStartEvent.g.verified.cs | 74 + ...ters.ClassifyRequestTruncate.g.verified.cs | 50 + ...ssifyRequestTruncateNullable.g.verified.cs | 57 + ...sificationClassificationType.g.verified.cs | 50 + ...onClassificationTypeNullable.g.verified.cs | 57 + ...onverters.CompatibleEndpoint.g.verified.cs | 50 + ...s.CompatibleEndpointNullable.g.verified.cs | 57 + ...nverters.ConnectorAuthStatus.g.verified.cs | 50 + ....ConnectorAuthStatusNullable.g.verified.cs | 57 + .../_#JsonConverters.Content.g.verified.cs | 55 + ...reateEmbedJobRequestTruncate.g.verified.cs | 50 + ...edJobRequestTruncateNullable.g.verified.cs | 57 + ..._#JsonConverters.DatasetType.g.verified.cs | 50 + ...nverters.DatasetTypeNullable.g.verified.cs | 57 + ...ters.DatasetValidationStatus.g.verified.cs | 50 + ...asetValidationStatusNullable.g.verified.cs | 57 + ...edByTypeResponseResponseType.g.verified.cs | 50 + ...ResponseResponseTypeNullable.g.verified.cs | 57 + ...edFloatsResponseResponseType.g.verified.cs | 50 + ...ResponseResponseTypeNullable.g.verified.cs | 57 + ...sonConverters.EmbedInputType.g.verified.cs | 50 + ...rters.EmbedInputTypeNullable.g.verified.cs | 57 + ...sonConverters.EmbedJobStatus.g.verified.cs | 50 + ...rters.EmbedJobStatusNullable.g.verified.cs | 57 + ...nConverters.EmbedJobTruncate.g.verified.cs | 50 + ...ers.EmbedJobTruncateNullable.g.verified.cs | 57 + ...verters.EmbedRequestTruncate.g.verified.cs | 50 + ...EmbedRequestTruncateNullable.g.verified.cs | 57 + ...JsonConverters.EmbeddingType.g.verified.cs | 50 + ...erters.EmbeddingTypeNullable.g.verified.cs | 57 + ...#JsonConverters.FinishReason.g.verified.cs | 50 + ...verters.FinishReasonNullable.g.verified.cs | 57 + ...rateRequestReturnLikelihoods.g.verified.cs | 50 + ...estReturnLikelihoodsNullable.g.verified.cs | 57 + ...ters.GenerateRequestTruncate.g.verified.cs | 50 + ...erateRequestTruncateNullable.g.verified.cs | 57 + ...Converters.GenerateStreamEnd.g.verified.cs | 74 + ...nverters.GenerateStreamError.g.verified.cs | 74 + ...GenerateStreamEventEventType.g.verified.cs | 50 + ...StreamEventEventTypeNullable.g.verified.cs | 57 + ...onverters.GenerateStreamText.g.verified.cs | 74 + ...ers.GenerateStreamedResponse.g.verified.cs | 93 + ....GetClusterJobResponseStatus.g.verified.cs | 50 + ...terJobResponseStatusNullable.g.verified.cs | 57 + .../_#JsonConverters.Message.g.verified.cs | 74 + .../_#JsonConverters.OneOf1.g.verified.cs | 54 + .../_#JsonConverters.OneOf2.g.verified.cs | 73 + ...JsonConverters.OneOfFactory1.g.verified.cs | 26 + ...JsonConverters.OneOfFactory2.g.verified.cs | 26 + ...sonConverters.ResponseFormat.g.verified.cs | 74 + ...onConverters.ResponseFormat2.g.verified.cs | 74 + ...onverters.ResponseFormatType.g.verified.cs | 50 + ...s.ResponseFormatTypeNullable.g.verified.cs | 57 + .../_#JsonConverters.Source.g.verified.cs | 74 + .../_#JsonConverters.Status.g.verified.cs | 50 + ...sonConverters.StatusNullable.g.verified.cs | 57 + .../_#JsonConverters.Strategy.g.verified.cs | 50 + ...nConverters.StrategyNullable.g.verified.cs | 57 + ...verters.StreamedChatResponse.g.verified.cs | 188 + ...erters.StreamedChatResponse2.g.verified.cs | 207 + ...mmarizeRequestExtractiveness.g.verified.cs | 50 + ...equestExtractivenessNullable.g.verified.cs | 57 + ...rters.SummarizeRequestFormat.g.verified.cs | 50 + ...mmarizeRequestFormatNullable.g.verified.cs | 57 + ...rters.SummarizeRequestLength.g.verified.cs | 50 + ...mmarizeRequestLengthNullable.g.verified.cs | 57 + ...Converters.SystemMessageRole.g.verified.cs | 50 + ...rs.SystemMessageRoleNullable.g.verified.cs | 57 + ...onConverters.TextContentType.g.verified.cs | 50 + ...ters.TextContentTypeNullable.g.verified.cs | 57 + .../_#JsonConverters.Tool2Type.g.verified.cs | 50 + ...Converters.Tool2TypeNullable.g.verified.cs | 57 + ...JsonConverters.ToolCall2Type.g.verified.cs | 50 + ...erters.ToolCall2TypeNullable.g.verified.cs | 57 + ...onConverters.ToolContentType.g.verified.cs | 50 + ...ters.ToolContentTypeNullable.g.verified.cs | 57 + ...nConverters.ToolMessage2Role.g.verified.cs | 50 + ...ers.ToolMessage2RoleNullable.g.verified.cs | 57 + ...pdateClusterJobRequestStatus.g.verified.cs | 50 + ...sterJobRequestStatusNullable.g.verified.cs | 57 + ...onConverters.UserMessageRole.g.verified.cs | 50 + ...ters.UserMessageRoleNullable.g.verified.cs | 57 + .../SystemTextJson/_#OneOf.1.g.verified.cs | 115 + .../SystemTextJson/_#OneOf.2.g.verified.cs | 166 + ...Tests.HuggingFace_Diagnostics.verified.txt | 1 + .../NewtonsoftJson/_#AnyOf.2.g.verified.cs | 166 + .../_#G.Api.GenerateText.g.verified.cs | 136 + .../NewtonsoftJson/_#G.Api.g.verified.cs | 61 + .../_#G.Models.ErrorResponse.g.verified.cs | 26 + ...G.Models.GenerateTextRequest.g.verified.cs | 37 + ...s.GenerateTextRequestOptions.g.verified.cs | 32 + ...enerateTextRequestParameters.g.verified.cs | 88 + ...ls.GenerateTextResponseValue.g.verified.cs | 24 + .../_#G.Polyfills.g.verified.cs | 54 + ...Tests.HuggingFace_Diagnostics.verified.txt | 1 + .../SystemTextJson/_#AnyOf.2.g.verified.cs | 166 + .../_#G.Api.GenerateText.g.verified.cs | 136 + .../SystemTextJson/_#G.Api.g.verified.cs | 69 + .../_#G.Models.ErrorResponse.g.verified.cs | 28 + ...G.Models.GenerateTextRequest.g.verified.cs | 38 + ...s.GenerateTextRequestOptions.g.verified.cs | 32 + ...enerateTextRequestParameters.g.verified.cs | 88 + ...ls.GenerateTextResponseValue.g.verified.cs | 25 + .../_#G.Polyfills.g.verified.cs | 54 + .../_#JsonConverters.AnyOf2.g.verified.cs | 73 + ...JsonConverters.AnyOfFactory2.g.verified.cs | 26 + .../OpenApiGenerator.SnapshotTests/Tests.cs | 36 + .../OpenApiGenerator.UnitTests/DataTests.cs | 24 + .../Ai21/ResolvedSchemas/_.verified.txt | 564 + .../Snapshots/Ai21/Schemas/_.verified.txt | 564 + .../Cohere/ResolvedSchemas/_.verified.txt | 1713 +++ .../Snapshots/Cohere/Schemas/_.verified.txt | 1713 +++ .../GitHub/ResolvedSchemas/_.verified.txt | 8 +- .../Snapshots/GitHub/Schemas/_.verified.txt | 8 +- .../ResolvedSchemas/_.verified.txt | 31 + .../HuggingFace/Schemas/_.verified.txt | 31 + .../LangSmith/ResolvedSchemas/_.verified.txt | 22 +- .../LangSmith/Schemas/_.verified.txt | 22 +- 1863 files changed, 116771 insertions(+), 30 deletions(-) create mode 100644 specs/ai21.yaml create mode 100644 specs/cohere.yaml create mode 100644 specs/huggingface.yaml create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/Tests.Ai21_Diagnostics.verified.txt create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#AllOf.1.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#AnyOf.2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Api.Authorizations.Bearer.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Api.Constructors.Bearer.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Api.ConvertDocumentFileStudioV1ChatFilesConvertPost.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Api.V1Answer.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Api.V1ConversationalRag.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Api.V1Embed.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Api.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.ChatClient.V1J2UltraChat.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.ChatClient.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2GrandeComplete.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2GrandeCustomModelComplete.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2GrandeInstructComplete.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2JumboComplete.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2JumboComplete2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2JumboInstructComplete.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2LargeComplete.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2LargeCustomModelComplete.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2LargeInstructComplete.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2LightComplete.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2LightCustomModelComplete.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2MidComplete.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2MidCustomModelComplete.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2UltraComplete.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2UltraComplete2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CustomModelsClient.V1CreateCustomModel.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CustomModelsClient.V1GetCustomModel.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CustomModelsClient.V1GetCustomModels.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CustomModelsClient.V1UpdateCustomModel.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CustomModelsClient.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.DatasetsClient.V1DeleteDataset.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.DatasetsClient.V1GetDataset.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.DatasetsClient.V1GetDatasetDownloadUrl.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.DatasetsClient.V1GetDatasets.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.DatasetsClient.V1UploadDataset.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.DatasetsClient.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.GrammaticalErrorCorrectionsClient.V1Corrections.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.GrammaticalErrorCorrectionsClient.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.JambaCompleteClient.V1ChatComplete.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.JambaCompleteClient.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.LibraryManagementClient.V1LibraryDelete.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.LibraryManagementClient.V1LibraryManagement.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.LibraryManagementClient.V1LibraryManagement2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.LibraryManagementClient.V1LibraryManagement3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.LibraryManagementClient.V1LibraryUpload.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.LibraryManagementClient.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.AnswerBody.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.AnswerLength.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.AssistantMessage.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.AssistantMessageRole.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.BodyConvertDocumentFileStudioV1ChatFilesConvertPost.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.BodyV1LibraryUpload.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.BodyV1UploadDataset.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatCompletion.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatCompletionMeta.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatCompletionResponseChoice.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatCompletionResponseDeltaChoice.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatCompletionVllmStreamingMessage.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatCompletionVllmStreamingMessageMeta.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatMessage.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatOutput.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatStreamingContentDelta.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatStreamingFirstDelta.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatStreamingFirstDeltaRole.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.CompletionBody.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.CompletionBodyLogitBias.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ConversationalRagFlowPublicFields.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ConversationalRagFlowPublicFieldsRetrievalStrategy.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ConversationalRagResult.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ConversationalRagSource.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ConvertDocumentFileStudioV1ChatFilesConvertPostResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.Correction.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.CorrectionType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.CorrectionsBody.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.CorrectionsResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.CustomModelInput.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.CustomModelType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.CustomModelUpdateBody.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.DocumentSchema.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.DocumentSchemaMetadata.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.DocumentType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.EmbedType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.EmbeddingsBody.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.FileDeleteResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.FileResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.FileStatus.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.FileUploadResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.FilesUpdateRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.FinishReason.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.FunctionToolDefinition.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.HTTPValidationError.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.Highlight.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.LanguageStudioApiServerDataTypesChatChatRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.LanguageStudioApiServerDataTypesJ2ChatChatRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.LibraryAnswerRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.LibraryAnswerResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.LibrarySearchRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.LibrarySearchResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.LibrarySearchResult.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.Logprobs.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.LogprobsData.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.Message.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.MessageRole.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.MockResponseConfig.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.Mode.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ModelName.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ParaphraseBody.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.Penalty.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ResponseFormat.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ResponseFormatType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.RetrievalStrategy3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.RoleType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.Segment.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.SegmentSummary.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.SegmentationBody.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.SegmentationResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.SegmentedSummaryBody.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.SourceDocument.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.StyleType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.SummarizationResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.SummarizeBody.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.SummarizeBySegmentResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.SummaryMethod.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.SystemMessage.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.SystemMessageRole.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.TokenizeBody.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ToolCall.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ToolCallType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ToolDefinition.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ToolDefinitionType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ToolFunction.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ToolMessage.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ToolMessageRole.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ToolParameters.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ToolParametersProperties.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ToolParametersType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.TopLogprobsData.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.UsageInfo.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.UserMessage.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.UserMessageRole.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1AnswerResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1CreateCustomModelResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1DeleteDatasetResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1EmbedResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1GetCustomModelResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1GetCustomModelsResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1GetDatasetDownloadUrlResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1GetDatasetResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1GetDatasetsResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2GrandeCompleteResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2GrandeCustomModelCompleteResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2GrandeInstructCompleteResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2JumboCompleteResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2JumboCompleteResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2JumboInstructCompleteResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2LargeCompleteResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2LargeCustomModelCompleteResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2LargeInstructCompleteResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2LightCompleteResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2LightCustomModelCompleteResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2MidCompleteResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2MidCustomModelCompleteResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2UltraCompleteResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2UltraCompleteResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1LibraryManagementResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1ParaphrazeResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1TokenizeResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1UpdateCustomModelResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1UploadDatasetResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ValidationError.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.ParaphraseClient.V1Paraphraze.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.ParaphraseClient.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Polyfills.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.RAGEngineClient.V1LibraryAnswer.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.RAGEngineClient.V1LibraryManagement4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.RAGEngineClient.V1LibrarySearch.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.RAGEngineClient.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.SegmentationClient.V1Segmentation.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.SegmentationClient.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.SummarizeClient.V1Summarize.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.SummarizeClient.V1SummarizeBySegment.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.SummarizeClient.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.TokenizeClient.V1Tokenize.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.TokenizeClient.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#OneOf.4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/Tests.Ai21_Diagnostics.verified.txt create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#AllOf.1.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#AnyOf.2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Api.Authorizations.Bearer.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Api.Constructors.Bearer.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Api.ConvertDocumentFileStudioV1ChatFilesConvertPost.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Api.V1Answer.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Api.V1ConversationalRag.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Api.V1Embed.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Api.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.ChatClient.V1J2UltraChat.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.ChatClient.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2GrandeComplete.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2GrandeCustomModelComplete.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2GrandeInstructComplete.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2JumboComplete.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2JumboComplete2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2JumboInstructComplete.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2LargeComplete.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2LargeCustomModelComplete.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2LargeInstructComplete.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2LightComplete.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2LightCustomModelComplete.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2MidComplete.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2MidCustomModelComplete.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2UltraComplete.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2UltraComplete2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CustomModelsClient.V1CreateCustomModel.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CustomModelsClient.V1GetCustomModel.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CustomModelsClient.V1GetCustomModels.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CustomModelsClient.V1UpdateCustomModel.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CustomModelsClient.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.DatasetsClient.V1DeleteDataset.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.DatasetsClient.V1GetDataset.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.DatasetsClient.V1GetDatasetDownloadUrl.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.DatasetsClient.V1GetDatasets.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.DatasetsClient.V1UploadDataset.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.DatasetsClient.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.GrammaticalErrorCorrectionsClient.V1Corrections.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.GrammaticalErrorCorrectionsClient.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.JambaCompleteClient.V1ChatComplete.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.JambaCompleteClient.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.LibraryManagementClient.V1LibraryDelete.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.LibraryManagementClient.V1LibraryManagement.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.LibraryManagementClient.V1LibraryManagement2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.LibraryManagementClient.V1LibraryManagement3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.LibraryManagementClient.V1LibraryUpload.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.LibraryManagementClient.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.AnswerBody.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.AnswerLength.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.AssistantMessage.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.AssistantMessageRole.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.BodyConvertDocumentFileStudioV1ChatFilesConvertPost.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.BodyV1LibraryUpload.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.BodyV1UploadDataset.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatCompletion.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatCompletionMeta.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatCompletionResponseChoice.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatCompletionResponseDeltaChoice.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatCompletionVllmStreamingMessage.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatCompletionVllmStreamingMessageMeta.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatMessage.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatOutput.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatStreamingContentDelta.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatStreamingFirstDelta.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatStreamingFirstDeltaRole.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.CompletionBody.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.CompletionBodyLogitBias.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ConversationalRagFlowPublicFields.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ConversationalRagFlowPublicFieldsRetrievalStrategy.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ConversationalRagResult.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ConversationalRagSource.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ConvertDocumentFileStudioV1ChatFilesConvertPostResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.Correction.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.CorrectionType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.CorrectionsBody.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.CorrectionsResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.CustomModelInput.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.CustomModelType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.CustomModelUpdateBody.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.DocumentSchema.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.DocumentSchemaMetadata.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.DocumentType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.EmbedType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.EmbeddingsBody.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.FileDeleteResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.FileResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.FileStatus.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.FileUploadResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.FilesUpdateRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.FinishReason.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.FunctionToolDefinition.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.HTTPValidationError.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.Highlight.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.LanguageStudioApiServerDataTypesChatChatRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.LanguageStudioApiServerDataTypesJ2ChatChatRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.LibraryAnswerRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.LibraryAnswerResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.LibrarySearchRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.LibrarySearchResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.LibrarySearchResult.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.Logprobs.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.LogprobsData.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.Message.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.MessageRole.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.MockResponseConfig.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.Mode.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ModelName.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ParaphraseBody.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.Penalty.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ResponseFormat.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ResponseFormatType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.RetrievalStrategy3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.RoleType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.Segment.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.SegmentSummary.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.SegmentationBody.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.SegmentationResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.SegmentedSummaryBody.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.SourceDocument.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.StyleType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.SummarizationResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.SummarizeBody.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.SummarizeBySegmentResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.SummaryMethod.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.SystemMessage.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.SystemMessageRole.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.TokenizeBody.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ToolCall.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ToolCallType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ToolDefinition.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ToolDefinitionType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ToolFunction.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ToolMessage.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ToolMessageRole.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ToolParameters.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ToolParametersProperties.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ToolParametersType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.TopLogprobsData.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.UsageInfo.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.UserMessage.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.UserMessageRole.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1AnswerResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1CreateCustomModelResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1DeleteDatasetResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1EmbedResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1GetCustomModelResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1GetCustomModelsResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1GetDatasetDownloadUrlResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1GetDatasetResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1GetDatasetsResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2GrandeCompleteResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2GrandeCustomModelCompleteResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2GrandeInstructCompleteResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2JumboCompleteResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2JumboCompleteResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2JumboInstructCompleteResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2LargeCompleteResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2LargeCustomModelCompleteResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2LargeInstructCompleteResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2LightCompleteResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2LightCustomModelCompleteResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2MidCompleteResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2MidCustomModelCompleteResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2UltraCompleteResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2UltraCompleteResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1LibraryManagementResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1ParaphrazeResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1TokenizeResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1UpdateCustomModelResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1UploadDatasetResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ValidationError.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.ParaphraseClient.V1Paraphraze.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.ParaphraseClient.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Polyfills.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.RAGEngineClient.V1LibraryAnswer.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.RAGEngineClient.V1LibraryManagement4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.RAGEngineClient.V1LibrarySearch.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.RAGEngineClient.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.SegmentationClient.V1Segmentation.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.SegmentationClient.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.SummarizeClient.V1Summarize.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.SummarizeClient.V1SummarizeBySegment.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.SummarizeClient.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.TokenizeClient.V1Tokenize.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.TokenizeClient.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.AllOf1.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.AllOfFactory1.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.AnswerLength.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.AnswerLengthNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.AnyOf2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.AnyOfFactory2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.AssistantMessageRole.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.AssistantMessageRoleNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ChatStreamingFirstDeltaRole.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ChatStreamingFirstDeltaRoleNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ConversationalRagFlowPublicFieldsRetrievalStrategy.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ConversationalRagFlowPublicFieldsRetrievalStrategyNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.CorrectionType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.CorrectionTypeNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.CustomModelType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.CustomModelTypeNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.DocumentType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.DocumentTypeNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.EmbedType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.EmbedTypeNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.FileStatus.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.FileStatusNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.MessageRole.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.MessageRoleNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.Mode.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ModeNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ModelName.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ModelNameNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.OneOf4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.OneOfFactory4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ResponseFormatType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ResponseFormatTypeNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.RetrievalStrategy3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.RetrievalStrategy3Nullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.RoleType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.RoleTypeNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.StyleType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.StyleTypeNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.SummaryMethod.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.SummaryMethodNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.SystemMessageRole.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.SystemMessageRoleNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ToolCallType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ToolCallTypeNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ToolDefinitionType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ToolDefinitionTypeNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ToolMessageRole.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ToolMessageRoleNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ToolParametersType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ToolParametersTypeNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.UserMessageRole.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.UserMessageRoleNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#OneOf.4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/Tests.Cohere_Diagnostics.verified.txt create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.Authorizations.Bearer.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.Chat.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.Chatv2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.CheckAPIKey.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.Classify.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.Constructors.Bearer.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.Detokenize.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.Embed.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.Generate.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.Rerank.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.Summarize.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.Tokenize.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.ConnectorsClient.CreateConnector.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.ConnectorsClient.DeleteConnector.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.ConnectorsClient.GetConnector.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.ConnectorsClient.ListConnectors.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.ConnectorsClient.OAuthAuthorizeConnector.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.ConnectorsClient.UpdateConnector.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.ConnectorsClient.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.DatasetsClient.CreateDataset.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.DatasetsClient.DeleteDataset.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.DatasetsClient.GetDataset.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.DatasetsClient.GetDatasetUsage.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.DatasetsClient.ListDatasets.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.DatasetsClient.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.EmbedJobsClient.CancelEmbedJob.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.EmbedJobsClient.CreateEmbedJob.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.EmbedJobsClient.GetEmbedJob.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.EmbedJobsClient.ListEmbedJobs.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.EmbedJobsClient.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.FinetuningClient.CreateFinetunedModel.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.FinetuningClient.DeleteFinetunedModel.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.FinetuningClient.GetFinetunedModel.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.FinetuningClient.ListEvents.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.FinetuningClient.ListFinetunedModels.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.FinetuningClient.ListTrainingStepMetrics.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.FinetuningClient.UpdateFinetunedModel.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.FinetuningClient.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ApiMeta.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ApiMetaApiVersion.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ApiMetaBilledUnits.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ApiMetaTokens.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.AssistantMessage.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.AssistantMessageResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.AssistantMessageResponseRole.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.AssistantMessageRole.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.AuthTokenType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.BaseModel.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.BaseType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatCitation.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatCitationGenerationEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatCitationGenerationEventVariant2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatConnector.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatConnectorOptions.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentDeltaEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentDeltaEventVariant2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentDeltaEventVariant2Delta.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentDeltaEventVariant2DeltaMessage.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentDeltaEventVariant2DeltaMessageContent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentEndEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentEndEventVariant2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentStartEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentStartEventVariant2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentStartEventVariant2Delta.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentStartEventVariant2DeltaMessage.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentStartEventVariant2DeltaMessageContent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentStartEventVariant2DeltaMessageContentType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatDataMetrics.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatDocument.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatFinishReason.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatMessage.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatMessage2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatMessageEndEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatMessageEndEventVariant2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatMessageEndEventVariant2Delta.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatMessageStartEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatMessageStartEventVariant2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatMessageStartEventVariant2Delta.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatMessageStartEventVariant2DeltaMessage.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatMessageStartEventVariant2DeltaMessageRole.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatRequestCitationQuality.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatRequestPromptTruncation.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse13.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatRole.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatSearchQueriesGenerationEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatSearchQueriesGenerationEventVariant2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatSearchQuery.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatSearchResult.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatSearchResultConnector.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatSearchResultsEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatSearchResultsEventVariant2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatStreamEndEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatStreamEndEventVariant2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatStreamEndEventVariant2FinishReason.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatStreamEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatStreamEventEventType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatStreamEventType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatStreamEventTypeType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatStreamStartEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatStreamStartEventVariant2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatTextGenerationEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatTextGenerationEventVariant2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallDeltaEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallDeltaEventVariant2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallDeltaEventVariant2Delta.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallDeltaEventVariant2DeltaToolCall.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallDeltaEventVariant2DeltaToolCallFunction.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallEndEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallEndEventVariant2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallStartEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallStartEventVariant2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallStartEventVariant2Delta.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallStartEventVariant2DeltaToolCall.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallStartEventVariant2DeltaToolCallFunction.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallStartEventVariant2DeltaToolCallType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallsChunkEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallsChunkEventVariant2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallsGenerationEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallsGenerationEventVariant2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolPlanDeltaEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolPlanDeltaEventVariant2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolPlanDeltaEventVariant2Delta.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Request.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2RequestCitationMode.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response13.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse13.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Citation.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CitationEndEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CitationEndEventVariant2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CitationStartEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CitationStartEventVariant2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CitationStartEventVariant2Delta.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CitationStartEventVariant2DeltaMessage.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyDataMetrics.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyExample.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyRequestTruncate.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse13.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponseClassification.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponseClassificationClassificationType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponseClassificationLabels.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Cluster.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CompatibleEndpoint.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Connector.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ConnectorAuthStatus.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ConnectorLog.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ConnectorOAuth.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Content.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateClusterJobRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateClusterJobResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorOAuth.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse13.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorServiceAuth.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse13.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobRequestTruncate.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse13.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateFinetunedModelResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Dataset.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DatasetPart.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DatasetType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DatasetValidationStatus.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse13.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse13.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteFinetunedModelResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse13.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DocumentSource.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DocumentSourceDocument.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedByTypeResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedByTypeResponseEmbeddings.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedByTypeResponseResponseType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedFloatsResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedFloatsResponseResponseType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedInputType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedJob.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedJobStatus.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedJobTruncate.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedRequestTruncate.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse13.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbeddingType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Error.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Event.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.FinetuneDatasetMetrics.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.FinetunedModel.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.FinishReason.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateRequestReturnLikelihoods.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateRequestTruncate.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateStreamEnd.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateStreamEndVariant2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateStreamEndVariant2Response.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateStreamError.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateStreamErrorVariant2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateStreamEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateStreamEventEventType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateStreamText.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateStreamTextVariant2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateStreamedResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Generation.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetClusterJobResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetClusterJobResponseStatus.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse13.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorsLogsResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse13.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse13.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetFinetunedModelResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse13.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Hyperparameters.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.JSONResponseFormat.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.JSONResponseFormat2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.JSONResponseFormat2JsonSchema.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.JSONResponseFormatSchema.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.LabelMetric.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListClusterJobsResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse13.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse13.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEventsResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListFinetunedModelsResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse13.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListTrainingStepMetricsResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.LogLikelihoodResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Message.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Metrics.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.NonStreamedChatResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.NonStreamedChatResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ParseInfo.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankDocument.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse13.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponseResult.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponseResultDocument.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankerDataMetrics.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ResponseFormat.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ResponseFormat2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ResponseFormatType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Settings.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SingleGeneration.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SingleGenerationInStream.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SingleGenerationTokenLikelihood.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Source.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Status.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Strategy.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.StreamedChatResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.StreamedChatResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeRequestExtractiveness.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeRequestFormat.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeRequestLength.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse13.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SystemMessage.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SystemMessageRole.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TextContent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TextContentType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TextResponseFormat.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenLikelihood.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse13.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Tool.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Tool2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Tool2Function.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Tool2FunctionParameters.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Tool2Type.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolCall.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolCall2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolCall2Function.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolCall2Type.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolCallDelta.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolCallParameters.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolContent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolContentOutput.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolContentType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolMessage.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolMessage2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolMessage2Role.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolParameterDefinitions.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolResult.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolResultOutput.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolSource.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolSourceToolOutput.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TrainingStepMetrics.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TrainingStepMetricsMetrics.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateClusterJobRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateClusterJobRequestInputTrackingMetrics.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateClusterJobRequestOutputTrackingMetrics.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateClusterJobRequestStatus.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateClusterJobResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse13.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateFinetunedModelRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateFinetunedModelResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Usage.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UsageBilledUnits.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UsageTokens.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UserMessage.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UserMessageRole.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.WandbConfig.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.ModelsClient.GetModel.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.ModelsClient.ListModels.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.ModelsClient.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Polyfills.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#OneOf.1.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#OneOf.2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/Tests.Cohere_Diagnostics.verified.txt create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.Authorizations.Bearer.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.Chat.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.Chatv2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.CheckAPIKey.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.Classify.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.Constructors.Bearer.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.Detokenize.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.Embed.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.Generate.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.Rerank.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.Summarize.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.Tokenize.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.ConnectorsClient.CreateConnector.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.ConnectorsClient.DeleteConnector.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.ConnectorsClient.GetConnector.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.ConnectorsClient.ListConnectors.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.ConnectorsClient.OAuthAuthorizeConnector.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.ConnectorsClient.UpdateConnector.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.ConnectorsClient.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.DatasetsClient.CreateDataset.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.DatasetsClient.DeleteDataset.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.DatasetsClient.GetDataset.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.DatasetsClient.GetDatasetUsage.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.DatasetsClient.ListDatasets.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.DatasetsClient.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.EmbedJobsClient.CancelEmbedJob.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.EmbedJobsClient.CreateEmbedJob.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.EmbedJobsClient.GetEmbedJob.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.EmbedJobsClient.ListEmbedJobs.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.EmbedJobsClient.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.FinetuningClient.CreateFinetunedModel.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.FinetuningClient.DeleteFinetunedModel.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.FinetuningClient.GetFinetunedModel.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.FinetuningClient.ListEvents.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.FinetuningClient.ListFinetunedModels.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.FinetuningClient.ListTrainingStepMetrics.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.FinetuningClient.UpdateFinetunedModel.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.FinetuningClient.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ApiMeta.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ApiMetaApiVersion.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ApiMetaBilledUnits.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ApiMetaTokens.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.AssistantMessage.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.AssistantMessageResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.AssistantMessageResponseRole.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.AssistantMessageRole.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.AuthTokenType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.BaseModel.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.BaseType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatCitation.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatCitationGenerationEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatCitationGenerationEventVariant2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatConnector.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatConnectorOptions.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentDeltaEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentDeltaEventVariant2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentDeltaEventVariant2Delta.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentDeltaEventVariant2DeltaMessage.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentDeltaEventVariant2DeltaMessageContent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentEndEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentEndEventVariant2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentStartEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentStartEventVariant2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentStartEventVariant2Delta.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentStartEventVariant2DeltaMessage.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentStartEventVariant2DeltaMessageContent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentStartEventVariant2DeltaMessageContentType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatDataMetrics.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatDocument.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatFinishReason.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatMessage.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatMessage2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatMessageEndEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatMessageEndEventVariant2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatMessageEndEventVariant2Delta.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatMessageStartEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatMessageStartEventVariant2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatMessageStartEventVariant2Delta.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatMessageStartEventVariant2DeltaMessage.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatMessageStartEventVariant2DeltaMessageRole.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatRequestCitationQuality.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatRequestPromptTruncation.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse13.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatRole.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatSearchQueriesGenerationEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatSearchQueriesGenerationEventVariant2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatSearchQuery.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatSearchResult.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatSearchResultConnector.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatSearchResultsEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatSearchResultsEventVariant2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatStreamEndEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatStreamEndEventVariant2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatStreamEndEventVariant2FinishReason.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatStreamEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatStreamEventEventType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatStreamEventType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatStreamEventTypeType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatStreamStartEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatStreamStartEventVariant2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatTextGenerationEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatTextGenerationEventVariant2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallDeltaEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallDeltaEventVariant2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallDeltaEventVariant2Delta.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallDeltaEventVariant2DeltaToolCall.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallDeltaEventVariant2DeltaToolCallFunction.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallEndEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallEndEventVariant2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallStartEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallStartEventVariant2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallStartEventVariant2Delta.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallStartEventVariant2DeltaToolCall.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallStartEventVariant2DeltaToolCallFunction.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallStartEventVariant2DeltaToolCallType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallsChunkEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallsChunkEventVariant2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallsGenerationEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallsGenerationEventVariant2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolPlanDeltaEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolPlanDeltaEventVariant2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolPlanDeltaEventVariant2Delta.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Request.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2RequestCitationMode.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response13.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse13.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Citation.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CitationEndEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CitationEndEventVariant2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CitationStartEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CitationStartEventVariant2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CitationStartEventVariant2Delta.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CitationStartEventVariant2DeltaMessage.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyDataMetrics.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyExample.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyRequestTruncate.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse13.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponseClassification.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponseClassificationClassificationType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponseClassificationLabels.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Cluster.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CompatibleEndpoint.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Connector.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ConnectorAuthStatus.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ConnectorLog.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ConnectorOAuth.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Content.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateClusterJobRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateClusterJobResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorOAuth.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse13.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorServiceAuth.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse13.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobRequestTruncate.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse13.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateFinetunedModelResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Dataset.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DatasetPart.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DatasetType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DatasetValidationStatus.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse13.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse13.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteFinetunedModelResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse13.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DocumentSource.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DocumentSourceDocument.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedByTypeResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedByTypeResponseEmbeddings.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedByTypeResponseResponseType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedFloatsResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedFloatsResponseResponseType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedInputType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedJob.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedJobStatus.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedJobTruncate.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedRequestTruncate.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse13.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbeddingType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Error.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Event.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.FinetuneDatasetMetrics.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.FinetunedModel.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.FinishReason.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateRequestReturnLikelihoods.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateRequestTruncate.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateStreamEnd.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateStreamEndVariant2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateStreamEndVariant2Response.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateStreamError.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateStreamErrorVariant2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateStreamEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateStreamEventEventType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateStreamText.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateStreamTextVariant2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateStreamedResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Generation.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetClusterJobResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetClusterJobResponseStatus.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse13.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorsLogsResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse13.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse13.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetFinetunedModelResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse13.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Hyperparameters.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.JSONResponseFormat.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.JSONResponseFormat2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.JSONResponseFormat2JsonSchema.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.JSONResponseFormatSchema.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.LabelMetric.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListClusterJobsResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse13.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse13.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEventsResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListFinetunedModelsResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse13.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListTrainingStepMetricsResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.LogLikelihoodResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Message.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Metrics.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.NonStreamedChatResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.NonStreamedChatResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ParseInfo.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankDocument.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse13.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponseResult.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponseResultDocument.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankerDataMetrics.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ResponseFormat.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ResponseFormat2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ResponseFormatType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Settings.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SingleGeneration.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SingleGenerationInStream.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SingleGenerationTokenLikelihood.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Source.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Status.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Strategy.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.StreamedChatResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.StreamedChatResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeRequestExtractiveness.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeRequestFormat.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeRequestLength.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse13.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SystemMessage.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SystemMessageRole.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TextContent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TextContentType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TextResponseFormat.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenLikelihood.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse13.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Tool.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Tool2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Tool2Function.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Tool2FunctionParameters.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Tool2Type.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolCall.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolCall2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolCall2Function.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolCall2Type.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolCallDelta.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolCallParameters.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolContent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolContentOutput.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolContentType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolMessage.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolMessage2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolMessage2Role.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolParameterDefinitions.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolResult.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolResultOutput.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolSource.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolSourceToolOutput.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TrainingStepMetrics.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TrainingStepMetricsMetrics.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateClusterJobRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateClusterJobRequestInputTrackingMetrics.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateClusterJobRequestOutputTrackingMetrics.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateClusterJobRequestStatus.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateClusterJobResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse10.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse11.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse12.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse13.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse3.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse4.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse5.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse6.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse7.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse8.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse9.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateFinetunedModelRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateFinetunedModelResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Usage.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UsageBilledUnits.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UsageTokens.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UserMessage.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UserMessageRole.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.WandbConfig.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.ModelsClient.GetModel.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.ModelsClient.ListModels.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.ModelsClient.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Polyfills.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.AssistantMessageResponseRole.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.AssistantMessageResponseRoleNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.AssistantMessageRole.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.AssistantMessageRoleNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.AuthTokenType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.AuthTokenTypeNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.BaseType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.BaseTypeNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatCitationGenerationEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatContentDeltaEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatContentEndEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatContentStartEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatContentStartEventVariant2DeltaMessageContentType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatContentStartEventVariant2DeltaMessageContentTypeNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatFinishReason.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatFinishReasonNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatMessage2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatMessageEndEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatMessageStartEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatMessageStartEventVariant2DeltaMessageRole.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatMessageStartEventVariant2DeltaMessageRoleNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatRequestCitationQuality.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatRequestCitationQualityNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatRequestPromptTruncation.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatRequestPromptTruncationNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatRole.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatRoleNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatSearchQueriesGenerationEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatSearchResultsEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatStreamEndEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatStreamEndEventVariant2FinishReason.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatStreamEndEventVariant2FinishReasonNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatStreamEventEventType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatStreamEventEventTypeNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatStreamEventTypeType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatStreamEventTypeTypeNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatStreamStartEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatTextGenerationEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatToolCallDeltaEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatToolCallEndEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatToolCallStartEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatToolCallStartEventVariant2DeltaToolCallType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatToolCallStartEventVariant2DeltaToolCallTypeNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatToolCallsChunkEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatToolCallsGenerationEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatToolPlanDeltaEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.Chatv2RequestCitationMode.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.Chatv2RequestCitationModeNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.CitationEndEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.CitationStartEvent.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ClassifyRequestTruncate.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ClassifyRequestTruncateNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ClassifyResponseClassificationClassificationType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ClassifyResponseClassificationClassificationTypeNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.CompatibleEndpoint.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.CompatibleEndpointNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ConnectorAuthStatus.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ConnectorAuthStatusNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.Content.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.CreateEmbedJobRequestTruncate.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.CreateEmbedJobRequestTruncateNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.DatasetType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.DatasetTypeNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.DatasetValidationStatus.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.DatasetValidationStatusNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedByTypeResponseResponseType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedByTypeResponseResponseTypeNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedFloatsResponseResponseType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedFloatsResponseResponseTypeNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedInputType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedInputTypeNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedJobStatus.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedJobStatusNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedJobTruncate.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedJobTruncateNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedRequestTruncate.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedRequestTruncateNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbeddingType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbeddingTypeNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.FinishReason.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.FinishReasonNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GenerateRequestReturnLikelihoods.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GenerateRequestReturnLikelihoodsNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GenerateRequestTruncate.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GenerateRequestTruncateNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GenerateStreamEnd.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GenerateStreamError.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GenerateStreamEventEventType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GenerateStreamEventEventTypeNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GenerateStreamText.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GenerateStreamedResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GetClusterJobResponseStatus.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GetClusterJobResponseStatusNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.Message.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.OneOf1.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.OneOf2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.OneOfFactory1.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.OneOfFactory2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ResponseFormat.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ResponseFormat2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ResponseFormatType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ResponseFormatTypeNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.Source.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.Status.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.StatusNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.Strategy.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.StrategyNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.StreamedChatResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.StreamedChatResponse2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.SummarizeRequestExtractiveness.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.SummarizeRequestExtractivenessNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.SummarizeRequestFormat.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.SummarizeRequestFormatNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.SummarizeRequestLength.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.SummarizeRequestLengthNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.SystemMessageRole.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.SystemMessageRoleNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.TextContentType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.TextContentTypeNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.Tool2Type.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.Tool2TypeNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ToolCall2Type.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ToolCall2TypeNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ToolContentType.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ToolContentTypeNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ToolMessage2Role.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ToolMessage2RoleNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.UpdateClusterJobRequestStatus.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.UpdateClusterJobRequestStatusNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.UserMessageRole.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.UserMessageRoleNullable.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#OneOf.1.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#OneOf.2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/NewtonsoftJson/Tests.HuggingFace_Diagnostics.verified.txt create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/NewtonsoftJson/_#AnyOf.2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/NewtonsoftJson/_#G.Api.GenerateText.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/NewtonsoftJson/_#G.Api.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/NewtonsoftJson/_#G.Models.ErrorResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/NewtonsoftJson/_#G.Models.GenerateTextRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/NewtonsoftJson/_#G.Models.GenerateTextRequestOptions.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/NewtonsoftJson/_#G.Models.GenerateTextRequestParameters.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/NewtonsoftJson/_#G.Models.GenerateTextResponseValue.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/NewtonsoftJson/_#G.Polyfills.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/Tests.HuggingFace_Diagnostics.verified.txt create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/_#AnyOf.2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/_#G.Api.GenerateText.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/_#G.Api.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/_#G.Models.ErrorResponse.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/_#G.Models.GenerateTextRequest.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/_#G.Models.GenerateTextRequestOptions.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/_#G.Models.GenerateTextRequestParameters.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/_#G.Models.GenerateTextResponseValue.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/_#G.Polyfills.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/_#JsonConverters.AnyOf2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/_#JsonConverters.AnyOfFactory2.g.verified.cs create mode 100644 src/tests/OpenApiGenerator.UnitTests/Snapshots/Ai21/ResolvedSchemas/_.verified.txt create mode 100644 src/tests/OpenApiGenerator.UnitTests/Snapshots/Ai21/Schemas/_.verified.txt create mode 100644 src/tests/OpenApiGenerator.UnitTests/Snapshots/Cohere/ResolvedSchemas/_.verified.txt create mode 100644 src/tests/OpenApiGenerator.UnitTests/Snapshots/Cohere/Schemas/_.verified.txt create mode 100644 src/tests/OpenApiGenerator.UnitTests/Snapshots/HuggingFace/ResolvedSchemas/_.verified.txt create mode 100644 src/tests/OpenApiGenerator.UnitTests/Snapshots/HuggingFace/Schemas/_.verified.txt diff --git a/OpenApiGenerator.sln b/OpenApiGenerator.sln index 8cc8fef642..27f99dd372 100644 --- a/OpenApiGenerator.sln +++ b/OpenApiGenerator.sln @@ -47,6 +47,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "specs", "specs", "{7E829AE4 specs\dedoose.json = specs\dedoose.json specs\anthropic.yaml = specs\anthropic.yaml specs\leonardo.yaml = specs\leonardo.yaml + specs\ai21.yaml = specs\ai21.yaml + specs\huggingface.yaml = specs\huggingface.yaml + specs\cohere.yaml = specs\cohere.yaml EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenApiGenerator.IntegrationTests.Cli", "src\tests\OpenApiGenerator.IntegrationTests.Cli\OpenApiGenerator.IntegrationTests.Cli.csproj", "{41F1B4D8-5F6F-40FB-A1C2-A5E6A4B62AA7}" diff --git a/specs/ai21.yaml b/specs/ai21.yaml new file mode 100644 index 0000000000..37a6672406 --- /dev/null +++ b/specs/ai21.yaml @@ -0,0 +1,2895 @@ +openapi: 3.0.1 +info: + title: AI21 Studio API + description: Access our powerful language models using an API that makes you smile + version: 1.0.0 +servers: + - url: https://api.ai21.com/ +paths: + /studio/v1/chat/files/convert: + post: + summary: Convert Document File + operationId: convert_document_file_studio_v1_chat_files_convert_post + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/Body_convert_document_file_studio_v1_chat_files_convert_post' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: { } + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /studio/v1/chat/completions: + post: + tags: + - Jamba Complete + summary: Chat Complete + description: "This is the endpoint for the [Jamba Instruct model](https://docs.ai21.com/docs/jamba-models).\nThis is a foundation model that supports both single-turn (question answering,\ntext completion) and multi-turn (chat style) interactions.\n\nYou can optionally stream results if you want to get the response as each\ntoken is generated, rather than waiting for the entire response." + operationId: v1_chat_complete + parameters: + - name: Authorization + in: header + required: true + schema: + title: Authorization + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/language_studio_api_server__data_types__chat__ChatRequest' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: + title: Response V1 Chat Complete + anyOf: + - $ref: '#/components/schemas/ChatCompletion' + - type: array + items: + $ref: '#/components/schemas/ChatCompletionVllmStreamingMessage' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /studio/v1/j2-light/complete: + post: + tags: + - completion + summary: j2-light complete + operationId: v1_j2_light_complete + parameters: + - name: model + in: query + schema: + title: Model + type: string + default: j2-light + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompletionBody' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: { } + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + '/studio/v1/j2-light/{custom_model_name}/complete': + post: + tags: + - completion + summary: Custom j2-light complete + operationId: v1_j2_light_custom_model_complete + parameters: + - name: custom_model_name + in: path + required: true + schema: + title: Custom Model Name + type: string + - name: custom_model_type + in: query + schema: + title: Custom Model Type + type: string + default: j2-light + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompletionBody' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: { } + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /studio/v1/j2-mid/complete: + post: + tags: + - completion + summary: j2-mid complete + operationId: v1_j2_mid_complete + parameters: + - name: model + in: query + schema: + title: Model + type: string + default: j2-mid + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompletionBody' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: { } + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + '/studio/v1/j2-mid/{custom_model_name}/complete': + post: + tags: + - completion + summary: Custom j2-mid complete + operationId: v1_j2_mid_custom_model_complete + parameters: + - name: custom_model_name + in: path + required: true + schema: + title: Custom Model Name + type: string + - name: custom_model_type + in: query + schema: + title: Custom Model Type + type: string + default: j2-mid + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompletionBody' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: { } + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /studio/v1/j2-ultra/complete: + post: + tags: + - completion + summary: j2-ultra complete + operationId: v1_j2_ultra_complete + parameters: + - name: model + in: query + schema: + title: Model + type: string + default: j2-ultra + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompletionBody' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: { } + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + '/studio/v1/j2-ultra/{custom_model_name}/complete': + post: + tags: + - completion + summary: Custom j2-ultra complete + operationId: v1_j2_ultra_complete + parameters: + - name: custom_model_name + in: path + required: true + schema: + title: Custom Model Name + type: string + - name: custom_model_type + in: query + schema: + title: Custom Model Type + type: string + default: j2-ultra + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompletionBody' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: { } + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /studio/v1/j2-large/complete: + post: + tags: + - completion + summary: j2-large complete + operationId: v1_j2_large_complete + parameters: + - name: model + in: query + schema: + title: Model + type: string + default: j2-large + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompletionBody' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: { } + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /studio/v1/j2-large-instruct/complete: + post: + tags: + - completion + summary: j2-large-instruct complete + operationId: v1_j2_large_instruct_complete + parameters: + - name: model + in: query + schema: + title: Model + type: string + default: j2-large-instruct + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompletionBody' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: { } + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /studio/v1/j2-grande/complete: + post: + tags: + - completion + summary: j2-grande complete + operationId: v1_j2_grande_complete + parameters: + - name: model + in: query + schema: + title: Model + type: string + default: j2-grande + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompletionBody' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: { } + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /studio/v1/j2-grande-instruct/complete: + post: + tags: + - completion + summary: j2-grande-instruct complete + operationId: v1_j2_grande_instruct_complete + parameters: + - name: model + in: query + schema: + title: Model + type: string + default: j2-grande-instruct + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompletionBody' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: { } + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /studio/v1/j2-jumbo/complete: + post: + tags: + - completion + summary: j2-jumbo complete + operationId: v1_j2_jumbo_complete + parameters: + - name: model + in: query + schema: + title: Model + type: string + default: j2-jumbo + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompletionBody' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: { } + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /studio/v1/j2-jumbo-instruct/complete: + post: + tags: + - completion + summary: j2-jumbo-instruct complete + operationId: v1_j2_jumbo_instruct_complete + parameters: + - name: model + in: query + schema: + title: Model + type: string + default: j2-jumbo-instruct + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompletionBody' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: { } + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + '/studio/v1/j2-large/{custom_model_name}/complete': + post: + tags: + - completion + summary: Custom j2-large complete + operationId: v1_j2_large_custom_model_complete + parameters: + - name: custom_model_name + in: path + required: true + schema: + title: Custom Model Name + type: string + - name: custom_model_type + in: query + schema: + title: Custom Model Type + type: string + default: j2-large + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompletionBody' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: { } + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + '/studio/v1/j2-grande/{custom_model_name}/complete': + post: + tags: + - completion + summary: Custom j2-grande complete + operationId: v1_j2_grande_custom_model_complete + parameters: + - name: custom_model_name + in: path + required: true + schema: + title: Custom Model Name + type: string + - name: custom_model_type + in: query + schema: + title: Custom Model Type + type: string + default: j2-grande + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompletionBody' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: { } + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + '/studio/v1/j2-jumbo/{custom_model_name}/complete': + post: + tags: + - completion + summary: Custom j2-jumbo complete + operationId: v1_j2_jumbo_complete + parameters: + - name: custom_model_name + in: path + required: true + schema: + title: Custom Model Name + type: string + - name: custom_model_type + in: query + schema: + title: Custom Model Type + type: string + default: j2-jumbo + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompletionBody' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: { } + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /studio/v1/custom-model: + get: + tags: + - custom-models + summary: Get Custom Models List + operationId: v1_get_custom_models + parameters: + - name: includeMetadata + in: query + schema: + title: Includemetadata + type: boolean + default: false + responses: + '200': + description: Successful Response + content: + application/json: + schema: { } + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + post: + tags: + - custom-models + summary: Create Custom Model + operationId: v1_create_custom_model + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CustomModelInput' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: { } + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + '/studio/v1/custom-model/{custom_model_pid}': + get: + tags: + - custom-models + summary: Get Custom Model + operationId: v1_get_custom_model + parameters: + - name: custom_model_pid + in: path + required: true + schema: + title: Custom Model Pid + type: string + responses: + '200': + description: Successful Response + content: + application/json: + schema: { } + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + put: + tags: + - custom-models + summary: Update Model + operationId: v1_update_custom_model + parameters: + - name: custom_model_pid + in: path + required: true + schema: + title: Custom Model Pid + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CustomModelUpdateBody' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: { } + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /studio/v1/dataset: + get: + tags: + - datasets + summary: Dataset List + operationId: v1_get_datasets + responses: + '200': + description: Successful Response + content: + application/json: + schema: { } + post: + tags: + - datasets + summary: Add Dataset + operationId: v1_upload_dataset + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/Body_v1_upload_dataset' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: { } + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + '/studio/v1/dataset/{dataset_pid}': + get: + tags: + - datasets + summary: Dataset Get + operationId: v1_get_dataset + parameters: + - name: dataset_pid + in: path + required: true + schema: + title: Dataset Pid + type: string + responses: + '200': + description: Successful Response + content: + application/json: + schema: { } + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + delete: + tags: + - datasets + summary: Delete Dataset + operationId: v1_delete_dataset + parameters: + - name: dataset_pid + in: path + required: true + schema: + title: Dataset Pid + type: string + responses: + '200': + description: Successful Response + content: + application/json: + schema: { } + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + '/studio/v1/dataset/url/{dataset_pid}': + get: + tags: + - datasets + summary: Dataset Download Url + operationId: v1_get_dataset_download_url + parameters: + - name: dataset_pid + in: path + required: true + schema: + title: Dataset Pid + type: string + - name: dataset_name + in: query + required: true + schema: + title: Dataset Name + type: string + responses: + '200': + description: Successful Response + content: + application/json: + schema: { } + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /studio/v1/paraphrase: + post: + tags: + - paraphrase + summary: Paraphrase + operationId: v1_paraphraze + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ParaphraseBody' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: { } + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /studio/v1/summarize: + post: + tags: + - summarize + summary: Summarize + operationId: v1_summarize + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SummarizeBody' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/SummarizationResponse' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /studio/v1/summarize-by-segment: + post: + tags: + - summarize + summary: Segmented Summarize + operationId: v1_summarize_by_segment + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SegmentedSummaryBody' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/SummarizeBySegmentResponse' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /studio/v1/segmentation: + post: + tags: + - segmentation + summary: Segmentation + operationId: v1_segmentation + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SegmentationBody' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/SegmentationResponse' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /studio/v1/embed: + post: + summary: Embed + operationId: v1_embed + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EmbeddingsBody' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: { } + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /studio/v1/conversational-rag: + post: + summary: Conversational Rag + operationId: v1_conversational_rag + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConversationalRagFlowPublicFields' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/ConversationalRagResult' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /studio/v1/gec: + post: + tags: + - grammatical error corrections + summary: Grammatical Error Corrections + operationId: v1_corrections + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CorrectionsBody' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/CorrectionsResponse' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /studio/v1/library/files: + get: + tags: + - Library management + summary: Get Organization Files + description: "Get metadata about a specific file by file ID. The file ID is generated by\nAI21 when you upload the file." + operationId: v1_library_management + parameters: + - name: name + in: query + schema: + title: Name + type: string + - name: path + in: query + schema: + title: Path + type: string + - name: status + in: query + schema: + $ref: '#/components/schemas/FileStatus' + - name: label + in: query + schema: + title: Label + type: array + items: + type: string + - name: limit + in: query + schema: + title: Limit + type: integer + default: 1000 + - name: offset + in: query + schema: + title: Offset + type: integer + responses: + '200': + description: Successful Response + content: + application/json: + schema: + title: Response V1 Library Management + type: array + items: + $ref: '#/components/schemas/FileResponse' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + post: + tags: + - Library management + summary: Upload Organization File + description: "Upload files to use for [RAG Engine document searches](https://docs.ai21.com/docs/rag-engine-overview).\nYou can assign metadata to your files to limit searches to specific files by file metadata.\nThere is no bulk upload method; files must be loaded one at a time.\n\n- **Max number of files:** No limit. The playground limits bulk uploads to 50 files per request.\n- **Max library size:** 1 GB total size. No limit to individual file size.\n- **Supported file types:** PDF, DocX, HTML, TXT" + operationId: v1_library_upload + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/Body_v1_library_upload' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/FileUploadResponse' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + '/studio/v1/library/files/{file_id}': + get: + tags: + - Library management + summary: Get File By Id + description: "Retrieve a list of documents in the user's library. Optionally specify a\nfilter to find only files with matching labels or paths. This method\nreturns only metadata about files; to download a file, call\n`GET .../files/{file_id}/download`\n\nWhen specifying qualifiers with your request, only files that match\n_all_ qualifiers will be returns. So, for example, if you specify\n`label='financial'` and `status='UPLOADED'`, only files with the label\n\"financial\" AND status UPLOADED will be returned." + operationId: v1_library_management + parameters: + - name: file_id + in: path + required: true + schema: + title: File Id + type: string + format: uuid + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/FileResponse' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + put: + tags: + - Library management + summary: Update File + description: "Update the specified parameters of a specific document in the user's library.\nThis operation currently supports updating the publicUrl and labels parameters.\n\n> **This operation overwrites the specified items with the new data you provide.**\n> If you wish to add new labels to the labels list without removing the existing ones,\n> you must submit a labels list that includes both the current and new labels.**\n>\n> For instance, if the current labels are \"Label A\" and \"Label B\", and you wish to\n> add \"New Label C\" and \"New Label D\" to the list, you must specify `\"labels\": [\"Label A\", \"Label B\", \"New Label C\", \"New Label D\"]`." + operationId: v1_library_management + parameters: + - name: file_id + in: path + required: true + schema: + title: File Id + type: string + format: uuid + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FilesUpdateRequest' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: { } + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + delete: + tags: + - Library management + summary: Delete File + description: "Delete the specified file from the library.\n\n**Restrictions**:\nFiles in `PROCESSING` status cannot be deleted. Attempts to delete such files will result in a 422 error." + operationId: v1_library_delete + parameters: + - name: file_id + in: path + required: true + schema: + title: File Id + type: string + format: uuid + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/FileDeleteResponse' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /studio/v1/library/answer: + post: + tags: + - RAG Engine + summary: Answer + operationId: v1_library_answer + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LibraryAnswerRequest' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/LibraryAnswerResponse' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /studio/v1/library/search: + post: + tags: + - RAG Engine + summary: Search + operationId: v1_library_search + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LibrarySearchRequest' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/LibrarySearchResponse' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + '/studio/v1/library/files/{file_id}/download': + get: + tags: + - RAG Engine + summary: Generate Documents Signed Url + operationId: v1_library_management + parameters: + - name: file_id + in: path + required: true + schema: + title: File Id + type: string + format: uuid + responses: + '200': + description: Successful Response + content: + application/json: + schema: + title: Response V1 Library Management + type: string + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /studio/v1/answer: + post: + summary: Answer + operationId: v1_answer + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AnswerBody' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: { } + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /studio/v1/j2-ultra/chat: + post: + tags: + - chat + summary: j2-ultra chat + operationId: v1_j2_ultra_chat + parameters: + - name: model + in: query + schema: + title: Model + type: string + default: j2-ultra + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/language_studio_api_server__data_types__j2_chat__ChatRequest' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/ChatResponse' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /studio/v1/tokenize: + post: + tags: + - tokenize + summary: Tokenize + operationId: v1_tokenize + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TokenizeBody' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: { } + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' +components: + schemas: + AnswerBody: + title: AnswerBody + required: + - context + - question + type: object + properties: + context: + title: Context + type: string + question: + title: Question + type: string + answerLength: + $ref: '#/components/schemas/AnswerLength' + mode: + $ref: '#/components/schemas/Mode' + description: This class is to be used as a common class to all Studio API requests payloads + AnswerLength: + title: AnswerLength + enum: + - short + - medium + - long + description: An enumeration. + AssistantMessage: + title: AssistantMessage + type: object + properties: + role: + title: Role + enum: + - assistant + type: string + description: "The role of an individual message.\n- `user`: Input provided by the user. Any instructions given here that conflict\n with instructions given in the `system` prompt take precedence over the `system`\n prompt instructions.\n- `assistant`: Response generated by the model.\n- `system`: Initial instructions provided to the system to provide general guidance\n on the tone and voice of the generated message. An initial system message is\n optional but recommended to provide guidance on the tone of the chat. For\n example, \"You are a helpful chatbot with a background in earth sciences and a\n charming French accent.\"\n" + default: assistant + content: + title: Content + type: string + tool_calls: + title: Tool Calls + type: array + items: + $ref: '#/components/schemas/ToolCall' + Body_convert_document_file_studio_v1_chat_files_convert_post: + title: Body_convert_document_file_studio_v1_chat_files_convert_post + required: + - files + type: object + properties: + files: + title: Files + type: array + items: + type: string + format: binary + Body_v1_library_upload: + title: Body_v1_library_upload + required: + - file + type: object + properties: + file: + title: File + type: string + format: binary + path: + title: Path + type: string + labels: + title: Labels + type: array + items: + type: string + publicUrl: + title: Publicurl + type: string + custom_configs: + title: Custom Configs + type: string + Body_v1_upload_dataset: + title: Body_v1_upload_dataset + required: + - dataset_file + - dataset_name + type: object + properties: + dataset_file: + title: Dataset File + type: string + format: binary + dataset_name: + title: Dataset Name + type: string + selected_columns: + title: Selected Columns + type: string + approve_whitespace_correction: + title: Approve Whitespace Correction + type: boolean + delete_long_rows: + title: Delete Long Rows + type: boolean + split_ratio: + title: Split Ratio + type: number + default: 0.1 + ChatCompletion: + title: ChatCompletion + required: + - id + - choices + - usage + type: object + properties: + id: + title: Id + type: string + description: "A unique ID for the request (not the message). Repeated identical requests\nget different IDs. However, for a streaming response, the ID will be the same\nfor all responses in the stream.\n" + choices: + title: Choices + type: array + items: + $ref: '#/components/schemas/ChatCompletionResponseChoice' + description: "One or more responses, depending on the `n` parameter from the request.\n" + usage: + $ref: '#/components/schemas/UsageInfo' + meta: + title: Meta + type: object + description: Used for non-streaming responses. Streaming responses return `ChatCompletionVllmStreamingMessage`. + ChatCompletionResponseChoice: + title: ChatCompletionResponseChoice + required: + - index + - message + type: object + properties: + index: + title: Index + type: integer + description: "Zero-based index of the message in the list of messages. Note that this might not\ncorrespond with the position in the response list.\n" + message: + $ref: '#/components/schemas/AssistantMessage' + logprobs: + $ref: '#/components/schemas/Logprobs' + finish_reason: + title: Finish Reason + type: string + description: "Why the message ended. Possible reasons:\n - `stop`: The response ended naturally as a complete answer (due to\n [end-of-sequence token](https://huggingface.co/docs/transformers/v4.32.1/en/llm_tutorial#generate-text))\n or because the model generated a stop sequence provided in the request.\n - `length`: The response ended by reaching `max_tokens`.\n" + description: "A single possible response generated by the system. For non-streaming replies, There\ncan be multiple responses, depending on what `n` value you specified in the request.\n" + ChatCompletionResponseDeltaChoice: + title: ChatCompletionResponseDeltaChoice + required: + - index + - delta + type: object + properties: + index: + title: Index + type: integer + description: Always zero in streamed responses. + delta: + title: Delta + anyOf: + - $ref: '#/components/schemas/ChatStreamingFirstDelta' + - $ref: '#/components/schemas/ChatStreamingContentDelta' + description: "- **The first message** in the stream will be an object set to `{\"role\":\"assistant\"}`.\n- **Subsequent messages** will have an object `{\"content\": __token__}` with the generated token.\n" + logprobs: + $ref: '#/components/schemas/Logprobs' + finish_reason: + title: Finish Reason + type: string + description: "One of the following string values:\n - `null`: All messages but the last will return null for `finish_reason`.\n - `stop`: The response ended naturally as a complete answer (due to\n [end-of-sequence token](https://huggingface.co/docs/transformers/v4.32.1/en/llm_tutorial#generate-text))\n or because the model generated a stop sequence provided in the request.\n - `length`: The response ended by reaching `max_tokens`.\n" + ChatCompletionVllmStreamingMessage: + title: ChatCompletionVllmStreamingMessage + required: + - id + - choices + type: object + properties: + id: + title: Id + type: string + description: "A unique ID for the request (not the message). Repeated identical requests\nget different IDs. However, for a streaming response, the ID will be the same\nfor all responses in the stream.\n" + choices: + title: Choices + type: array + items: + $ref: '#/components/schemas/ChatCompletionResponseDeltaChoice' + description: The message + usage: + $ref: '#/components/schemas/UsageInfo' + meta: + title: Meta + type: object + description: Returned for streaming messages. Non-streaming responses return `ChatCompletion`. + ChatMessage: + title: ChatMessage + required: + - role + - text + type: object + properties: + role: + $ref: '#/components/schemas/RoleType' + text: + title: Text + type: string + ChatOutput: + title: ChatOutput + required: + - text + - role + - finishReason + type: object + properties: + text: + title: Text + type: string + role: + $ref: '#/components/schemas/RoleType' + finishReason: + $ref: '#/components/schemas/FinishReason' + ChatResponse: + title: ChatResponse + required: + - id + - outputs + type: object + properties: + id: + title: Id + type: string + description: "A unique ID for the request (not the message). Repeated identical requests\nget different IDs. However, for a streaming response, the ID will be the same\nfor all responses in the stream.\n" + outputs: + title: Outputs + type: array + items: + $ref: '#/components/schemas/ChatOutput' + ChatStreamingContentDelta: + title: ChatStreamingContentDelta + required: + - content + type: object + properties: + content: + title: Content + type: string + ChatStreamingFirstDelta: + title: ChatStreamingFirstDelta + required: + - role + type: object + properties: + role: + title: Role + enum: + - system + - user + - assistant + - tool + type: string + description: "The role of an individual message.\n- `user`: Input provided by the user. Any instructions given here that conflict\n with instructions given in the `system` prompt take precedence over the `system`\n prompt instructions.\n- `assistant`: Response generated by the model.\n- `system`: Initial instructions provided to the system to provide general guidance\n on the tone and voice of the generated message. An initial system message is\n optional but recommended to provide guidance on the tone of the chat. For\n example, \"You are a helpful chatbot with a background in earth sciences and a\n charming French accent.\"\n" + CompletionBody: + title: CompletionBody + required: + - prompt + type: object + properties: + prompt: + title: Prompt + type: string + numResults: + title: Numresults + type: integer + default: 1 + maxTokens: + title: Maxtokens + type: integer + default: 16 + minTokens: + title: Mintokens + type: integer + default: 0 + temperature: + title: Temperature + type: number + default: 1 + topP: + title: Topp + type: number + default: 1 + minP: + title: Minp + type: number + default: 0 + stopSequences: + title: Stopsequences + type: array + items: + type: string + topKReturn: + title: Topkreturn + type: integer + default: 0 + logitBias: + title: Logitbias + type: object + frequencyPenalty: + title: Frequencypenalty + allOf: + - $ref: '#/components/schemas/Penalty' + default: + scale: 0 + applyToWhitespaces: true + applyToPunctuations: true + applyToNumbers: true + applyToStopwords: true + applyToEmojis: true + presencePenalty: + title: Presencepenalty + allOf: + - $ref: '#/components/schemas/Penalty' + default: + scale: 0 + applyToWhitespaces: true + applyToPunctuations: true + applyToNumbers: true + applyToStopwords: true + applyToEmojis: true + countPenalty: + title: Countpenalty + allOf: + - $ref: '#/components/schemas/Penalty' + default: + scale: 0 + applyToWhitespaces: true + applyToPunctuations: true + applyToNumbers: true + applyToStopwords: true + applyToEmojis: true + epoch: + title: Epoch + type: integer + ConversationalRagFlowPublicFields: + title: ConversationalRagFlowPublicFields + required: + - messages + type: object + properties: + messages: + title: Messages + type: array + items: + $ref: '#/components/schemas/Message' + description: messages + path: + title: Path + type: string + labels: + title: Labels + type: array + items: + type: string + file_ids: + title: File Ids + type: array + items: + type: string + max_segments: + title: Max Segments + type: integer + default: 15 + retrieval_strategy: + title: Retrieval Strategy + enum: + - default + - segments + - add_neighbors + - full_doc + type: string + default: default + retrieval_similarity_threshold: + title: Retrieval Similarity Threshold + type: number + default: 0.8 + max_neighbors: + title: Max Neighbors + type: integer + hybrid_search_alpha: + title: Hybrid Search Alpha + type: number + default: 0.98 + description: This class is to be used as a common class to all Studio API requests payloads + ConversationalRagResult: + title: ConversationalRagResult + required: + - id + - choices + - context_retrieved + - answer_in_context + - sources + type: object + properties: + id: + title: Id + type: string + description: "A unique ID for the request (not the message). Repeated identical requests\nget different IDs. However, for a streaming response, the ID will be the same\nfor all responses in the stream.\n" + choices: + title: Choices + type: array + items: + $ref: '#/components/schemas/Message' + search_queries: + title: Search Queries + type: array + items: + type: string + context_retrieved: + title: Context Retrieved + type: boolean + answer_in_context: + title: Answer In Context + type: boolean + sources: + title: Sources + type: array + items: + $ref: '#/components/schemas/ConversationalRagSource' + ConversationalRagSource: + title: ConversationalRagSource + required: + - text + - file_id + - file_name + - score + type: object + properties: + text: + title: Text + type: string + file_id: + title: File Id + type: string + file_name: + title: File Name + type: string + score: + title: Score + type: number + order: + title: Order + type: integer + public_url: + title: Public Url + type: string + labels: + title: Labels + type: array + items: + type: string + Correction: + title: Correction + required: + - suggestion + - startIndex + - endIndex + - originalText + - correctionType + type: object + properties: + suggestion: + title: Suggestion + type: string + startIndex: + title: Startindex + type: integer + endIndex: + title: Endindex + type: integer + originalText: + title: Originaltext + type: string + correctionType: + $ref: '#/components/schemas/CorrectionType' + CorrectionType: + title: CorrectionType + enum: + - Grammar + - Missing Word + - Punctuation + - Spelling + - Word Repetition + - Wrong Word + description: An enumeration. + CorrectionsBody: + title: CorrectionsBody + required: + - text + type: object + properties: + text: + title: Text + type: string + description: This class is to be used as a common class to all Studio API requests payloads + CorrectionsResponse: + title: CorrectionsResponse + required: + - id + - corrections + type: object + properties: + id: + title: Id + type: string + description: "A unique ID for the request (not the message). Repeated identical requests\nget different IDs. However, for a streaming response, the ID will be the same\nfor all responses in the stream.\n" + corrections: + title: Corrections + type: array + items: + $ref: '#/components/schemas/Correction' + CustomModelInput: + title: CustomModelInput + required: + - model_type + - dataset_id + - model_name + type: object + properties: + model_type: + $ref: '#/components/schemas/CustomModelType' + learning_rate: + title: Learning Rate + type: number + num_epochs: + title: Num Epochs + type: integer + dataset_id: + title: Dataset Id + type: string + model_name: + title: Model Name + type: string + CustomModelType: + title: CustomModelType + enum: + - j2-large + - j2-grande + - j2-jumbo + - j2-light + - j2-mid + - j2-ultra + description: An enumeration. + CustomModelUpdateBody: + title: CustomModelUpdateBody + type: object + properties: + defaultEpoch: + title: Defaultepoch + type: integer + DocumentSchema: + title: DocumentSchema + required: + - content + type: object + properties: + id: + title: Id + type: string + description: "A unique ID for the request (not the message). Repeated identical requests\nget different IDs. However, for a streaming response, the ID will be the same\nfor all responses in the stream.\n" + content: + title: Content + type: string + metadata: + title: Metadata + type: object + additionalProperties: + type: string + DocumentType: + title: DocumentType + enum: + - URL + - TEXT + type: string + description: An enumeration. + EmbedType: + title: EmbedType + enum: + - query + - segment + type: string + description: An enumeration. + EmbeddingsBody: + title: EmbeddingsBody + required: + - texts + type: object + properties: + texts: + title: Texts + type: array + items: + type: string + type: + allOf: + - $ref: '#/components/schemas/EmbedType' + default: segment + description: This class is to be used as a common class to all Studio API requests payloads + FileDeleteResponse: + title: FileDeleteResponse + required: + - id + - fileId + type: object + properties: + id: + title: Id + type: string + description: "A unique ID for the request (not the message). Repeated identical requests\nget different IDs. However, for a streaming response, the ID will be the same\nfor all responses in the stream.\n" + fileId: + title: Fileid + type: string + description: The RAG library ID of the deleted file. + FileResponse: + title: FileResponse + required: + - fileId + - name + - fileType + - sizeBytes + - createdBy + - creationDate + - lastUpdated + - status + type: object + properties: + fileId: + title: Fileid + type: string + description: "The unique identifier of the file, generated by AI21.\n" + format: uuid + name: + title: Name + type: string + description: "The name of the file. This is the local file name from when the file was\nuploaded. It cannot be modified.\n" + path: + title: Path + type: string + description: "An arbitrary file-path-like string to indicate the content of a file. This has\nnothing to do with the location of the file in storage or on disk, and is only\nanother label that you can assign to the file in path-like format to help you\norganize the contents of the file or filter queries against your files. Example\npaths might be `pets/fish` or `pets/dogs`. Then, when searching your library,\nyou can filter files by the full path or path prefix. So to search only files\nin the \"dog folder\", filter by the path `/pets/dogs`. To search all files in\nthe \"pet folder\", filter your search by the path `pets/` when searching by path.\nThere isn't a restriction on whether a path must start or end with a / mark, but\nbe consistent in your usage, and all matches are prefix matching, not substring\nmatching. So filtering by `dog/` matches `dog/` and `dog/setter` but not `pets/dog/`.\n" + fileType: + title: Filetype + type: string + description: "The file type. See the file upload method to learn what file types are supported.\n" + sizeBytes: + title: Sizebytes + type: integer + description: 'The size of the file, in bytes.' + labels: + title: Labels + type: array + items: + type: string + description: "Any string labels you have associated with the file. You can apply arbitrary\nstring labels to your files and limit queries to files with one or more labels.\nSimilar to paths, but labels do not prefix match. Labels are case-sensitive.\nThere can be a maximum of 20 unique labels per account.\n" + publicUrl: + title: Publicurl + type: string + description: "The public URL of the file, if any. This URL is not validated by\nAI21 or used in any way. It is strictly a piece of metadata that you can\noptionally attach to a file.\n" + createdBy: + title: Createdby + type: string + description: "An internal identifier of the user who uploaded the file.\n" + format: uuid + creationDate: + title: Creationdate + type: string + description: The date when the file was uploaded. + format: date + lastUpdated: + title: Lastupdated + type: string + description: When the file data or metadata was last changed. + format: date + status: + title: Status + type: string + description: "File status. One of the following values: \"DB_RECORD_CREATED\",\n\"UPLOADED\", \"UPLOAD_FAILED\", \"PROCESSED\", \"PROCESSING_FAILED\"\n" + FileStatus: + title: FileStatus + enum: + - DB_RECORD_CREATED + - UPLOADED + - UPLOAD_FAILED + - PROCESSED + - PROCESSING_FAILED + type: string + description: An enumeration. + FileUploadResponse: + title: FileUploadResponse + required: + - id + - fileId + type: object + properties: + id: + title: Id + type: string + description: "A unique ID for the request (not the message). Repeated identical requests\nget different IDs. However, for a streaming response, the ID will be the same\nfor all responses in the stream.\n" + fileId: + title: Fileid + type: string + description: "A unique identifier for the uploaded file. Use this later to request, modify metadata,\nor delete the file. You don't need to store the value though, as it is returned\nalong with all file information in any file GET request. Example: da13301a-14e4-4487-aa2f-cc6048e73cdc\n" + FilesUpdateRequest: + title: FilesUpdateRequest + type: object + properties: + publicUrl: + title: Publicurl + type: string + description: "The public URL of the file, if any. This URL is not validated by\nAI21 or used in any way. It is strictly a piece of metadata that you can\noptionally attach to a file.\n" + labels: + title: Labels + type: array + items: + type: string + description: "Any labels to associate with this file. Separate multiple labels with commas. If\nprovided, will overwrite all existing labels.\n" + FinishReason: + title: FinishReason + required: + - reason + type: object + properties: + reason: + title: Reason + type: string + length: + title: Length + type: integer + sequence: + title: Sequence + type: string + FunctionToolDefinition: + title: FunctionToolDefinition + required: + - name + type: object + properties: + name: + title: Name + type: string + description: + title: Description + type: string + parameters: + $ref: '#/components/schemas/ToolParameters' + HTTPValidationError: + title: HTTPValidationError + type: object + properties: + detail: + title: Detail + type: array + items: + $ref: '#/components/schemas/ValidationError' + Highlight: + title: Highlight + required: + - text + - startIndex + - endIndex + type: object + properties: + text: + title: Text + type: string + startIndex: + title: Startindex + type: integer + endIndex: + title: Endindex + type: integer + LibraryAnswerRequest: + title: LibraryAnswerRequest + required: + - question + type: object + properties: + question: + title: Question + type: string + maxSegments: + title: Maxsegments + type: integer + path: + title: Path + type: string + labels: + title: Labels + type: array + items: + type: string + fileIds: + title: Fileids + type: array + items: + type: string + format: uuid + answerLength: + $ref: '#/components/schemas/AnswerLength' + mode: + $ref: '#/components/schemas/Mode' + retrievalStrategy: + allOf: + - $ref: '#/components/schemas/RetrievalStrategy' + default: default + retrievalSimilarityThreshold: + title: Retrievalsimilaritythreshold + maximum: 1.5 + minimum: 0.5 + type: number + hybridSearchAlpha: + title: Hybridsearchalpha + maximum: 1.0 + minimum: 0.0 + type: number + description: This class is to be used as a common class to all Studio API requests payloads + LibraryAnswerResponse: + title: LibraryAnswerResponse + required: + - id + - answerInContext + type: object + properties: + id: + title: Id + type: string + description: "A unique ID for the request (not the message). Repeated identical requests\nget different IDs. However, for a streaming response, the ID will be the same\nfor all responses in the stream.\n" + answerInContext: + title: Answerincontext + type: boolean + answer: + title: Answer + type: string + sources: + title: Sources + type: array + items: + $ref: '#/components/schemas/SourceDocument' + LibrarySearchRequest: + title: LibrarySearchRequest + required: + - query + type: object + properties: + query: + title: Query + type: string + maxSegments: + title: Maxsegments + type: integer + path: + title: Path + type: string + labels: + title: Labels + type: array + items: + type: string + fileIds: + title: Fileids + type: array + items: + type: string + format: uuid + retrievalStrategy: + allOf: + - $ref: '#/components/schemas/RetrievalStrategy' + default: default + maxNeighbors: + title: Maxneighbors + type: integer + default: 1 + retrievalSimilarityThreshold: + title: Retrievalsimilaritythreshold + maximum: 1.5 + minimum: 0.5 + type: number + hybridSearchAlpha: + title: Hybridsearchalpha + maximum: 1.0 + minimum: 0.0 + type: number + description: This class is to be used as a common class to all Studio API requests payloads + LibrarySearchResponse: + title: LibrarySearchResponse + required: + - id + - results + type: object + properties: + id: + title: Id + type: string + description: "A unique ID for the request (not the message). Repeated identical requests\nget different IDs. However, for a streaming response, the ID will be the same\nfor all responses in the stream.\n" + results: + title: Results + type: array + items: + $ref: '#/components/schemas/LibrarySearchResult' + LibrarySearchResult: + title: LibrarySearchResult + required: + - text + - fileId + - fileName + - score + type: object + properties: + text: + title: Text + type: string + fileId: + title: Fileid + type: string + fileName: + title: Filename + type: string + score: + title: Score + type: number + order: + title: Order + type: integer + publicUrl: + title: Publicurl + type: string + labels: + title: Labels + type: array + items: + type: string + Logprobs: + title: Logprobs + required: + - content + type: object + properties: + content: + title: Content + type: array + items: + $ref: '#/components/schemas/LogprobsData' + LogprobsData: + title: LogprobsData + required: + - token + - logprob + type: object + properties: + token: + title: Token + type: string + logprob: + title: Logprob + type: number + top_logprobs: + title: Top Logprobs + type: array + items: + $ref: '#/components/schemas/TopLogprobsData' + Message: + title: Message + required: + - role + - content + type: object + properties: + role: + title: Role + enum: + - assistant + - user + type: string + description: "The role of an individual message.\n- `user`: Input provided by the user. Any instructions given here that conflict\n with instructions given in the `system` prompt take precedence over the `system`\n prompt instructions.\n- `assistant`: Response generated by the model.\n- `system`: Initial instructions provided to the system to provide general guidance\n on the tone and voice of the generated message. An initial system message is\n optional but recommended to provide guidance on the tone of the chat. For\n example, \"You are a helpful chatbot with a background in earth sciences and a\n charming French accent.\"\n" + content: + title: Content + type: string + MockResponseConfig: + title: MockResponseConfig + type: object + properties: + response_delay_seconds: + title: Response Delay Seconds + minimum: 0.0 + type: number + default: 1 + stream_response_delay_between_deltas_seconds: + title: Stream Response Delay Between Deltas Seconds + minimum: 0.0 + type: number + default: 0.1 + Mode: + title: Mode + enum: + - flexible + - strict + description: An enumeration. + ModelName: + title: ModelName + enum: + - jamba-instruct + - jamba-instruct-preview + - jamba-next + - jamba-large-next + - jamba-large-next-2 + - jamba-1.5-mini + - jamba-1.5-large + type: string + description: An enumeration. + ParaphraseBody: + title: ParaphraseBody + required: + - text + type: object + properties: + text: + title: Text + type: string + style: + allOf: + - $ref: '#/components/schemas/StyleType' + default: general + startIndex: + title: Startindex + type: integer + default: 0 + endIndex: + title: Endindex + type: integer + description: This class is to be used as a common class to all Studio API requests payloads + Penalty: + title: Penalty + required: + - scale + type: object + properties: + scale: + title: Scale + type: number + applyToWhitespaces: + title: Applytowhitespaces + type: boolean + default: true + applyToPunctuations: + title: Applytopunctuations + type: boolean + default: true + applyToNumbers: + title: Applytonumbers + type: boolean + default: true + applyToStopwords: + title: Applytostopwords + type: boolean + default: true + applyToEmojis: + title: Applytoemojis + type: boolean + default: true + ResponseFormat: + title: ResponseFormat + required: + - type + type: object + properties: + type: + title: Type + enum: + - text + - json_object + type: string + RetrievalStrategy: + title: RetrievalStrategy + enum: + - default + - add_neighbors + - full_doc + type: string + description: An enumeration. + RoleType: + title: RoleType + enum: + - user + - assistant + type: string + description: An enumeration. + Segment: + title: Segment + required: + - segmentText + - segmentType + type: object + properties: + segmentText: + title: Segmenttext + type: string + segmentType: + title: Segmenttype + type: string + SegmentSummary: + title: SegmentSummary + required: + - segmentText + - segmentType + - hasSummary + - highlights + type: object + properties: + summary: + title: Summary + type: string + segmentText: + title: Segmenttext + type: string + segmentHtml: + title: Segmenthtml + type: string + segmentType: + title: Segmenttype + type: string + hasSummary: + title: Hassummary + type: boolean + highlights: + title: Highlights + type: array + items: + $ref: '#/components/schemas/Highlight' + SegmentationBody: + title: SegmentationBody + required: + - sourceType + - source + type: object + properties: + sourceType: + $ref: '#/components/schemas/DocumentType' + source: + title: Source + type: string + description: This class is to be used as a common class to all Studio API requests payloads + SegmentationResponse: + title: SegmentationResponse + required: + - id + - segments + type: object + properties: + id: + title: Id + type: string + description: "A unique ID for the request (not the message). Repeated identical requests\nget different IDs. However, for a streaming response, the ID will be the same\nfor all responses in the stream.\n" + segments: + title: Segments + type: array + items: + $ref: '#/components/schemas/Segment' + SegmentedSummaryBody: + title: SegmentedSummaryBody + required: + - source + - sourceType + type: object + properties: + source: + title: Source + type: string + sourceType: + $ref: '#/components/schemas/DocumentType' + focus: + title: Focus + type: string + description: This class is to be used as a common class to all Studio API requests payloads + SourceDocument: + title: SourceDocument + required: + - fileId + - name + - highlights + type: object + properties: + fileId: + title: Fileid + type: string + name: + title: Name + type: string + highlights: + title: Highlights + type: array + items: + type: string + publicUrl: + title: Publicurl + type: string + labels: + title: Labels + type: array + items: + type: string + StyleType: + title: StyleType + enum: + - long + - short + - formal + - casual + - general + description: An enumeration. + SummarizationResponse: + title: SummarizationResponse + required: + - id + - summary + type: object + properties: + id: + title: Id + type: string + description: "A unique ID for the request (not the message). Repeated identical requests\nget different IDs. However, for a streaming response, the ID will be the same\nfor all responses in the stream.\n" + summary: + title: Summary + type: string + SummarizeBody: + title: SummarizeBody + required: + - source + - sourceType + type: object + properties: + source: + title: Source + type: string + sourceType: + $ref: '#/components/schemas/DocumentType' + focus: + title: Focus + type: string + summaryMethod: + $ref: '#/components/schemas/SummaryMethod' + description: This class is to be used as a common class to all Studio API requests payloads + SummarizeBySegmentResponse: + title: SummarizeBySegmentResponse + required: + - id + - segments + type: object + properties: + id: + title: Id + type: string + description: "A unique ID for the request (not the message). Repeated identical requests\nget different IDs. However, for a streaming response, the ID will be the same\nfor all responses in the stream.\n" + segments: + title: Segments + type: array + items: + $ref: '#/components/schemas/SegmentSummary' + SummaryMethod: + title: SummaryMethod + enum: + - segments + - guided + - fullDocument + description: An enumeration. + SystemMessage: + title: SystemMessage + required: + - content + type: object + properties: + role: + title: Role + enum: + - system + type: string + description: "The role of an individual message.\n- `user`: Input provided by the user. Any instructions given here that conflict\n with instructions given in the `system` prompt take precedence over the `system`\n prompt instructions.\n- `assistant`: Response generated by the model.\n- `system`: Initial instructions provided to the system to provide general guidance\n on the tone and voice of the generated message. An initial system message is\n optional but recommended to provide guidance on the tone of the chat. For\n example, \"You are a helpful chatbot with a background in earth sciences and a\n charming French accent.\"\n" + default: system + content: + title: Content + type: string + TokenizeBody: + title: TokenizeBody + required: + - text + type: object + properties: + text: + title: Text + type: string + ToolCall: + title: ToolCall + required: + - id + - function + type: object + properties: + id: + title: Id + type: string + description: "A unique ID for the request (not the message). Repeated identical requests\nget different IDs. However, for a streaming response, the ID will be the same\nfor all responses in the stream.\n" + type: + title: Type + enum: + - function + type: string + default: function + function: + $ref: '#/components/schemas/ToolFunction' + ToolDefinition: + title: ToolDefinition + required: + - type + - function + type: object + properties: + type: + title: Type + enum: + - function + type: string + function: + $ref: '#/components/schemas/FunctionToolDefinition' + ToolFunction: + title: ToolFunction + required: + - name + - arguments + type: object + properties: + name: + title: Name + type: string + arguments: + title: Arguments + type: string + ToolMessage: + title: ToolMessage + required: + - content + - tool_call_id + type: object + properties: + role: + title: Role + enum: + - tool + type: string + description: "The role of an individual message.\n- `user`: Input provided by the user. Any instructions given here that conflict\n with instructions given in the `system` prompt take precedence over the `system`\n prompt instructions.\n- `assistant`: Response generated by the model.\n- `system`: Initial instructions provided to the system to provide general guidance\n on the tone and voice of the generated message. An initial system message is\n optional but recommended to provide guidance on the tone of the chat. For\n example, \"You are a helpful chatbot with a background in earth sciences and a\n charming French accent.\"\n" + default: tool + content: + title: Content + type: string + tool_call_id: + title: Tool Call Id + type: string + ToolParameters: + title: ToolParameters + required: + - properties + type: object + properties: + type: + title: Type + enum: + - object + type: string + description: 'Type of the parameter schema, only `object` is supported' + default: object + properties: + title: Properties + type: object + required: + title: Required + type: array + items: + type: string + description: List of required properties + TopLogprobsData: + title: TopLogprobsData + required: + - token + - logprob + type: object + properties: + token: + title: Token + type: string + logprob: + title: Logprob + type: number + UsageInfo: + title: UsageInfo + required: + - prompt_tokens + - completion_tokens + - total_tokens + type: object + properties: + prompt_tokens: + title: Prompt Tokens + type: integer + description: "Number of tokens in the prompt for this request. Note that the prompt token\nincludes the entire message history, plus extra tokens needed by the system\nwhen combining the list of prompt messages into a single message, as\nrequired by the model. The number of extra tokens is typically proportional\nto the number of messages in the thread, and should be relatively small.\n" + completion_tokens: + title: Completion Tokens + type: integer + description: Number of tokens in the response message. + total_tokens: + title: Total Tokens + type: integer + description: "`prompt_tokens` + `completion_tokens`.\n" + UserMessage: + title: UserMessage + required: + - content + type: object + properties: + role: + title: Role + enum: + - user + type: string + description: "The role of an individual message.\n- `user`: Input provided by the user. Any instructions given here that conflict\n with instructions given in the `system` prompt take precedence over the `system`\n prompt instructions.\n- `assistant`: Response generated by the model.\n- `system`: Initial instructions provided to the system to provide general guidance\n on the tone and voice of the generated message. An initial system message is\n optional but recommended to provide guidance on the tone of the chat. For\n example, \"You are a helpful chatbot with a background in earth sciences and a\n charming French accent.\"\n" + default: user + content: + title: Content + type: string + ValidationError: + title: ValidationError + required: + - loc + - msg + - type + type: object + properties: + loc: + title: Location + type: array + items: + anyOf: + - type: string + - type: integer + msg: + title: Message + type: string + type: + title: Error Type + type: string + language_studio_api_server__data_types__chat__ChatRequest: + title: ChatRequest + required: + - model + - messages + type: object + properties: + model: + $ref: '#/components/schemas/ModelName' + messages: + title: Messages + type: array + items: + oneOf: + - $ref: '#/components/schemas/UserMessage' + - $ref: '#/components/schemas/AssistantMessage' + - $ref: '#/components/schemas/ToolMessage' + - $ref: '#/components/schemas/SystemMessage' + discriminator: + propertyName: role + mapping: + user: '#/components/schemas/UserMessage' + assistant: '#/components/schemas/AssistantMessage' + tool: '#/components/schemas/ToolMessage' + system: '#/components/schemas/SystemMessage' + description: messages + tools: + title: Tools + type: array + items: + $ref: '#/components/schemas/ToolDefinition' + n: + title: N + type: integer + default: 1 + max_tokens: + title: Max Tokens + type: integer + default: 4096 + temperature: + title: Temperature + type: number + top_p: + title: Top P + type: number + default: 1 + stop: + title: Stop + anyOf: + - type: string + - type: array + items: + type: string + stream: + title: Stream + type: boolean + description: "Whether or not to stream the result one token at a time using\n[server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events).\nThis can be useful when waiting for long results where a long wait time for an\nanswer can be problematic, such as a chatbot. If set to `True`, then `n` must\nbe 1. A streaming response is different than the non-streaming response.\n" + default: false + mock_response: + $ref: '#/components/schemas/MockResponseConfig' + documents: + title: Documents + type: array + items: + $ref: '#/components/schemas/DocumentSchema' + response_format: + title: Response Format + allOf: + - $ref: '#/components/schemas/ResponseFormat' + default: + type: text + language_studio_api_server__data_types__j2_chat__ChatRequest: + title: ChatRequest + required: + - messages + - system + type: object + properties: + messages: + title: Messages + type: array + items: + $ref: '#/components/schemas/ChatMessage' + description: messages + system: + title: System + type: string + frequencyPenalty: + title: Frequencypenalty + allOf: + - $ref: '#/components/schemas/Penalty' + default: + scale: 0 + applyToWhitespaces: true + applyToPunctuations: true + applyToNumbers: true + applyToStopwords: true + applyToEmojis: true + presencePenalty: + title: Presencepenalty + allOf: + - $ref: '#/components/schemas/Penalty' + default: + scale: 0 + applyToWhitespaces: true + applyToPunctuations: true + applyToNumbers: true + applyToStopwords: true + applyToEmojis: true + countPenalty: + title: Countpenalty + allOf: + - $ref: '#/components/schemas/Penalty' + default: + scale: 0 + applyToWhitespaces: true + applyToPunctuations: true + applyToNumbers: true + applyToStopwords: true + applyToEmojis: true + numResults: + title: Numresults + type: integer + default: 1 + temperature: + title: Temperature + type: number + default: 0.7 + maxTokens: + title: Maxtokens + type: integer + default: 300 + minTokens: + title: Mintokens + type: integer + default: 0 + topP: + title: Topp + type: number + default: 1 + topKReturn: + title: Topkreturn + type: integer + default: 0 + stopSequences: + title: Stopsequences + type: array + items: + type: string + description: This class is to be used as a common class to all Studio API requests payloads + securitySchemes: + Bearer: + type: http + scheme: bearer +security: + - Bearer: [ ] \ No newline at end of file diff --git a/specs/cohere.yaml b/specs/cohere.yaml new file mode 100644 index 0000000000..b5f6393533 --- /dev/null +++ b/specs/cohere.yaml @@ -0,0 +1,12089 @@ +openapi: 3.0.1 +info: + title: API Reference + description: "The Cohere Platform is centered around models.\n\nEach model has a different amount of power (i.e. parameters), to be used for different tasks.\n\nCohere also supports finetuning of baseline models to improve performance on downstream tasks or to teach the model large quantities of information which cannot be extracted with few-shot learning or prompt engineering." + termsOfService: https://cohere.com/terms-of-use + contact: + name: Cohere Developers + url: https://cohere.com/ + email: team@cohere.com + license: + name: proprietary + url: https://cohere.com/terms-of-use + version: '1.0' +servers: + - url: https://api.cohere.com + description: production +paths: + /v1/chat: + post: + summary: Chat + description: "Generates a text response to a user message.\nTo learn how to use the Chat API with Streaming and RAG follow our [Text Generation guides](https://docs.cohere.com/docs/chat-api).\n" + operationId: chat + parameters: + - $ref: '#/components/parameters/RequestSource' + requestBody: + content: + application/json: + schema: + required: + - message + type: object + properties: + message: + type: string + description: "Text input for the model to respond to.\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n" + x-fern-audiences: + - public + model: + type: string + description: "Defaults to `command-r-plus`.\n\nThe name of a compatible [Cohere model](https://docs.cohere.com/docs/models) or the ID of a [fine-tuned](https://docs.cohere.com/docs/chat-fine-tuning) model.\nCompatible Deployments: Cohere Platform, Private Deployments\n" + x-fern-audiences: + - public + stream: + type: boolean + description: "Defaults to `false`.\n\nWhen `true`, the response will be a JSON stream of events. The final event will contain the complete response, and will have an `event_type` of `\"stream-end\"`.\n\nStreaming is beneficial for user interfaces that render the contents of the response piece by piece, as it gets generated.\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n" + x-fern-audiences: + - public + preamble: + type: string + description: "When specified, the default Cohere preamble will be replaced with the provided one. Preambles are a part of the prompt used to adjust the model's overall behavior and conversation style, and use the `SYSTEM` role.\n\nThe `SYSTEM` role is also used for the contents of the optional `chat_history=` parameter. When used with the `chat_history=` parameter it adds content throughout a conversation. Conversely, when used with the `preamble=` parameter it adds content at the start of the conversation only.\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n" + x-fern-audiences: + - public + chat_history: + minItems: 0 + type: array + items: + $ref: '#/components/schemas/Message' + description: "A list of previous messages between the user and the model, giving the model conversational context for responding to the user's `message`.\n\nEach item represents a single message in the chat history, excluding the current user turn. It has two properties: `role` and `message`. The `role` identifies the sender (`CHATBOT`, `SYSTEM`, or `USER`), while the `message` contains the text content.\n\nThe chat_history parameter should not be used for `SYSTEM` messages in most cases. Instead, to add a `SYSTEM` role message at the beginning of a conversation, the `preamble` parameter should be used.\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n" + x-fern-audiences: + - public + conversation_id: + type: string + description: "An alternative to `chat_history`.\n\nProviding a `conversation_id` creates or resumes a persisted conversation with the specified ID. The ID can be any non empty string.\nCompatible Deployments: Cohere Platform\n" + x-fern-audiences: + - public + prompt_truncation: + enum: + - OFF + - AUTO + - AUTO_PRESERVE_ORDER + type: string + description: "Defaults to `AUTO` when `connectors` are specified and `OFF` in all other cases.\n\nDictates how the prompt will be constructed.\n\nWith `prompt_truncation` set to \"AUTO\", some elements from `chat_history` and `documents` will be dropped in an attempt to construct a prompt that fits within the model's context length limit. During this process the order of the documents and chat history will be changed and ranked by relevance.\n\nWith `prompt_truncation` set to \"AUTO_PRESERVE_ORDER\", some elements from `chat_history` and `documents` will be dropped in an attempt to construct a prompt that fits within the model's context length limit. During this process the order of the documents and chat history will be preserved as they are inputted into the API.\n\nWith `prompt_truncation` set to \"OFF\", no elements will be dropped. If the sum of the inputs exceeds the model's context length limit, a `TooManyTokens` error will be returned.\nCompatible Deployments: Cohere Platform Only AUTO_PRESERVE_ORDER: Azure, AWS Sagemaker/Bedrock, Private Deployments\n" + x-fern-audiences: + - public + connectors: + minItems: 0 + type: array + items: + $ref: '#/components/schemas/ChatConnector' + description: "Accepts `{\"id\": \"web-search\"}`, and/or the `\"id\"` for a custom [connector](https://docs.cohere.com/docs/connectors), if you've [created](https://docs.cohere.com/docs/creating-and-deploying-a-connector) one.\n\nWhen specified, the model's reply will be enriched with information found by querying each of the connectors (RAG).\nCompatible Deployments: Cohere Platform\n" + x-fern-audiences: + - public + search_queries_only: + type: boolean + description: "Defaults to `false`.\n\nWhen `true`, the response will only contain a list of generated search queries, but no search will take place, and no reply from the model to the user's `message` will be generated.\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n" + x-fern-audiences: + - public + documents: + type: array + items: + $ref: '#/components/schemas/ChatDocument' + description: "A list of relevant documents that the model can cite to generate a more accurate reply. Each document is a string-string dictionary.\n\nExample:\n```\n[\n { \"title\": \"Tall penguins\", \"text\": \"Emperor penguins are the tallest.\" },\n { \"title\": \"Penguin habitats\", \"text\": \"Emperor penguins only live in Antarctica.\" },\n]\n```\n\nKeys and values from each document will be serialized to a string and passed to the model. The resulting generation will include citations that reference some of these documents.\n\nSome suggested keys are \"text\", \"author\", and \"date\". For better generation quality, it is recommended to keep the total word count of the strings in the dictionary to under 300 words.\n\nAn `id` field (string) can be optionally supplied to identify the document in the citations. This field will not be passed to the model.\n\nAn `_excludes` field (array of strings) can be optionally supplied to omit some key-value pairs from being shown to the model. The omitted fields will still show up in the citation object. The \"_excludes\" field will not be passed to the model.\n\nSee ['Document Mode'](https://docs.cohere.com/docs/retrieval-augmented-generation-rag#document-mode) in the guide for more information.\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n" + x-fern-audiences: + - public + citation_quality: + enum: + - fast + - accurate + - off + type: string + description: "Defaults to `\"accurate\"`.\n\nDictates the approach taken to generating citations as part of the RAG flow by allowing the user to specify whether they want `\"accurate\"` results, `\"fast\"` results or no results.\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n" + x-fern-audiences: + - public + temperature: + maximum: 1 + minimum: 0 + type: number + description: "Defaults to `0.3`.\n\nA non-negative float that tunes the degree of randomness in generation. Lower temperatures mean less random generations, and higher temperatures mean more random generations.\n\nRandomness can be further maximized by increasing the value of the `p` parameter.\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n" + format: float + x-fern-audiences: + - public + max_tokens: + type: integer + description: "The maximum number of tokens the model will generate as part of the response. Note: Setting a low value may result in incomplete generations.\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n" + writeOnly: true + x-fern-audiences: + - public + max_input_tokens: + type: integer + description: "The maximum number of input tokens to send to the model. If not specified, `max_input_tokens` is the model's context length limit minus a small buffer.\n\nInput will be truncated according to the `prompt_truncation` parameter.\nCompatible Deployments: Cohere Platform\n" + writeOnly: true + x-fern-audiences: + - public + k: + maximum: 500 + minimum: 0 + type: integer + description: "Ensures only the top `k` most likely tokens are considered for generation at each step.\nDefaults to `0`, min value of `0`, max value of `500`.\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n" + default: 0 + writeOnly: true + x-fern-audiences: + - public + p: + maximum: 0.99 + minimum: 0.01 + type: number + description: "Ensures that only the most likely tokens, with total probability mass of `p`, are considered for generation at each step. If both `k` and `p` are enabled, `p` acts after `k`.\nDefaults to `0.75`. min value of `0.01`, max value of `0.99`.\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n" + default: 0.75 + writeOnly: true + x-fern-audiences: + - public + seed: + maximum: 18446744073709552000 + minimum: 0 + type: integer + description: "If specified, the backend will make a best effort to sample tokens\ndeterministically, such that repeated requests with the same\nseed and parameters should return the same result. However,\ndeterminism cannot be totally guaranteed.\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n" + x-fern-audiences: + - public + stop_sequences: + type: array + items: + type: string + description: "A list of up to 5 strings that the model will use to stop generation. If the model generates a string that matches any of the strings in the list, it will stop generating tokens and return the generated text up to that point not including the stop sequence.\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n" + writeOnly: true + x-fern-audiences: + - public + frequency_penalty: + type: number + description: "Defaults to `0.0`, min value of `0.0`, max value of `1.0`.\n\nUsed to reduce repetitiveness of generated tokens. The higher the value, the stronger a penalty is applied to previously present tokens, proportional to how many times they have already appeared in the prompt or prior generation.\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n" + writeOnly: true + x-fern-audiences: + - public + presence_penalty: + type: number + description: "Defaults to `0.0`, min value of `0.0`, max value of `1.0`.\n\nUsed to reduce repetitiveness of generated tokens. Similar to `frequency_penalty`, except that this penalty is applied equally to all tokens that have already appeared, regardless of their exact frequencies.\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n" + writeOnly: true + x-fern-audiences: + - public + tools: + minItems: 0 + type: array + items: + $ref: '#/components/schemas/Tool' + description: "A list of available tools (functions) that the model may suggest invoking before producing a text response.\n\nWhen `tools` is passed (without `tool_results`), the `text` field in the response will be `\"\"` and the `tool_calls` field in the response will be populated with a list of tool calls that need to be made. If no calls need to be made, the `tool_calls` array will be empty.\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n" + x-fern-audiences: + - public + tool_results: + minItems: 0 + type: array + items: + $ref: '#/components/schemas/ToolResult' + description: "A list of results from invoking tools recommended by the model in the previous chat turn. Results are used to produce a text response and will be referenced in citations. When using `tool_results`, `tools` must be passed as well.\nEach tool_result contains information about how it was invoked, as well as a list of outputs in the form of dictionaries.\n\n**Note**: `outputs` must be a list of objects. If your tool returns a single object (eg `{\"status\": 200}`), make sure to wrap it in a list.\n```\ntool_results = [\n {\n \"call\": {\n \"name\": ,\n \"parameters\": {\n : \n }\n },\n \"outputs\": [{\n : \n }]\n },\n ...\n]\n```\n**Note**: Chat calls with `tool_results` should not be included in the Chat history to avoid duplication of the message text.\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n" + x-fern-audiences: + - public + force_single_step: + type: boolean + description: Forces the chat to be single step. Defaults to `false`. + x-fern-audiences: + - public + response_format: + $ref: '#/components/schemas/ResponseFormat' + x-fern-audiences: + - public + x-examples: + Chat: + value: + message: Can you give me a global market overview of solar panels? + temperature: 0.3 + stream: false + chat_history: + - role: User + message: Hi! + - role: Chatbot + message: How can I help you today? + prompt_truncation: OFF + Chat with web search: + value: + message: Can you give me a global market overview of solar panels? + temperature: 0.3 + stream: false + chat_history: [ ] + connectors: + - id: web-search + prompt_truncation: AUTO + Chat with connector: + value: + message: How do I expense a meal? + stream: false + connectors: + - id: custom-connector-id + prompt_truncation: AUTO + responses: + '200': + description: OK + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/NonStreamedChatResponse' + - $ref: '#/components/schemas/StreamedChatResponse' + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' + '422': + $ref: '#/components/responses/UnprocessableEntity' + '429': + $ref: '#/components/responses/RateLimit' + '498': + $ref: '#/components/responses/InvalidToken' + '499': + $ref: '#/components/responses/RequestCancelled' + '500': + $ref: '#/components/responses/InternalServerError' + '501': + $ref: '#/components/responses/NotImplemented' + '503': + $ref: '#/components/responses/ServiceUnavailable' + '504': + $ref: '#/components/responses/GatewayTimeout' + x-fern-audiences: + - public + x-fern-streaming: + stream-condition: $request.stream + response: + required: + - text + x-fern-type-name: NonStreamedChatResponse + properties: + text: + type: string + x-fern-audiences: + - public + minLength: 1 + description: Contents of the reply generated by the model. + generation_id: + type: string + x-fern-audiences: + - public + format: uuid + description: Unique identifier for the generated reply. Useful for submitting feedback. + citations: + type: array + x-fern-audiences: + - public + minItems: 0 + description: Inline citations for the generated reply. + items: + $ref: '#/components/schemas/ChatCitation' + documents: + type: array + x-fern-audiences: + - public + minItems: 0 + description: Documents seen by the model when generating the reply. + items: + $ref: '#/components/schemas/ChatDocument' + is_search_required: + type: boolean + x-fern-audiences: + - public + description: Denotes that a search for documents is required during the RAG flow. + search_queries: + type: array + x-fern-audiences: + - public + description: 'Generated search queries, meant to be used as part of the RAG flow.' + items: + $ref: '#/components/schemas/ChatSearchQuery' + search_results: + type: array + x-fern-audiences: + - public + minItems: 0 + description: Documents retrieved from each of the conducted searches. + items: + $ref: '#/components/schemas/ChatSearchResult' + finish_reason: + x-fern-audiences: + - public + $ref: '#/components/schemas/FinishReason' + tool_calls: + x-fern-audiences: + - public + type: array + items: + $ref: '#/components/schemas/ToolCall' + chat_history: + type: array + x-fern-audiences: + - public + minItems: 0 + items: + $ref: '#/components/schemas/Message' + description: "A list of previous messages between the user and the model, meant to give the model conversational context for responding to the user's `message`.\n" + meta: + $ref: '#/components/schemas/ApiMeta' + x-fern-audiences: + - public + response-stream: + description: StreamedChatResponse is returned in streaming mode (specified with `stream=True` in the request). + x-fern-type-name: StreamedChatResponse + oneOf: + - $ref: '#/components/schemas/ChatStreamStartEvent' + - $ref: '#/components/schemas/ChatSearchQueriesGenerationEvent' + - $ref: '#/components/schemas/ChatSearchResultsEvent' + - $ref: '#/components/schemas/ChatTextGenerationEvent' + - $ref: '#/components/schemas/ChatCitationGenerationEvent' + - $ref: '#/components/schemas/ChatToolCallsGenerationEvent' + - $ref: '#/components/schemas/ChatStreamEndEvent' + - $ref: '#/components/schemas/ChatToolCallsChunkEvent' + x-fern-examples: + - code-samples: + - sdk: go + name: Default + code: "package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(\"<>\"))\n\n\tresp, err := co.Chat(\n\t\tcontext.TODO(),\n\t\t&cohere.ChatRequest{\n\t\t\tChatHistory: []*cohere.Message{\n\t\t\t\t{\n\t\t\t\t\tRole: \"USER\",\n\t\t\t\t\tUser: &cohere.ChatMessage{\n\t\t\t\t\t\tMessage: \"Who discovered gravity?\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tRole: \"CHATBOT\",\n\t\t\t\t\tChatbot: &cohere.ChatMessage{\n\t\t\t\t\t\tMessage: \"The man who is widely credited with discovering gravity is Sir Isaac Newton\",\n\t\t\t\t\t},\n\t\t\t\t}},\n\t\t\tMessage: \"What year was he born?\",\n\t\t\tConnectors: []*cohere.ChatConnector{\n\t\t\t\t{Id: \"web-search\"},\n\t\t\t},\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n" + - sdk: typescript + name: Default + code: "const { CohereClient } = require('cohere-ai');\n\nconst cohere = new CohereClient({\n token: '<>',\n});\n\n(async () => {\n const response = await cohere.chat({\n chatHistory: [\n { role: 'USER', message: 'Who discovered gravity?' },\n {\n role: 'CHATBOT',\n message: 'The man who is widely credited with discovering gravity is Sir Isaac Newton',\n },\n ],\n message: 'What year was he born?',\n // perform web search before answering the question. You can also use your own custom connector.\n connectors: [{ id: 'web-search' }],\n });\n\n console.log(response);\n})();\n" + - sdk: java + name: Default + code: "/* (C)2024 */\npackage chatpost;\n\nimport com.cohere.api.Cohere;\nimport com.cohere.api.requests.ChatRequest;\nimport com.cohere.api.types.ChatMessage;\nimport com.cohere.api.types.ChatMessageRole;\nimport com.cohere.api.types.NonStreamedChatResponse;\nimport java.util.List;\n\npublic class Default {\n public static void main(String[] args) {\n Cohere cohere = Cohere.builder().token(\"<>\").clientName(\"snippet\").build();\n\n NonStreamedChatResponse response =\n cohere.chat(\n ChatRequest.builder()\n .message(\"What year was he born?\")\n .chatHistory(\n List.of(\n ChatMessage.builder()\n .role(ChatMessageRole.USER)\n .message(\"Who discovered gravity?\")\n .build(),\n ChatMessage.builder()\n .role(ChatMessageRole.CHATBOT)\n .message(\n \"The man who is widely credited\"\n + \" with discovering gravity is\"\n + \" Sir Isaac Newton\")\n .build()))\n .build());\n\n System.out.println(response);\n }\n}\n" + - sdk: python + name: Sync + code: "import cohere\n\nco = cohere.Client(\"<>\")\n\nresponse = co.chat(\n chat_history=[\n {\"role\": \"USER\", \"message\": \"Who discovered gravity?\"},\n {\n \"role\": \"CHATBOT\",\n \"message\": \"The man who is widely credited with discovering gravity is Sir Isaac Newton\",\n },\n ],\n message=\"What year was he born?\",\n # perform web search before answering the question. You can also use your own custom connector.\n connectors=[{\"id\": \"web-search\"}],\n)\n\nprint(response)\n" + - sdk: python + name: Async + code: "import cohere\nimport asyncio\n\nco = cohere.AsyncClient(\"<>\")\n\n\nasync def main():\n return await co.chat(\n chat_history=[\n {\"role\": \"USER\", \"message\": \"Who discovered gravity?\"},\n {\n \"role\": \"CHATBOT\",\n \"message\": \"The man who is widely credited with discovering gravity is Sir Isaac Newton\",\n },\n ],\n message=\"What year was he born?\",\n # perform web search before answering the question. You can also use your own custom connector.\n connectors=[{\"id\": \"web-search\"}],\n )\n\nasyncio.run(main())\n" + - sdk: curl + name: Default + code: "curl --request POST \\\n --url https://api.cohere.com/v1/chat \\\n --header 'accept: application/json' \\\n --header 'content-type: application/json' \\\n --header \"Authorization: bearer $CO_API_KEY\" \\\n --data '{\n \"chat_history\": [\n {\n \"role\": \"USER\",\n \"message\": \"Who discovered gravity?\"\n },\n {\n \"role\": \"CHATBOT\",\n \"message\": \"The man who is widely credited with discovering gravity is Sir Isaac Newton\"\n }\n ],\n \"message\": \"What year was he born?\",\n \"connectors\": [\n {\n \"id\": \"web-search\"\n }\n ]\n }'" + request: + chat_history: + - role: USER + message: Who discovered gravity? + - role: CHATBOT + message: The man who is widely credited with discovering gravity is Sir Isaac Newton + message: What year was he born? + connectors: + - id: web-search + stream: false + response: + body: + text: Isaac Newton was born on 25 December 1642 (Old Style) or 4 January 1643 (New Style). + generation_id: 0385c7cf-4247-43a3-a450-b25b547a31e1 + chat_history: + - role: USER + message: Who discovered gravity? + - role: CHATBOT + message: The man who is widely credited with discovering gravity is Sir Isaac Newton + - role: USER + message: What year was he born? + - role: CHATBOT + message: Isaac Newton was born on 25 December 1642 (Old Style) or 4 January 1643 (New Style). + finish_reason: COMPLETE + meta: + api_version: + version: '1' + billed_units: + input_tokens: 31738 + output_tokens: 35 + tokens: + input_tokens: 32465 + output_tokens: 205 + citations: + - start: 25 + end: 41 + text: '1642-12-25T00:00:00.0000000+03:42' + document_ids: + - web-search_0 + - web-search_1 + - web-search_2 + - web-search_3 + - web-search_4 + - web-search_5 + - start: 42 + end: 53 + text: (Old Style) + document_ids: + - web-search_0 + - web-search_1 + - web-search_4 + - web-search_5 + - start: 57 + end: 71 + text: '1643-01-04T00:00:00.0000000+03:42' + document_ids: + - web-search_0 + - web-search_1 + - web-search_3 + - web-search_4 + - web-search_5 + - start: 72 + end: 83 + text: (New Style) + document_ids: + - web-search_0 + - web-search_1 + - web-search_4 + - web-search_5 + documents: + - id: web-search_0 + snippet: "New Articles History & Society\n\nLifestyles & Social Issues\n\nPhilosophy & Religion\n\nPolitics, Law & Government\n\nWorld History Science & Tech\n\nTechnology Biographies\n\nBrowse Biographies Animals & Nature\n\nBirds, Reptiles & Other Vertebrates\n\nBugs, Mollusks & Other Invertebrates\n\nFossils & Geologic Time\n\nPlants Geography & Travel\n\nGeography & Travel Arts & Culture\n\nEntertainment & Pop Culture\n\nAsk the Chatbot Games & Quizzes History & Society Science & Tech Biographies Animals & Nature Geography & Travel Arts & Culture Money Videos\n\nIntroduction & Top Questions\n\nFormative influences\n\nInfluence of the Scientific Revolution\n\nWork during the plague years\n\nInaugural lectures at Trinity\n\nInfluence of the Hermetic tradition\n\nUniversal gravitation\n\nInternational prominence\n\nInterest in religion and theology\n\nLeader of English science\n\nFinal years Quotes References & Edit History Quick Facts & Related Topics\n\nIsaac Newton Timeline\n\nIsaac Newton’s Achievements\n\nUnderstanding Newton’s Laws of Motion\n\nNumbers and Mathematics\n\nPhysics and Natural Law\n\nWhat is Isaac Newton most famous for?\n\nHow was Isaac Newton educated?\n\nWhat was Isaac Newton’s childhood like?\n\nWhat is the Scientific Revolution?\n\nHow is the Scientific Revolution connected to the Enlightenment?\n\nGravity: From Apples to the Universe\n\nTelescopes: Seeing Stars\n\nUnusual Counting Systems\n\nWhat's the Difference Between Speed and Velocity?\n\nIs Zero an Even or an Odd Number?\n\nThe 10 Greatest Basketball Players of All Time\n\nWhat Is a Modern Pentathlon?\n\nWhich Religion Is the Oldest?\n\nWhat's the Difference Between a Solstice and an Equinox?\n\nNew Seven Wonders of the World\n\nIs It True That Squirrels Forget Where They Bury About Half of Their Food?\n\nAmerica’s 5 Most Notorious Cold Cases (Including One You May Have Thought Was Already Solved)\n\nIsaac Newton, oil painting by Sir Godfrey Kneller, 1702; in the National Portrait Gallery, London. Newton's discoveries in physics and mathematics revolutionized science.(more)\n\nEnglish physicist and mathematician\n\nWhile every effort has been made to follow citation style rules, there may be some discrepancies. Please refer to the appropriate style manual or other sources if you have any questions.\n\nSelect Citation Style\n\nChicago Manual of Style\n\nShare to social media\n\nURL https://www.britannica.com/biography/Isaac-Newton\n\nThank you for your feedback\n\nOur editors will review what you’ve submitted and determine whether to revise the article.\n\nIsaac Newton Institute of Mathematical Sciences - Who was Isaac Newton?\n\nScience Kids - Fun Science and Technology for Kids - Biography of Isaac Newton\n\nTrinity College Dublin - School of mathematics - Biography of Sir Isaac Newton\n\nWorld History Encyclopedia - Isaac Newton\n\nStanford Encyclopedia of Philosophy - Biography of Isaac Newton\n\nUniversity of British Columbia - Physics and Astronomy Department - The Life and Work of Newton\n\nLiveScience - Biography of Isaac Newton\n\nPhysics LibreTexts - Newton's Laws of Motion\n\nArticles from Britannica Encyclopedias for elementary and high school students.\n\nIsaac Newton - Children's Encyclopedia (Ages 8-11)\n\nIsaac Newton - Student Encyclopedia (Ages 11 and up)\n\nPlease select which sections you would like to print:\n\nWhile every effort has been made to follow citation style rules, there may be some discrepancies. Please refer to the appropriate style manual or other sources if you have any questions.\n\nSelect Citation Style\n\nChicago Manual of Style\n\nShare to social media\n\nURL https://www.britannica.com/biography/Isaac-Newton Feedback\n\nThank you for your feedback\n\nOur editors will review what you’ve submitted and determine whether to revise the article.\n\nIsaac Newton Institute of Mathematical Sciences - Who was Isaac Newton?\n\nScience Kids - Fun Science and Technology for Kids - Biography of Isaac Newton\n\nTrinity College Dublin - School of mathematics - Biography of Sir Isaac Newton\n\nWorld History Encyclopedia - Isaac Newton\n\nStanford Encyclopedia of Philosophy - Biography of Isaac Newton\n\nUniversity of British Columbia - Physics and Astronomy Department - The Life and Work of Newton\n\nLiveScience - Biography of Isaac Newton\n\nPhysics LibreTexts - Newton's Laws of Motion\n\nArticles from Britannica Encyclopedias for elementary and high school students.\n\nIsaac Newton - Children's Encyclopedia (Ages 8-11)\n\nIsaac Newton - Student Encyclopedia (Ages 11 and up)\n\nAlso known as: Sir Isaac Newton\n\nProfessor of History of Science, Indiana University, Bloomington, 1963–89. Author of Never at Rest: A Biography of Isaac Newton and others.\n\nThe Editors of Encyclopaedia Britannica\n\nEncyclopaedia Britannica's editors oversee subject areas in which they have extensive knowledge, whether from years of experience gained by working on that content or via study for an advanced degree. They write new content and verify and edit content received from contributors.\n\nThe Editors of Encyclopaedia Britannica\n\nLast Updated: Jul 23, 2024 • Article History Table of Contents\n\nSir Isaac Newton (Show more)\n\nDecember 25, 1642 [January 4, 1643, New Style], Woolsthorpe, Lincolnshire, England (Show more)\n\nMarch 20 [March 31], 1727, London (aged 84) (Show more)\n\n“The Method of Fluxions and Infinite Series” (Show more)\n\nNewton’s laws of motion\n\nwhite light (Show more)\n\nScientific Revolution (Show more)\n\nIsaac Newton Institute of Mathematical Sciences - Who was Isaac Newton? (July 23, 2024) (Show more)\n\nSee all related content →\n\nWhat is Isaac Newton most famous for?\n\nAlthough Isaac Newton is well known for his discoveries in optics (white light composition) and mathematics (calculus), it is his formulation of the three laws of motion—the basic principles of modern physics—for which he is most famous. His formulation of the laws of motion resulted in the law of universal gravitation.\n\nHow was Isaac Newton educated?\n\nAfter interrupted attendance at the grammar school in Grantham, Lincolnshire, England, Isaac Newton finally settled down to prepare for university, going on to Trinity College, Cambridge, in 1661, somewhat older than his classmates. There he immersed himself in Aristotle’s work and discovered the works of René Descartes before graduating in 1665 with a bachelor’s degree.\n\nWhat was Isaac Newton’s childhood like?\n\nIsaac Newton was born to a widowed mother (his father died three months prior) and was not expected to survive, being tiny and weak. Shortly thereafter Newton was sent by his stepfather, the well-to-do minister Barnabas Smith, to live with his grandmother and was separated from his mother until Smith’s death in 1653.\n\nWhat did Isaac Newton write?\n\nIsaac Newton is widely known for his published work Philosophiae Naturalis Principia Mathematica (1687), commonly known as the Principia. His laws of motion first appeared in this work. It is one of the most important single works in the history of modern science.\n\nConsider how Isaac Newton's discovery of gravity led to a better understanding of planetary motion\n\nIsaac Newton's formulation of the law of universal gravitation.(more)See all videos for this article\n\nIsaac Newton (born December 25, 1642 [January 4, 1643, New Style], Woolsthorpe, Lincolnshire, England—died March 20 [March 31], 1727, London) was an English physicist and mathematician who was the culminating figure of the Scientific Revolution of the 17th century. In optics, his discovery of the composition of white light integrated the phenomena of colours into the science of light and laid the foundation for modern physical optics. In mechanics, his three laws of motion, the basic principles of modern physics, resulted in the formulation of the law of universal gravitation. In mathematics, he was the original discoverer of the infinitesimal calculus. Newton’s Philosophiae Naturalis Principia Mathematica (Mathematical Principles of Natural Philosophy, 1687) was one of the most important single works in the history of modern science.\n\nFormative influences\n\nBorn in the hamlet of Woolsthorpe, Newton was the only son of a local yeoman, also Isaac Newton, who had died three months before, and of Hannah Ayscough. That same year, at Arcetri near Florence, Galileo Galilei had died; Newton would eventually pick up his idea of a mathematical science of motion and bring his work to full fruition. A tiny and weak baby, Newton was not expected to survive his first day of life, much less 84 years. Deprived of a father before birth, he soon lost his mother as well, for within two years she married a second time; her husband, the well-to-do minister Barnabas Smith, left young Isaac with his grandmother and moved to a neighbouring village to raise a son and two daughters. For nine years, until the death of Barnabas Smith in 1653, Isaac was effectively separated from his mother, and his pronounced psychotic tendencies have been ascribed to this traumatic event. That he hated his stepfather we may be sure. When he examined the state of his soul in 1662 and compiled a catalog of sins in shorthand, he remembered “Threatning my father and mother Smith to burne them and the house over them.” The acute sense of insecurity that rendered him obsessively anxious when his work was published and irrationally violent when he defended it accompanied Newton throughout his life and can plausibly be traced to his early years.\n\nAfter his mother was widowed a second time, she determined that her first-born son should manage her now considerable property. It quickly became apparent, however, that this would be a disaster, both for the estate and for Newton. He could not bring himself to concentrate on rural affairs—set to watch the cattle, he would curl up under a tree with a book. Fortunately, the mistake was recognized, and Newton was sent back to the grammar school in Grantham, where he had already studied, to prepare for the university. As with many of the leading scientists of the age, he left behind in Grantham anecdotes about his mechanical ability and his skill in building models of machines, such as clocks and windmills. At the school he apparently gained a firm command of Latin but probably received no more than a smattering of arithmetic. By June 1661 he was ready to matriculate at Trinity College, Cambridge, somewhat older than the other undergraduates because of his interrupted education.\n\nInfluence of the Scientific Revolution\n\nWhen Newton arrived in Cambridge in 1661, the movement now known as the Scientific Revolution was well advanced, and many of the works basic to modern science had appeared. Astronomers from Nicolaus Copernicus to Johannes Kepler had elaborated the heliocentric system of the universe. Galileo had proposed the foundations of a new mechanics built on the principle of inertia. Led by René Descartes, philosophers had begun to formulate a new conception of nature as an intricate, impersonal, and inert machine. Yet as far as the universities of Europe, including Cambridge, were concerned, all this might well have never happened. They continued to be the strongholds of outmoded Aristotelianism, which rested on a geocentric view of the universe and dealt with nature in qualitative rather than quantitative terms.\n\nPhysics and Natural Law\n\nLike thousands of other undergraduates, Newton began his higher education by immersing himself in Aristotle’s work. Even though the new philosophy was not in the curriculum, it was in the air. Some time during his undergraduate career, Newton discovered the works of the French natural philosopher Descartes and the other mechanical philosophers, who, in contrast to Aristotle, viewed physical reality as composed entirely of particles of matter in motion and who held that all the phenomena of nature result from their mechanical interaction. A new set of notes, which he entitled “Quaestiones Quaedam Philosophicae” (“Certain Philosophical Questions”), begun sometime in 1664, usurped the unused pages of a notebook intended for traditional scholastic exercises; under the title he entered the slogan “Amicus Plato amicus Aristoteles magis amica veritas” (“Plato is my friend, Aristotle is my friend, but my best friend is truth”). Newton’s scientific career had begun.\n\nThe “Quaestiones” reveal that Newton had discovered the new conception of nature that provided the framework of the Scientific Revolution. He had thoroughly mastered the works of Descartes and had also discovered that the French philosopher Pierre Gassendi had revived atomism, an alternative mechanical system to explain nature. The “Quaestiones” also reveal that Newton already was inclined to find the latter a more attractive philosophy than Cartesian natural philosophy, which rejected the existence of ultimate indivisible particles. The works of the 17th-century chemist Robert Boyle provided the foundation for Newton’s considerable work in chemistry. Significantly, he had read Henry More, the Cambridge Platonist, and was thereby introduced to another intellectual world, the magical Hermetic tradition, which sought to explain natural phenomena in terms of alchemical and magical concepts. The two traditions of natural philosophy, the mechanical and the Hermetic, antithetical though they appear, continued to influence his thought and in their tension supplied the fundamental theme of his scientific career.\n\nAre you a student? Get a special academic rate on Britannica Premium. Learn More\n\nAlthough he did not record it in the “Quaestiones,” Newton had also begun his mathematical studies. He again started with Descartes, from whose La Géometrie he branched out into the other literature of modern analysis with its application of algebraic techniques to problems of geometry. He then reached back for the support of classical geometry. Within little more than a year, he had mastered the literature; and, pursuing his own line of analysis, he began to move into new territory. He discovered the binomial theorem, and he developed the calculus, a more powerful form of analysis that employs infinitesimal considerations in finding the slopes of curves and areas under curves.\n\nBy 1669 Newton was ready to write a tract summarizing his progress, De Analysi per Aequationes Numeri Terminorum Infinitas (“On Analysis by Infinite Series”), which circulated in manuscript through a limited circle and made his name known. During the next two years he revised it as De methodis serierum et fluxionum (“On the Methods of Series and Fluxions”). The word fluxions, Newton’s private rubric, indicates that the calculus had been born. Despite the fact that only a handful of savants were even aware of Newton’s existence, he had arrived at the point where he had become the leading mathematician in Europe.\n\nWork during the plague years\n\nWho created the color wheel?\n\nFor millennia, many believed Aristotle's theory that all colors were a mixture of black and white. How did we learn otherwise?(more)See all videos for this article\n\nWhen Newton received the bachelor’s degree in April 1665, the most remarkable undergraduate career in the history of university education had passed unrecognized. On his own, without formal guidance, he had sought out the new philosophy and the new mathematics and made them his own, but he had confined the progress of his studies to his notebooks. Then, in 1665, the plague closed the university, and for most of the following two years he was forced to stay at his home, contemplating at leisure what he had learned. During the plague years Newton laid the foundations of the calculus and extended an earlier insight into an essay, “Of Colours,” which contains most of the ideas elaborated in his Opticks. It was during this time that he examined the elements of circular motion and, applying his analysis to the Moon and the planets, derived the inverse square relation that the radially directed force acting on a planet decreases with the square of its distance from the Sun—which was later crucial to the law of universal gravitation. The world heard nothing of these discoveries." + timestamp: '2024-08-15T20:57:35.0000000+04:00' + title: 'Isaac Newton | Biography, Facts, Discoveries, Laws, & Inventions | Britannica' + url: https://www.britannica.com/biography/Isaac-Newton + - id: web-search_1 + snippet: "Sir Isaac Newton FRS (25 December 1642 – 20 March 1726/27) was an English polymath active as a mathematician, physicist, astronomer, alchemist, theologian, and author who was described in his time as a natural philosopher. He was a key figure in the Scientific Revolution and the Enlightenment that followed. His pioneering book Philosophiæ Naturalis Principia Mathematica (Mathematical Principles of Natural Philosophy), first published in 1687, consolidated many previous results and established classical mechanics. Newton also made seminal contributions to optics, and shares credit with German mathematician Gottfried Wilhelm Leibniz for formulating infinitesimal calculus, though he developed calculus years before Leibniz.\n\nIn the Principia, Newton formulated the laws of motion and universal gravitation that formed the dominant scientific viewpoint for centuries until it was superseded by the theory of relativity. He used his mathematical description of gravity to derive Kepler's laws of planetary motion, account for tides, the trajectories of comets, the precession of the equinoxes and other phenomena, eradicating doubt about the Solar System's heliocentricity. He demonstrated that the motion of objects on Earth and celestial bodies could be accounted for by the same principles. Newton's inference that the Earth is an oblate spheroid was later confirmed by the geodetic measurements of Maupertuis, La Condamine, and others, convincing most European scientists of the superiority of Newtonian mechanics over earlier systems.\n\nHe built the first practical reflecting telescope and developed a sophisticated theory of colour based on the observation that a prism separates white light into the colours of the visible spectrum. His work on light was collected in his highly influential book Opticks, published in 1704. He formulated an empirical law of cooling, which was the first heat transfer formulation, made the first theoretical calculation of the speed of sound, and introduced the notion of a Newtonian fluid. Furthermore, he made early investigations into electricity, with an idea from his book Opticks arguably the beginning of the field theory of the electric force. In addition to his work on calculus, as a mathematician, he contributed to the study of power series, generalised the binomial theorem to non-integer exponents, developed a method for approximating the roots of a function, and classified most of the cubic plane curves.\n\nNewton was a fellow of Trinity College and the second Lucasian Professor of Mathematics at the University of Cambridge. He was a devout but unorthodox Christian who privately rejected the doctrine of the Trinity. He refused to take holy orders in the Church of England, unlike most members of the Cambridge faculty of the day. Beyond his work on the mathematical sciences, Newton dedicated much of his time to the study of alchemy and biblical chronology, but most of his work in those areas remained unpublished until long after his death. Politically and personally tied to the Whig party, Newton served two brief terms as Member of Parliament for the University of Cambridge, in 1689–1690 and 1701–1702. He was knighted by Queen Anne in 1705 and spent the last three decades of his life in London, serving as Warden (1696–1699) and Master (1699–1727) of the Royal Mint, as well as president of the Royal Society (1703–1727).\n\nIsaac Newton was born (according to the Julian calendar in use in England at the time) on Christmas Day, 25 December 1642 (NS 4 January 1643) at Woolsthorpe Manor in Woolsthorpe-by-Colsterworth, a hamlet in the county of Lincolnshire. His father, also named Isaac Newton, had died three months before. Born prematurely, Newton was a small child; his mother Hannah Ayscough reportedly said that he could have fit inside a quart mug. When Newton was three, his mother remarried and went to live with her new husband, the Reverend Barnabas Smith, leaving her son in the care of his maternal grandmother, Margery Ayscough (née Blythe). Newton disliked his stepfather and maintained some enmity towards his mother for marrying him, as revealed by this entry in a list of sins committed up to the age of 19: \"Threatening my father and mother Smith to burn them and the house over them.\" Newton's mother had three children (Mary, Benjamin, and Hannah) from her second marriage.\n\nFrom the age of about twelve until he was seventeen, Newton was educated at The King's School in Grantham, which taught Latin and Ancient Greek and probably imparted a significant foundation of mathematics. He was removed from school by his mother and returned to Woolsthorpe-by-Colsterworth by October 1659. His mother, widowed for the second time, attempted to make him a farmer, an occupation he hated. Henry Stokes, master at The King's School, persuaded his mother to send him back to school. Motivated partly by a desire for revenge against a schoolyard bully, he became the top-ranked student, distinguishing himself mainly by building sundials and models of windmills.\n\nUniversity of Cambridge\n\nIn June 1661, Newton was admitted to Trinity College at the University of Cambridge. His uncle the Reverend William Ayscough, who had studied at Cambridge, recommended him to the university. At Cambridge, Newton started as a subsizar, paying his way by performing valet duties until he was awarded a scholarship in 1664, which covered his university costs for four more years until the completion of his MA. At the time, Cambridge's teachings were based on those of Aristotle, whom Newton read along with then more modern philosophers, including Descartes and astronomers such as Galileo Galilei and Thomas Street. He set down in his notebook a series of \"Quaestiones\" about mechanical philosophy as he found it. In 1665, he discovered the generalised binomial theorem and began to develop a mathematical theory that later became calculus. Soon after Newton obtained his BA degree at Cambridge in August 1665, the university temporarily closed as a precaution against the Great Plague.\n\nAlthough he had been undistinguished as a Cambridge student, Newton's private studies at his home in Woolsthorpe over the next two years saw the development of his theories on calculus, optics, and the law of gravitation.\n\nIn April 1667, Newton returned to the University of Cambridge, and in October he was elected as a fellow of Trinity. Fellows were required to take holy orders and be ordained as Anglican priests, although this was not enforced in the Restoration years, and an assertion of conformity to the Church of England was sufficient. He made the commitment that \"I will either set Theology as the object of my studies and will take holy orders when the time prescribed by these statutes [7 years] arrives, or I will resign from the college.\" Up until this point he had not thought much about religion and had twice signed his agreement to the Thirty-nine Articles, the basis of Church of England doctrine. By 1675 the issue could not be avoided, and by then his unconventional views stood in the way.\n\nHis academic work impressed the Lucasian professor Isaac Barrow, who was anxious to develop his own religious and administrative potential (he became master of Trinity College two years later); in 1669, Newton succeeded him, only one year after receiving his MA. The terms of the Lucasian professorship required that the holder not be active in the church – presumably to leave more time for science. Newton argued that this should exempt him from the ordination requirement, and King Charles II, whose permission was needed, accepted this argument; thus, a conflict between Newton's religious views and Anglican orthodoxy was averted.\n\nThe Lucasian Professor of Mathematics at Cambridge position included the responsibility of instructing geography. In 1672, and again in 1681, Newton published a revised, corrected, and amended edition of the Geographia Generalis, a geography textbook first published in 1650 by the then-deceased Bernhardus Varenius. In the Geographia Generalis, Varenius attempted to create a theoretical foundation linking scientific principles to classical concepts in geography, and considered geography to be a mix between science and pure mathematics applied to quantifying features of the Earth. While it is unclear if Newton ever lectured in geography, the 1733 Dugdale and Shaw English translation of the book stated Newton published the book to be read by students while he lectured on the subject. The Geographia Generalis is viewed by some as the dividing line between ancient and modern traditions in the history of geography, and Newton's involvement in the subsequent editions is thought to be a large part of the reason for this enduring legacy.\n\nNewton was elected a Fellow of the Royal Society (FRS) in 1672.\n\nNewton's work has been said \"to distinctly advance every branch of mathematics then studied\". His work on the subject, usually referred to as fluxions or calculus, seen in a manuscript of October 1666, is now published among Newton's mathematical papers. His work De analysi per aequationes numero terminorum infinitas, sent by Isaac Barrow to John Collins in June 1669, was identified by Barrow in a letter sent to Collins that August as the work \"of an extraordinary genius and proficiency in these things\". Newton later became involved in a dispute with Leibniz over priority in the development of calculus. Most modern historians believe that Newton and Leibniz developed calculus independently, although with very different mathematical notations. However, it is established that Newton came to develop calculus much earlier than Leibniz. Leibniz's notation and \"differential Method\", nowadays recognised as much more convenient notations, were adopted by continental European mathematicians, and after 1820 or so, also by British mathematicians.\n\nHis work extensively uses calculus in geometric form based on limiting values of the ratios of vanishingly small quantities: in the Principia itself, Newton gave demonstration of this under the name of \"the method of first and last ratios\" and explained why he put his expositions in this form, remarking also that \"hereby the same thing is performed as by the method of indivisibles.\" Because of this, the Principia has been called \"a book dense with the theory and application of the infinitesimal calculus\" in modern times and in Newton's time \"nearly all of it is of this calculus.\" His use of methods involving \"one or more orders of the infinitesimally small\" is present in his De motu corporum in gyrum of 1684 and in his papers on motion \"during the two decades preceding 1684\".\n\nNewton had been reluctant to publish his calculus because he feared controversy and criticism. He was close to the Swiss mathematician Nicolas Fatio de Duillier. In 1691, Duillier started to write a new version of Newton's Principia, and corresponded with Leibniz. In 1693, the relationship between Duillier and Newton deteriorated and the book was never completed. Starting in 1699, other members of the Royal Society accused Leibniz of plagiarism. The dispute then broke out in full force in 1711 when the Royal Society proclaimed in a study that it was Newton who was the true discoverer and labelled Leibniz a fraud; it was later found that Newton wrote the study's concluding remarks on Leibniz. Thus began the bitter controversy which marred the lives of both Newton and Leibniz until the latter's death in 1716.\n\nNewton is generally credited with the generalised binomial theorem, valid for any exponent. He discovered Newton's identities, Newton's method, classified cubic plane curves (polynomials of degree three in two variables), made substantial contributions to the theory of finite differences, and was the first to use fractional indices and to employ coordinate geometry to derive solutions to Diophantine equations. He approximated partial sums of the harmonic series by logarithms (a precursor to Euler's summation formula) and was the first to use power series with confidence and to revert power series. Newton's work on infinite series was inspired by Simon Stevin's decimals.\n\nIn 1666, Newton observed that the spectrum of colours exiting a prism in the position of minimum deviation is oblong, even when the light ray entering the prism is circular, which is to say, the prism refracts different colours by different angles. This led him to conclude that colour is a property intrinsic to light – a point which had, until then, been a matter of debate.\n\nFrom 1670 to 1672, Newton lectured on optics. During this period he investigated the refraction of light, demonstrating that the multicoloured image produced by a prism, which he named a spectrum, could be recomposed into white light by a lens and a second prism. Modern scholarship has revealed that Newton's analysis and resynthesis of white light owes a debt to corpuscular alchemy.\n\nHe showed that coloured light does not change its properties by separating out a coloured beam and shining it on various objects, and that regardless of whether reflected, scattered, or transmitted, the light remains the same colour. Thus, he observed that colour is the result of objects interacting with already-coloured light rather than objects generating the colour themselves. This is known as Newton's theory of colour.\n\nFrom this work, he concluded that the lens of any refracting telescope would suffer from the dispersion of light into colours (chromatic aberration). As a proof of the concept, he constructed a telescope using reflective mirrors instead of lenses as the objective to bypass that problem. Building the design, the first known functional reflecting telescope, today known as a Newtonian telescope, involved solving the problem of a suitable mirror material and shaping technique. Newton ground his own mirrors out of a custom composition of highly reflective speculum metal, using Newton's rings to judge the quality of the optics for his telescopes. In late 1668, he was able to produce this first reflecting telescope. It was about eight inches long and it gave a clearer and larger image. In 1671, the Royal Society asked for a demonstration of his reflecting telescope. Their interest encouraged him to publish his notes, Of Colours, which he later expanded into the work Opticks. When Robert Hooke criticised some of Newton's ideas, Newton was so offended that he withdrew from public debate. Newton and Hooke had brief exchanges in 1679–80, when Hooke, appointed to manage the Royal Society's correspondence, opened up a correspondence intended to elicit contributions from Newton to Royal Society transactions, which had the effect of stimulating Newton to work out a proof that the elliptical form of planetary orbits would result from a centripetal force inversely proportional to the square of the radius vector. But the two men remained generally on poor terms until Hooke's death.\n\nNewton argued that light is composed of particles or corpuscles, which were refracted by accelerating into a denser medium. He verged on soundlike waves to explain the repeated pattern of reflection and transmission by thin films (Opticks Bk. II, Props. 12), but still retained his theory of 'fits' that disposed corpuscles to be reflected or transmitted (Props.13). However, later physicists favoured a purely wavelike explanation of light to account for the interference patterns and the general phenomenon of diffraction. Today's quantum mechanics, photons, and the idea of wave–particle duality bear only a minor resemblance to Newton's understanding of light.\n\nIn his Hypothesis of Light of 1675, Newton posited the existence of the ether to transmit forces between particles. The contact with the Cambridge Platonist philosopher Henry More revived his interest in alchemy. He replaced the ether with occult forces based on Hermetic ideas of attraction and repulsion between particles. John Maynard Keynes, who acquired many of Newton's writings on alchemy, stated that \"Newton was not the first of the age of reason: He was the last of the magicians.\" Newton's contributions to science cannot be isolated from his interest in alchemy. This was at a time when there was no clear distinction between alchemy and science.\n\nIn 1704, Newton published Opticks, in which he expounded his corpuscular theory of light. He considered light to be made up of extremely subtle corpuscles, that ordinary matter was made of grosser corpuscles and speculated that through a kind of alchemical transmutation \"Are not gross Bodies and Light convertible into one another, ... and may not Bodies receive much of their Activity from the Particles of Light which enter their Composition?\" Newton also constructed a primitive form of a frictional electrostatic generator, using a glass globe.\n\nIn his book Opticks, Newton was the first to show a diagram using a prism as a beam expander, and also the use of multiple-prism arrays. Some 278 years after Newton's discussion, multiple-prism beam expanders became central to the development of narrow-linewidth tunable lasers. Also, the use of these prismatic beam expanders led to the multiple-prism dispersion theory.\n\nSubsequent to Newton, much has been amended. Young and Fresnel discarded Newton's particle theory in favour of Huygens' wave theory to show that colour is the visible manifestation of light's wavelength. Science also slowly came to realise the difference between perception of colour and mathematisable optics. The German poet and scientist, Goethe, could not shake the Newtonian foundation but \"one hole Goethe did find in Newton's armour, ... Newton had committed himself to the doctrine that refraction without colour was impossible. He, therefore, thought that the object-glasses of telescopes must forever remain imperfect, achromatism and refraction being incompatible. This inference was proved by Dollond to be wrong.\"\n\nNewton had been developing his theory of gravitation as far back as 1665. In 1679, Newton returned to his work on celestial mechanics by considering gravitation and its effect on the orbits of planets with reference to Kepler's laws of planetary motion. This followed stimulation by a brief exchange of letters in 1679–80 with Hooke, who had been appointed Secretary of the Royal Society, and who opened a correspondence intended to elicit contributions from Newton to Royal Society transactions. Newton's reawakening interest in astronomical matters received further stimulus by the appearance of a comet in the winter of 1680–1681, on which he corresponded with John Flamsteed. After the exchanges with Hooke, Newton worked out a proof that the elliptical form of planetary orbits would result from a centripetal force inversely proportional to the square of the radius vector. Newton communicated his results to Edmond Halley and to the Royal Society in De motu corporum in gyrum, a tract written on about nine sheets which was copied into the Royal Society's Register Book in December 1684. This tract contained the nucleus that Newton developed and expanded to form the Principia.\n\nThe Principia was published on 5 July 1687 with encouragement and financial help from Halley. In this work, Newton stated the three universal laws of motion. Together, these laws describe the relationship between any object, the forces acting upon it and the resulting motion, laying the foundation for classical mechanics. They contributed to many advances during the Industrial Revolution which soon followed and were not improved upon for more than 200 years. Many of these advances continue to be the underpinnings of non-relativistic technologies in the modern world. He used the Latin word gravitas (weight) for the effect that would become known as gravity, and defined the law of universal gravitation.\n\nIn the same work, Newton presented a calculus-like method of geometrical analysis using 'first and last ratios', gave the first analytical determination (based on Boyle's law) of the speed of sound in air, inferred the oblateness of Earth's spheroidal figure, accounted for the precession of the equinoxes as a result of the Moon's gravitational attraction on the Earth's oblateness, initiated the gravitational study of the irregularities in the motion of the Moon, provided a theory for the determination of the orbits of comets, and much more. Newton's biographer David Brewster reported that the complexity of applying his theory of gravity to the motion of the moon was so great it affected Newton's health: \"[H]e was deprived of his appetite and sleep\" during his work on the problem in 1692–93, and told the astronomer John Machin that \"his head never ached but when he was studying the subject\". According to Brewster, Edmund Halley also told John Conduitt that when pressed to complete his analysis Newton \"always replied that it made his head ache, and kept him awake so often, that he would think of it no more\". [Emphasis in original]\n\nNewton made clear his heliocentric view of the Solar System—developed in a somewhat modern way because already in the mid-1680s he recognised the \"deviation of the Sun\" from the centre of gravity of the Solar System. For Newton, it was not precisely the centre of the Sun or any other body that could be considered at rest, but rather \"the common centre of gravity of the Earth, the Sun and all the Planets is to be esteem'd the Centre of the World\", and this centre of gravity \"either is at rest or moves uniformly forward in a right line\". (Newton adopted the \"at rest\" alternative in view of common consent that the centre, wherever it was, was at rest.)\n\nNewton was criticised for introducing \"occult agencies\" into science because of his postulate of an invisible force able to act over vast distances. Later, in the second edition of the Principia (1713), Newton firmly rejected such criticisms in a concluding General Scholium, writing that it was enough that the phenomena implied a gravitational attraction, as they did; but they did not so far indicate its cause, and it was both unnecessary and improper to frame hypotheses of things that were not implied by the phenomena. (Here Newton used what became his famous expression \"Hypotheses non fingo\".)\n\nWith the Principia, Newton became internationally recognised. He acquired a circle of admirers, including the Swiss-born mathematician Nicolas Fatio de Duillier.\n\nIn 1710, Newton found 72 of the 78 \"species\" of cubic curves and categorised them into four types. In 1717, and probably with Newton's help, James Stirling proved that every cubic was one of these four types. Newton also claimed that the four types could be obtained by plane projection from one of them, and this was proved in 1731, four years after his death.\n\nIn the 1690s, Newton wrote a number of religious tracts dealing with the literal and symbolic interpretation of the Bible. A manuscript Newton sent to John Locke in which he disputed the fidelity of 1 John 5:7—the Johannine Comma—and its fidelity to the original manuscripts of the New Testament, remained unpublished until 1785.\n\nNewton was also a member of the Parliament of England for Cambridge University in 1689 and 1701, but according to some accounts his only comments were to complain about a cold draught in the chamber and request that the window be closed. He was, however, noted by Cambridge diarist Abraham de la Pryme to have rebuked students who were frightening locals by claiming that a house was haunted.\n\nNewton moved to London to take up the post of warden of the Royal Mint during the reign of King William III in 1696, a position that he had obtained through the patronage of Charles Montagu, 1st Earl of Halifax, then Chancellor of the Exchequer. He took charge of England's great recoining, trod on the toes of Lord Lucas, Governor of the Tower, and secured the job of deputy comptroller of the temporary Chester branch for Edmond Halley. Newton became perhaps the best-known Master of the Mint upon the death of Thomas Neale in 1699, a position Newton held for the last 30 years of his life. These appointments were intended as sinecures, but Newton took them seriously. He retired from his Cambridge duties in 1701, and exercised his authority to reform the currency and punish clippers and counterfeiters.\n\nAs Warden, and afterwards as Master, of the Royal Mint, Newton estimated that 20 percent of the coins taken in during the Great Recoinage of 1696 were counterfeit. Counterfeiting was high treason, punishable by the felon being hanged, drawn and quartered. Despite this, convicting even the most flagrant criminals could be extremely difficult, but Newton proved equal to the task.\n\nDisguised as a habitué of bars and taverns, he gathered much of that evidence himself. For all the barriers placed to prosecution, and separating the branches of government, English law still had ancient and formidable customs of authority. Newton had himself made a justice of the peace in all the home counties. A draft letter regarding the matter is included in Newton's personal first edition of Philosophiæ Naturalis Principia Mathematica, which he must have been amending at the time. Then he conducted more than 100 cross-examinations of witnesses, informers, and suspects between June 1698 and Christmas 1699. Newton successfully prosecuted 28 coiners.\n\nNewton was made president of the Royal Society in 1703 and an associate of the French Académie des Sciences. In his position at the Royal Society, Newton made an enemy of John Flamsteed, the Astronomer Royal, by prematurely publishing Flamsteed's Historia Coelestis Britannica, which Newton had used in his studies.\n\nIn April 1705, Queen Anne knighted Newton during a royal visit to Trinity College, Cambridge. The knighthood is likely to have been motivated by political considerations connected with the parliamentary election in May 1705, rather than any recognition of Newton's scientific work or services as Master of the Mint. Newton was the second scientist to be knighted, after Francis Bacon.\n\nAs a result of a report written by Newton on 21 September 1717 to the Lords Commissioners of His Majesty's Treasury, the bimetallic relationship between gold coins and silver coins was changed by royal proclamation on 22 December 1717, forbidding the exchange of gold guineas for more than 21 silver shillings. This inadvertently resulted in a silver shortage as silver coins were used to pay for imports, while exports were paid for in gold, effectively moving Britain from the silver standard to its first gold standard. It is a matter of debate as to whether he intended to do this or not. It has been argued that Newton conceived of his work at the Mint as a continuation of his alchemical work.\n\nNewton was invested in the South Sea Company and lost some £20,000 (£4.4 million in 2020) when it collapsed in around 1720.\n\nToward the end of his life, Newton took up residence at Cranbury Park, near Winchester, with his niece and her husband, until his death. His half-niece, Catherine Barton, served as his hostess in social affairs at his house on Jermyn Street in London; he was her \"very loving Uncle\", according to his letter to her when she was recovering from smallpox.\n\nNewton died in his sleep in London on 20 March 1727 (OS 20 March 1726; NS 31 March 1727). He was given a ceremonial funeral, attended by nobles, scientists, and philosophers, and was buried in Westminster Abbey among kings and queens. He was the first scientist to be buried in the abbey. Voltaire may have been present at his funeral. A bachelor, he had divested much of his estate to relatives during his last years, and died intestate. His papers went to John Conduitt and Catherine Barton.\n\nShortly after his death, a plaster death mask was moulded of Newton. It was used by Flemish sculptor John Michael Rysbrack in making a sculpture of Newton. It is now held by the Royal Society, who created a 3D scan of it in 2012.\n\nNewton's hair was posthumously examined and found to contain mercury, probably resulting from his alchemical pursuits. Mercury poisoning could explain Newton's eccentricity in late life.\n\nAlthough it was claimed that he was once engaged, Newton never married. The French writer and philosopher Voltaire, who was in London at the time of Newton's funeral, said that he \"was never sensible to any passion, was not subject to the common frailties of mankind, nor had any commerce with women—a circumstance which was assured me by the physician and surgeon who attended him in his last moments.” There exists a widespread belief that Newton died a virgin, and writers as diverse as mathematician Charles Hutton, economist John Maynard Keynes, and physicist Carl Sagan have commented on it.\n\nNewton had a close friendship with the Swiss mathematician Nicolas Fatio de Duillier, whom he met in London around 1689—some of their correspondence has survived. Their relationship came to an abrupt and unexplained end in 1693, and at the same time Newton suffered a nervous breakdown, which included sending wild accusatory letters to his friends Samuel Pepys and John Locke. His note to the latter included the charge that Locke had endeavoured to \"embroil\" him with \"woemen & by other means\".\n\nNewton was relatively modest about his achievements, writing in a letter to Robert Hooke in February 1676, \"If I have seen further it is by standing on the shoulders of giants.\" Two writers think that the sentence, written at a time when Newton and Hooke were in dispute over optical discoveries, was an oblique attack on Hooke (said to have been short and hunchbacked), rather than—or in addition to—a statement of modesty. On the other hand, the widely known proverb about standing on the shoulders of giants, published among others by seventeenth-century poet George Herbert (a former orator of the University of Cambridge and fellow of Trinity College) in his Jacula Prudentum (1651), had as its main point that \"a dwarf on a giant's shoulders sees farther of the two\", and so its effect as an analogy would place Newton himself rather than Hooke as the 'dwarf'.\n\nIn a later memoir, Newton wrote, \"I do not know what I may appear to the world, but to myself I seem to have been only like a boy playing on the sea-shore, and diverting myself in now and then finding a smoother pebble or a prettier shell than ordinary, whilst the great ocean of truth lay all undiscovered before me.\"\n\nAlthough born into an Anglican family, by his thirties Newton held a Christian faith that, had it been made public, would not have been considered orthodox by mainstream Christianity, with one historian labelling him a heretic.\n\nBy 1672, he had started to record his theological researches in notebooks which he showed to no one and which have only been available for public examination since 1972. Over half of what Newton wrote concerned theology and alchemy, and most has never been printed. His writings demonstrate an extensive knowledge of early Church writings and show that in the conflict between Athanasius and Arius which defined the Creed, he took the side of Arius, the loser, who rejected the conventional view of the Trinity. Newton \"recognized Christ as a divine mediator between God and man, who was subordinate to the Father who created him.\" He was especially interested in prophecy, but for him, \"the great apostasy was trinitarianism.\"\n\nNewton tried unsuccessfully to obtain one of the two fellowships that exempted the holder from the ordination requirement. At the last moment in 1675 he received a dispensation from the government that excused him and all future holders of the Lucasian chair.\n\nIn Newton's eyes, worshipping Christ as God was idolatry, to him the fundamental sin. In 1999, historian Stephen D. Snobelen wrote, \"Isaac Newton was a heretic. But ... he never made a public declaration of his private faith—which the orthodox would have deemed extremely radical. He hid his faith so well that scholars are still unraveling his personal beliefs.\" Snobelen concludes that Newton was at least a Socinian sympathiser (he owned and had thoroughly read at least eight Socinian books), possibly an Arian and almost certainly an anti-trinitarian.\n\nAlthough the laws of motion and universal gravitation became Newton's best-known discoveries, he warned against using them to view the Universe as a mere machine, as if akin to a great clock. He said, \"So then gravity may put the planets into motion, but without the Divine Power it could never put them into such a circulating motion, as they have about the sun\".\n\nAlong with his scientific fame, Newton's studies of the Bible and of the early Church Fathers were also noteworthy. Newton wrote works on textual criticism, most notably An Historical Account of Two Notable Corruptions of Scripture and Observations upon the Prophecies of Daniel, and the Apocalypse of St. John. He placed the crucifixion of Jesus Christ at 3 April, AD 33, which agrees with one traditionally accepted date.\n\nHe believed in a rationally immanent world, but he rejected the hylozoism implicit in Leibniz and Baruch Spinoza. The ordered and dynamically informed Universe could be understood, and must be understood, by an active reason. In his correspondence, Newton claimed that in writing the Principia \"I had an eye upon such Principles as might work with considering men for the belief of a Deity\". He saw evidence of design in the system of the world: \"Such a wonderful uniformity in the planetary system must be allowed the effect of choice\". But Newton insisted that divine intervention would eventually be required to reform the system, due to the slow growth of instabilities. For this, Leibniz lampooned him: \"God Almighty wants to wind up his watch from time to time: otherwise it would cease to move. He had not, it seems, sufficient foresight to make it a perpetual motion.\"\n\nNewton's position was vigorously defended by his follower Samuel Clarke in a famous correspondence. A century later, Pierre-Simon Laplace's work Celestial Mechanics had a natural explanation for why the planet orbits do not require periodic divine intervention. The contrast between Laplace's mechanistic worldview and Newton's one is the most strident considering the famous answer which the French scientist gave Napoleon, who had criticised him for the absence of the Creator in the Mécanique céleste: \"Sire, j'ai pu me passer de cette hypothèse\" (\"Sir, I didn't need this hypothesis\").\n\nScholars long debated whether Newton disputed the doctrine of the Trinity. His first biographer, David Brewster, who compiled his manuscripts, interpreted Newton as questioning the veracity of some passages used to support the Trinity, but never denying the doctrine of the Trinity as such. In the twentieth century, encrypted manuscripts written by Newton and bought by John Maynard Keynes (among others) were deciphered and it became known that Newton did indeed reject Trinitarianism.\n\nNewton and Robert Boyle's approach to the mechanical philosophy was promoted by rationalist pamphleteers as a viable alternative to the pantheists and enthusiasts, and was accepted hesitantly by orthodox preachers as well as dissident preachers like the latitudinarians. The clarity and simplicity of science was seen as a way to combat the emotional and metaphysical superlatives of both superstitious enthusiasm and the threat of atheism, and at the same time, the second wave of English deists used Newton's discoveries to demonstrate the possibility of a \"Natural Religion\".\n\nThe attacks made against pre-Enlightenment \"magical thinking\", and the mystical elements of Christianity, were given their foundation with Boyle's mechanical conception of the universe. Newton gave Boyle's ideas their completion through mathematical proofs and, perhaps more importantly, was very successful in popularising them.\n\nNewton was not the first of the age of reason. He was the last of the magicians, the last of the Babylonians and Sumerians, the last great mind which looked out on the visible and intellectual world with the same eyes as those who began to build our intellectual inheritance rather less than 10,000 years ago. Isaac Newton, a posthumous child born with no father on Christmas Day, 1642, was the last wonderchild to whom the Magi could do sincere and appropriate homage.\n\n–John Maynard Keynes, \"Newton, the Man\"\n\nOf an estimated ten million words of writing in Newton's papers, about one million deal with alchemy. Many of Newton's writings on alchemy are copies of other manuscripts, with his own annotations. Alchemical texts mix artisanal knowledge with philosophical speculation, often hidden behind layers of wordplay, allegory, and imagery to protect craft secrets. Some of the content contained in Newton's papers could have been considered heretical by the church.\n\nIn 1888, after spending sixteen years cataloguing Newton's papers, Cambridge University kept a small number and returned the rest to the Earl of Portsmouth. In 1936, a descendant offered the papers for sale at Sotheby's. The collection was broken up and sold for a total of about £9,000. John Maynard Keynes was one of about three dozen bidders who obtained part of the collection at auction. Keynes went on to reassemble an estimated half of Newton's collection of papers on alchemy before donating his collection to Cambridge University in 1946.\n\nAll of Newton's known writings on alchemy are currently being put online in a project undertaken by Indiana University: \"The Chymistry of Isaac Newton\" and summarised in a book.\n\nNewton's fundamental contributions to science include the quantification of gravitational attraction, the discovery that white light is actually a mixture of immutable spectral colors, and the formulation of the calculus. Yet there is another, more mysterious side to Newton that is imperfectly known, a realm of activity that spanned some thirty years of his life, although he kept it largely hidden from his contemporaries and colleagues. We refer to Newton's involvement in the discipline of alchemy, or as it was often called in seventeenth-century England, \"chymistry.\"\n\nIn June 2020, two unpublished pages of Newton's notes on Jan Baptist van Helmont's book on plague, De Peste, were being auctioned online by Bonhams. Newton's analysis of this book, which he made in Cambridge while protecting himself from London's 1665–1666 infection, is the most substantial written statement he is known to have made about the plague, according to Bonhams. As far as the therapy is concerned, Newton writes that \"the best is a toad suspended by the legs in a chimney for three days, which at last vomited up earth with various insects in it, on to a dish of yellow wax, and shortly after died. Combining powdered toad with the excretions and serum made into lozenges and worn about the affected area drove away the contagion and drew out the poison\".\n\nThe mathematician Joseph-Louis Lagrange said that Newton was the greatest genius who ever lived, and once added that Newton was also \"the most fortunate, for we cannot find more than once a system of the world to establish.\" English poet Alexander Pope wrote the famous epitaph:\n\nNature, and Nature's laws lay hid in night. God said, Let Newton be! and all was light.\n\nBut this was not allowed to be inscribed in Newton's monument at Westminster. The epitaph added is as follows:\n\nH. S. E. ISAACUS NEWTON Eques Auratus, / Qui, animi vi prope divinâ, / Planetarum Motus, Figuras, / Cometarum semitas, Oceanique Aestus. Suâ Mathesi facem praeferente / Primus demonstravit: / Radiorum Lucis dissimilitudines, / Colorumque inde nascentium proprietates, / Quas nemo antea vel suspicatus erat, pervestigavit. / Naturae, Antiquitatis, S. Scripturae, / Sedulus, sagax, fidus Interpres / Dei O. M. Majestatem Philosophiâ asseruit, / Evangelij Simplicitatem Moribus expressit. / Sibi gratulentur Mortales, / Tale tantumque exstitisse / HUMANI GENERIS DECUS. / NAT. XXV DEC. A.D. MDCXLII. OBIIT. XX. MAR. MDCCXXVI,\n\nwhich can be translated as follows:\n\nHere is buried Isaac Newton, Knight, who by a strength of mind almost divine, and mathematical principles peculiarly his own, explored the course and figures of the planets, the paths of comets, the tides of the sea, the dissimilarities in rays of light, and, what no other scholar has previously imagined, the properties of the colours thus produced. Diligent, sagacious and faithful, in his expositions of nature, antiquity and the holy Scriptures, he vindicated by his philosophy the majesty of God mighty and good, and expressed the simplicity of the Gospel in his manners. Mortals rejoice that there has existed such and so great an ornament of the human race! He was born on 25th December 1642, and died on 20th March 1726.\n\nIn a 2005 survey of members of Britain's Royal Society (formerly headed by Newton) asking who had the greater effect on the history of science, Newton or Albert Einstein, the members deemed Newton to have made the greater overall contribution. In 1999, an opinion poll of 100 of the day's leading physicists voted Einstein the \"greatest physicist ever,\" with Newton the runner-up, while a parallel survey of rank-and-file physicists by the site PhysicsWeb gave the top spot to Newton. New Scientist called Newton \"the supreme genius and most enigmatic character in the history of science\". Newton has been called the \"most influential figure in the history of Western science\". Einstein kept a picture of Newton on his study wall alongside ones of Michael Faraday and James Clerk Maxwell.\n\nPhysicist Lev Landau ranked physicists on a logarithmic scale of productivity ranging from 0 to 5. The highest ranking, 0, was assigned to Newton. Albert Einstein was ranked 0.5. A rank of 1 was awarded to the \"founding fathers\" of quantum mechanics, Niels Bohr, Werner Heisenberg, Paul Dirac and Erwin Schrödinger. Landau, a Nobel prize winner and discoverer of superfluidity, ranked himself as 2.\n\nThe SI derived unit of force is named the newton in his honour.\n\nWoolsthorpe Manor is a Grade I listed building by Historic England through being his birthplace and \"where he discovered gravity and developed his theories regarding the refraction of light\".\n\nIn 1816, a tooth said to have belonged to Newton was sold for £730 in London to an aristocrat who had it set in a ring. Guinness World Records 2002 classified it as the most valuable tooth in the world, which would value approximately £25,000 (US$35,700) in late 2001. Who bought it and who currently has it has not been disclosed.\n\nNewton himself often told the story that he was inspired to formulate his theory of gravitation by watching the fall of an apple from a tree. The story is believed to have passed into popular knowledge after being related by Catherine Barton, Newton's niece, to Voltaire. Voltaire then wrote in his Essay on Epic Poetry (1727), \"Sir Isaac Newton walking in his gardens, had the first thought of his system of gravitation, upon seeing an apple falling from a tree.\"\n\nAlthough it has been said that the apple story is a myth and that he did not arrive at his theory of gravity at any single moment, acquaintances of Newton (such as William Stukeley, whose manuscript account of 1752 has been made available by the Royal Society) do in fact confirm the incident, though not the apocryphal version that the apple actually hit Newton's head. Stukeley recorded in his Memoirs of Sir Isaac Newton's Life a conversation with Newton in Kensington on 15 April 1726:\n\nwe went into the garden, & drank thea under the shade of some appletrees, only he, & myself. amidst other discourse, he told me, he was just in the same situation, as when formerly, the notion of gravitation came into his mind. \"why should that apple always descend perpendicularly to the ground,\" thought he to him self: occasion'd by the fall of an apple, as he sat in a comtemplative mood: \"why should it not go sideways, or upwards? but constantly to the earths centre? assuredly, the reason is, that the earth draws it. there must be a drawing power in matter. & the sum of the drawing power in the matter of the earth must be in the earths center, not in any side of the earth. therefore dos this apple fall perpendicularly, or toward the center. if matter thus draws matter; it must be in proportion of its quantity. therefore the apple draws the earth, as well as the earth draws the apple.\"\n\nJohn Conduitt, Newton's assistant at the Royal Mint and husband of Newton's niece, also described the event when he wrote about Newton's life:\n\nIn the year 1666 he retired again from Cambridge to his mother in Lincolnshire. Whilst he was pensively meandering in a garden it came into his thought that the power of gravity (which brought an apple from a tree to the ground) was not limited to a certain distance from earth, but that this power must extend much further than was usually thought. Why not as high as the Moon said he to himself & if so, that must influence her motion & perhaps retain her in her orbit, whereupon he fell a calculating what would be the effect of that supposition.\n\nIt is known from his notebooks that Newton was grappling in the late 1660s with the idea that terrestrial gravity extends, in an inverse-square proportion, to the Moon; however, it took him two decades to develop the full-fledged theory. The question was not whether gravity existed, but whether it extended so far from Earth that it could also be the force holding the Moon to its orbit. Newton showed that if the force decreased as the inverse square of the distance, one could indeed calculate the Moon's orbital period, and get good agreement. He guessed the same force was responsible for other orbital motions, and hence named it \"universal gravitation\".\n\nVarious trees are claimed to be \"the\" apple tree which Newton describes. The King's School, Grantham claims that the tree was purchased by the school, uprooted and transported to the headmaster's garden some years later. The staff of the (now) National Trust-owned Woolsthorpe Manor dispute this, and claim that a tree present in their gardens is the one described by Newton. A descendant of the original tree can be seen growing outside the main gate of Trinity College, Cambridge, below the room Newton lived in when he studied there. The National Fruit Collection at Brogdale in Kent can supply grafts from their tree, which appears identical to Flower of Kent, a coarse-fleshed cooking variety.\n\nNewton's monument (1731) can be seen in Westminster Abbey, at the north of the entrance to the choir against the choir screen, near his tomb. It was executed by the sculptor Michael Rysbrack (1694–1770) in white and grey marble with design by the architect William Kent. The monument features a figure of Newton reclining on top of a sarcophagus, his right elbow resting on several of his great books and his left hand pointing to a scroll with a mathematical design. Above him is a pyramid and a celestial globe showing the signs of the Zodiac and the path of the comet of 1680. A relief panel depicts putti using instruments such as a telescope and prism.\n\nFrom 1978 until 1988, an image of Newton designed by Harry Ecclestone appeared on Series D £1 banknotes issued by the Bank of England (the last £1 notes to be issued by the Bank of England). Newton was shown on the reverse of the notes holding a book and accompanied by a telescope, a prism and a map of the Solar System.\n\nA statue of Isaac Newton, looking at an apple at his feet, can be seen at the Oxford University Museum of Natural History. A large bronze statue, Newton, after William Blake, by Eduardo Paolozzi, dated 1995 and inspired by Blake's etching, dominates the piazza of the British Library in London. A bronze statue of Newton was erected in 1858 in the centre of Grantham where he went to school, prominently standing in front of Grantham Guildhall.\n\nThe still-surviving farmhouse at Woolsthorpe By Colsterworth is a Grade I listed building by Historic England through being his birthplace and \"where he discovered gravity and developed his theories regarding the refraction of light\".\n\nEnlightenment philosophers chose a short history of scientific predecessors—Galileo, Boyle, and Newton principally—as the guides and guarantors of their applications of the singular concept of nature and natural law to every physical and social field of the day. In this respect, the lessons of history and the social structures built upon it could be discarded.\n\nIt is held by European philosophers of the Enlightenment and by historians of the Enlightenment that Newton's publication of the Principia was a turning point in the Scientific Revolution and started the Enlightenment. It was Newton's conception of the universe based upon natural and rationally understandable laws that became one of the seeds for Enlightenment ideology. Locke and Voltaire applied concepts of natural law to political systems advocating intrinsic rights; the physiocrats and Adam Smith applied natural conceptions of psychology and self-interest to economic systems; and sociologists criticised the current social order for trying to fit history into natural models of progress. Monboddo and Samuel Clarke resisted elements of Newton's work, but eventually rationalised it to conform with their strong religious views of nature.\n\nPublished in his lifetime\n\nDe analysi per aequationes numero terminorum infinitas (1669, published 1711)\n\nOf Natures Obvious Laws & Processes in Vegetation (unpublished, c. 1671–75)\n\nDe motu corporum in gyrum (1684)\n\nPhilosophiæ Naturalis Principia Mathematica (1687)\n\nScala graduum Caloris. Calorum Descriptiones & signa (1701)\n\nReports as Master of the Mint (1701–1725)\n\nArithmetica Universalis (1707)\n\nPublished posthumously\n\nDe mundi systemate (The System of the World) (1728)\n\nOptical Lectures (1728)\n\nThe Chronology of Ancient Kingdoms Amended (1728)\n\nObservations on Daniel and The Apocalypse of St. John (1733)\n\nMethod of Fluxions (1671, published 1736)\n\nAn Historical Account of Two Notable Corruptions of Scripture (1754)\n\nElements of the Philosophy of Newton, a book by Voltaire\n\nList of multiple discoveries: seventeenth century\n\nList of things named after Isaac Newton\n\nList of presidents of the Royal Society\n\n^ a b c d e During Newton's lifetime, two calendars were in use in Europe: the Julian (\"Old Style\") calendar in Protestant and Orthodox regions, including Britain; and the Gregorian (\"New Style\") calendar in Roman Catholic Europe. At Newton's birth, Gregorian dates were ten days ahead of Julian dates; thus, his birth is recorded as taking place on 25 December 1642 Old Style, but it can be converted to a New Style (modern) date of 4 January 1643. By the time of his death, the difference between the calendars had increased to eleven days. Moreover, he died in the period after the start of the New Style year on 1 January but before that of the Old Style new year on 25 March. His death occurred on 20 March 1726, according to the Old Style calendar, but the year is usually adjusted to 1727. A full conversion to New Style gives the date 31 March 1727.\n\n^ This claim was made by William Stukeley in 1727, in a letter about Newton written to Richard Mead. Charles Hutton, who in the late eighteenth century collected oral traditions about earlier scientists, declared that there \"do not appear to be any sufficient reason for his never marrying, if he had an inclination so to do. It is much more likely that he had a constitutional indifference to the state, and even to the sex in general.\"" + timestamp: '2024-08-20T11:51:54.0000000+04:00' + title: Isaac Newton - Wikipedia + url: https://en.wikipedia.org/wiki/Isaac_Newton + - id: web-search_2 + snippet: "Stanford Encyclopedia of Philosophy\n\nEditorial Information\n\nPDFs for SEP Friends\n\nAuthor and Citation Info\n\nFirst published Wed Dec 19, 2007\n\nIsaac Newton (1642–1727) is best known for having invented the calculus in the mid to late 1660s (most of a decade before Leibniz did so independently, and ultimately more influentially) and for having formulated the theory of universal gravity — the latter in his Principia, the single most important work in the transformation of early modern natural philosophy into modern physical science. Yet he also made major discoveries in optics beginning in the mid-1660s and reaching across four decades; and during the course of his 60 years of intense intellectual activity he put no less effort into chemical and alchemical research and into theology and biblical studies than he put into mathematics and physics. He became a dominant figure in Britain almost immediately following publication of his Principia in 1687, with the consequence that “Newtonianism” of one form or another had become firmly rooted there within the first decade of the eighteenth century. His influence on the continent, however, was delayed by the strong opposition to his theory of gravity expressed by such leading figures as Christiaan Huygens and Leibniz, both of whom saw the theory as invoking an occult power of action at a distance in the absence of Newton's having proposed a contact mechanism by means of which forces of gravity could act. As the promise of the theory of gravity became increasingly substantiated, starting in the late 1730s but especially during the 1740s and 1750s, Newton became an equally dominant figure on the continent, and “Newtonianism,” though perhaps in more guarded forms, flourished there as well. What physics textbooks now refer to as “Newtonian mechanics” and “Newtonian science” consists mostly of results achieved on the continent between 1740 and 1800.\n\n1.1 Newton's Early Years\n\n1.2 Newton's Years at Cambridge Prior to Principia\n\n1.3 Newton's Final Years at Cambridge\n\n1.4 Newton's Years in London and His Final Years\n\n2. Newton's Work and Influence\n\nOther Internet Resources\n\nNewton's life naturally divides into four parts: the years before he entered Trinity College, Cambridge in 1661; his years in Cambridge before the Principia was published in 1687; a period of almost a decade immediately following this publication, marked by the renown it brought him and his increasing disenchantment with Cambridge; and his final three decades in London, for most of which he was Master of the Mint. While he remained intellectually active during his years in London, his legendary advances date almost entirely from his years in Cambridge. Nevertheless, save for his optical papers of the early 1670s and the first edition of the Principia, all his works published before he died fell within his years in London.[1]\n\n1.1 Newton's Early Years\n\nNewton was born into a Puritan family in Woolsthorpe, a small village in Linconshire near Grantham, on 25 December 1642 (old calendar), a few days short of one year after Galileo died. Isaac's father, a farmer, died two months before Isaac was born. When his mother Hannah married the 63 year old Barnabas Smith three years later and moved to her new husband's residence, Isaac was left behind with his maternal grandparents. (Isaac learned to read and write from his maternal grandmother and mother, both of whom, unlike his father, were literate.) Hannah returned to Woolsthorpe with three new children in 1653, after Smith died. Two years later Isaac went to boarding school in Grantham, returning full time to manage the farm, not very successfully, in 1659. Hannah's brother, who had received an M.A. from Cambridge, and the headmaster of the Grantham school then persuaded his mother that Isaac should prepare for the university. After further schooling at Grantham, he entered Trinity College in 1661, somewhat older than most of his classmates.\n\nThese years of Newton's youth were the most turbulent in the history of England. The English Civil War had begun in 1642, King Charles was beheaded in 1649, Oliver Cromwell ruled as lord protector from 1653 until he died in 1658, followed by his son Richard from 1658 to 1659, leading to the restoration of the monarchy under Charles II in 1660. How much the political turmoil of these years affected Newton and his family is unclear, but the effect on Cambridge and other universities was substantial, if only through unshackling them for a period from the control of the Anglican Catholic Church. The return of this control with the restoration was a key factor inducing such figures as Robert Boyle to turn to Charles II for support for what in 1660 emerged as the Royal Society of London. The intellectual world of England at the time Newton matriculated to Cambridge was thus very different from what it was when he was born.\n\n1.2 Newton's Years at Cambridge Prior to Principia\n\nNewton's initial education at Cambridge was classical, focusing (primarily through secondary sources) on Aristotlean rhetoric, logic, ethics, and physics. By 1664, Newton had begun reaching beyond the standard curriculum, reading, for example, the 1656 Latin edition of Descartes's Opera philosophica, which included the Meditations, Discourse on Method, the Dioptrics, and the Principles of Philosophy. By early 1664 he had also begun teaching himself mathematics, taking notes on works by Oughtred, Viète, Wallis, and Descartes — the latter via van Schooten's Latin translation, with commentary, of the Géométrie. Newton spent all but three months from the summer of 1665 until the spring of 1667 at home in Woolsthorpe when the university was closed because of the plague. This period was his so-called annus mirabilis. During it, he made his initial experimental discoveries in optics and developed (independently of Huygens's treatment of 1659) the mathematical theory of uniform circular motion, in the process noting the relationship between the inverse-square and Kepler's rule relating the square of the planetary periods to the cube of their mean distance from the Sun. Even more impressively, by late 1666 he had become de facto the leading mathematician in the world, having extended his earlier examination of cutting-edge problems into the discovery of the calculus, as presented in his tract of October 1666. He returned to Trinity as a Fellow in 1667, where he continued his research in optics, constructing his first reflecting telescope in 1669, and wrote a more extended tract on the calculus “De Analysi per Æquations Numero Terminorum Infinitas” incorporating new work on infinite series. On the basis of this tract Isaac Barrow recommended Newton as his replacement as Lucasian Professor of Mathematics, a position he assumed in October 1669, four and a half years after he had received his Bachelor of Arts.\n\nOver the course of the next fifteen years as Lucasian Professor Newton presented his lectures and carried on research in a variety of areas. By 1671 he had completed most of a treatise length account of the calculus,[2] which he then found no one would publish. This failure appears to have diverted his interest in mathematics away from the calculus for some time, for the mathematical lectures he registered during this period mostly concern algebra. (During the early 1680s he undertook a critical review of classical texts in geometry, a review that reduced his view of the importance of symbolic mathematics.) His lectures from 1670 to 1672 concerned optics, with a large range of experiments presented in detail. Newton went public with his work in optics in early 1672, submitting material that was read before the Royal Society and then published in the Philosophical Transactions of the Royal Society. This led to four years of exchanges with various figures who challenged his claims, including both Robert Hooke and Christiaan Huygens — exchanges that at times exasperated Newton to the point that he chose to withdraw from further public exchanges in natural philosophy. Before he largely isolated himself in the late 1670s, however, he had also engaged in a series of sometimes long exchanges in the mid 1670s, most notably with John Collins (who had a copy of “De Analysi”) and Leibniz, concerning his work on the calculus. So, though they remained unpublished, Newton's advances in mathematics scarcely remained a secret.\n\nThis period as Lucasian Professor also marked the beginning of his more private researches in alchemy and theology. Newton purchased chemical apparatus and treatises in alchemy in 1669, with experiments in chemistry extending across this entire period. The issue of the vows Newton might have to take in conjunction with the Lucasian Professorship also appears to have precipitated his study of the doctrine of the Trinity, which opened the way to his questioning the validity of a good deal more doctrine central to the Roman and Anglican Churches.\n\nNewton showed little interest in orbital astronomy during this period until Hooke initiated a brief correspondence with him in an effort to solicit material for the Royal Society at the end of November 1679, shortly after Newton had returned to Cambridge following the death of his mother. Among the several problems Hooke proposed to Newton was the question of the trajectory of a body under an inverse-square central force:\n\nIt now remaines to know the proprietys of a curve Line (not circular nor concentricall) made by a centrall attractive power which makes the velocitys of Descent from the tangent Line or equall straight motion at all Distances in a Duplicate proportion to the Distances Reciprocally taken. I doubt not but that by your excellent method you will easily find out what the Curve must be, and it proprietys, and suggest a physicall Reason of this proportion.[3]\n\nNewton apparently discovered the systematic relationship between conic-section trajectories and inverse-square central forces at the time, but did not communicate it to anyone, and for reasons that remain unclear did not follow up this discovery until Halley, during a visit in the summer of 1684, put the same question to him. His immediate answer was, an ellipse; and when he was unable to produce the paper on which he had made this determination, he agreed to forward an account to Halley in London. Newton fulfilled this commitment in November by sending Halley a nine-folio-page manuscript, “De Motu Corporum in Gyrum” (“On the Motion of Bodies in Orbit”), which was entered into the Register of the Royal Society in early December 1684. The body of this tract consists of ten deduced propositions — three theorems and seven problems — all of which, along with their corollaries, recur in important propositions in the Principia.\n\nSave for a few weeks away from Cambridge, from late 1684 until early 1687, Newton concentrated on lines of research that expanded the short ten-proposition tract into the 500 page Principia, with its 192 derived propositions. Initially the work was to have a two book structure, but Newton subsequently shifted to three books, and replaced the original version of the final book with one more mathematically demanding. The manuscript for Book 1 was sent to London in the spring of 1686, and the manuscripts for Books 2 and 3, in March and April 1687, respectively. The roughly three hundred copies of the Principia came off the press in the summer of 1687, thrusting the 44 year old Newton into the forefront of natural philosophy and forever ending his life of comparative isolation.\n\n1.3 Newton's Final Years at Cambridge\n\nThe years between the publication of the Principia and Newton's permanent move to London in 1696 were marked by his increasing disenchantment with his situation in Cambridge. In January 1689, following the Glorious Revolution at the end of 1688, he was elected to represent Cambridge University in the Convention Parliament, which he did until January 1690. During this time he formed friendships with John Locke and Nicolas Fatio de Duillier, and in the summer of 1689 he finally met Christiaan Huygens face to face for two extended discussions. Perhaps because of disappointment with Huygens not being convinced by the argument for universal gravity, in the early 1690s Newton initiated a radical rewriting of the Principia. During these same years he wrote (but withheld) his principal treatise in alchemy, Praxis; he corresponded with Richard Bentley on religion and allowed Locke to read some of his writings on the subject; he once again entered into an effort to put his work on the calculus in a form suitable for publication; and he carried out experiments on diffraction with the intent of completing his Opticks, only to withhold the manuscript from publication because of dissatisfaction with its treatment of diffraction. The radical revision of the Principia became abandoned by 1693, during the middle of which Newton suffered, by his own testimony, what in more recent times would be called a nervous breakdown. In the two years following his recovery that autumn, he continued his experiments in chymistry and he put substantial effort into trying to refine and extend the gravity-based theory of the lunar orbit in the Principia, but with less success than he had hoped.\n\nThroughout these years Newton showed interest in a position of significance in London, but again with less success than he had hoped until he accepted the relatively minor position of Warden of the Mint in early 1696, a position he held until he became Master of the Mint at the end of 1699. He again represented Cambridge University in Parliament for 16 months, beginning in 1701, the year in which he resigned his Fellowship at Trinity College and the Lucasian Professorship. He was elected President of the Royal Society in 1703 and was knighted by Queen Anne in 1705.\n\n1.4 Newton's Years in London and His Final Years\n\nNewton thus became a figure of imminent authority in London over the rest of his life, in face-to-face contact with individuals of power and importance in ways that he had not known in his Cambridge years. His everyday home life changed no less dramatically when his extraordinarily vivacious teenage niece, Catherine Barton, the daughter of his half-sister Hannah, moved in with him shortly after he moved to London, staying until she married John Conduitt in 1717, and after that remaining in close contact. (It was through her and her husband that Newton's papers came down to posterity.) Catherine was socially prominent among the powerful and celebrated among the literati for the years before she married, and her husband was among the wealthiest men of London.\n\nThe London years saw Newton embroiled in some nasty disputes, probably made the worse by the ways in which he took advantage of his position of authority in the Royal Society. In the first years of his Presidency he became involved in a dispute with John Flamsteed in which he and Halley, long ill-disposed toward the Flamsteed, violated the trust of the Royal Astronomer, turning him into a permanent enemy. Ill feelings between Newton and Leibniz had been developing below the surface from even before Huygens had died in 1695, and they finally came to a head in 1710 when John Keill accused Leibniz in the Philosophical Transactions of having plagiarized the calculus from Newton and Leibniz, a Fellow of the Royal Society since 1673, demanded redress from the Society. The Society's 1712 published response was anything but redress. Newton not only was a dominant figure in this response, but then published an outspoken anonymous review of it in 1715 in the Philosophical Transactions. Leibniz and his colleagues on the Continent had never been comfortable with the Principia and its implication of action at a distance. With the priority dispute this attitude turned into one of open hostility toward Newton's theory of gravity — a hostility that was matched in its blindness by the fervor of acceptance of the theory in England. The public elements of the priority dispute had the effect of expanding a schism between Newton and Leibniz into a schism between the English associated with the Royal Society and the group who had been working with Leibniz on the calculus since the 1690s, including most notably Johann Bernoulli, and this schism in turn transformed into one between the conduct of science and mathematics in England versus the Continent that persisted long after Leibniz died in 1716.\n\nAlthough Newton obviously had far less time available to devote to solitary research during his London years than he had had in Cambridge, he did not entirely cease to be productive. The first (English) edition of his Opticks finally appeared in 1704, appended to which were two mathematical treatises, his first work on the calculus to appear in print. This edition was followed by a Latin edition in 1706 and a second English edition in 1717, each containing important Queries on key topics in natural philosophy beyond those in its predecessor. Other earlier work in mathematics began to appear in print, including a work on algebra, Arithmetica Universalis, in 1707 and “De Analysi” and a tract on finite differences, “Methodis differentialis” in 1711. The second edition of the Principia, on which Newton had begun work at the age of 66 in 1709, was published in 1713, with a third edition in 1726. Though the original plan for a radical restructuring had long been abandoned, the fact that virtually every page of the Principia received some modifications in the second edition shows how carefully Newton, often prodded by his editor Roger Cotes, reconsidered everything in it; and important parts were substantially rewritten not only in response to Continental criticisms, but also because of new data, including data from experiments on resistance forces carried out in London. Focused effort on the third edition began in 1723, when Newton was 80 years old, and while the revisions are far less extensive than in the second edition, it does contain substantive additions and modfications, and it surely has claim to being the edition that represents his most considered views.\n\nNewton died on 20 March 1727 at the age of 84. His contemporaries' conception of him nevertheless continued to expand as a consequence of various posthumous publications, including The Chronology of Ancient Kingdoms Amended (1728); the work originally intended to be the last book of the Principia, The System of the World (1728, in both English and Latin); Observations upon the Prophecies of Daniel and the Apocalypse of St. John (1733); A Treatise of the Method of Fluxions and Infinite Series (1737); A Dissertation upon the Sacred Cubit of the Jews (1737), and Four Letters from Sir Isaac Newton to Doctor Bentley concerning Some Arguments in Proof of a Deity (1756). Even then, however, the works that had been published represented only a limited fraction of the total body of papers that had been left in the hands of Catherine and John Conduitt. The five volume collection of Newton's works edited by Samuel Horsley (1779–85) did not alter this situation. Through the marriage of the Conduitts' daughter Catherine and subsequent inheritance, this body of papers came into the possession of Lord Portsmouth, who agreed in 1872 to allow it to be reviewed by scholars at Cambridge University (John Couch Adams, George Stokes, H. R. Luard, and G. D. Liveing). They issued a catalogue in 1888, and the university then retained all the papers of a scientific character. With the notable exception of W. W. Rouse Ball, little work was done on the scientific papers before World War II. The remaining papers were returned to Lord Portsmouth, and then ultimately sold at auction in 1936 to various parties. Serious scholarly work on them did not get underway until the 1970s, and much remains to be done on them.\n\n2. Newton's Work and Influence\n\nThree factors stand in the way of giving an account of Newton's work and influence. First is the contrast between the public Newton, consisting of publications in his lifetime and in the decade or two following his death, and the private Newton, consisting of his unpublished work in math and physics, his efforts in chymistry — that is, the 17th century blend of alchemy and chemistry — and his writings in radical theology — material that has become public mostly since World War II. Only the public Newton influenced the eighteenth and early nineteenth centuries, yet any account of Newton himself confined to this material can at best be only fragmentary. Second is the contrast, often shocking, between the actual content of Newton's public writings and the positions attributed to him by others, including most importantly his popularizers. The term “Newtonian” refers to several different intellectual strands unfolding in the eighteenth century, some of them tied more closely to Voltaire, Pemberton, and Maclaurin — or for that matter to those who saw themselves as extending his work, such as Clairaut, Euler, d'Alembert, Lagrange, and Laplace — than to Newton himself. Third is the contrast between the enormous range of subjects to which Newton devoted his full concentration at one time or another during the 60 years of his intellectual career — mathematics, optics, mechanics, astronomy, experimental chemistry, alchemy, and theology — and the remarkably little information we have about what drove him or his sense of himself. Biographers and analysts who try to piece together a unified picture of Newton and his intellectual endeavors often end up telling us almost as much about themselves as about Newton.\n\nCompounding the diversity of the subjects to which Newton devoted time are sharp contrasts in his work within each subject. Optics and orbital mechanics both fall under what we now call physics, and even then they were seen as tied to one another, as indicated by Descartes' first work on the subject, Le Monde, ou Traité de la lumierè. Nevertheless, two very different “Newtonian” traditions in physics arose from Newton's Opticks and Principia: from his Opticks a tradition centered on meticulous experimentation and from his Principia a tradition centered on mathematical theory. The most important element common to these two was Newton's deep commitment to having the empirical world serve not only as the ultimate arbiter, but also as the sole basis for adopting provisional theory. Throughout all of this work he displayed distrust of what was then known as the method of hypotheses – putting forward hypotheses that reach beyond all known phenomena and then testing them by deducing observable conclusions from them. Newton insisted instead on having specific phenomena decide each element of theory, with the goal of limiting the provisional aspect of theory as much as possible to the step of inductively generalizing from the specific phenomena. This stance is perhaps best summarized in his fourth Rule of Reasoning, added in the third edition of the Principia, but adopted as early as his Optical Lectures of the 1670s:\n\nIn experimental philosophy, propositions gathered from phenomena by induction should be taken to be either exactly or very nearly true notwithstanding any contrary hypotheses, until yet other phenomena make such propositions either more exact or liable to exceptions.\n\nThis rule should be followed so that arguments based on induction may not be nullified by hypotheses.\n\nSuch a commitment to empirically driven science was a hallmark of the Royal Society from its very beginnings, and one can find it in the research of Kepler, Galileo, Huygens, and in the experimental efforts of the Royal Academy of Paris. Newton, however, carried this commitment further first by eschewing the method of hypotheses and second by displaying in his Principia and Opticks how rich a set of theoretical results can be secured through well-designed experiments and mathematical theory designed to allow inferences from phenomena. The success of those after him in building on these theoretical results completed the process of transforming natural philosophy into modern empirical science.\n\nNewton's commitment to having phenomena decide the elements of theory required questions to be left open when no available phenomena could decide them. Newton contrasted himself most strongly with Leibniz in this regard at the end of his anonymous review of the Royal Society's report on the priority dispute over the calculus:\n\nIt must be allowed that these two Gentlemen differ very much in Philosophy. The one proceeds upon the Evidence arising from Experiments and Phenomena, and stops where such Evidence is wanting; the other is taken up with Hypotheses, and propounds them, not to be examined by Experiments, but to be believed without Examination. The one for want of Experiments to decide the Question, doth not affirm whether the Cause of Gravity be Mechanical or not Mechanical; the other that it is a perpetual Miracle if it be not Mechanical.\n\nNewton could have said much the same about the question of what light consists of, waves or particles, for while he felt that the latter was far more probable, he saw it still not decided by any experiment or phenomenon in his lifetime. Leaving questions about the ultimate cause of gravity and the constitution of light open was the other factor in his work driving a wedge between natural philosophy and empirical science.\n\nThe many other areas of Newton's intellectual endeavors made less of a difference to eighteenth century philosophy and science. In mathematics, Newton was the first to develop a full range of algorithms for symbolically determining what we now call integrals and derivatives, but he subsequently became fundamentally opposed to the idea, championed by Leibniz, of transforming mathematics into a discipline grounded in symbol manipulation. Newton thought the only way of rendering limits rigorous lay in extending geometry to incorporate them, a view that went entirely against the tide in the development of mathematics in the eighteenth and nineteenth ceturies. In chemistry Newton conducted a vast array of experiments, but the experimental tradition coming out of his Opticks, and not his experiments in chemistry, lay behind Lavoisier calling himself a Newtonian; indeed, one must wonder whether Lavoisier would even have associated his new form of chemistry with Newton had he been aware of Newton's fascination with writings in the alchemical tradition. And even in theology, there is Newton the anti-Trinitarian mild heretic who was not that much more radical in his departures from Roman and Anglican Christianity than many others at the time, and Newton, the wild religious zealot predicting the end of the Earth, who did not emerge to public view until quite recently.\n\nThere is surprisingly little cross-referencing of themes from one area of Newton's endeavors to another. The common element across almost all of them is that of a problem-solver extraordinaire, taking on one problem at a time and staying with it until he had found, usually rather promptly, a solution. All of his technical writings display this, but so too does his unpublished manuscript reconstructing Solomon's Temple from the biblical account of it and his posthumously published Chronology of the Ancient Kingdoms in which he attempted to infer from astronomical phenomena the dating of major events in the Old Testament. The Newton one encounters in his writings seems to compartmentalize his interests at any given moment. Whether he had a unified conception of what he was up to in all his intellectual efforts, and if so what this conception might be, has been a continuing source of controversy among Newton scholars.\n\nOf course, were it not for the Principia, there would be no entry at all for Newton in an Encyclopedia of Philosophy. In science, he would have been known only for the contributions he made to optics, which, while notable, were no more so than those made by Huygens and Grimaldi, neither of whom had much impact on philosophy; and in mathematics, his failure to publish would have relegated his work to not much more than a footnote to the achievements of Leibniz and his school. Regardless of which aspect of Newton's endeavors “Newtonian” might be applied to, the word gained its aura from the Principia. But this adds still a further complication, for the Principia itself was substantially different things to different people. The press-run of the first edition (estimated to be around 300) was too small for it to have been read by all that many individuals. The second edition also appeared in two pirated Amsterdam editions, and hence was much more widely available, as was the third edition and its English (and later French) translation. The Principia, however, is not an easy book to read, so one must still ask, even of those who had access to it, whether they read all or only portions of the book and to what extent they grasped the full complexity of what they read. The detailed commentary provided in the three volume Jesuit edition (1739–42) made the work less daunting. But even then the vast majority of those invoking the word “Newtonian” were unlikely to have been much more conversant with the Principia itself than those in the first half of the 20th century who invoked ‘relativity’ were likely to have read Einstein's two special relativity papers of 1905 or his general relativity paper of 1916. An important question to ask of any philosophers commenting on Newton is, what primary sources had they read?\n\nThe 1740s witnessed a major transformation in the standing of the science in the Principia. The Principia itself had left a number of loose-ends, most of them detectable by only highly discerning readers. By 1730, however, some of these loose-ends had been cited in Bernard le Bovier de Fontenelle's elogium for Newton[4] and in John Machin's appendix to the 1729 English translation of the Principia, raising questions about just how secure Newton's theory of gravity was, empirically. The shift on the continent began in the 1730s when Maupertuis convinced the Royal Academy to conduct expeditions to Lapland and Peru to determine whether Newton's claims about the non-spherical shape of the Earth and the variation of surface gravity with latitude are correct. Several of the loose-ends were successfully resolved during the 1740's through such notable advances beyond the Principia as Clairaut's Théorie de la Figure de la Terre; the return of the expedition from Peru; d'Alembert's 1749 rigid-body solution for the wobble of the Earth that produces the precession of the equinoxes; Clairaut's 1749 resolution of the factor of 2 discrepancy between theory and observation in the mean motion of the lunar apogee, glossed over by Newton but emphasized by Machin; and the prize-winning first ever successful description of the motion of the Moon by Tobias Mayer in 1753, based on a theory of this motion derived from gravity by Euler in the early 1750s taking advantage of Clairaut's solution for the mean motion of the apogee.\n\nEuler was the central figure in turning the three laws of motion put forward by Newton in the Principia into Newtonian mechanics. These three laws, as Newton formulated them, apply to “point-masses,” a term Euler had put forward in his Mechanica of 1736. Most of the effort of eighteenth century mechanics was devoted to solving problems of the motion of rigid bodies, elastic strings and bodies, and fluids, all of which require principles beyond Newton's three laws. From the 1740s on this led to alternative approaches to formulating a general mechanics, employing such different principles as the conservation of vis viva, the principle of least action, and d'Alembert's principle. The “Newtonian” formulation of a general mechanics sprang from Euler's proposal in 1750 that Newton's second law, in an F=ma formulation that appears nowhere in the Principia, could be applied locally within bodies and fluids to yield differential equations for the motions of bodies, elastic and rigid, and fluids. During the 1750s Euler developed his equations for the motion of fluids, and in the 1760s, his equations of rigid-body motion. What we call Newtonian mechanics was accordingly something for which Euler was more responsible than Newton.\n\nAlthough some loose-ends continued to defy resolution until much later in the eighteenth century, by the early 1750s Newton's theory of gravity had become the accepted basis for ongoing research among almost everyone working in orbital astronomy. Clairaut's successful prediction of the month of return of Halley's comet at the end of this decade made a larger segment of the educated public aware of the extent to which empirical grounds for doubting Newton's theory of gravity had largely disappeared. Even so, one must still ask of anyone outside active research in gravitational astronomy just how aware they were of the developments from ongoing efforts when they made their various pronouncements about the standing of the science of the Principia among the community of researchers. The naivety of these pronouncements cuts both ways: on the one hand, they often reflected a bloated view of how secure Newton's theory was at the time, and, on the other, they often underestimated how strong the evidence favoring it had become. The upshot is a need to be attentive to the question of what anyone, even including Newton himself, had in mind when they spoke of the science of the Principia.\n\nTo view the seventy years of research after Newton died as merely tying up the loose-ends of the Principia or as simply compiling more evidence for his theory of gravity is to miss the whole point. Research predicated on Newton's theory had answered a huge number of questions about the world dating from long before it. The motion of the Moon and the trajectories of comets were two early examples, both of which answered such questions as how one comet differs from another and what details make the Moon's motion so much more complicated than that of the satellites of Jupiter and Saturn. In the 1770s Laplace had developed a proper theory of the tides, reaching far beyond the suggestions Newton had made in the Principia by including the effects of the Earth's rotation and the non-radial components of the gravitational forces of the Sun and Moon, components that dominate the radial component that Newton had singled out. In 1786 Laplace identified a large 900 year fluctuation in the motions of Jupiter and Saturn arising from quite subtle features of their respective orbits. With this discovery, calculation of the motion of the planets from the theory of gravity became the basis for predicting planet positions, with observation serving primarily to identify further forces not yet taken into consideration in the calculation. These advances in our understanding of planetary motion led Laplace to produce the four principal volumes of his Traité de mécanique céleste from 1799 to 1805, a work collecting in one place all the theoretical and empirical results of the research predicated on Newton's Principia. From that time forward, Newtonian science sprang from Laplace's work, not Newton's.\n\nThe success of the research in celestial mechanics predicated on the Principia was unprecedented. Nothing of comparable scope and accuracy had ever occurred before in empirical research of any kind. That led to a new philosophical question: what was it about the science of the Principia that enabled it to achieve what it did? Philosophers like Locke and Berkeley began asking this question while Newton was still alive, but it gained increasing force as successes piled on one another over the decades after he died. This question had a practical side, as those working in other fields like chemistry pursued comparable success, and others like Hume and Adam Smith aimed for a science of human affairs. It had, of course, a philosophical side, giving rise to the subdiscipline of philosophy of science, starting with Kant and continuing throughout the nineteenth century as other areas of physical science began showing similar signs of success. The Einsteinian revolution in the beginning of the twentieth century, in which Newtonian theory was shown to hold only as a limiting case of the special and general theories of relativity, added a further twist to the question, for now all the successes of Newtonian science, which still remain in place, have to be seen as predicated on a theory that holds only to high approximation in parochial circumstances.\n\nThe extraordinary character of the Principia gave rise to a still continuing tendency to place great weight on everything Newton said. This, however, was, and still is, easy to carry to excess. One need look no further than Book 2 of the Principia to see that Newton had no more claim to being somehow in tune with nature and the truth than any number of his contemporaries. Newton's manuscripts do reveal an exceptional level of attention to detail of phrasing, from which we can rightly conclude that his pronouncements, especially in print, were generally backed by careful, self-critical reflection. But this conclusion does not automatically extend to every statement he ever made. We must constantly be mindful of the possibility of too much weight being placed, then or now, on any pronouncement that stands in relative isolation over his 60 year career; and, to counter the tendency to excess, we should be even more vigilant than usual in not losing sight of the context, circumstantial as well as historical and textual, of both Newton's statements and the eighteenth century reaction to them.\n\nPhilosophiae Naturalis Principia Mathematica (“Mathematical Principles of Natural Philosophy”), London, 1687; Cambridge, 1713; London, 1726. Isaac Newton's Philosophiae Naturalis Principia Mathematica, the Third Edition with Variant Readings, ed. A. Koyré and I. B. Cohen, 2 vols., Cambridge: Harvard University Press and Cambridge: Cambridge University Press, 1972. The Principia: Mathematical Principles of Natural Philosophy: A New Translation, tr. I. B. Cohen and Anne Whitman, preceded by “A Guide to Newton'sPrincipia” by I. B. Cohen, Berkeley: University of California Press, 1999.\n\nOpticks or A Treatise of the Reflections, Refractions, Inflections & Colors of Light, London, 1704 (English), 1706 (Latin), 1717/18 (English). Now available under the same title, but based on the fourth posthumous edition of 1730, New York: Dover Publications, 1952.\n\nThe Chronology of Ancient Kingdoms Amended, ed. John Conduit, London,1728.\n\nThe System of the World, London, 1728. The original version of the third book of the Principia, retitled by the translator and reissued in reprint form, London: Dawsons of Pall Mall, 1969.\n\nObservations upon the Prophecies of Daniel and the Apocalypse of St John, ed. Benjamin Smith, London and Dublin,1733.\n\nThe Correspondence of Isaac Newton, ed. H. W. Turnbull, J. F. Scott, A. R. Hall, and L. Tilling, 7 vols., Cambridge: Cambridge University Press, 1959–1984.\n\nThe Mathematical Papers of Isaac Newton, ed. D. T. Whiteside, 8 vols., Cambridge: Cambridge University Press, 1967–81.\n\nThe Mathematical Works of Isaac Newton, ed. D. T. Whiteside, 2 vols., New York: Johnson Reprint Corporation, 1964, 1967. Contains facsimile reprints of the translations into English published during the first half of the 18th century.\n\nUnpublished Scientific Papers of Isaac Newton, ed. A. R. Hall and M. B. Hall, Cambridge: Cambridge University Press, 1962.\n\nIsaac Newton's Papers and Letters on Natural Philosophy, 2nd ed., ed. I. B. Cohen and R. E. Schofield, Cambridge: Harvard University Press, 1978. Contains all the papers on optics published in the early 1670s, the letters to Bentley, and Fontenelle's Elogium, among other things).\n\nThe Optical Papers of Isaac Newton: Volume 1, The Optical Lectures, 1670–72, ed. Alan E. Shapiro, Cambridge University Press, 1984; volume 2 forthcoming.\n\nPhilosophical Writings, ed. A. Janiak, Cambridge: Cambridge University Press, 2004.\n\nWestfall, Richard S., 1980, Never At Rest: A Biography of Isaac Newton, New York: Cambridge University Press.\n\nHall, A. Rupert, 1992, Isaac Newton: Adventurer in Thought, Oxford: Blackwell.\n\nFeingold, Mordechai, 2004, The Newtonian Moment: Isaac Newton and the Making of Modern Culture, Oxford: Oxford University Press.\n\nIliffe, Rob, 2007, Newton: A Very Short Introduction Oxford: Oxford University Press.\n\nCohen, I. B. and Smith, G. E., 2002, The Cambridge Companion to Newton, Cambridge: Cambridge University Press.\n\nCohen, I. B. and Westfall, R. S., 1995, Newton: Texts, Backgrounds, and Commentaries, A Norton Critical Edition, New York: Norton.\n\nHow to cite this entry.\n\nPreview the PDF version of this entry at the Friends of the SEP Society.\n\nLook up topics and thinkers related to this entry at the Internet Philosophy Ontology Project (InPhO).\n\nEnhanced bibliography for this entry at PhilPapers, with links to its database.\n\nOther Internet Resources\n\nMacTutor History of Mathematics Archive\n\nThe Newton Project-Canada\n\nThe Chymistry of Isaac Newton, Digital Library at Indiana\n\nCopernicus, Nicolaus | Descartes, René | Kant, Immanuel | Leibniz, Gottfried Wilhelm | Newton, Isaac: Philosophiae Naturalis Principia Mathematica | scientific revolutions | trinity | Whewell, William\n\nCopyright © 2007 by George Smith \n\nOpen access to the SEP is made possible by a world-wide funding initiative. The Encyclopedia Now Needs Your Support Please Read How You Can Help Keep the Encyclopedia Free\n\nEditorial Information\n\nPDFs for SEP Friends\n\nView this site from another server:\n\nUSA (Main Site) Philosophy, Stanford University\n\nInfo about mirror sites\n\nThe Stanford Encyclopedia of Philosophy is copyright © 2024 by The Metaphysics Research Lab, Department of Philosophy, Stanford University\n\nLibrary of Congress Catalog Data: ISSN 1095-5054" + timestamp: '2024-07-29T20:46:15.0000000+04:00' + title: Isaac Newton (Stanford Encyclopedia of Philosophy) + url: https://plato.stanford.edu/Entries/newton/ + - id: web-search_3 + snippet: "ShowsThis Day In HistoryScheduleTopicsStories\n\nFind History on Facebook (Opens in a new window)\n\nFind History on Twitter (Opens in a new window)\n\nFind History on YouTube (Opens in a new window)\n\nFind History on Instagram (Opens in a new window)\n\nFind History on TikTok (Opens in a new window)\n\nBy: History.com Editors\n\nUpdated: October 16, 2023 | Original: March 10, 2015\n\ncopy page linkPrint Page\n\nIsaac Newton is best know for his theory about the law of gravity, but his “Principia Mathematica” (1686) with its three laws of motion greatly influenced the Enlightenment in Europe. Born in 1643 in Woolsthorpe, England, Sir Isaac Newton began developing his theories on light, calculus and celestial mechanics while on break from Cambridge University. \n\nYears of research culminated with the 1687 publication of “Principia,” a landmark work that established the universal laws of motion and gravity. Newton’s second major book, “Opticks,” detailed his experiments to determine the properties of light. Also a student of Biblical history and alchemy, the famed scientist served as president of the Royal Society of London and master of England’s Royal Mint until his death in 1727.\n\nIsaac Newton: Early Life and Education\n\nIsaac Newton was born on January 4, 1643, in Woolsthorpe, Lincolnshire, England. The son of a farmer who died three months before he was born, Newton spent most of his early years with his maternal grandmother after his mother remarried. His education was interrupted by a failed attempt to turn him into a farmer, and he attended the King’s School in Grantham before enrolling at the University of Cambridge’s Trinity College in 1661.\n\nNewton studied a classical curriculum at Cambridge, but he became fascinated by the works of modern philosophers such as René Descartes, even devoting a set of notes to his outside readings he titled “Quaestiones Quaedam Philosophicae” (“Certain Philosophical Questions”). When the Great Plague shuttered Cambridge in 1665, Newton returned home and began formulating his theories on calculus, light and color, his farm the setting for the supposed falling apple that inspired his work on gravity.\n\nHistory Shorts: Isaac Newton's Genius in Quarantine (Forged in Crisis)\n\nIsaac Newton’s Telescope and Studies on Light\n\nNewton returned to Cambridge in 1667 and was elected a minor fellow. He constructed the first reflecting telescope in 1668, and the following year he received his Master of Arts degree and took over as Cambridge’s Lucasian Professor of Mathematics. Asked to give a demonstration of his telescope to the Royal Society of London in 1671, he was elected to the Royal Society the following year and published his notes on optics for his peers.\n\nThrough his experiments with refraction, Newton determined that white light was a composite of all the colors on the spectrum, and he asserted that light was composed of particles instead of waves. His methods drew sharp rebuke from established Society member Robert Hooke, who was unsparing again with Newton’s follow-up paper in 1675. \n\nKnown for his temperamental defense of his work, Newton engaged in heated correspondence with Hooke before suffering a nervous breakdown and withdrawing from the public eye in 1678. In the following years, he returned to his earlier studies on the forces governing gravity and dabbled in alchemy.\n\nIsaac Newton and the Law of Gravity\n\nIn 1684, English astronomer Edmund Halley paid a visit to the secluded Newton. Upon learning that Newton had mathematically worked out the elliptical paths of celestial bodies, Halley urged him to organize his notes. \n\nThe result was the 1687 publication of “Philosophiae Naturalis Principia Mathematica” (Mathematical Principles of Natural Philosophy), which established the three laws of motion and the law of universal gravity. Newton’s three laws of motion state that (1) Every object in a state of uniform motion will remain in that state of motion unless an external force acts on it; (2) Force equals mass times acceleration: F=MA and (3) For every action there is an equal and opposite reaction.\n\n“Principia” propelled Newton to stardom in intellectual circles, eventually earning universal acclaim as one of the most important works of modern science. His work was a foundational part of the European Enlightenment.\n\nWith his newfound influence, Newton opposed the attempts of King James II to reinstitute Catholic teachings at English Universities. King James II was replaced by his protestant daughter Mary and her husband William of Orange as part of the Glorious Revolution of 1688, and Newton was elected to represent Cambridge in Parliament in 1689. \n\nNewton moved to London permanently after being named warden of the Royal Mint in 1696, earning a promotion to master of the Mint three years later. Determined to prove his position wasn’t merely symbolic, Newton moved the pound sterling from the silver to the gold standard and sought to punish counterfeiters.\n\nThe death of Hooke in 1703 allowed Newton to take over as president of the Royal Society, and the following year he published his second major work, “Opticks.” Composed largely from his earlier notes on the subject, the book detailed Newton’s painstaking experiments with refraction and the color spectrum, closing with his ruminations on such matters as energy and electricity. In 1705, he was knighted by Queen Anne of England.\n\nIsaac Newton: Founder of Calculus?\n\nAround this time, the debate over Newton’s claims to originating the field of calculus exploded into a nasty dispute. Newton had developed his concept of “fluxions” (differentials) in the mid 1660s to account for celestial orbits, though there was no public record of his work. \n\nIn the meantime, German mathematician Gottfried Leibniz formulated his own mathematical theories and published them in 1684. As president of the Royal Society, Newton oversaw an investigation that ruled his work to be the founding basis of the field, but the debate continued even after Leibniz’s death in 1716. Researchers later concluded that both men likely arrived at their conclusions independent of one another.\n\nDeath of Isaac Newton\n\nNewton was also an ardent student of history and religious doctrines, and his writings on those subjects were compiled into multiple books that were published posthumously. Having never married, Newton spent his later years living with his niece at Cranbury Park near Winchester, England. He died in his sleep on March 31, 1727, and was buried in Westminster Abbey.\n\nA giant even among the brilliant minds that drove the Scientific Revolution, Newton is remembered as a transformative scholar, inventor and writer. He eradicated any doubts about the heliocentric model of the universe by establishing celestial mechanics, his precise methodology giving birth to what is known as the scientific method. Although his theories of space-time and gravity eventually gave way to those of Albert Einstein, his work remains the bedrock on which modern physics was built.\n\n“If I have seen further it is by standing on the shoulders of Giants.”\n\n“I can calculate the motion of heavenly bodies but not the madness of people.”\n\n“What we know is a drop, what we don't know is an ocean.”\n\n“Gravity explains the motions of the planets, but it cannot explain who sets the planets in motion.”\n\n“No great discovery was ever made without a bold guess.”\n\nHISTORY Vault: Sir Isaac Newton: Gravity of Genius\n\nExplore the life of Sir Isaac Newton, who laid the foundations for calculus and defined the laws of gravity.\n\nSign up for Inside History\n\nGet HISTORY’s most fascinating stories delivered to your inbox three times a week.\n\nBy submitting your information, you agree to receive emails from HISTORY and A+E Networks. You can opt out at any time. You must be 16 years or older and a resident of the United States.\n\nMore details: Privacy Notice | Terms of Use | Contact Us" + timestamp: '2024-08-13T07:37:00.0000000+04:00' + title: 'Isaac Newton ‑ Facts, Biography & Laws' + url: https://www.history.com/topics/inventions/isaac-newton + - id: web-search_4 + snippet: "Isaac Newton was an English physicist and mathematician famous for his laws of physics. He was a key figure in the Scientific Revolution of the 17th century.\n\nUpdated: Nov 05, 2020 10:32 AM EST\n\nPhoto: Painting by Godfrey Kneller, [Public Domain], via Wikimedia Commons//Getty Images\n\nWho Was Isaac Newton?\n\nIsaac Newton was a physicist and mathematician who developed the principles of modern physics, including the laws of motion and is credited as one of the great minds of the 17th-century Scientific Revolution.\n\nIn 1687, he published his most acclaimed work, Philosophiae Naturalis Principia Mathematica (Mathematical Principles of Natural Philosophy), which has been called the single most influential book on physics. In 1705, he was knighted by Queen Anne of England, making him Sir Isaac Newton.\n\nEarly Life and Family\n\nNewton was born on January 4, 1643, in Woolsthorpe, Lincolnshire, England. Using the \"old\" Julian calendar, Newton's birth date is sometimes displayed as December 25, 1642.\n\nNewton was the only son of a prosperous local farmer, also named Isaac, who died three months before he was born. A premature baby born tiny and weak, Newton was not expected to survive.\n\nWhen he was 3 years old, his mother, Hannah Ayscough Newton, remarried a well-to-do minister, Barnabas Smith, and went to live with him, leaving young Newton with his maternal grandmother.\n\nThe experience left an indelible imprint on Newton, later manifesting itself as an acute sense of insecurity. He anxiously obsessed over his published work, defending its merits with irrational behavior.\n\nAt age 12, Newton was reunited with his mother after her second husband died. She brought along her three small children from her second marriage.\n\nIsaac Newton's Education\n\nNewton was enrolled at the King's School in Grantham, a town in Lincolnshire, where he lodged with a local apothecary and was introduced to the fascinating world of chemistry.\n\nHis mother pulled him out of school at age 12. Her plan was to make him a farmer and have him tend the farm. Newton failed miserably, as he found farming monotonous. Newton was soon sent back to King's School to finish his basic education.\n\nPerhaps sensing the young man's innate intellectual abilities, his uncle, a graduate of the University of Cambridge's Trinity College, persuaded Newton's mother to have him enter the university. Newton enrolled in a program similar to a work-study in 1661, and subsequently waited on tables and took care of wealthier students' rooms.\n\nScientific Revolution\n\nWhen Newton arrived at Cambridge, the Scientific Revolution of the 17th century was already in full force. The heliocentric view of the universe—theorized by astronomers Nicolaus Copernicus and Johannes Kepler, and later refined by Galileo—was well known in most European academic circles.\n\nPhilosopher René Descartes had begun to formulate a new concept of nature as an intricate, impersonal and inert machine. Yet, like most universities in Europe, Cambridge was steeped in Aristotelian philosophy and a view of nature resting on a geocentric view of the universe, dealing with nature in qualitative rather than quantitative terms.\n\nDuring his first three years at Cambridge, Newton was taught the standard curriculum but was fascinated with the more advanced science. All his spare time was spent reading from the modern philosophers. The result was a less-than-stellar performance, but one that is understandable, given his dual course of study.\n\nIt was during this time that Newton kept a second set of notes, entitled \"Quaestiones Quaedam Philosophicae\" (\"Certain Philosophical Questions\"). The \"Quaestiones\" reveal that Newton had discovered the new concept of nature that provided the framework for the Scientific Revolution. Though Newton graduated without honors or distinctions, his efforts won him the title of scholar and four years of financial support for future education.\n\nIn 1665, the bubonic plague that was ravaging Europe had come to Cambridge, forcing the university to close. After a two-year hiatus, Newton returned to Cambridge in 1667 and was elected a minor fellow at Trinity College, as he was still not considered a standout scholar.\n\nIn the ensuing years, his fortune improved. Newton received his Master of Arts degree in 1669, before he was 27. During this time, he came across Nicholas Mercator's published book on methods for dealing with infinite series.\n\nNewton quickly wrote a treatise, De Analysi, expounding his own wider-ranging results. He shared this with friend and mentor Isaac Barrow, but didn't include his name as author.\n\nIn June 1669, Barrow shared the unaccredited manuscript with British mathematician John Collins. In August 1669, Barrow identified its author to Collins as \"Mr. Newton ... very young ... but of an extraordinary genius and proficiency in these things.\"\n\nNewton's work was brought to the attention of the mathematics community for the first time. Shortly afterward, Barrow resigned his Lucasian professorship at Cambridge, and Newton assumed the chair.\n\nIsaac Newton’s Discoveries\n\nNewton made discoveries in optics, motion and mathematics. Newton theorized that white light was a composite of all colors of the spectrum, and that light was composed of particles.\n\nHis momentous book on physics, Principia, contains information on nearly all of the essential concepts of physics except energy, ultimately helping him to explain the laws of motion and the theory of gravity. Along with mathematician Gottfried Wilhelm von Leibniz, Newton is credited for developing essential theories of calculus.\n\nIsaac Newton Inventions\n\nNewton's first major public scientific achievement was designing and constructing a reflecting telescope in 1668. As a professor at Cambridge, Newton was required to deliver an annual course of lectures and chose optics as his initial topic. He used his telescope to study optics and help prove his theory of light and color.\n\nThe Royal Society asked for a demonstration of his reflecting telescope in 1671, and the organization's interest encouraged Newton to publish his notes on light, optics and color in 1672. These notes were later published as part of Newton's Opticks: Or, A treatise of the Reflections, Refractions, Inflections and Colours of Light.\n\nPhoto: Hulton Archive/Getty Images\n\nSir Isaac Newton contemplates the force of gravity, as the famous story goes, on seeing an apple fall in his orchard, circa 1665.\n\nBetween 1665 and 1667, Newton returned home from Trinity College to pursue his private study, as school was closed due to the Great Plague. Legend has it that, at this time, Newton experienced his famous inspiration of gravity with the falling apple. According to this common myth, Newton was sitting under an apple tree when a fruit fell and hit him on the head, inspiring him to suddenly come up with the theory of gravity.\n\nWhile there is no evidence that the apple actually hit Newton on the head, he did see an apple fall from a tree, leading him to wonder why it fell straight down and not at an angle. Consequently, he began exploring the theories of motion and gravity.\n\nIt was during this 18-month hiatus as a student that Newton conceived many of his most important insights—including the method of infinitesimal calculus, the foundations for his theory of light and color, and the laws of planetary motion—that eventually led to the publication of his physics book Principia and his theory of gravity.\n\nIsaac Newton’s Laws of Motion\n\nIn 1687, following 18 months of intense and effectively nonstop work, Newton published Philosophiae Naturalis Principia Mathematica (Mathematical Principles of Natural Philosophy), most often known as Principia.\n\nPrincipia is said to be the single most influential book on physics and possibly all of science. Its publication immediately raised Newton to international prominence.\n\nPrincipia offers an exact quantitative description of bodies in motion, with three basic but important laws of motion:\n\nA stationary body will stay stationary unless an external force is applied to it.\n\nForce is equal to mass times acceleration, and a change in motion (i.e., change in speed) is proportional to the force applied.\n\nFor every action, there is an equal and opposite reaction.\n\nNewton and the Theory of Gravity\n\nNewton’s three basic laws of motion outlined in Principia helped him arrive at his theory of gravity. Newton’s law of universal gravitation states that two objects attract each other with a force of gravitational attraction that’s proportional to their masses and inversely proportional to the square of the distance between their centers.\n\nThese laws helped explain not only elliptical planetary orbits but nearly every other motion in the universe: how the planets are kept in orbit by the pull of the sun’s gravity; how the moon revolves around Earth and the moons of Jupiter revolve around it; and how comets revolve in elliptical orbits around the sun.\n\nThey also allowed him to calculate the mass of each planet, calculate the flattening of the Earth at the poles and the bulge at the equator, and how the gravitational pull of the sun and moon create the Earth’s tides. In Newton's account, gravity kept the universe balanced, made it work, and brought heaven and Earth together in one great equation.\n\nDOWNLOAD BIOGRAPHY'S ISAAC NEWTON FACT CARD\n\nIsaac Newton & Robert Hooke\n\nNot everyone at the Royal Academy was enthusiastic about Newton’s discoveries in optics and 1672 publication of Opticks: Or, A treatise of the Reflections, Refractions, Inflections and Colours of Light. Among the dissenters was Robert Hooke, one of the original members of the Royal Academy and a scientist who was accomplished in a number of areas, including mechanics and optics.\n\nWhile Newton theorized that light was composed of particles, Hooke believed it was composed of waves. Hooke quickly condemned Newton's paper in condescending terms, and attacked Newton's methodology and conclusions.\n\nHooke was not the only one to question Newton's work in optics. Renowned Dutch scientist Christiaan Huygens and a number of French Jesuits also raised objections. But because of Hooke's association with the Royal Society and his own work in optics, his criticism stung Newton the worst.\n\nUnable to handle the critique, he went into a rage—a reaction to criticism that was to continue throughout his life. Newton denied Hooke's charge that his theories had any shortcomings and argued the importance of his discoveries to all of science.\n\nIn the ensuing months, the exchange between the two men grew more acrimonious, and soon Newton threatened to quit the Royal Society altogether. He remained only when several other members assured him that the Fellows held him in high esteem.\n\nThe rivalry between Newton and Hooke would continue for several years thereafter. Then, in 1678, Newton suffered a complete nervous breakdown and the correspondence abruptly ended. The death of his mother the following year caused him to become even more isolated, and for six years he withdrew from intellectual exchange except when others initiated correspondence, which he always kept short.\n\nDuring his hiatus from public life, Newton returned to his study of gravitation and its effects on the orbits of planets. Ironically, the impetus that put Newton on the right direction in this study came from Robert Hooke.\n\nIn a 1679 letter of general correspondence to Royal Society members for contributions, Hooke wrote to Newton and brought up the question of planetary motion, suggesting that a formula involving the inverse squares might explain the attraction between planets and the shape of their orbits.\n\nSubsequent exchanges transpired before Newton quickly broke off the correspondence once again. But Hooke's idea was soon incorporated into Newton's work on planetary motion, and from his notes it appears he had quickly drawn his own conclusions by 1680, though he kept his discoveries to himself.\n\nIn early 1684, in a conversation with fellow Royal Society members Christopher Wren and Edmond Halley, Hooke made his case on the proof for planetary motion. Both Wren and Halley thought he was on to something, but pointed out that a mathematical demonstration was needed.\n\nIn August 1684, Halley traveled to Cambridge to visit with Newton, who was coming out of his seclusion. Halley idly asked him what shape the orbit of a planet would take if its attraction to the sun followed the inverse square of the distance between them (Hooke's theory).\n\nNewton knew the answer, due to his concentrated work for the past six years, and replied, \"An ellipse.\" Newton claimed to have solved the problem some 18 years prior, during his hiatus from Cambridge and the plague, but he was unable to find his notes. Halley persuaded him to work out the problem mathematically and offered to pay all costs so that the ideas might be published, which it was, in Newton’s Principia.\n\nUpon the publication of the first edition of Principia in 1687, Robert Hooke immediately accused Newton of plagiarism, claiming that he had discovered the theory of inverse squares and that Newton had stolen his work. The charge was unfounded, as most scientists knew, for Hooke had only theorized on the idea and had never brought it to any level of proof.\n\nNewton, however, was furious and strongly defended his discoveries. He withdrew all references to Hooke in his notes and threatened to withdraw from publishing the subsequent edition of Principia altogether.\n\nHalley, who had invested much of himself in Newton's work, tried to make peace between the two men. While Newton begrudgingly agreed to insert a joint acknowledgment of Hooke's work (shared with Wren and Halley) in his discussion of the law of inverse squares, it did nothing to placate Hooke.\n\nAs the years went on, Hooke's life began to unravel. His beloved niece and companion died the same year that Principia was published, in 1687. As Newton's reputation and fame grew, Hooke's declined, causing him to become even more bitter and loathsome toward his rival.\n\nTo the very end, Hooke took every opportunity he could to offend Newton. Knowing that his rival would soon be elected president of the Royal Society, Hooke refused to retire until the year of his death, in 1703.\n\nFollowing the publication of Principia, Newton was ready for a new direction in life. He no longer found contentment in his position at Cambridge and was becoming more involved in other issues.\n\nHe helped lead the resistance to King James II's attempts to reinstitute Catholic teaching at Cambridge, and in 1689 he was elected to represent Cambridge in Parliament.\n\nWhile in London, Newton acquainted himself with a broader group of intellectuals and became acquainted with political philosopher John Locke. Though many of the scientists on the continent continued to teach the mechanical world according to Aristotle, a young generation of British scientists became captivated with Newton's new view of the physical world and recognized him as their leader.\n\nOne of these admirers was Nicolas Fatio de Duillier, a Swiss mathematician whom Newton befriended while in London.\n\nHowever, within a few years, Newton fell into another nervous breakdown in 1693. The cause is open to speculation: his disappointment over not being appointed to a higher position by England's new monarchs, William III and Mary II, or the subsequent loss of his friendship with Duillier; exhaustion from being overworked; or perhaps chronic mercury poisoning after decades of alchemical research.\n\nIt's difficult to know the exact cause, but evidence suggests that letters written by Newton to several of his London acquaintances and friends, including Duillier, seemed deranged and paranoiac, and accused them of betrayal and conspiracy.\n\nOddly enough, Newton recovered quickly, wrote letters of apology to friends, and was back to work within a few months. He emerged with all his intellectual facilities intact, but seemed to have lost interest in scientific problems and now favored pursuing prophecy and scripture and the study of alchemy.\n\nWhile some might see this as work beneath the man who had revolutionized science, it might be more properly attributed to Newton responding to the issues of the time in turbulent 17th century Britain.\n\nMany intellectuals were grappling with the meaning of many different subjects, not least of which were religion, politics and the very purpose of life. Modern science was still so new that no one knew for sure how it measured up against older philosophies.\n\nIn 1696, Newton was able to attain the governmental position he had long sought: warden of the Mint; after acquiring this new title, he permanently moved to London and lived with his niece, Catherine Barton.\n\nBarton was the mistress of Lord Halifax, a high-ranking government official who was instrumental in having Newton promoted, in 1699, to master of the Mint—a position that he would hold until his death.\n\nNot wanting it to be considered a mere honorary position, Newton approached the job in earnest, reforming the currency and severely punishing counterfeiters. As master of the Mint, Newton moved the British currency, the pound sterling, from the silver to the gold standard.\n\nIn 1703, Newton was elected president of the Royal Society upon Robert Hooke's death. However, Newton never seemed to understand the notion of science as a cooperative venture, and his ambition and fierce defense of his own discoveries continued to lead him from one conflict to another with other scientists.\n\nBy most accounts, Newton's tenure at the society was tyrannical and autocratic; he was able to control the lives and careers of younger scientists with absolute power.\n\nIn 1705, in a controversy that had been brewing for several years, German mathematician Gottfried Leibniz publicly accused Newton of plagiarizing his research, claiming he had discovered infinitesimal calculus several years before the publication of Principia.\n\nIn 1712, the Royal Society appointed a committee to investigate the matter. Of course, since Newton was president of the society, he was able to appoint the committee's members and oversee its investigation. Not surprisingly, the committee concluded Newton's priority over the discovery.\n\nThat same year, in another of Newton's more flagrant episodes of tyranny, he published without permission the notes of astronomer John Flamsteed. It seems the astronomer had collected a massive body of data from his years at the Royal Observatory at Greenwich, England.\n\nNewton had requested a large volume of Flamsteed's notes for his revisions to Principia. Annoyed when Flamsteed wouldn't provide him with more information as quickly as he wanted it, Newton used his influence as president of the Royal Society to be named the chairman of the body of \"visitors\" responsible for the Royal Observatory.\n\nHe then tried to force the immediate publication of Flamsteed's catalogue of the stars, as well as all of Flamsteed's notes, edited and unedited. To add insult to injury, Newton arranged for Flamsteed's mortal enemy, Edmund Halley, to prepare the notes for press.\n\nFlamsteed was finally able to get a court order forcing Newton to cease his plans for publication and return the notes—one of the few times that Newton was bested by one of his rivals.\n\nToward the end of this life, Newton lived at Cranbury Park, near Winchester, England, with his niece, Catherine (Barton) Conduitt, and her husband, John Conduitt.\n\nBy this time, Newton had become one of the most famous men in Europe. His scientific discoveries were unchallenged. He also had become wealthy, investing his sizable income wisely and bestowing sizable gifts to charity.\n\nDespite his fame, Newton's life was far from perfect: He never married or made many friends, and in his later years, a combination of pride, insecurity and side trips on peculiar scientific inquiries led even some of his few friends to worry about his mental stability.\n\nBy the time he reached 80 years of age, Newton was experiencing digestion problems and had to drastically change his diet and mobility.\n\nIn March 1727, Newton experienced severe pain in his abdomen and blacked out, never to regain consciousness. He died the next day, on March 31, 1727, at the age of 84.\n\nNewton's fame grew even more after his death, as many of his contemporaries proclaimed him the greatest genius who ever lived. Maybe a slight exaggeration, but his discoveries had a large impact on Western thought, leading to comparisons to the likes of Plato, Aristotle and Galileo.\n\nAlthough his discoveries were among many made during the Scientific Revolution, Newton's universal principles of gravity found no parallels in science at the time.\n\nOf course, Newton was proven wrong on some of his key assumptions. In the 20th century, Albert Einstein would overturn Newton's concept of the universe, stating that space, distance and motion were not absolute but relative and that the universe was more fantastic than Newton had ever conceived.\n\nNewton might not have been surprised: In his later life, when asked for an assessment of his achievements, he replied, \"I do not know what I may appear to the world; but to myself I seem to have been only like a boy playing on the seashore, and diverting myself now and then in finding a smoother pebble or prettier shell than ordinary, while the great ocean of truth lay all undiscovered before me.\"\n\nBirth date: January 4, 1643\n\nBirth City: Woolsthorpe, Lincolnshire, England\n\nBirth Country: United Kingdom\n\nBest Known For: Isaac Newton was an English physicist and mathematician famous for his laws of physics. He was a key figure in the Scientific Revolution of the 17th century.\n\nScience and Medicine\n\nTechnology and Engineering\n\nEducation and Academia\n\nAstrological Sign: Capricorn\n\nUniversity of Cambridge, Trinity College\n\nIsaac Newton helped develop the principles of modern physics, including the laws of motion, and is credited as one of the great minds of the 17th-century Scientific Revolution.\n\nIn 1687, Newton published his most acclaimed work, 'Philosophiae Naturalis Principia Mathematica' ('Mathematical Principles of Natural Philosophy'), which has been called the single most influential book on physics.\n\nNewton's theory of gravity states that two objects attract each other with a force of gravitational attraction that’s proportional to their masses and inversely proportional to the square of the distance between their centers.\n\nDeath date: March 31, 1727\n\nDeath City: London, England\n\nDeath Country: United Kingdom\n\nWe strive for accuracy and fairness.If you see something that doesn't look right,contact us!\n\nCITATION INFORMATION\n\nArticle Title: Isaac Newton Biography\n\nAuthor: Biography.com Editors\n\nWebsite Name: The Biography.com website\n\nUrl: https://www.biography.com/scientists/isaac-newton\n\nPublisher: A&E; Television Networks\n\nLast Updated: November 5, 2020\n\nOriginal Published Date: April 3, 2014\n\nI do not know what I may appear to the world; but to myself I seem to have been only like a boy playing on the seashore, and diverting myself now and then in finding a smoother pebble or prettier shell than ordinary, while the great ocean of truth lay all undiscovered before me.\n\nPlato is my friend, Aristotle is my friend, but my greatest friend is truth.\n\nIf I have seen further it is by standing on the shoulders of giants.\n\nIt is the perfection of God's works that they are all done with the greatest simplicity.\n\nEvery body continues in its state of rest, or of uniform motion in a right line, unless it is compelled to change that state by forces impressed upon it.\n\nTo every action there is always opposed an equal reaction: or, the mutual actions of two bodies upon each other are always equal, and directed to contrary parts.\n\nI see I have made myself a slave to philosophy.\n\nThe changing of bodies into light, and light into bodies, is very conformable to the course of nature, which seems delighted with transmutations.\n\nTo explain all nature is too difficult a task for any one man or even for any one age. Tis much better to do a little with certainty and leave the rest for others that come after, then to explain all things by conjecture without making sure of any thing.\n\nTruth is ever to be found in simplicity, and not in the multiplicity and confusion of things.\n\nAtheism is so senseless and odious to mankind that it never had many professors.\n\nNewton was not the first of the age of reason. He was the last of the magicians, the last of the Babylonians and Sumerians, the last great mind that looked out on the visible and intellectual world with the same eyes as those who began to build our intellectual inheritance rather less than 10,000 years ago.\n\nAdvertisement - Continue Reading Below\n\nFamous British People\n\nAdvertisement - Continue Reading Below\n\nThe Real Royal Scheme Depicted in ‘Mary & George’\n\nAdvertisement - Continue Reading Below" + timestamp: '2024-08-13T07:52:50.0000000+04:00' + title: 'Isaac Newton - Quotes, Facts & Laws' + url: https://www.biography.com/scientists/isaac-newton + - id: web-search_5 + snippet: "Join our email list and be the first to learn about new programs, events, and collections updates!Sign Up\n\nWednesday, August 14, 2024\n\nOpen today 4 PM - 11 PM\n\nWednesday, August 14, 2024\n\nOpen today 4 PM - 11 PM\n\nScientist of the Day\n\nIsaac Newton was born Jan. 4, 1643. It used to be that we celebrated Newton’s birthday on Dec. 25, for his own birth records attest that he came into the world on Christmas Day, 1642. But the Julian calendar in use in England at the time of Newton’s...\n\nScientist of the Day - Isaac Newton\n\nIsaac Newton was born Jan. 4, 1643. It used to be that we celebrated Newton’s birthday on Dec. 25, for his own birth records attest that he came into the world on Christmas Day, 1642. But the Julian calendar in use in England at the time of Newton’s birth was 10 days behind the Gregorian calendar that had been adopted by most of the Continent, so if you had asked Christiaan Huygens or Pierre Fermat for Newton’s birthday, they would have said Jan. 4, 1643. The generally accepted practice among historians today is to convert all Julian dates between 1582 (when the Gregorian calendar was first implemented) and 1752 (when England finally adopted the “new style” calendar) to Gregorian dates, and we have done so here.\n\nNearly everyone has heard of Isaac Newton and knows that he “discovered gravity”. What Newton actually proposed is the existence of a universal force of gravitation, so that any two objects in the universe are attracted to one another by a force that increases with the product of the masses of the two objects, and decreases with the square of the distance between them. With this force, Newton was able to explain: the rate at which an apple falls, the orbits of the moon and planets, the swing of a pendulum, the ebb and flow of the tides, and even the shape of the earth. Even though Newton did not know how this force acted at a distance, its explanatory power was so great that universal gravitation was almost universally adopted within twenty-five years of his death in 1727.\n\nNewton’s equation for the force of gravitation, and his famous “laws of motion”, first appeared in his Mathematical Principles of Natural Philosophy (1687), usually referred to as the Principia, after the third word of the Latin title. We have nearly every edition of the Principia ever published, including the first, in our History of Science Collection. The first English translation of 1729 includes a frontispiece that not only deifies Newton, but nicely represents the solar system as bound together by gravitational forces (third image).\n\nThe copy of the 1687 Principia shown above (second image) is not our copy, but rather Newton’s own corrected copy, in the Cambridge University Library.\n\nDr. William B. Ashworth, Jr., Consultant for the History of Science, Linda Hall Library and Associate Professor, Department of History, University of Missouri-Kansas City. Comments or corrections are welcome; please direct to ashworthw@umkc.edu.\n\nMargaret Lindsay Huggins\n\nScientist of the Day\n\nScientist of the Day\n\nScientist of the Day\n\nScientist of the Day\n\nScientist of the Day\n\nMonday - Friday 10 AM - 5 PM\n\nTelephone816.363.4600\n\n5109 Cherry Street Kansas City, Missouri 64110-2498\n\nAcceptable Use Policy\n\nTerms and Conditions\n\nLinda Hall Library on FacebookLinda Hall Library on TwitterLinda Hall Library on TumblrLinda Hall Library on VimeoLinda Hall Library on InstagramLinda Hall Library on Youtube" + timestamp: '2024-08-14T18:39:29.0000000+04:00' + title: Isaac Newton - Linda Hall Library + url: https://www.lindahall.org/about/news/scientist-of-the-day/isaac-newton/ + search_results: + - search_query: + text: Isaac Newton birth year + generation_id: 9a497980-c3e2-4460-b81c-ef44d293f95d + document_ids: + - web-search_0 + - web-search_1 + - web-search_2 + - web-search_3 + - web-search_4 + - web-search_5 + connector: + id: web-search + search_queries: + - text: Isaac Newton birth year + generation_id: 9a497980-c3e2-4460-b81c-ef44d293f95d + - code-samples: + - sdk: go + name: Documents + code: "package main\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"io\"\n\t\"log\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(\"<>\"))\n\n\tresp, err := co.ChatStream(\n\t\tcontext.TODO(),\n\t\t&cohere.ChatStreamRequest{\n\t\t\tChatHistory: []*cohere.Message{\n\t\t\t\t{\n\t\t\t\t\tRole: \"USER\",\n\t\t\t\t\tUser: &cohere.ChatMessage{\n\t\t\t\t\t\tMessage: \"Who discovered gravity?\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tRole: \"CHATBOT\",\n\t\t\t\t\tChatbot: &cohere.ChatMessage{\n\t\t\t\t\t\tMessage: \"The man who is widely credited with discovering gravity is Sir Isaac Newton\",\n\t\t\t\t\t},\n\t\t\t\t}},\n\t\t\tMessage: \"What year was he born?\",\n\t\t\tConnectors: []*cohere.ChatConnector{\n\t\t\t\t{Id: \"web-search\"},\n\t\t\t},\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\t// Make sure to close the stream when you're done reading.\n\t// This is easily handled with defer.\n\tdefer resp.Close()\n\n\tfor {\n\t\tmessage, err := resp.Recv()\n\n\t\tif errors.Is(err, io.EOF) {\n\t\t\t// An io.EOF error means the server is done sending messages\n\t\t\t// and should be treated as a success.\n\t\t\tbreak\n\t\t}\n\n\t\tif message.TextGeneration != nil {\n\t\t\tlog.Printf(\"%+v\", resp)\n\t\t}\n\t}\n\n}\n" + - sdk: typescript + name: Documents + code: "const { CohereClient } = require('cohere-ai');\n\nconst cohere = new CohereClient({\n token: '<>',\n});\n\n(async () => {\n const response = await cohere.chat({\n message: 'Who is more popular: Nsync or Backstreet Boys?',\n documents: [\n {\n title: 'CSPC: Backstreet Boys Popularity Analysis - ChartMasters',\n snippet:\n '↓ Skip to Main Content\\n\\nMusic industry – One step closer to being accurate\\n\\nCSPC: Backstreet Boys Popularity Analysis\\n\\nHernán Lopez Posted on February 9, 2017 Posted in CSPC 72 Comments Tagged with Backstreet Boys, Boy band\\n\\nAt one point, Backstreet Boys defined success: massive albums sales across the globe, great singles sales, plenty of chart topping releases, hugely hyped tours and tremendous media coverage.\\n\\nIt is true that they benefited from extraordinarily good market conditions in all markets. After all, the all-time record year for the music business, as far as revenues in billion dollars are concerned, was actually 1999. That is, back when this five men group was at its peak.',\n },\n {\n title: 'CSPC: NSYNC Popularity Analysis - ChartMasters',\n snippet:\n \"↓ Skip to Main Content\\n\\nMusic industry – One step closer to being accurate\\n\\nCSPC: NSYNC Popularity Analysis\\n\\nMJD Posted on February 9, 2018 Posted in CSPC 27 Comments Tagged with Boy band, N'Sync\\n\\nAt the turn of the millennium three teen acts were huge in the US, the Backstreet Boys, Britney Spears and NSYNC. The latter is the only one we haven’t study so far. It took 15 years and Adele to break their record of 2,4 million units sold of No Strings Attached in its first week alone.\\n\\nIt wasn’t a fluke, as the second fastest selling album of the Soundscan era prior 2015, was also theirs since Celebrity debuted with 1,88 million units sold.\",\n },\n {\n title: 'CSPC: Backstreet Boys Popularity Analysis - ChartMasters',\n snippet:\n ' 1997, 1998, 2000 and 2001 also rank amongst some of the very best years.\\n\\nYet the way many music consumers – especially teenagers and young women’s – embraced their output deserves its own chapter. If Jonas Brothers and more recently One Direction reached a great level of popularity during the past decade, the type of success achieved by Backstreet Boys is in a completely different level as they really dominated the business for a few years all over the world, including in some countries that were traditionally hard to penetrate for Western artists.\\n\\nWe will try to analyze the extent of that hegemony with this new article with final results which will more than surprise many readers.',\n },\n {\n title: 'CSPC: NSYNC Popularity Analysis - ChartMasters',\n snippet:\n ' Was the teen group led by Justin Timberlake really that big? Was it only in the US where they found success? Or were they a global phenomenon?\\n\\nAs usual, I’ll be using the Commensurate Sales to Popularity Concept in order to relevantly gauge their results. This concept will not only bring you sales information for all NSYNC‘s albums, physical and download singles, as well as audio and video streaming, but it will also determine their true popularity. If you are not yet familiar with the CSPC method, the next page explains it with a short video. I fully recommend watching the video before getting into the sales figures.',\n },\n ],\n });\n\n console.log(response);\n})();\n" + - sdk: java + name: Documents + code: "/* (C)2024 */\npackage chatpost;\n\nimport com.cohere.api.Cohere;\nimport com.cohere.api.requests.ChatRequest;\nimport com.cohere.api.types.NonStreamedChatResponse;\nimport java.util.List;\nimport java.util.Map;\n\npublic class Documents {\n public static void main(String[] args) {\n Cohere cohere = Cohere.builder().token(\"<>\").clientName(\"snippet\").build();\n\n NonStreamedChatResponse response =\n cohere.chat(\n ChatRequest.builder()\n .message(\"What year was he born?\")\n .documents(\n List.of(\n Map.of(\n \"title\",\n \"CSPC: Backstreet Boys Popularity\"\n + \" Analysis - ChartMasters\",\n \"snippet\",\n \"↓ Skip to Main Content\\n\\n\"\n + \"Music industry – One step\"\n + \" closer to being\"\n + \" accurate\\n\\n\"\n + \"CSPC: Backstreet Boys\"\n + \" Popularity Analysis\\n\\n\"\n + \"Hernán Lopez Posted on\"\n + \" February 9, 2017 Posted in\"\n + \" CSPC 72 Comments Tagged\"\n + \" with Backstreet Boys, Boy\"\n + \" band\\n\\n\"\n + \"At one point, Backstreet\"\n + \" Boys defined success:\"\n + \" massive albums sales across\"\n + \" the globe, great singles\"\n + \" sales, plenty of chart\"\n + \" topping releases, hugely\"\n + \" hyped tours and tremendous\"\n + \" media coverage.\\n\\n\"\n + \"It is true that they\"\n + \" benefited from\"\n + \" extraordinarily good market\"\n + \" conditions in all markets.\"\n + \" After all, the all-time\"\n + \" record year for the music\"\n + \" business, as far as\"\n + \" revenues in billion dollars\"\n + \" are concerned, was actually\"\n + \" 1999. That is, back when\"\n + \" this five men group was at\"\n + \" its peak.\"),\n Map.of(\n \"title\",\n \"CSPC: NSYNC Popularity Analysis -\"\n + \" ChartMasters\",\n \"snippet\",\n \"↓ Skip to Main Content\\n\\n\"\n + \"Music industry – One step\"\n + \" closer to being\"\n + \" accurate\\n\\n\"\n + \"CSPC: NSYNC Popularity\"\n + \" Analysis\\n\\n\"\n + \"MJD Posted on February 9,\"\n + \" 2018 Posted in CSPC 27\"\n + \" Comments Tagged with Boy\"\n + \" band, N'Sync\\n\\n\"\n + \"At the turn of the\"\n + \" millennium three teen acts\"\n + \" were huge in the US, the\"\n + \" Backstreet Boys, Britney\"\n + \" Spears and NSYNC. The\"\n + \" latter is the only one we\"\n + \" haven’t study so far. It\"\n + \" took 15 years and Adele to\"\n + \" break their record of 2,4\"\n + \" million units sold of No\"\n + \" Strings Attached in its\"\n + \" first week alone.\\n\\n\"\n + \"It wasn’t a fluke, as the\"\n + \" second fastest selling\"\n + \" album of the Soundscan era\"\n + \" prior 2015, was also theirs\"\n + \" since Celebrity debuted\"\n + \" with 1,88 million units\"\n + \" sold.\"),\n Map.of(\n \"title\",\n \"CSPC: Backstreet Boys Popularity\"\n + \" Analysis - ChartMasters\",\n \"snippet\",\n \" 1997, 1998, 2000 and 2001 also\"\n + \" rank amongst some of the\"\n + \" very best years.\\n\\n\"\n + \"Yet the way many music\"\n + \" consumers – especially\"\n + \" teenagers and young women’s\"\n + \" – embraced their output\"\n + \" deserves its own chapter.\"\n + \" If Jonas Brothers and more\"\n + \" recently One Direction\"\n + \" reached a great level of\"\n + \" popularity during the past\"\n + \" decade, the type of success\"\n + \" achieved by Backstreet Boys\"\n + \" is in a completely\"\n + \" different level as they\"\n + \" really dominated the\"\n + \" business for a few years\"\n + \" all over the world,\"\n + \" including in some countries\"\n + \" that were traditionally\"\n + \" hard to penetrate for\"\n + \" Western artists.\\n\\n\"\n + \"We will try to analyze the\"\n + \" extent of that hegemony\"\n + \" with this new article with\"\n + \" final results which will\"\n + \" more than surprise many\"\n + \" readers.\"),\n Map.of(\n \"title\",\n \"CSPC: NSYNC Popularity Analysis -\"\n + \" ChartMasters\",\n \"snippet\",\n \" Was the teen group led by Justin\"\n + \" Timberlake really that big? Was it\"\n + \" only in the US where they found\"\n + \" success? Or were they a global\"\n + \" phenomenon?\\n\\n\"\n + \"As usual, I’ll be using the\"\n + \" Commensurate Sales to Popularity\"\n + \" Concept in order to relevantly\"\n + \" gauge their results. This concept\"\n + \" will not only bring you sales\"\n + \" information for all NSYNC‘s albums,\"\n + \" physical and download singles, as\"\n + \" well as audio and video streaming,\"\n + \" but it will also determine their\"\n + \" true popularity. If you are not yet\"\n + \" familiar with the CSPC method, the\"\n + \" next page explains it with a short\"\n + \" video. I fully recommend watching\"\n + \" the video before getting into the\"\n + \" sales figures.\")))\n .build());\n\n System.out.println(response);\n }\n}\n" + - sdk: python + name: Documents + code: "import cohere\n\nco = cohere.Client(\"<>\")\n\nresponse = co.chat(\n model=\"command\",\n message=\"Who is more popular: Nsync or Backstreet Boys?\",\n documents=[\n {\n \"title\": \"CSPC: Backstreet Boys Popularity Analysis - ChartMasters\",\n \"snippet\": \"↓ Skip to Main Content\\n\\nMusic industry – One step closer to being accurate\\n\\nCSPC: Backstreet Boys Popularity Analysis\\n\\nHernán Lopez Posted on February 9, 2017 Posted in CSPC 72 Comments Tagged with Backstreet Boys, Boy band\\n\\nAt one point, Backstreet Boys defined success: massive albums sales across the globe, great singles sales, plenty of chart topping releases, hugely hyped tours and tremendous media coverage.\\n\\nIt is true that they benefited from extraordinarily good market conditions in all markets. After all, the all-time record year for the music business, as far as revenues in billion dollars are concerned, was actually 1999. That is, back when this five men group was at its peak.\"\n },\n {\n \"title\": \"CSPC: NSYNC Popularity Analysis - ChartMasters\",\n \"snippet\": \"↓ Skip to Main Content\\n\\nMusic industry – One step closer to being accurate\\n\\nCSPC: NSYNC Popularity Analysis\\n\\nMJD Posted on February 9, 2018 Posted in CSPC 27 Comments Tagged with Boy band, N'Sync\\n\\nAt the turn of the millennium three teen acts were huge in the US, the Backstreet Boys, Britney Spears and NSYNC. The latter is the only one we haven’t study so far. It took 15 years and Adele to break their record of 2,4 million units sold of No Strings Attached in its first week alone.\\n\\nIt wasn’t a fluke, as the second fastest selling album of the Soundscan era prior 2015, was also theirs since Celebrity debuted with 1,88 million units sold.\"\n },\n {\n \"title\": \"CSPC: Backstreet Boys Popularity Analysis - ChartMasters\",\n \"snippet\": \" 1997, 1998, 2000 and 2001 also rank amongst some of the very best years.\\n\\nYet the way many music consumers – especially teenagers and young women’s – embraced their output deserves its own chapter. If Jonas Brothers and more recently One Direction reached a great level of popularity during the past decade, the type of success achieved by Backstreet Boys is in a completely different level as they really dominated the business for a few years all over the world, including in some countries that were traditionally hard to penetrate for Western artists.\\n\\nWe will try to analyze the extent of that hegemony with this new article with final results which will more than surprise many readers.\"\n },\n {\n \"title\": \"CSPC: NSYNC Popularity Analysis - ChartMasters\",\n \"snippet\": \" Was the teen group led by Justin Timberlake really that big? Was it only in the US where they found success? Or were they a global phenomenon?\\n\\nAs usual, I’ll be using the Commensurate Sales to Popularity Concept in order to relevantly gauge their results. This concept will not only bring you sales information for all NSYNC‘s albums, physical and download singles, as well as audio and video streaming, but it will also determine their true popularity. If you are not yet familiar with the CSPC method, the next page explains it with a short video. I fully recommend watching the video before getting into the sales figures.\"\n }\n ])\n\nprint(response)\n" + - sdk: curl + name: Documents + code: "curl --request POST \\\n --url https://api.cohere.com/v1/chat \\\n --header 'accept: application/json' \\\n --header 'content-type: application/json' \\\n --header \"Authorization: bearer $CO_API_KEY\" \\\n --data '{\n \"message\": \"Who is more popular: Nsync or Backstreet Boys?\",\n \"documents\": [\n {\n \"title\": \"CSPC: Backstreet Boys Popularity Analysis - ChartMasters\",\n \"snippet\": \"↓ Skip to Main Content\\\\n\\\\nMusic industry – One step closer to being accurate\\\\n\\\\nCSPC: Backstreet Boys Popularity Analysis\\\\n\\\\nHernán Lopez Posted on February 9, 2017 Posted in CSPC 72 Comments Tagged with Backstreet Boys, Boy band\\\\n\\\\nAt one point, Backstreet Boys defined success: massive albums sales across the globe, great singles sales, plenty of chart topping releases, hugely hyped tours and tremendous media coverage.\\\\n\\\\nIt is true that they benefited from extraordinarily good market conditions in all markets. After all, the all-time record year for the music business, as far as revenues in billion dollars are concerned, was actually 1999. That is, back when this five men group was at its peak.\"\n },\n {\n \"title\": \"CSPC: NSYNC Popularity Analysis - ChartMasters\",\n \"snippet\": \"↓ Skip to Main Content\\\\n\\\\nMusic industry – One step closer to being accurate\\\\n\\\\nCSPC: NSYNC Popularity Analysis\\\\n\\\\nMJD Posted on February 9, 2018 Posted in CSPC 27 Comments Tagged with Boy band, NSync\\\\n\\\\nAt the turn of the millennium three teen acts were huge in the US, the Backstreet Boys, Britney Spears and NSYNC. The latter is the only one we haven’t study so far. It took 15 years and Adele to break their record of 2,4 million units sold of No Strings Attached in its first week alone.\\\\n\\\\nIt wasn’t a fluke, as the second fastest selling album of the Soundscan era prior 2015, was also theirs since Celebrity debuted with 1,88 million units sold.\"\n },\n {\n \"title\": \"CSPC: Backstreet Boys Popularity Analysis - ChartMasters\",\n \"snippet\": \" 1997, 1998, 2000 and 2001 also rank amongst some of the very best years.\\\\n\\\\nYet the way many music consumers – especially teenagers and young women’s – embraced their output deserves its own chapter. If Jonas Brothers and more recently One Direction reached a great level of popularity during the past decade, the type of success achieved by Backstreet Boys is in a completely different level as they really dominated the business for a few years all over the world, including in some countries that were traditionally hard to penetrate for Western artists.\\\\n\\\\nWe will try to analyze the extent of that hegemony with this new article with final results which will more than surprise many readers.\"\n },\n {\n \"title\": \"CSPC: NSYNC Popularity Analysis - ChartMasters\",\n \"snippet\": \" Was the teen group led by Justin Timberlake really that big? Was it only in the US where they found success? Or were they a global phenomenon?\\\\n\\\\nAs usual, I’ll be using the Commensurate Sales to Popularity Concept in order to relevantly gauge their results. This concept will not only bring you sales information for all NSYNC‘s albums, physical and download singles, as well as audio and video streaming, but it will also determine their true popularity. If you are not yet familiar with the CSPC method, the next page explains it with a short video. I fully recommend watching the video before getting into the sales figures.\"\n }\n ]\n }'" + request: + message: 'Who is more popular: Nsync or Backstreet Boys?' + documents: + - title: 'CSPC: Backstreet Boys Popularity Analysis - ChartMasters' + snippet: "↓ Skip to Main Content\n\nMusic industry – One step closer to being accurate\n\nCSPC: Backstreet Boys Popularity Analysis\n\nHernán Lopez Posted on February 9, 2017 Posted in CSPC 72 Comments Tagged with Backstreet Boys, Boy band\n\nAt one point, Backstreet Boys defined success: massive albums sales across the globe, great singles sales, plenty of chart topping releases, hugely hyped tours and tremendous media coverage.\n\nIt is true that they benefited from extraordinarily good market conditions in all markets. After all, the all-time record year for the music business, as far as revenues in billion dollars are concerned, was actually 1999. That is, back when this five men group was at its peak." + - title: 'CSPC: NSYNC Popularity Analysis - ChartMasters' + snippet: "↓ Skip to Main Content\n\nMusic industry – One step closer to being accurate\n\nCSPC: NSYNC Popularity Analysis\n\nMJD Posted on February 9, 2018 Posted in CSPC 27 Comments Tagged with Boy band, N'Sync\n\nAt the turn of the millennium three teen acts were huge in the US, the Backstreet Boys, Britney Spears and NSYNC. The latter is the only one we haven’t study so far. It took 15 years and Adele to break their record of 2,4 million units sold of No Strings Attached in its first week alone.\n\nIt wasn’t a fluke, as the second fastest selling album of the Soundscan era prior 2015, was also theirs since Celebrity debuted with 1,88 million units sold." + - title: 'CSPC: Backstreet Boys Popularity Analysis - ChartMasters' + snippet: "1997, 1998, 2000 and 2001 also rank amongst some of the very best years.\nYet the way many music consumers – especially teenagers and young women’s – embraced their output deserves its own chapter. If Jonas Brothers and more recently One Direction reached a great level of popularity during the past decade, the type of success achieved by Backstreet Boys is in a completely different level as they really dominated the business for a few years all over the world, including in some countries that were traditionally hard to penetrate for Western artists.\n\nWe will try to analyze the extent of that hegemony with this new article with final results which will more than surprise many readers." + - title: 'CSPC: NSYNC Popularity Analysis - ChartMasters' + snippet: "Was the teen group led by Justin Timberlake really that big? Was it only in the US where they found success? Or were they a global phenomenon?\nAs usual, I’ll be using the Commensurate Sales to Popularity Concept in order to relevantly gauge their results. This concept will not only bring you sales information for all NSYNC‘s albums, physical and download singles, as well as audio and video streaming, but it will also determine their true popularity. If you are not yet familiar with the CSPC method, the next page explains it with a short video. I fully recommend watching the video before getting into the sales figures." + stream: false + response: + body: + text: "Both NSync and Backstreet Boys were extremely popular at the turn of the millennium. Backstreet Boys had massive album sales across the globe, great singles sales, plenty of chart-topping releases, hyped tours, and tremendous media coverage. NSync also had huge sales, with their album No Strings Attached selling 2.4 million units in its first week. They also had the second fastest-selling album of the Soundscan era before 2015, with Celebrity debuting at 1.88 million units sold.\n\nWhile it is difficult to say for sure which of the two bands was more popular, Backstreet Boys did have success in some countries that were traditionally hard to penetrate for Western artists." + generation_id: c14c80c3-18eb-4519-9460-6c92edd8cfb4 + chat_history: + - role: USER + message: 'Who is more popular: Nsync or Backstreet Boys?' + - role: CHATBOT + message: "Both NSync and Backstreet Boys were extremely popular at the turn of the millennium. Backstreet Boys had massive album sales across the globe, great singles sales, plenty of chart-topping releases, hyped tours, and tremendous media coverage. NSync also had huge sales, with their album No Strings Attached selling 2.4 million units in its first week. They also had the second fastest-selling album of the Soundscan era before 2015, with Celebrity debuting at 1.88 million units sold.\n\nWhile it is difficult to say for sure which of the two bands was more popular, Backstreet Boys did have success in some countries that were traditionally hard to penetrate for Western artists." + finish_reason: COMPLETE + meta: + api_version: + version: '1' + billed_units: + input_tokens: 682 + output_tokens: 143 + tokens: + input_tokens: 1380 + output_tokens: 434 + citations: + - start: 36 + end: 84 + text: extremely popular at the turn of the millennium. + document_ids: + - doc_1 + - start: 105 + end: 141 + text: massive album sales across the globe + document_ids: + - doc_0 + - start: 143 + end: 162 + text: great singles sales + document_ids: + - doc_0 + - start: 164 + end: 196 + text: plenty of chart-topping releases + document_ids: + - doc_0 + - start: 198 + end: 209 + text: hyped tours + document_ids: + - doc_0 + - start: 215 + end: 241 + text: tremendous media coverage. + document_ids: + - doc_0 + - start: 280 + end: 350 + text: album No Strings Attached selling 2.4 million units in its first week. + document_ids: + - doc_1 + - start: 369 + end: 430 + text: second fastest-selling album of the Soundscan era before 2015 + document_ids: + - doc_1 + - start: 437 + end: 483 + text: Celebrity debuting at 1.88 million units sold. + document_ids: + - doc_1 + - start: 589 + end: 677 + text: success in some countries that were traditionally hard to penetrate for Western artists. + document_ids: + - doc_2 + documents: + - id: doc_1 + snippet: "↓ Skip to Main Content\n\nMusic industry – One step closer to being accurate\n\nCSPC: NSYNC Popularity Analysis\n\nMJD Posted on February 9, 2018 Posted in CSPC 27 Comments Tagged with Boy band, N'Sync\n\nAt the turn of the millennium three teen acts were huge in the US, the Backstreet Boys, Britney Spears and NSYNC. The latter is the only one we haven’t study so far. It took 15 years and Adele to break their record of 2,4 million units sold of No Strings Attached in its first week alone.\n\nIt wasn’t a fluke, as the second fastest selling album of the Soundscan era prior 2015, was also theirs since Celebrity debuted with 1,88 million units sold." + title: 'CSPC: NSYNC Popularity Analysis - ChartMasters' + - id: doc_0 + snippet: "↓ Skip to Main Content\n\nMusic industry – One step closer to being accurate\n\nCSPC: Backstreet Boys Popularity Analysis\n\nHernán Lopez Posted on February 9, 2017 Posted in CSPC 72 Comments Tagged with Backstreet Boys, Boy band\n\nAt one point, Backstreet Boys defined success: massive albums sales across the globe, great singles sales, plenty of chart topping releases, hugely hyped tours and tremendous media coverage.\n\nIt is true that they benefited from extraordinarily good market conditions in all markets. After all, the all-time record year for the music business, as far as revenues in billion dollars are concerned, was actually 1999. That is, back when this five men group was at its peak." + title: 'CSPC: Backstreet Boys Popularity Analysis - ChartMasters' + - id: doc_2 + snippet: "1997, 1998, 2000 and 2001 also rank amongst some of the very best years.\nYet the way many music consumers – especially teenagers and young women’s – embraced their output deserves its own chapter. If Jonas Brothers and more recently One Direction reached a great level of popularity during the past decade, the type of success achieved by Backstreet Boys is in a completely different level as they really dominated the business for a few years all over the world, including in some countries that were traditionally hard to penetrate for Western artists.\n\nWe will try to analyze the extent of that hegemony with this new article with final results which will more than surprise many readers." + title: 'CSPC: Backstreet Boys Popularity Analysis - ChartMasters' + - code-samples: + - sdk: go + name: Streaming + code: "package main\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"io\"\n\t\"log\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(\"<>\"))\n\n\tresp, err := co.ChatStream(\n\t\tcontext.TODO(),\n\t\t&cohere.ChatStreamRequest{\n\t\t\tChatHistory: []*cohere.Message{\n\t\t\t\t{\n\t\t\t\t\tRole: \"USER\",\n\t\t\t\t\tUser: &cohere.ChatMessage{\n\t\t\t\t\t\tMessage: \"Who discovered gravity?\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tRole: \"CHATBOT\",\n\t\t\t\t\tChatbot: &cohere.ChatMessage{\n\t\t\t\t\t\tMessage: \"The man who is widely credited with discovering gravity is Sir Isaac Newton\",\n\t\t\t\t\t},\n\t\t\t\t}},\n\t\t\tMessage: \"What year was he born?\",\n\t\t\tConnectors: []*cohere.ChatConnector{\n\t\t\t\t{Id: \"web-search\"},\n\t\t\t},\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\t// Make sure to close the stream when you're done reading.\n\t// This is easily handled with defer.\n\tdefer resp.Close()\n\n\tfor {\n\t\tmessage, err := resp.Recv()\n\n\t\tif errors.Is(err, io.EOF) {\n\t\t\t// An io.EOF error means the server is done sending messages\n\t\t\t// and should be treated as a success.\n\t\t\tbreak\n\t\t}\n\n\t\tif message.TextGeneration != nil {\n\t\t\tlog.Printf(\"%+v\", resp)\n\t\t}\n\t}\n\n}\n" + - sdk: typescript + name: Streaming + code: "const { CohereClient } = require('cohere-ai');\n\nconst cohere = new CohereClient({\n token: '<>',\n});\n\n(async () => {\n const chatStream = await cohere.chatStream({\n chatHistory: [\n { role: 'USER', message: 'Who discovered gravity?' },\n {\n role: 'CHATBOT',\n message: 'The man who is widely credited with discovering gravity is Sir Isaac Newton',\n },\n ],\n message: 'What year was he born?',\n // perform web search before answering the question. You can also use your own custom connector.\n connectors: [{ id: 'web-search' }],\n });\n\n for await (const message of chatStream) {\n if (message.eventType === 'text-generation') {\n process.stdout.write(message);\n }\n }\n})();\n" + - sdk: java + name: Streaming + code: "/* (C)2024 */\npackage chatpost;\n\nimport com.cohere.api.Cohere;\nimport com.cohere.api.requests.ChatStreamRequest;\nimport com.cohere.api.types.ChatMessage;\nimport com.cohere.api.types.ChatMessageRole;\nimport com.cohere.api.types.ChatTextGenerationEvent;\nimport com.cohere.api.types.StreamedChatResponse;\nimport java.util.List;\n\npublic class Stream {\n public static void main(String[] args) {\n Cohere cohere = Cohere.builder().token(\"<>\").clientName(\"snippet\").build();\n\n Iterable response =\n cohere.chatStream(\n ChatStreamRequest.builder()\n .message(\"What year was he born?\")\n .chatHistory(\n List.of(\n ChatMessage.builder()\n .role(ChatMessageRole.USER)\n .message(\"Who discovered gravity?\")\n .build(),\n ChatMessage.builder()\n .role(ChatMessageRole.CHATBOT)\n .message(\n \"The man who is widely credited\"\n + \" with discovering gravity is\"\n + \" Sir Isaac Newton\")\n .build()))\n .build());\n\n for (StreamedChatResponse chatResponse : response) {\n if (chatResponse.isTextGeneration()) {\n System.out.println(\n chatResponse\n .getTextGeneration()\n .map(ChatTextGenerationEvent::getText)\n .orElse(\"\"));\n }\n }\n\n System.out.println(response);\n }\n}\n" + - sdk: python + name: Streaming + code: "import cohere\n\nco = cohere.Client(\"<>\")\n\nresponse = co.chat_stream(\n chat_history=[\n {\"role\": \"USER\", \"message\": \"Who discovered gravity?\"},\n {\n \"role\": \"CHATBOT\",\n \"message\": \"The man who is widely credited with discovering gravity is Sir Isaac Newton\",\n },\n ],\n message=\"What year was he born?\",\n # perform web search before answering the question. You can also use your own custom connector.\n connectors=[{\"id\": \"web-search\"}],\n)\n\nfor event in response:\n if event.event_type == \"text-generation\":\n print(event.text, end='')\n" + - sdk: curl + name: Streaming + code: "curl --request POST \\\n --url https://api.cohere.com/v1/chat \\\n --header 'accept: application/json' \\\n --header 'content-type: application/json' \\\n --header \"Authorization: bearer $CO_API_KEY\" \\\n --data '{\n \"stream\": true,\n \"chatHistory\": [\n {\n \"role\": \"USER\",\n \"message\": \"Who discovered gravity?\"\n },\n {\n \"role\": \"CHATBOT\",\n \"message\": \"The man who is widely credited with discovering gravity is Sir Isaac Newton\"\n }\n ],\n \"message\": \"What year was he born?\",\n \"connectors\": [\n {\n \"id\": \"web-search\"\n }\n ]\n }'" + request: + message: hello world! + stream: true + response: + stream: + - event_type: stream-start + generation_id: 29f14a5a-11de-4cae-9800-25e4747408ea + - event_type: text-generation + text: Hello + - event_type: text-generation + text: '!' + - event_type: text-generation + text: ' How' + - event_type: text-generation + text: ' can' + - event_type: text-generation + text: ' I' + - event_type: text-generation + text: ' help' + - event_type: text-generation + text: ' you' + - event_type: text-generation + text: ' today' + - event_type: text-generation + text: '?' + - event_type: stream-end + response: + text: Hello! How can I help you today? + generation_id: 29f14a5a-11de-4cae-9800-25e4747408ea + chat_history: + - role: USER + message: hello world! + - role: CHATBOT + message: Hello! How can I help you today? + finish_reason: COMPLETE + meta: + api_version: + version: '1' + billed_units: + input_tokens: 3 + output_tokens: 9 + tokens: + input_tokens: 69 + output_tokens: 9 + finish_reason: COMPLETE + - code-samples: + - sdk: go + name: Tools + code: "package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(\"<>\"))\n\n\tresp, err := co.Chat(\n\t\tcontext.TODO(),\n\t\t&cohere.ChatRequest{\n\t\t\tMessage: \"Can you provide a sales summary for 29th September 2023, and also give me some details about the products in the 'Electronics' category, for example their prices and stock levels?\",\n\t\t\tTools: []*cohere.Tool{\n\t\t\t\t{\n\t\t\t\t\tName: \"query_daily_sales_report\",\n\t\t\t\t\tDescription: \"Connects to a database to retrieve overall sales volumes and sales information for a given day.\",\n\t\t\t\t\tParameterDefinitions: map[string]*cohere.ToolParameterDefinitionsValue{\n\t\t\t\t\t\t\"day\": {\n\t\t\t\t\t\t\tDescription: cohere.String(\"Retrieves sales data for this day, formatted as YYYY-MM-DD.\"),\n\t\t\t\t\t\t\tType: \"str\",\n\t\t\t\t\t\t\tRequired: cohere.Bool(true),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tName: \"query_product_catalog\",\n\t\t\t\t\tDescription: \"Connects to a a product catalog with information about all the products being sold, including categories, prices, and stock levels.\",\n\t\t\t\t\tParameterDefinitions: map[string]*cohere.ToolParameterDefinitionsValue{\n\t\t\t\t\t\t\"category\": {\n\t\t\t\t\t\t\tDescription: cohere.String(\"Retrieves product information data for all products in this category.\"),\n\t\t\t\t\t\t\tType: \"str\",\n\t\t\t\t\t\t\tRequired: cohere.Bool(true),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n" + - sdk: typescript + name: Tools + code: "const { CohereClient } = require('cohere-ai');\n\nconst cohere = new CohereClient({\n token: '<>',\n});\n\n(async () => {\n const response = await cohere.chat({\n message:\n \"Can you provide a sales summary for 29th September 2023, and also give me some details about the products in the 'Electronics' category, for example their prices and stock levels?\",\n tools: [\n {\n name: 'query_daily_sales_report',\n description:\n 'Connects to a database to retrieve overall sales volumes and sales information for a given day.',\n parameterDefinitions: {\n day: {\n description: 'Retrieves sales data for this day, formatted as YYYY-MM-DD.',\n type: 'str',\n required: true,\n },\n },\n },\n {\n name: 'query_product_catalog',\n description:\n 'Connects to a a product catalog with information about all the products being sold, including categories, prices, and stock levels.',\n parameterDefinitions: {\n category: {\n description: 'Retrieves product information data for all products in this category.',\n type: 'str',\n required: true,\n },\n },\n },\n ],\n });\n\n console.log(response);\n})();\n" + - sdk: java + name: Tools + code: "/* (C)2024 */\npackage chatpost;\n\nimport com.cohere.api.Cohere;\nimport com.cohere.api.requests.ChatRequest;\nimport com.cohere.api.types.NonStreamedChatResponse;\nimport com.cohere.api.types.Tool;\nimport com.cohere.api.types.ToolParameterDefinitionsValue;\nimport java.util.List;\nimport java.util.Map;\n\npublic class Tools {\n public static void main(String[] args) {\n Cohere cohere = Cohere.builder().token(\"<>\").clientName(\"snippet\").build();\n\n NonStreamedChatResponse response =\n cohere.chat(\n ChatRequest.builder()\n .message(\n \"Can you provide a sales summary for 29th September 2023,\"\n + \" and also give me some details about the products in\"\n + \" the 'Electronics' category, for example their\"\n + \" prices and stock levels?\")\n .tools(\n List.of(\n Tool.builder()\n .name(\"query_daily_sales_report\")\n .description(\n \"Connects to a database to retrieve\"\n + \" overall sales volumes and\"\n + \" sales information for a\"\n + \" given day.\")\n .parameterDefinitions(\n Map.of(\n \"day\",\n ToolParameterDefinitionsValue\n .builder()\n .type(\"str\")\n .description(\n \"Retrieves\"\n + \" sales\"\n + \" data\"\n + \" for this\"\n + \" day,\"\n + \" formatted\"\n + \" as YYYY-MM-DD.\")\n .required(true)\n .build()))\n .build(),\n Tool.builder()\n .name(\"query_product_catalog\")\n .description(\n \"Connects to a a product catalog\"\n + \" with information about all\"\n + \" the products being sold,\"\n + \" including categories,\"\n + \" prices, and stock levels.\")\n .parameterDefinitions(\n Map.of(\n \"category\",\n ToolParameterDefinitionsValue\n .builder()\n .type(\"str\")\n .description(\n \"Retrieves\"\n + \" product\"\n + \" information\"\n + \" data\"\n + \" for all\"\n + \" products\"\n + \" in this\"\n + \" category.\")\n .required(true)\n .build()))\n .build()))\n .build());\n\n System.out.println(response);\n }\n}\n" + - sdk: python + name: Tools + code: "import cohere\n\nco = cohere.Client(\"<>\")\n\n# tool descriptions that the model has access to\ntools = [\n {\n \"name\": \"query_daily_sales_report\",\n \"description\": \"Connects to a database to retrieve overall sales volumes and sales information for a given day.\",\n \"parameter_definitions\": {\n \"day\": {\n \"description\": \"Retrieves sales data for this day, formatted as YYYY-MM-DD.\",\n \"type\": \"str\",\n \"required\": True\n }\n }\n },\n {\n \"name\": \"query_product_catalog\",\n \"description\": \"Connects to a a product catalog with information about all the products being sold, including categories, prices, and stock levels.\",\n \"parameter_definitions\": {\n \"category\": {\n \"description\": \"Retrieves product information data for all products in this category.\",\n \"type\": \"str\",\n \"required\": True\n }\n }\n }\n]\n\n\n# user request\nmessage = \"Can you provide a sales summary for 29th September 2023, and also give me some details about the products in the 'Electronics' category, for example their prices and stock levels?\"\n\nresponse = co.chat(\n message=message,\n tools=tools,\n)\n\nprint(response)\n" + - sdk: curl + name: Tools + code: "curl --request POST \\\n --url https://api.cohere.com/v1/chat \\\n --header 'accept: application/json' \\\n --header 'content-type: application/json' \\\n --header \"Authorization: bearer $CO_API_KEY\" \\\n --data '{\n \"message\": \"Can you provide a sales summary for 29th September 2023, and also give me some details about the products in the 'Electronics' category, for example their prices and stock levels?\",\n \"tools\": [\n {\n \"name\": \"query_daily_sales_report\",\n \"description\": \"Connects to a database to retrieve overall sales volumes and sales information for a given day.\",\n \"parameterDefinitions\": {\n \"day\": {\n \"description\": \"Retrieves sales data for this day, formatted as YYYY-MM-DD.\",\n \"type\": \"str\",\n \"required\": true\n }\n }\n },\n {\n \"name\": \"query_product_catalog\",\n \"description\": \"Connects to a a product catalog with information about all the products being sold, including categories, prices, and stock levels.\",\n \"parameterDefinitions\": {\n \"category\": {\n \"description\": \"Retrieves product information data for all products in this category.\",\n \"type\": \"str\",\n \"required\": true\n }\n }\n }\n ]\n }'\n" + request: + message: 'Can you provide a sales summary for 29th September 2023, and also give me some details about the products in the ''Electronics'' category, for example their prices and stock levels?' + tools: + - name: query_daily_sales_report + description: Connects to a database to retrieve overall sales volumes and sales information for a given day. + parameter_definitions: + day: + description: 'Retrieves sales data for this day, formatted as YYYY-MM-DD.' + type: str + required: true + - name: query_product_catalog + description: 'Connects to a a product catalog with information about all the products being sold, including categories, prices, and stock levels.' + parameter_definitions: + category: + description: Retrieves product information data for all products in this category. + type: str + required: true + stream: false + response: + body: + text: 'I will first find the sales summary for 29th September 2023. Then, I will find the details of the products in the ''Electronics'' category.' + generation_id: 9e5f00aa-bf1e-481a-abe3-0eceac18c3ec + chat_history: + - role: USER + message: 'Can you provide a sales summary for 29th September 2023, and also give me some details about the products in the ''Electronics'' category, for example their prices and stock levels?' + - role: CHATBOT + message: 'I will first find the sales summary for 29th September 2023. Then, I will find the details of the products in the ''Electronics'' category.' + tool_calls: + - name: query_daily_sales_report + parameters: + day: '2023-09-29T00:00:00.0000000+04:00' + - name: query_product_catalog + parameters: + category: Electronics + finish_reason: COMPLETE + meta: + api_version: + version: '1' + billed_units: + input_tokens: 127 + output_tokens: 69 + tokens: + input_tokens: 1032 + output_tokens: 124 + tool_calls: + - name: query_daily_sales_report + parameters: + day: '2023-09-29T00:00:00.0000000+04:00' + - name: query_product_catalog + parameters: + category: Electronics + /v2/chat: + post: + summary: Chat with the model + description: "Generates a message from the model in response to a provided conversation. To learn how to use the Chat API with Streaming and RAG follow our Text Generation guides.\n" + operationId: chatv2 + requestBody: + content: + application/json: + schema: + required: + - messages + - model + type: object + properties: + model: + type: string + description: 'The name of a compatible [Cohere model](https://docs.cohere.com/docs/models) (such as command-r or command-r-plus) or the ID of a [fine-tuned](https://docs.cohere.com/docs/chat-fine-tuning) model.' + messages: + $ref: '#/components/schemas/ChatMessages' + tools: + type: array + items: + $ref: '#/components/schemas/Tool-2' + description: "A list of available tools (functions) that the model may suggest invoking before producing a text response.\n\nWhen `tools` is passed (without `tool_results`), the `text` content in the response will be empty and the `tool_calls` field in the response will be populated with a list of tool calls that need to be made. If no calls need to be made, the `tool_calls` array will be empty.\n" + citation_mode: + enum: + - FAST + - ACCURATE + - OFF + type: string + description: "Defaults to `\"accurate\"`.\nDictates the approach taken to generating citations as part of the RAG flow by allowing the user to specify whether they want `\"accurate\"` results, `\"fast\"` results or no results.\n" + response_format: + $ref: '#/components/schemas/ResponseFormat-2' + max_tokens: + type: integer + description: "The maximum number of tokens the model will generate as part of the response. Note: Setting a low value may result in incomplete generations.\n" + stop_sequences: + type: array + items: + type: string + description: "A list of up to 5 strings that the model will use to stop generation. If the model generates a string that matches any of the strings in the list, it will stop generating tokens and return the generated text up to that point not including the stop sequence.\n" + temperature: + maximum: 1 + minimum: 0 + type: number + description: "Defaults to `0.3`.\n\nA non-negative float that tunes the degree of randomness in generation. Lower temperatures mean less random generations, and higher temperatures mean more random generations.\n\nRandomness can be further maximized by increasing the value of the `p` parameter.\n" + format: float + seed: + maximum: 18446744073709552000 + minimum: 0 + type: integer + description: "If specified, the backend will make a best effort to sample tokens\ndeterministically, such that repeated requests with the same\nseed and parameters should return the same result. However,\ndeterminism cannot be totally guaranteed.\n" + frequency_penalty: + type: number + description: "Defaults to `0.0`, min value of `0.0`, max value of `1.0`.\nUsed to reduce repetitiveness of generated tokens. The higher the value, the stronger a penalty is applied to previously present tokens, proportional to how many times they have already appeared in the prompt or prior generation.\n" + format: float + presence_penalty: + type: number + description: "Defaults to `0.0`, min value of `0.0`, max value of `1.0`.\nUsed to reduce repetitiveness of generated tokens. Similar to `frequency_penalty`, except that this penalty is applied equally to all tokens that have already appeared, regardless of their exact frequencies.\n" + format: float + k: + maximum: 500 + minimum: 0 + type: number + description: "Ensures only the top `k` most likely tokens are considered for generation at each step.\nDefaults to `0`, min value of `0`, max value of `500`.\n" + format: float + default: 0 + p: + maximum: 0.99 + minimum: 0.01 + type: number + description: "Ensures that only the most likely tokens, with total probability mass of `p`, are considered for generation at each step. If both `k` and `p` are enabled, `p` acts after `k`.\nDefaults to `0.75`. min value of `0.01`, max value of `0.99`.\n" + format: float + default: 0.75 + responses: + '200': + description: OK + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/NonStreamedChatResponse-2' + - $ref: '#/components/schemas/StreamedChatResponse-2' + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' + '422': + $ref: '#/components/responses/UnprocessableEntity' + '429': + $ref: '#/components/responses/RateLimit' + '498': + $ref: '#/components/responses/InvalidToken' + '499': + $ref: '#/components/responses/RequestCancelled' + '500': + $ref: '#/components/responses/InternalServerError' + '501': + $ref: '#/components/responses/NotImplemented' + '503': + $ref: '#/components/responses/ServiceUnavailable' + '504': + $ref: '#/components/responses/GatewayTimeout' + x-fern-audiences: + - v2-beta + x-fern-sdk-group-name: v2 + x-fern-sdk-method-name: chat + x-fern-streaming: + format: sse + stream-condition: $request.stream + response: + x-fern-sdk-group-name: v2 + required: + - id + - finish_reason + - messages + properties: + id: + type: string + description: Unique identifier for the generated reply. Useful for submitting feedback. + finish_reason: + $ref: '#/components/schemas/ChatFinishReason' + message: + $ref: '#/components/schemas/AssistantMessageResponse' + usage: + $ref: '#/components/schemas/Usage' + response-stream: + x-fern-sdk-group-name: v2 + description: StreamedChatResponse is returned in streaming mode (specified with `stream=True` in the request). + oneOf: + - $ref: '#/components/schemas/ChatMessageStartEvent' + - $ref: '#/components/schemas/ChatContentStartEvent' + - $ref: '#/components/schemas/ChatContentDeltaEvent' + - $ref: '#/components/schemas/ChatContentEndEvent' + - $ref: '#/components/schemas/ChatToolPlanDeltaEvent' + - $ref: '#/components/schemas/ChatToolCallStartEvent' + - $ref: '#/components/schemas/ChatToolCallDeltaEvent' + - $ref: '#/components/schemas/ChatToolCallEndEvent' + - $ref: '#/components/schemas/ChatMessageEndEvent' + x-fern-examples: + - code-samples: + - sdk: typescript + name: Default + code: "const { CohereClientV2 } = require('cohere-ai');\n\nconst cohere = new CohereClientV2({\n token: '<>',\n});\n\n(async () => {\n const response = await cohere.chat({\n model: 'command-r-plus',\n messages: [\n {\n role: 'user',\n content: 'hello world!',\n },\n ],\n });\n\n console.log(response);\n})();\n" + - sdk: python + name: Default + code: "import cohere\n\nco = cohere.ClientV2(\"<>\")\n\nresponse = co.chat(\n model=\"command-r-plus\",\n messages=[\n {\n \"role\": \"user\",\n \"content\": \"hello world!\"\n }\n ]\n)\n\nprint(response)\n" + - sdk: python + name: Async + code: "import cohere\nimport asyncio\n\nco = cohere.AsyncClientV2(\"<>\")\n\n\nasync def main():\n response = await co.chat(\n model=\"command-r-plus\",\n messages=[\n cohere.v2.ChatMessage2_User(\n content=\"hello world!\"\n )\n ]\n )\n\n print(response)\n\nasyncio.run(main())\n" + request: + model: command-r + messages: + - role: user + content: Tell me about LLMs + stream: false + response: + body: + id: c14c80c3-18eb-4519-9460-6c92edd8cfb4 + message: + role: assistant + content: + - type: text + text: "LLMs stand for Large Language Models, which are a type of neural network model specialized in processing and generating human language. They are designed to understand and respond to natural language input and have become increasingly popular and valuable in recent years.\n\nLLMs are trained on vast amounts of text data, enabling them to learn patterns, grammar, and semantic meanings present in the language. These models can then be used for various natural language processing tasks, such as text generation, summarization, question answering, machine translation, sentiment analysis, and even some aspects of natural language understanding.\n\nSome well-known examples of LLMs include:\n\n1. GPT-3 (Generative Pre-trained Transformer 3) — An open-source LLM developed by OpenAI, capable of generating human-like text and performing various language tasks.\n\n2. BERT (Bidirectional Encoder Representations from Transformers) — A Google-developed LLM that is particularly good at understanding contextual relationships in text, and is widely used for natural language understanding tasks like sentiment analysis and named entity recognition.\n\n3. T5 (Text-to-Text Transfer Transformer) — Also from Google, T5 is a flexible LLM that frames all language tasks as text-to-text problems, where the model learns to generate output text based on input text prompts.\n\n4. RoBERTa (Robustly Optimized BERT Approach) — A variant of BERT that uses additional training techniques to improve performance.\n\n5. DeBERTa (Decoding-enhanced BERT with disentangled attention) — Another variant of BERT that introduces a new attention mechanism.\n\nLLMs have become increasingly powerful and larger in scale, improving the accuracy and sophistication of language tasks. They are also being used as a foundation for developing various applications, including chatbots, content recommendation systems, language translation services, and more. \n\nThe future of LLMs holds the potential for even more sophisticated language technologies, with ongoing research and development focused on enhancing their capabilities, improving efficiency, and exploring their applications in various domains." + finish_reason: complete + usage: + billed_units: + input_tokens: 5 + output_tokens: 418 + tokens: + input_tokens: 71 + output_tokens: 418 + - code-samples: + - sdk: typescript + name: Documents + code: "const { CohereClientV2 } = require('cohere-ai');\n\nconst cohere = new CohereClientV2({\n token: '<>',\n});\n\n(async () => {\n const response = await cohere.chat({\n model: 'command-r-plus',\n messages: [\n {\n role: 'user',\n content: [{ type: 'text', text: \"Who's the best?\" }],\n documents: [{ id: '1', text: 'Cohere is the best!' }],\n },\n ],\n });\n\n console.log(response);\n})();\n" + - sdk: python + name: Documents + code: "import cohere\n\nco = cohere.ClientV2(\"<>\")\n\nresponse = co.chat(\n model=\"command-r-plus\",\n messages=[\n {\n \"role\": \"user\",\n \"content\": \"Who's the best?\",\n \"documents\": [{'id': '1', 'title': 'The best', 'text': 'Cohere is the best!'}]\n }\n ]\n)\n\nprint(response)\n" + request: + model: command-r + messages: + - role: user + content: 'Who is more popular: Nsync or Backstreet Boys?' + documents: + - title: 'CSPC: Backstreet Boys Popularity Analysis - ChartMasters' + snippet: "↓ Skip to Main Content\n\nMusic industry – One step closer to being accurate\n\nCSPC: Backstreet Boys Popularity Analysis\n\nHernán Lopez Posted on February 9, 2017 Posted in CSPC 72 Comments Tagged with Backstreet Boys, Boy band\n\nAt one point, Backstreet Boys defined success: massive albums sales across the globe, great singles sales, plenty of chart topping releases, hugely hyped tours and tremendous media coverage.\n\nIt is true that they benefited from extraordinarily good market conditions in all markets. After all, the all-time record year for the music business, as far as revenues in billion dollars are concerned, was actually 1999. That is, back when this five men group was at its peak." + - title: 'CSPC: NSYNC Popularity Analysis - ChartMasters' + snippet: "↓ Skip to Main Content\n\nMusic industry – One step closer to being accurate\n\nCSPC: NSYNC Popularity Analysis\n\nMJD Posted on February 9, 2018 Posted in CSPC 27 Comments Tagged with Boy band, N'Sync\n\nAt the turn of the millennium three teen acts were huge in the US, the Backstreet Boys, Britney Spears and NSYNC. The latter is the only one we haven’t study so far. It took 15 years and Adele to break their record of 2,4 million units sold of No Strings Attached in its first week alone.\n\nIt wasn’t a fluke, as the second fastest selling album of the Soundscan era prior 2015, was also theirs since Celebrity debuted with 1,88 million units sold." + - title: 'CSPC: Backstreet Boys Popularity Analysis - ChartMasters' + snippet: "1997, 1998, 2000 and 2001 also rank amongst some of the very best years.\nYet the way many music consumers – especially teenagers and young women’s – embraced their output deserves its own chapter. If Jonas Brothers and more recently One Direction reached a great level of popularity during the past decade, the type of success achieved by Backstreet Boys is in a completely different level as they really dominated the business for a few years all over the world, including in some countries that were traditionally hard to penetrate for Western artists.\n\nWe will try to analyze the extent of that hegemony with this new article with final results which will more than surprise many readers." + - title: 'CSPC: NSYNC Popularity Analysis - ChartMasters' + snippet: "Was the teen group led by Justin Timberlake really that big? Was it only in the US where they found success? Or were they a global phenomenon?\nAs usual, I’ll be using the Commensurate Sales to Popularity Concept in order to relevantly gauge their results. This concept will not only bring you sales information for all NSYNC‘s albums, physical and download singles, as well as audio and video streaming, but it will also determine their true popularity. If you are not yet familiar with the CSPC method, the next page explains it with a short video. I fully recommend watching the video before getting into the sales figures." + stream: false + response: + body: + id: c14c80c3-18eb-4519-9460-6c92edd8cfb4 + message: + role: assistant + content: + - type: text + text: "Both NSync and Backstreet Boys were extremely popular at the turn of the millennium. Backstreet Boys had massive album sales across the globe, great singles sales, plenty of chart-topping releases, hyped tours, and tremendous media coverage. NSync also had huge sales, with their album No Strings Attached selling 2.4 million units in its first week. They also had the second fastest-selling album of the Soundscan era before 2015, with Celebrity debuting at 1.88 million units sold.\n\nWhile it is difficult to say for sure which of the two bands was more popular, Backstreet Boys did have success in some countries that were traditionally hard to penetrate for Western artists." + citations: + - start: 36 + end: 84 + text: extremely popular at the turn of the millennium. + sources: + - type: document + id: doc_1 + document: + snippet: "↓ Skip to Main Content\n\nMusic industry – One step closer to being accurate\n\nCSPC: NSYNC Popularity Analysis\n\nMJD Posted on February 9, 2018 Posted in CSPC 27 Comments Tagged with Boy band, N'Sync\n\nAt the turn of the millennium three teen acts were huge in the US, the Backstreet Boys, Britney Spears and NSYNC. The latter is the only one we haven’t study so far. It took 15 years and Adele to break their record of 2,4 million units sold of No Strings Attached in its first week alone.\n\nIt wasn’t a fluke, as the second fastest selling album of the Soundscan era prior 2015, was also theirs since Celebrity debuted with 1,88 million units sold." + title: 'CSPC: NSYNC Popularity Analysis - ChartMasters' + - start: 105 + end: 141 + text: massive album sales across the globe + sources: + - type: document + id: doc_0 + document: + snippet: "↓ Skip to Main Content\n\nMusic industry – One step closer to being accurate\n\nCSPC: Backstreet Boys Popularity Analysis\n\nHernán Lopez Posted on February 9, 2017 Posted in CSPC 72 Comments Tagged with Backstreet Boys, Boy band\n\nAt one point, Backstreet Boys defined success: massive albums sales across the globe, great singles sales, plenty of chart topping releases, hugely hyped tours and tremendous media coverage.\n\nIt is true that they benefited from extraordinarily good market conditions in all markets. After all, the all-time record year for the music business, as far as revenues in billion dollars are concerned, was actually 1999. That is, back when this five men group was at its peak." + title: 'CSPC: Backstreet Boys Popularity Analysis - ChartMasters' + - start: 143 + end: 162 + text: great singles sales + sources: + - type: document + id: doc_0 + document: + snippet: "↓ Skip to Main Content\n\nMusic industry – One step closer to being accurate\n\nCSPC: Backstreet Boys Popularity Analysis\n\nHernán Lopez Posted on February 9, 2017 Posted in CSPC 72 Comments Tagged with Backstreet Boys, Boy band\n\nAt one point, Backstreet Boys defined success: massive albums sales across the globe, great singles sales, plenty of chart topping releases, hugely hyped tours and tremendous media coverage.\n\nIt is true that they benefited from extraordinarily good market conditions in all markets. After all, the all-time record year for the music business, as far as revenues in billion dollars are concerned, was actually 1999. That is, back when this five men group was at its peak." + title: 'CSPC: Backstreet Boys Popularity Analysis - ChartMasters' + - start: 164 + end: 196 + text: plenty of chart-topping releases + sources: + - type: document + id: doc_0 + document: + snippet: "↓ Skip to Main Content\n\nMusic industry – One step closer to being accurate\n\nCSPC: Backstreet Boys Popularity Analysis\n\nHernán Lopez Posted on February 9, 2017 Posted in CSPC 72 Comments Tagged with Backstreet Boys, Boy band\n\nAt one point, Backstreet Boys defined success: massive albums sales across the globe, great singles sales, plenty of chart topping releases, hugely hyped tours and tremendous media coverage.\n\nIt is true that they benefited from extraordinarily good market conditions in all markets. After all, the all-time record year for the music business, as far as revenues in billion dollars are concerned, was actually 1999. That is, back when this five men group was at its peak." + title: 'CSPC: Backstreet Boys Popularity Analysis - ChartMasters' + - start: 198 + end: 209 + text: hyped tours + sources: + - type: document + id: doc_0 + document: + snippet: "↓ Skip to Main Content\n\nMusic industry – One step closer to being accurate\n\nCSPC: Backstreet Boys Popularity Analysis\n\nHernán Lopez Posted on February 9, 2017 Posted in CSPC 72 Comments Tagged with Backstreet Boys, Boy band\n\nAt one point, Backstreet Boys defined success: massive albums sales across the globe, great singles sales, plenty of chart topping releases, hugely hyped tours and tremendous media coverage.\n\nIt is true that they benefited from extraordinarily good market conditions in all markets. After all, the all-time record year for the music business, as far as revenues in billion dollars are concerned, was actually 1999. That is, back when this five men group was at its peak." + title: 'CSPC: Backstreet Boys Popularity Analysis - ChartMasters' + - start: 215 + end: 241 + text: tremendous media coverage. + sources: + - type: document + id: doc_0 + document: + snippet: "↓ Skip to Main Content\n\nMusic industry – One step closer to being accurate\n\nCSPC: Backstreet Boys Popularity Analysis\n\nHernán Lopez Posted on February 9, 2017 Posted in CSPC 72 Comments Tagged with Backstreet Boys, Boy band\n\nAt one point, Backstreet Boys defined success: massive albums sales across the globe, great singles sales, plenty of chart topping releases, hugely hyped tours and tremendous media coverage.\n\nIt is true that they benefited from extraordinarily good market conditions in all markets. After all, the all-time record year for the music business, as far as revenues in billion dollars are concerned, was actually 1999. That is, back when this five men group was at its peak." + title: 'CSPC: Backstreet Boys Popularity Analysis - ChartMasters' + - start: 280 + end: 350 + text: album No Strings Attached selling 2.4 million units in its first week. + sources: + - type: document + id: doc_1 + document: + snippet: "↓ Skip to Main Content\n\nMusic industry – One step closer to being accurate\n\nCSPC: NSYNC Popularity Analysis\n\nMJD Posted on February 9, 2018 Posted in CSPC 27 Comments Tagged with Boy band, N'Sync\n\nAt the turn of the millennium three teen acts were huge in the US, the Backstreet Boys, Britney Spears and NSYNC. The latter is the only one we haven’t study so far. It took 15 years and Adele to break their record of 2,4 million units sold of No Strings Attached in its first week alone.\n\nIt wasn’t a fluke, as the second fastest selling album of the Soundscan era prior 2015, was also theirs since Celebrity debuted with 1,88 million units sold." + title: 'CSPC: NSYNC Popularity Analysis - ChartMasters' + - start: 369 + end: 430 + text: second fastest-selling album of the Soundscan era before 2015 + sources: + - type: document + id: doc_1 + document: + snippet: "↓ Skip to Main Content\n\nMusic industry – One step closer to being accurate\n\nCSPC: NSYNC Popularity Analysis\n\nMJD Posted on February 9, 2018 Posted in CSPC 27 Comments Tagged with Boy band, N'Sync\n\nAt the turn of the millennium three teen acts were huge in the US, the Backstreet Boys, Britney Spears and NSYNC. The latter is the only one we haven’t study so far. It took 15 years and Adele to break their record of 2,4 million units sold of No Strings Attached in its first week alone.\n\nIt wasn’t a fluke, as the second fastest selling album of the Soundscan era prior 2015, was also theirs since Celebrity debuted with 1,88 million units sold." + title: 'CSPC: NSYNC Popularity Analysis - ChartMasters' + - start: 437 + end: 483 + text: Celebrity debuting at 1.88 million units sold. + sources: + - type: document + id: doc_1 + document: + snippet: "↓ Skip to Main Content\n\nMusic industry – One step closer to being accurate\n\nCSPC: NSYNC Popularity Analysis\n\nMJD Posted on February 9, 2018 Posted in CSPC 27 Comments Tagged with Boy band, N'Sync\n\nAt the turn of the millennium three teen acts were huge in the US, the Backstreet Boys, Britney Spears and NSYNC. The latter is the only one we haven’t study so far. It took 15 years and Adele to break their record of 2,4 million units sold of No Strings Attached in its first week alone.\n\nIt wasn’t a fluke, as the second fastest selling album of the Soundscan era prior 2015, was also theirs since Celebrity debuted with 1,88 million units sold." + title: 'CSPC: NSYNC Popularity Analysis - ChartMasters' + - start: 589 + end: 677 + text: success in some countries that were traditionally hard to penetrate for Western artists. + sources: + - type: document + id: doc_2 + document: + snippet: "1997, 1998, 2000 and 2001 also rank amongst some of the very best years.\nYet the way many music consumers – especially teenagers and young women’s – embraced their output deserves its own chapter. If Jonas Brothers and more recently One Direction reached a great level of popularity during the past decade, the type of success achieved by Backstreet Boys is in a completely different level as they really dominated the business for a few years all over the world, including in some countries that were traditionally hard to penetrate for Western artists.\n\nWe will try to analyze the extent of that hegemony with this new article with final results which will more than surprise many readers." + title: 'CSPC: Backstreet Boys Popularity Analysis - ChartMasters' + finish_reason: complete + usage: + billed_units: + input_tokens: 682 + output_tokens: 143 + tokens: + input_tokens: 1380 + output_tokens: 434 + - code-samples: + - sdk: typescript + name: Streaming + code: "const { CohereClientV2 } = require('cohere-ai');\n\nconst cohere = new CohereClientV2({\n token: '<>',\n});\n\n(async () => {\n const stream = await cohere.chatStream({\n model: 'command-r-plus',\n messages: [\n {\n role: 'user',\n content: 'hello world!',\n },\n ],\n });\n\n for await (const chatEvent of stream) {\n if (chatEvent.type === 'content-delta') {\n console.log(chatEvent.delta?.message);\n }\n }\n})();\n" + - sdk: python + name: Streaming + code: "import cohere\n\nco = cohere.ClientV2(\"<>\")\n\nresponse = co.chat_stream(\n model=\"command-r-plus\",\n messages=[\n {\n \"role\": \"user\",\n \"content\": \"hello world!\"\n }\n ]\n)\n\nfor event in response:\n if event.type == \"content-delta\":\n print(event.delta.message.content.text, end='')\n" + request: + model: command-r + messages: + - role: user + content: Hello! + stream: true + response: + stream: + - type: message-start + id: 29f14a5a-11de-4cae-9800-25e4747408ea + delta: + message: + role: assistant + content: [ ] + tool_plan: '' + tool_calls: [ ] + citations: [ ] + - type: content-start + index: 0 + delta: + message: + content: + type: text + text: '' + - type: content-delta + index: 0 + delta: + message: + content: + text: Hello + - type: content-delta + index: 0 + delta: + message: + content: + text: '!' + - type: content-delta + index: 0 + delta: + message: + content: + text: ' How' + - type: content-delta + index: 0 + delta: + message: + content: + text: ' can' + - type: content-delta + index: 0 + delta: + message: + content: + text: ' I' + - type: content-delta + index: 0 + delta: + message: + content: + text: ' help' + - type: content-delta + index: 0 + delta: + message: + content: + text: ' you' + - type: content-delta + index: 0 + delta: + message: + content: + text: ' today' + - type: content-delta + index: 0 + delta: + message: + content: + text: '?' + - type: content-end + index: 0 + - event_type: message-end + delta: + finish_reason: complete + usage: + api_version: + version: '2' + billed_units: + input_tokens: 3 + output_tokens: 9 + tokens: + input_tokens: 69 + output_tokens: 9 + - code-samples: + - sdk: typescript + name: Tools + code: "const { CohereClientV2 } = require('cohere-ai');\n\nconst cohere = new CohereClientV2({\n token: '<>',\n});\n\n(async () => {\n const response = await cohere.chat({\n model: 'command-r-plus',\n tools: [\n {\n type: 'function',\n function: {\n name: 'query_daily_sales_report',\n description:\n 'Connects to a database to retrieve overall sales volumes and sales information for a given day.',\n parameters: {\n day: {\n description: 'Retrieves sales data for this day, formatted as YYYY-MM-DD.',\n type: 'str',\n required: true,\n },\n },\n },\n },\n {\n type: 'function',\n function: {\n name: 'query_product_catalog',\n description:\n 'Connects to a a product catalog with information about all the products being sold, including categories, prices, and stock levels.',\n parameters: {\n category: {\n description: 'Retrieves product information data for all products in this category.',\n type: 'str',\n required: true,\n },\n },\n },\n },\n ],\n messages: [\n {\n role: 'user',\n content:\n \"Can you provide a sales summary for 29th September 2023, and also give me some details about the products in the 'Electronics' category, for example their prices and stock levels?\",\n },\n ],\n });\n\n console.log(response);\n})();\n" + - sdk: python + name: Tools + code: "import cohere\n\nco = cohere.Client(\"<>\")\n\nresponse = co.chat(\n model=\"command-r-plus\",\n tools=[\n cohere.v2.Tool2(type='function', function={\n \"name\": 'query_daily_sales_report',\n \"description\": 'Connects to a database to retrieve overall sales volumes and sales information for a given day.',\n \"parameters\": {\n \"day\": {\n \"description\": 'Retrieves sales data for this day, formatted as YYYY-MM-DD.',\n \"type\": 'str',\n \"required\": True,\n },\n }\n }),\n cohere.v2.Tool2(type='function', function={\n \"name\": 'query_product_catalog',\n \"description\": 'Connects to a a product catalog with information about all the products being sold, including categories, prices, and stock levels.',\n \"parameters\": {\n \"category\": {\n \"description\": 'Retrieves product information data for all products in this category.',\n \"type\": 'str',\n \"required\": True,\n },\n }\n })\n ],\n messages=[\n {\n \"role\": \"user\",\n \"content\":\"Can you provide a sales summary for 29th September 2023, and also give me some details about the products in the 'Electronics' category, for example their prices and stock levels?\"\n }\n ]\n)\n\nprint(response)\n" + request: + model: command-r + messages: + - role: user + content: Tell me about LLMs + tools: + - type: function + function: + name: query_daily_sales_report + description: Connects to a database to retrieve overall sales volumes and sales information for a given day. + parameters: + type: object + properties: + day: + description: 'Retrieves sales data for this day, formatted as YYYY-MM-DD.' + type: str + required: + - day + - type: function + function: + name: query_product_catalog + description: 'Connects to a a product catalog with information about all the products being sold, including categories, prices, and stock levels.' + parameters: + type: object + properties: + category: + description: Retrieves product information data for all products in this category. + type: str + required: + - category + stream: false + response: + body: + id: 9e5f00aa-bf1e-481a-abe3-0eceac18c3ec + message: + role: assistant + tool_plan: 'I will first find the sales summary for 29th September 2023. Then, I wil' + find the details of the products in the 'Electronics' category." tool_calls: + - id: query_daily_sales_report_hgxxmkby3wta + type: function + function: + name: query_daily_sales_report + arguments: '{"day": "2023-09-29"}' + - id: query_product_catalog_rpg0z5h8yyz2 + type: function + function: + name: query_product_catalog + arguments: '{"category": "Electronics"}' + finish_reason: tool_call + usage: + billed_units: + input_tokens: 127 + output_tokens: 69 + tokens: + input_tokens: 1032 + output_tokens: 124 + /v1/generate: + post: + summary: Generate + description: "\nThis API is marked as \"Legacy\" and is no longer maintained. Follow the [migration guide](/docs/migrating-from-cogenerate-to-cochat) to start using the Chat API.\n\nGenerates realistic text conditioned on a given input.\n" + operationId: generate + parameters: + - $ref: '#/components/parameters/RequestSource' + requestBody: + description: '' + content: + application/json: + schema: + required: + - prompt + type: object + properties: + prompt: + type: string + description: "The input text that serves as the starting point for generating the response.\nNote: The prompt will be pre-processed and modified before reaching the model.\n" + writeOnly: true + example: Please explain to me how LLMs work + x-fern-audiences: + - public + model: + type: string + description: "The identifier of the model to generate with. Currently available models are `command` (default), `command-nightly` (experimental), `command-light`, and `command-light-nightly` (experimental).\nSmaller, \"light\" models are faster, while larger models will perform better. [Custom models](/docs/training-custom-models) can also be supplied with their full ID." + writeOnly: true + x-fern-audiences: + - public + num_generations: + type: integer + description: "The maximum number of generations that will be returned. Defaults to `1`, min value of `1`, max value of `5`.\n" + writeOnly: true + x-fern-audiences: + - public + stream: + type: boolean + description: "When `true`, the response will be a JSON stream of events. Streaming is beneficial for user interfaces that render the contents of the response piece by piece, as it gets generated.\n\nThe final event will contain the complete response, and will contain an `is_finished` field set to `true`. The event will also contain a `finish_reason`, which can be one of the following:\n- `COMPLETE` - the model sent back a finished reply\n- `MAX_TOKENS` - the reply was cut off because the model reached the maximum number of tokens for its context length\n- `ERROR` - something went wrong when generating the reply\n- `ERROR_TOXIC` - the model generated a reply that was deemed toxic\n" + x-fern-audiences: + - public + max_tokens: + type: integer + description: "The maximum number of tokens the model will generate as part of the response. Note: Setting a low value may result in incomplete generations.\n\nThis parameter is off by default, and if it's not specified, the model will continue generating until it emits an EOS completion token. See [BPE Tokens](/bpe-tokens-wiki) for more details.\n\nCan only be set to `0` if `return_likelihoods` is set to `ALL` to get the likelihood of the prompt.\n" + writeOnly: true + x-fern-audiences: + - public + truncate: + enum: + - NONE + - START + - END + type: string + description: "One of `NONE|START|END` to specify how the API will handle inputs longer than the maximum token length.\n\nPassing `START` will discard the start of the input. `END` will discard the end of the input. In both cases, input is discarded until the remaining input is exactly the maximum input token length for the model.\n\nIf `NONE` is selected, when the input exceeds the maximum input token length an error will be returned." + default: END + writeOnly: true + x-fern-audiences: + - public + temperature: + type: number + description: "A non-negative float that tunes the degree of randomness in generation. Lower temperatures mean less random generations. See [Temperature](/temperature-wiki) for more details.\nDefaults to `0.75`, min value of `0.0`, max value of `5.0`.\n" + writeOnly: true + x-fern-audiences: + - public + seed: + maximum: 18446744073709552000 + minimum: 0 + type: integer + description: "If specified, the backend will make a best effort to sample tokens\ndeterministically, such that repeated requests with the same\nseed and parameters should return the same result. However,\ndeterminism cannot be totally guaranteed.\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n" + x-fern-audiences: + - public + preset: + type: string + description: "Identifier of a custom preset. A preset is a combination of parameters, such as prompt, temperature etc. You can create presets in the [playground](https://dashboard.cohere.com/playground/generate).\nWhen a preset is specified, the `prompt` parameter becomes optional, and any included parameters will override the preset's parameters.\n" + writeOnly: true + example: my-preset-a58sbd + x-fern-audiences: + - public + end_sequences: + type: array + items: + type: string + x-fern-audiences: + - public + description: The generated text will be cut at the beginning of the earliest occurrence of an end sequence. The sequence will be excluded from the text. + writeOnly: true + x-fern-audiences: + - public + stop_sequences: + type: array + items: + type: string + x-fern-audiences: + - public + description: The generated text will be cut at the end of the earliest occurrence of a stop sequence. The sequence will be included the text. + writeOnly: true + x-fern-audiences: + - public + k: + type: integer + description: "Ensures only the top `k` most likely tokens are considered for generation at each step.\nDefaults to `0`, min value of `0`, max value of `500`.\n" + writeOnly: true + x-fern-audiences: + - public + p: + type: number + description: "Ensures that only the most likely tokens, with total probability mass of `p`, are considered for generation at each step. If both `k` and `p` are enabled, `p` acts after `k`.\nDefaults to `0.75`. min value of `0.01`, max value of `0.99`.\n" + writeOnly: true + x-fern-audiences: + - public + frequency_penalty: + type: number + description: "Used to reduce repetitiveness of generated tokens. The higher the value, the stronger a penalty is applied to previously present tokens, proportional to how many times they have already appeared in the prompt or prior generation.\n\nUsing `frequency_penalty` in combination with `presence_penalty` is not supported on newer models.\n" + writeOnly: true + x-fern-audiences: + - public + presence_penalty: + type: number + description: "Defaults to `0.0`, min value of `0.0`, max value of `1.0`.\n\nCan be used to reduce repetitiveness of generated tokens. Similar to `frequency_penalty`, except that this penalty is applied equally to all tokens that have already appeared, regardless of their exact frequencies.\n\nUsing `frequency_penalty` in combination with `presence_penalty` is not supported on newer models.\n" + writeOnly: true + x-fern-audiences: + - public + return_likelihoods: + enum: + - GENERATION + - ALL + - NONE + type: string + description: "One of `GENERATION|ALL|NONE` to specify how and if the token likelihoods are returned with the response. Defaults to `NONE`.\n\nIf `GENERATION` is selected, the token likelihoods will only be provided for generated text.\n\nIf `ALL` is selected, the token likelihoods will be provided both for the prompt and the generated text." + default: NONE + x-fern-audiences: + - public + raw_prompting: + type: boolean + description: 'When enabled, the user''s prompt will be sent to the model without any pre-processing.' + x-fern-audiences: + - public + writeOnly: true + x-fern-audiences: + - public + responses: + '200': + description: OK + headers: + X-API-Warning: + description: Warning description for incorrect usage of the API + schema: + type: string + x-fern-audiences: + - public + content: + application/json: + schema: + $ref: '#/components/schemas/Generation' + application/stream+json: + schema: + $ref: '#/components/schemas/GenerateStreamedResponse' + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' + '422': + $ref: '#/components/responses/UnprocessableEntity' + '429': + $ref: '#/components/responses/RateLimit' + '498': + $ref: '#/components/responses/InvalidToken' + '499': + $ref: '#/components/responses/RequestCancelled' + '500': + $ref: '#/components/responses/InternalServerError' + '501': + $ref: '#/components/responses/NotImplemented' + '503': + $ref: '#/components/responses/ServiceUnavailable' + '504': + $ref: '#/components/responses/GatewayTimeout' + x-fern-audiences: + - public + x-fern-streaming: + stream-condition: $request.stream + response: + type: object + x-fern-type-name: Generation + required: + - id + - generations + properties: + id: + type: string + x-fern-audiences: + - public + prompt: + type: string + x-fern-audiences: + - public + description: Prompt used for generations. + generations: + type: array + x-fern-audiences: + - public + description: List of generated results + items: + type: object + x-fern-audiences: + - public + $ref: '#/components/schemas/SingleGeneration' + meta: + $ref: '#/components/schemas/ApiMeta' + x-fern-audiences: + - public + response-stream: + description: Response in content type stream when `stream` is `true` in the request parameters. Generation tokens are streamed with the GenerationStream response. The final response is of type GenerationFinalResponse. + x-fern-type-name: GenerateStreamedResponse + oneOf: + - $ref: '#/components/schemas/GenerateStreamText' + - $ref: '#/components/schemas/GenerateStreamEnd' + - $ref: '#/components/schemas/GenerateStreamError' + x-fern-examples: + - code-samples: + - sdk: go + name: Cohere Go SDK + code: "package main\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"io\"\n\t\"log\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(\"<>\"))\n\n\tresp, err := co.GenerateStream(\n\t\tcontext.TODO(),\n\t\t&cohere.GenerateStreamRequest{\n\t\t\tPrompt: \"Please explain to me how LLMs work\",\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\t// Make sure to close the stream when you're done reading.\n\t// This is easily handled with defer.\n\tdefer resp.Close()\n\n\tfor {\n\t\tmessage, err := resp.Recv()\n\n\t\tif errors.Is(err, io.EOF) {\n\t\t\t// An io.EOF error means the server is done sending messages\n\t\t\t// and should be treated as a success.\n\t\t\tbreak\n\t\t}\n\n\t\tif message.TextGeneration != nil {\n\t\t\tlog.Printf(\"%+v\", resp)\n\t\t}\n\t}\n}\n" + - sdk: typescript + name: Cohere TypeScript SDK + code: "const { CohereClient } = require('cohere-ai');\n\nconst cohere = new CohereClient({\n token: '<>',\n});\n\n(async () => {\n const generate = await cohere.generate({\n prompt: 'Please explain to me how LLMs work',\n });\n\n console.log(generate);\n})();\n" + - sdk: python + name: Sync + code: "import cohere\n\nco = cohere.Client(\"<>\")\n\nresponse = co.generate(\n prompt=\"Please explain to me how LLMs work\",\n)\nprint(response)\n" + - sdk: python + name: Async + code: "import cohere\nimport asyncio\n\nco = cohere.AsyncClient(\"<>\")\n\n\nasync def main():\n response = await co.generate(\n prompt=\"Please explain to me how LLMs work\",\n )\n print(response)\n\nasyncio.run(main())\n" + - sdk: java + name: Cohere java SDK + code: "import com.cohere.api.Cohere;\nimport com.cohere.api.requests.GenerateRequest;\nimport com.cohere.api.types.Generation;\n\n\npublic class GeneratePost {\n public static void main(String[] args) {\n Cohere cohere = Cohere.builder().token(\"<>\").clientName(\"snippet\").build();\n\n Generation response = cohere.generate(GenerateRequest.builder().prompt(\"Please explain to me how LLMs work\").build());\n\n System.out.println(response);\n }\n}\n" + - sdk: curl + name: cURL + code: "curl --request POST \\\n --url https://api.cohere.com/v1/generate \\\n --header 'accept: application/json' \\\n --header 'content-type: application/json' \\\n --header \"Authorization: bearer $CO_API_KEY\" \\\n --data '{\n \"prompt\": \"Please explain to me how LLMs work\"\n }'" + request: + prompt: Please explain to me how LLMs work + stream: false + response: + body: + id: 6afae9c2-3375-4d0e-8d18-2e9eb7f2c3ec + generations: + - id: 8e6de35d-3007-43ab-9253-ac4f95dcb8a2 + text: "LLMs, or Large Language Models, are a type of neural network-based AI model that has been trained on massive amounts of text data and have become ubiquitous in the AI landscape. They possess astounding capabilities for comprehending and generating human-like language.\nThese models leverage neural networks that operate on a large scale, often involving millions or even billions of parameters. This substantial scale enables them to capture intricate patterns and connections within the vast amounts of text they have been trained on.\n\nThe training process for LLMs is fueled by colossal datasets of textual information, ranging from books and articles to websites and conversational transcripts. This extensive training enables them to develop a nuanced understanding of language patterns, grammar, and semantics.\n\nWhen posed with a new text input, LLMs employ their finely honed understanding of language to generate informed responses or undertake tasks such as language translation, text completion, or question answering. They do this by manipulating the input text through adding, removing, or altering elements to craft a desired output.\n\nOne of the underlying principles of their efficacy is the recurrent neural network (RNN) architecture they often adopt. This design enables them to process sequential data like natural language effectively. RNNs possess \"memory\" aspects via loops between layers, which allows them to retain and manipulate information gathered across long sequences, akin to the way humans process information.\n\nHowever, it's their size that arguably constitutes their most notable aspect. The sheer volume of these models – with counts of parameters often exceeding 100 million – enables them to capture correlations and patterns within language data effectively. This empowers them to generate coherent and contextually appropriate responses, posing a remarkable advancement in conversational AI.\n\nWhile LLMs have demonstrated extraordinary language prowess, it's vital to acknowledge their limitations and potential for improvement. Their biases often reflect those of the training data, and they may struggle with logical inconsistencies or factual errors. Ongoing research aims to enhance their robustness, diversity, and overall usability.\n\nIn essence, LLMs are a groundbreaking manifestation of AI's potential to simulate and even extend human language capabilities, while also serving as a testament to the ongoing journey towards refining and perfecting these technologies. " + prompt: Please explain to me how LLMs work + meta: + api_version: + version: '1' + billed_units: + input_tokens: 8 + output_tokens: 442 + /v1/embed: + post: + summary: Embed + description: "This endpoint returns text embeddings. An embedding is a list of floating point numbers that captures semantic information about the text that it represents.\n\nEmbeddings can be used to create text classifiers as well as empower semantic search. To learn more about embeddings, see the embedding page.\n\nIf you want to learn more how to use the embedding model, have a look at the [Semantic Search Guide](/docs/semantic-search)." + operationId: embed + parameters: + - $ref: '#/components/parameters/RequestSource' + requestBody: + description: '' + content: + application/json: + schema: + required: + - texts + type: object + properties: + texts: + maxItems: 96 + minItems: 1 + type: array + items: + type: string + writeOnly: true + x-fern-audiences: + - public + description: An array of strings for the model to embed. Maximum number of texts per call is `96`. We recommend reducing the length of each text to be under `512` tokens for optimal quality. + writeOnly: true + x-fern-audiences: + - public + model: + type: string + description: "Defaults to embed-english-v2.0\n\nThe identifier of the model. Smaller \"light\" models are faster, while larger models will perform better. [Custom models](/docs/training-custom-models) can also be supplied with their full ID.\n\nAvailable models and corresponding embedding dimensions:\n\n* `embed-english-v3.0` 1024\n* `embed-multilingual-v3.0` 1024\n* `embed-english-light-v3.0` 384\n* `embed-multilingual-light-v3.0` 384\n\n* `embed-english-v2.0` 4096\n* `embed-english-light-v2.0` 1024\n* `embed-multilingual-v2.0` 768" + writeOnly: true + x-fern-audiences: + - public + input_type: + $ref: '#/components/schemas/EmbedInputType' + embedding_types: + type: array + items: + $ref: '#/components/schemas/EmbeddingType' + description: "Specifies the types of embeddings you want to get back. Not required and default is None, which returns the Embed Floats response type. Can be one or more of the following types.\n\n* `\"float\"`: Use this when you want to get back the default float embeddings. Valid for all models.\n* `\"int8\"`: Use this when you want to get back signed int8 embeddings. Valid for only v3 models.\n* `\"uint8\"`: Use this when you want to get back unsigned int8 embeddings. Valid for only v3 models.\n* `\"binary\"`: Use this when you want to get back signed binary embeddings. Valid for only v3 models.\n* `\"ubinary\"`: Use this when you want to get back unsigned binary embeddings. Valid for only v3 models." + writeOnly: true + x-fern-audiences: + - public + truncate: + enum: + - NONE + - START + - END + type: string + description: "One of `NONE|START|END` to specify how the API will handle inputs longer than the maximum token length.\n\nPassing `START` will discard the start of the input. `END` will discard the end of the input. In both cases, input is discarded until the remaining input is exactly the maximum input token length for the model.\n\nIf `NONE` is selected, when the input exceeds the maximum input token length an error will be returned." + default: END + writeOnly: true + x-fern-audiences: + - public + x-fern-audiences: + - public + responses: + '200': + description: OK + headers: + X-API-Warning: + description: Warning description for incorrect usage of the API + schema: + type: string + x-fern-audiences: + - public + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/EmbedFloatsResponse' + - $ref: '#/components/schemas/EmbedByTypeResponse' + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' + '422': + $ref: '#/components/responses/UnprocessableEntity' + '429': + $ref: '#/components/responses/RateLimit' + '498': + $ref: '#/components/responses/InvalidToken' + '499': + $ref: '#/components/responses/RequestCancelled' + '500': + $ref: '#/components/responses/InternalServerError' + '501': + $ref: '#/components/responses/NotImplemented' + '503': + $ref: '#/components/responses/ServiceUnavailable' + '504': + $ref: '#/components/responses/GatewayTimeout' + x-fern-audiences: + - public + x-fern-examples: + - code-samples: + - sdk: go + name: Cohere Go SDK + code: "package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(\"<>\"))\n\n\tresp, err := co.Embed(\n\t\tcontext.TODO(),\n\t\t&cohere.EmbedRequest{\n\t\t\tTexts: []string{\"hello\", \"goodbye\"},\n\t\t\tModel: cohere.String(\"embed-english-v3.0\"),\n\t\t\tInputType: cohere.EmbedInputTypeSearchDocument.Ptr(),\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n" + - sdk: typescript + name: Cohere TypeScript SDK + code: "const { CohereClient } = require('cohere-ai');\n\nconst cohere = new CohereClient({\n token: '<>',\n});\n\n(async () => {\n const embed = await cohere.embed({\n texts: ['hello', 'goodbye'],\n model: 'embed-english-v3.0',\n inputType: 'classification',\n });\n console.log(embed);\n})();\n" + - sdk: python + name: Sync + code: "import cohere\n\nco = cohere.Client(\"<>\")\n\nresponse = co.embed(\n texts=[\"hello\", \"goodbye\"], model=\"embed-english-v3.0\", input_type=\"classification\"\n)\nprint(response)\n" + - sdk: python + name: Async + code: "import cohere\nimport asyncio\n\nco = cohere.AsyncClient(\"<>\")\n\n\nasync def main():\n response = await co.embed(\n texts=[\"hello\", \"goodbye\"], model=\"embed-english-v3.0\", input_type=\"classification\"\n )\n print(response)\n\nasyncio.run(main())\n" + - sdk: java + name: Cohere java SDK + code: "import com.cohere.api.Cohere;\nimport com.cohere.api.requests.EmbedRequest;\nimport com.cohere.api.types.EmbedInputType;\nimport com.cohere.api.types.EmbedResponse;\n\nimport java.util.List;\n\n\npublic class EmbedPost {\n public static void main(String[] args) {\n Cohere cohere = Cohere.builder().token(\"<>\").clientName(\"snippet\").build();\n\n EmbedResponse response = cohere.embed(EmbedRequest.builder().texts(List.of(\"hello\", \"goodbye\")).model(\"embed-english-v3.0\").inputType(EmbedInputType.CLASSIFICATION).build());\n\n System.out.println(response);\n }\n}\n" + - sdk: curl + name: cURL + code: "curl --request POST \\\n --url https://api.cohere.com/v1/embed \\\n --header 'accept: application/json' \\\n --header 'content-type: application/json' \\\n --header \"Authorization: bearer $CO_API_KEY\" \\\n --data '{\n \"model\": \"embed-english-v3.0\",\n \"texts\": [\"hello\", \"goodbye\"],\n \"input_type\": \"classification\"\n }'" + request: + texts: + - hello + - goodbye + model: embed-english-v3.0 + input_type: classification + response: + body: + id: 1c62213a-1f15-46f1-ac62-36f6bbaf3972 + texts: + - hello + - goodbye + embeddings: + - + - 0.016296387 + - -0.008354187 + - -0.04699707 + - -0.07104492 + - 0.00013196468 + - -0.014892578 + - -0.018661499 + - 0.019134521 + - 0.008476257 + - 0.04159546 + - -0.036895752 + - -0.00048303604 + - 0.06414795 + - -0.036346436 + - 0.045806885 + - -0.03125 + - 0.03793335 + - 0.048583984 + - 0.0062179565 + - 0.0071144104 + - -0.020935059 + - 0.04196167 + - -0.039398193 + - 0.03463745 + - 0.051879883 + - 0.030838013 + - -0.0048103333 + - -0.00036287308 + - -0.017944336 + - -0.039611816 + - 0.013389587 + - 0.0044021606 + - 0.018951416 + - 0.020767212 + - -0.0025997162 + - 0.0904541 + - -0.0121154785 + - -0.026184082 + - 0.012413025 + - 0.004119873 + - 0.030654907 + - -0.030792236 + - -0.041107178 + - -0.02368164 + - -0.043304443 + - -0.00077438354 + - -0.017074585 + - -0.019729614 + - 0.078125 + - -0.031585693 + - 0.020217896 + - -0.01524353 + - 0.017471313 + - -0.0008010864 + - -0.03717041 + - 0.011062622 + - -0.072143555 + - -0.013175964 + - 0.01058197 + - 0.030853271 + - 0.044799805 + - 0.0045928955 + - 0.03253174 + - 0.047698975 + - -0.0039024353 + - -0.01965332 + - 0.024475098 + - -0.013755798 + - 0.018951416 + - -0.015487671 + - 0.015594482 + - 0.00096321106 + - -0.006450653 + - -0.04748535 + - -0.021972656 + - 0.06323242 + - -0.009498596 + - 0.014297485 + - 0.0038471222 + - -0.023117065 + - -0.02180481 + - -0.01928711 + - -0.08758545 + - -0.04852295 + - 0.029510498 + - 0.011276245 + - -0.013504028 + - -0.009391785 + - -0.0064468384 + - 0.010978699 + - -0.014404297 + - 0.053741455 + - 0.046569824 + - 0.00042700768 + - -0.037719727 + - 0.011985779 + - -0.009643555 + - 0.0067749023 + - 0.008071899 + - 0.018829346 + - -0.05419922 + - -0.020950317 + - -0.02659607 + - -0.028869629 + - -0.015716553 + - 0.022705078 + - -0.0046958923 + - 0.02192688 + - 0.032440186 + - 0.048034668 + - -0.006843567 + - 0.045074463 + - -0.02293396 + - 0.010238647 + - -0.04534912 + - 0.01638794 + - -0.00680542 + - 0.0038871765 + - -0.032836914 + - 0.051361084 + - 0.0395813 + - 0.032928467 + - -0.00843811 + - 0.007858276 + - -0.040802002 + - -0.008346558 + - -0.013252258 + - -0.046173096 + - 0.051727295 + - -0.027175903 + - -0.011497498 + - 0.04940796 + - -0.095214844 + - -0.0345459 + - -0.021453857 + - 0.0051002502 + - -0.01725769 + - -0.045196533 + - -0.0016956329 + - 0.021575928 + - 0.07720947 + - -0.00094270706 + - 0.020904541 + - 0.05001831 + - -0.033111572 + - 0.032287598 + - -0.0052833557 + - -7.402897E-05 + - 0.035125732 + - 0.019424438 + - -0.06665039 + - -0.02557373 + - 0.010887146 + - 0.05807495 + - 0.015022278 + - 0.0657959 + - -0.015350342 + - 0.008468628 + - -0.017944336 + - 0.029388428 + - -0.005126953 + - 0.015914917 + - 0.051879883 + - -0.015975952 + - -0.039031982 + - -0.012374878 + - 0.0032424927 + - 0.0008568764 + - 0.014579773 + - 0.021530151 + - -0.0061912537 + - 0.028717041 + - 0.046844482 + - 0.032836914 + - 0.0071372986 + - -0.023406982 + - -0.03717041 + - 0.016723633 + - 0.03994751 + - 0.025390625 + - 0.03427124 + - -0.01914978 + - -0.026000977 + - 0.07342529 + - -0.03213501 + - -0.058258057 + - 0.029144287 + - 0.001042366 + - 0.030517578 + - 0.011474609 + - 0.058410645 + - 0.005027771 + - -0.038635254 + - -0.015029907 + - -0.015655518 + - -0.03918457 + - -0.016342163 + - -0.020858765 + - -0.0043907166 + - 0.03857422 + - 0.007423401 + - -0.0473938 + - 0.04257202 + - -0.043823242 + - -0.03842163 + - -0.033691406 + - -0.010925293 + - 0.012260437 + - 0.0009822845 + - 0.0058937073 + - -0.008644104 + - -0.031585693 + - 0.0055618286 + - -0.06976318 + - -0.030578613 + - -0.038970947 + - -0.08880615 + - -0.00315094 + - 0.00020766258 + - 0.04058838 + - 0.0028266907 + - -0.0018129349 + - -0.01625061 + - -0.022277832 + - -0.008956909 + - -0.009292603 + - -0.040771484 + - -0.008705139 + - -0.065979004 + - -0.010414124 + - -0.0152282715 + - 0.033447266 + - -0.033599854 + - -0.008049011 + - -0.020828247 + - 0.0053901672 + - 0.0002875328 + - 0.037078857 + - 0.015159607 + - -0.0016326904 + - 0.012397766 + - 0.0026817322 + - -0.032196045 + - -0.0079422 + - 0.03567505 + - -0.0010242462 + - 0.03652954 + - -0.0035171509 + - 0.01802063 + - 0.026641846 + - 0.0107421875 + - -0.021942139 + - 0.035095215 + - -0.0236969 + - -0.015975952 + - 0.039215088 + - 0.0038166046 + - 0.020462036 + - -0.039764404 + - 0.035888672 + - -0.038604736 + - -0.008621216 + - -0.012619019 + - -0.014602661 + - -0.036102295 + - -0.02368164 + - -0.0121536255 + - -0.0054512024 + - -0.015701294 + - -0.016296387 + - 0.016433716 + - -0.005672455 + - -0.019332886 + - 0.00025129318 + - 0.0803833 + - 0.04248047 + - -0.05960083 + - -0.009147644 + - -0.0021247864 + - 0.012481689 + - -0.015129089 + - -0.021133423 + - -0.01878357 + - 0.0027332306 + - 0.036956787 + - -0.0053253174 + - -0.0007238388 + - 0.016983032 + - -0.0034694672 + - 0.059387207 + - 0.076660156 + - 0.015312195 + - -0.015823364 + - 0.02456665 + - 0.012901306 + - 0.020126343 + - -0.032440186 + - 0.011291504 + - -0.001876831 + - -0.052215576 + - 0.004634857 + - 0.036956787 + - 0.006164551 + - -0.023422241 + - -0.025619507 + - 0.024261475 + - 0.023849487 + - 0.015007019 + - 0.020050049 + - -0.044067383 + - 0.030029297 + - 0.021377563 + - 0.011657715 + - 0.017196655 + - -0.032318115 + - -0.031555176 + - -0.00982666 + - -0.0039787292 + - -0.079589844 + - -0.006416321 + - 0.00844574 + - -0.007434845 + - -0.045013428 + - -0.02557373 + - -0.01537323 + - 0.027633667 + - -0.076538086 + - -0.0025749207 + - -0.05279541 + - 0.029373169 + - 0.047912598 + - 0.00083875656 + - -0.01234436 + - -0.017059326 + - 0.01159668 + - 0.014228821 + - 0.029571533 + - -0.055114746 + - 0.006389618 + - 0.028869629 + - 0.09375 + - -0.014251709 + - 0.029418945 + - 0.007633209 + - 0.010848999 + - -0.004055023 + - -0.02116394 + - 0.007194519 + - -0.0062217712 + - -0.01209259 + - 0.024749756 + - -0.037506104 + - -0.029510498 + - -0.028442383 + - 0.03189087 + - 0.0008239746 + - 0.007419586 + - -0.016723633 + - 0.06964111 + - -0.07232666 + - 0.022201538 + - -0.019882202 + - -0.0385437 + - -0.022567749 + - 0.010353088 + - -0.027755737 + - -0.006713867 + - -0.023406982 + - -0.025054932 + - -0.013076782 + - 0.015808105 + - -0.0073165894 + - 0.02949524 + - -0.036499023 + - -0.07287598 + - -0.01876831 + - -0.02709961 + - -0.06567383 + - 0.050567627 + - 0.004047394 + - 0.030471802 + - 0.025405884 + - 0.046783447 + - 0.01763916 + - 0.053466797 + - 0.049072266 + - -0.015197754 + - 0.0013389587 + - 0.049591064 + - 0.006965637 + - -0.00014233589 + - 0.01335907 + - -0.04675293 + - -0.026733398 + - 0.03024292 + - 0.0012464523 + - -0.037200928 + - 0.030166626 + - -0.08544922 + - -0.013893127 + - -0.014823914 + - 0.0014219284 + - -0.023620605 + - -0.0010480881 + - -0.072387695 + - 0.057922363 + - -0.04067993 + - -0.025299072 + - 0.020446777 + - 0.06451416 + - 0.007205963 + - 0.015838623 + - -0.008674622 + - 0.0002270937 + - -0.026321411 + - 0.027130127 + - -0.01828003 + - -0.011482239 + - 0.03463745 + - 0.00724411 + - -0.010406494 + - 0.025268555 + - -0.023651123 + - 0.04034424 + - -0.036834717 + - 0.05014038 + - -0.026184082 + - 0.036376953 + - 0.03253174 + - -0.01828003 + - -0.023376465 + - -0.034576416 + - -0.00598526 + - -0.023239136 + - -0.032409668 + - 0.07672119 + - -0.038604736 + - 0.056884766 + - -0.012550354 + - -0.03778076 + - -0.013061523 + - 0.017105103 + - 0.010482788 + - -0.005077362 + - -0.010719299 + - -0.018661499 + - 0.019760132 + - 0.022018433 + - -0.058746338 + - 0.03564453 + - -0.0892334 + - 0.025421143 + - -0.015716553 + - 0.07910156 + - -0.009361267 + - 0.016921997 + - 0.048736572 + - 0.035247803 + - 0.01864624 + - 0.011413574 + - 0.018295288 + - 0.00052690506 + - -0.07122803 + - -0.01890564 + - -0.017669678 + - 0.027694702 + - 0.0152282715 + - 0.006511688 + - -0.045837402 + - -0.009765625 + - 0.013877869 + - -0.0146102905 + - 0.033294678 + - -0.0019874573 + - 0.023040771 + - 0.025619507 + - -0.015823364 + - -0.020858765 + - -0.023529053 + - 0.0070152283 + - -0.0647583 + - 0.036224365 + - 0.0023403168 + - -0.062286377 + - -0.036315918 + - 0.021209717 + - -0.037353516 + - -0.03656006 + - 0.01889038 + - 0.023239136 + - 0.011764526 + - 0.005970001 + - 0.049346924 + - -0.006893158 + - -0.015068054 + - -0.0008716583 + - -0.0034999847 + - 0.04034424 + - 0.017913818 + - -0.06707764 + - -0.07531738 + - 0.00042319298 + - -0.00680542 + - -0.0023174286 + - 0.04425049 + - -0.05105591 + - -0.016967773 + - 0.020507812 + - 0.038604736 + - 0.029846191 + - 0.04309082 + - -0.00084733963 + - -0.008911133 + - 0.0082092285 + - -0.0050239563 + - 0.05038452 + - 0.014595032 + - 0.015182495 + - 0.007247925 + - -0.04046631 + - -0.011169434 + - -0.010292053 + - 0.068603516 + - 0.02470398 + - -0.0023403168 + - 0.005996704 + - -0.0010709763 + - 0.008178711 + - -0.029205322 + - -0.025253296 + - 0.05822754 + - 0.04269409 + - 0.059295654 + - -0.0011911392 + - -0.031311035 + - 0.023712158 + - -0.037506104 + - 0.004589081 + - 0.014923096 + - -0.019866943 + - -0.019180298 + - -0.0020999908 + - -0.008972168 + - 0.01348114 + - 0.014801025 + - -0.02645874 + - 0.019897461 + - 0.081970215 + - -0.05822754 + - 0.09399414 + - 0.001209259 + - -0.050750732 + - 0.062316895 + - -0.014892578 + - -0.019104004 + - -0.036987305 + - -0.040618896 + - -0.008163452 + - -0.0035247803 + - 0.06774902 + - -0.001420021 + - -0.0013103485 + - -0.031799316 + - -0.0023651123 + - 0.012298584 + - 0.003583908 + - 0.050964355 + - -0.01802063 + - -0.007091522 + - 0.01448822 + - -0.016159058 + - -0.019439697 + - -0.022491455 + - -0.036346436 + - -0.03491211 + - -0.0032920837 + - 0.003528595 + - -0.0016469955 + - 0.01612854 + - -0.003709793 + - 0.012840271 + - 0.0043182373 + - -0.030456543 + - 0.007369995 + - 0.0039787292 + - 0.036499023 + - 0.021362305 + - 0.00062942505 + - 0.0047073364 + - 0.026382446 + - -0.0020542145 + - -0.038757324 + - -0.00095272064 + - 0.0019435883 + - 0.007232666 + - -0.0031471252 + - 0.019943237 + - -0.062042236 + - 0.010826111 + - 0.0026607513 + - -0.04727173 + - 0.020126343 + - 0.046417236 + - -0.03881836 + - 0.011222839 + - 0.011428833 + - -0.056396484 + - 0.010879517 + - -0.011772156 + - -0.0038414001 + - 0.010246277 + - -0.020141602 + - -0.011169434 + - 0.006916046 + - -0.022659302 + - 0.010299683 + - 0.046966553 + - 0.0234375 + - -0.0016288757 + - -0.03262329 + - -0.01689148 + - -0.00031924248 + - 0.028152466 + - 0.004234314 + - 0.03878784 + - -0.03579712 + - 0.007457733 + - -0.0036907196 + - 0.0073051453 + - -0.00028276443 + - -0.0067100525 + - 0.003206253 + - -0.0021209717 + - -0.05960083 + - 0.024337769 + - 0.076171875 + - -0.012062073 + - -0.0032787323 + - -0.08380127 + - 0.024917603 + - 0.019073486 + - -0.012031555 + - -0.03237915 + - -0.0042686462 + - -0.01525116 + - -0.0158844 + - -0.0014514923 + - -0.024429321 + - -0.028442383 + - 0.020843506 + - 0.007133484 + - 0.024230957 + - 0.0002002716 + - -0.005466461 + - -0.0032367706 + - 0.012718201 + - 0.032806396 + - 0.062042236 + - -0.040283203 + - -0.025497437 + - 0.045013428 + - 0.054473877 + - -0.033599854 + - -0.0039482117 + - 0.02268982 + - -0.0012645721 + - 0.045166016 + - 0.0501709 + - -0.0022602081 + - 0.019897461 + - 0.007926941 + - 0.017364502 + - 0.011650085 + - -0.042510986 + - -0.059448242 + - 0.030014038 + - 0.039611816 + - 0.015571594 + - 0.04031372 + - -0.0006723404 + - -0.03353882 + - -0.05569458 + - 0.040283203 + - 0.019058228 + - -0.032592773 + - 0.004470825 + - 0.06359863 + - 0.029693604 + - 0.01826477 + - -0.0104522705 + - -0.043945312 + - -0.01802063 + - 0.0075187683 + - -0.02456665 + - 0.02798462 + - 0.0047340393 + - -0.017623901 + - -0.014335632 + - -0.04550171 + - -0.0039711 + - 0.023864746 + - -0.015281677 + - 0.055755615 + - -0.04864502 + - 0.033599854 + - 0.024810791 + - -0.03048706 + - -0.043121338 + - 0.011291504 + - 0.024932861 + - -0.0020275116 + - 0.032287598 + - -0.0234375 + - 0.006942749 + - -0.007221222 + - -0.03869629 + - -0.03765869 + - -0.03475952 + - -0.046936035 + - 0.03012085 + - -0.021362305 + - -0.023452759 + - 0.051239014 + - -0.009925842 + - 0.04925537 + - -0.00944519 + - -0.040008545 + - -0.019485474 + - -0.00022566319 + - -0.017028809 + - 0.03277588 + - 0.0066375732 + - -0.013328552 + - 0.01864624 + - -0.011726379 + - 0.023849487 + - 0.04006958 + - 0.03793335 + - 0.060821533 + - 0.005504608 + - -0.0395813 + - -0.010131836 + - 0.046539307 + - 0.030136108 + - 0.002231598 + - 0.042236328 + - 0.014755249 + - 0.047058105 + - -0.017318726 + - 0.008598328 + - 0.01966858 + - 0.0064430237 + - 0.03616333 + - -0.011985779 + - -0.003446579 + - -0.06616211 + - -0.0657959 + - 0.014137268 + - 0.044677734 + - -0.03515625 + - -0.05215454 + - -0.012710571 + - 0.0047416687 + - 0.05368042 + - 0.013900757 + - 0.05001831 + - 0.027709961 + - 0.02557373 + - -0.025512695 + - 0.0031032562 + - 0.072143555 + - 0.018829346 + - 0.0073928833 + - 0.009269714 + - -0.011299133 + - 0.0048828125 + - 0.014808655 + - -0.0184021 + - -0.00089359283 + - -0.0015716553 + - -0.012863159 + - 0.0074386597 + - -0.020767212 + - 0.02204895 + - -0.027404785 + - -0.021972656 + - 0.02494812 + - 0.044006348 + - -0.011581421 + - 0.06298828 + - 0.009010315 + - 0.03842163 + - -5.555153E-05 + - 0.06774902 + - 0.036254883 + - -0.016311646 + - -4.887581E-06 + - 0.0057373047 + - 0.03704834 + - -0.041503906 + - 0.0074043274 + - -0.012290955 + - -0.020263672 + - -0.0057792664 + - -0.025878906 + - -0.021652222 + - -0.008079529 + - 0.022613525 + - -0.012069702 + - 0.050079346 + - -0.004283905 + - -0.021118164 + - -0.010559082 + - -0.0041160583 + - -0.00026345253 + - -0.01260376 + - 0.050628662 + - -0.03137207 + - 0.027526855 + - -0.052642822 + - -0.0046463013 + - 0.04937744 + - -0.0017156601 + - 0.014625549 + - -0.022476196 + - 0.02571106 + - 0.043884277 + - -0.016952515 + - -0.021011353 + - 0.056396484 + - 0.056762695 + - 0.013473511 + - -0.02357483 + - 0.043792725 + - 0.032470703 + - -0.052612305 + - -0.017837524 + - -6.7055225E-05 + - 0.039276123 + - -0.012283325 + - -0.0029888153 + - -0.024719238 + - 0.012870789 + - -0.032287598 + - 0.028839111 + - 0.008056641 + - 0.011100769 + - -0.034210205 + - 0.028198242 + - 0.01940918 + - 0.029052734 + - 0.030303955 + - 0.03475952 + - -0.03982544 + - 0.026870728 + - 0.02079773 + - 0.03012085 + - -0.044281006 + - 0.006462097 + - -0.008705139 + - -0.024734497 + - 0.02458191 + - -0.050201416 + - -0.028778076 + - 0.036956787 + - 0.025634766 + - -0.025650024 + - 0.020629883 + - -0.04385376 + - 0.009536743 + - -0.0027256012 + - 0.031158447 + - 0.008712769 + - -0.039855957 + - -0.018249512 + - -0.011268616 + - 0.009689331 + - -0.032073975 + - 0.023010254 + - 0.04925537 + - 0.013168335 + - 0.02734375 + - 0.031707764 + - -0.024032593 + - -0.010604858 + - -0.00258255 + - 0.0054092407 + - 0.033569336 + - 0.0068359375 + - 0.019882202 + - 0.018096924 + - -0.05392456 + - -0.0030059814 + - -0.01374054 + - -0.008483887 + - 0.016494751 + - -0.015487671 + - 0.016143799 + - -0.028198242 + - -0.016326904 + - -0.013160706 + - -0.046905518 + - 0.026428223 + - -0.02420044 + - -0.022262573 + - 0.041748047 + - 0.05557251 + - -0.0044059753 + - -0.030960083 + - -0.023544312 + - 0.0103302 + - -0.013534546 + - -0.016830444 + - 0.028167725 + - 0.0061950684 + - 0.02178955 + - -0.06945801 + - -0.040039062 + - -0.0024642944 + - -0.06359863 + - -0.020812988 + - 0.029006958 + - 0.0072364807 + - -0.028747559 + - -0.057891846 + - 0.022155762 + - -0.035369873 + - -0.025909424 + - -0.04095459 + - 0.0019893646 + - -0.0038146973 + - -0.030639648 + - -0.038970947 + - -0.0026626587 + - -0.0047454834 + - -0.014816284 + - 0.008575439 + - -0.032165527 + - -0.011062622 + - 0.003622055 + - -0.0129852295 + - -0.0007658005 + - -0.009902954 + - 0.03704834 + - -0.02456665 + - 0.020385742 + - 0.0019044876 + - -0.008552551 + - -0.028137207 + - -0.006500244 + - 0.017227173 + - -0.0077285767 + - -0.05496216 + - 0.038024902 + - -0.0335083 + - 0.047668457 + - -0.02998352 + - -0.0395813 + - -0.0068359375 + - -0.024627686 + - -0.005756378 + - 0.025863647 + - 0.032104492 + - -0.029022217 + - -0.08685303 + - -0.014724731 + - -0.035583496 + - 0.024002075 + - 0.008422852 + - 0.012931824 + - -0.0055656433 + - -0.013748169 + - -0.021530151 + - -0.034332275 + - -0.008766174 + - -0.025222778 + - 0.019836426 + - -0.011619568 + - -0.037963867 + - 0.013519287 + - -0.035736084 + - 0.049102783 + - -0.011398315 + - 0.050598145 + - -0.066833496 + - 0.080566406 + - -0.061553955 + - -0.041778564 + - 0.01864624 + - 0.014907837 + - -0.010482788 + - 0.035217285 + - -0.0473938 + - -0.031951904 + - 0.052886963 + - -0.022109985 + - 0.031677246 + - -0.01977539 + - 0.08282471 + - 0.012901306 + - -0.009490967 + - 0.0030956268 + - 0.023895264 + - 0.012611389 + - -0.0011844635 + - -0.007633209 + - 0.019195557 + - -0.05404663 + - 0.006187439 + - -0.06762695 + - -0.049468994 + - 0.028121948 + - -0.004032135 + - -0.043151855 + - 0.028121948 + - -0.0058555603 + - 0.019454956 + - 0.0028438568 + - -0.0036354065 + - -0.015411377 + - -0.026535034 + - 0.03704834 + - -0.01802063 + - 0.009765625 + - + - 0.04663086 + - -0.023239136 + - 0.008163452 + - -0.03945923 + - -0.018051147 + - -0.011123657 + - 0.0022335052 + - -0.0015516281 + - -0.002336502 + - 0.031799316 + - -0.049591064 + - -0.049835205 + - 0.019317627 + - -0.013328552 + - -0.01838684 + - -0.067871094 + - 0.02671814 + - 0.038085938 + - 0.03265381 + - -0.0043907166 + - 0.026321411 + - 0.0070114136 + - -0.037628174 + - 0.008026123 + - 0.015525818 + - 0.066589355 + - -0.018005371 + - -0.0017309189 + - -0.052368164 + - -0.055511475 + - -0.00504303 + - 0.043029785 + - -0.013328552 + - 0.08581543 + - -0.038269043 + - 0.051971436 + - -0.04675293 + - 0.038146973 + - 0.05328369 + - -0.028762817 + - 0.01625061 + - -0.008644104 + - -0.060150146 + - -0.0259552 + - -0.05432129 + - -0.00680542 + - -0.012649536 + - 0.0025501251 + - 0.060272217 + - -0.013168335 + - 0.046691895 + - 0.030395508 + - 0.039733887 + - 0.00044679642 + - -0.034240723 + - 0.01828003 + - -0.047546387 + - -0.036499023 + - 0.024505615 + - 0.027374268 + - 0.015197754 + - -0.003932953 + - 0.03475952 + - 0.013633728 + - 0.020858765 + - -0.025344849 + - -0.056732178 + - 0.008178711 + - 0.043304443 + - 0.014625549 + - -0.0020503998 + - -0.033569336 + - -0.00178051 + - -0.0446167 + - -0.045837402 + - 0.089538574 + - 0.00440979 + - 0.03741455 + - 0.0015287399 + - -0.035339355 + - 0.017654419 + - -0.008956909 + - -0.035064697 + - -0.014251709 + - 0.008331299 + - 0.0077781677 + - 0.0020999908 + - -0.021636963 + - -0.014625549 + - -0.0209198 + - -0.009429932 + - 0.070617676 + - 0.013923645 + - -0.025558472 + - -0.0519104 + - -0.0049552917 + - 0.000998497 + - -0.01448822 + - -0.027175903 + - -0.04083252 + - -0.032043457 + - -0.0096588135 + - -0.047088623 + - -0.0012331009 + - -0.025878906 + - 0.031799316 + - -0.023712158 + - 0.015701294 + - 0.017730713 + - 0.062927246 + - 0.009178162 + - -0.046295166 + - -0.014701843 + - -0.007751465 + - -0.021148682 + - 0.033966064 + - -0.013664246 + - 0.03945923 + - -0.02520752 + - 0.08905029 + - -0.039520264 + - -0.012435913 + - -0.057403564 + - 0.007068634 + - 0.006061554 + - -0.040161133 + - -0.015548706 + - 0.080078125 + - 0.08862305 + - 0.008003235 + - -0.048339844 + - 0.037750244 + - -0.04498291 + - -0.065979004 + - -0.032470703 + - -0.03225708 + - 0.004890442 + - -0.013023376 + - -0.020965576 + - 0.035095215 + - 0.035491943 + - -0.01486969 + - 0.027023315 + - 0.009552002 + - -0.01285553 + - 0.044891357 + - 0.00062322617 + - -0.030639648 + - 0.024108887 + - 0.0035648346 + - -0.06585693 + - -0.011070251 + - 0.037506104 + - 0.05697632 + - -0.027236938 + - 0.03475952 + - 0.0143585205 + - -0.014442444 + - -0.011405945 + - -0.013648987 + - -0.028625488 + - 0.024902344 + - 0.09387207 + - -0.012741089 + - -0.040985107 + - -0.018814087 + - 0.0046920776 + - -0.017715454 + - 0.013839722 + - 0.0022621155 + - 0.0024433136 + - -0.028366089 + - -0.0046310425 + - 0.028717041 + - -0.00013160706 + - 0.006690979 + - -0.053863525 + - 0.03302002 + - 0.040802002 + - 0.03201294 + - 0.032073975 + - -0.03125 + - -0.005241394 + - 0.048828125 + - -0.016204834 + - -0.0014667511 + - -0.013572693 + - 0.007949829 + - 0.019744873 + - -0.004776001 + - -0.0022506714 + - 0.033111572 + - 0.00039958954 + - 0.008369446 + - -0.021057129 + - -0.033935547 + - -0.03692627 + - 0.0042762756 + - -0.030380249 + - -0.01876831 + - -0.023529053 + - 0.004764557 + - 0.026947021 + - -0.013267517 + - -0.023666382 + - 0.0024929047 + - -0.017990112 + - 0.035217285 + - 0.0034389496 + - 0.030380249 + - 0.02015686 + - -0.013061523 + - -0.047790527 + - 0.042633057 + - 0.009559631 + - -0.03186035 + - -0.02796936 + - -0.0151901245 + - -0.0039482117 + - 0.0345459 + - -0.018096924 + - 0.012062073 + - -0.02180481 + - 0.031402588 + - 0.041412354 + - -0.052459717 + - 0.006286621 + - -0.033203125 + - -0.0013237 + - -0.012466431 + - -0.041748047 + - 0.027313232 + - -0.0284729 + - -0.05682373 + - -0.02809143 + - 0.030899048 + - 0.023773193 + - 0.044677734 + - -0.0064353943 + - -6.4373016E-06 + - 0.011512756 + - 0.0028190613 + - -0.041870117 + - -0.028182983 + - 0.014595032 + - -0.0143966675 + - 0.022949219 + - -0.004371643 + - 0.01461792 + - 0.0035171509 + - 0.01398468 + - -0.04473877 + - 0.04232788 + - -0.033599854 + - -0.000647068 + - 0.034606934 + - 0.006160736 + - -0.014640808 + - 0.028137207 + - -0.02470398 + - 0.0043563843 + - 0.00039553642 + - -0.039886475 + - 0.014251709 + - -0.035736084 + - -0.021347046 + - -0.029663086 + - -0.011688232 + - -0.038085938 + - -0.0034008026 + - 0.029144287 + - -0.010948181 + - -0.024978638 + - 0.009468079 + - 0.093933105 + - 0.014205933 + - -0.08569336 + - -0.011657715 + - 0.02027893 + - 0.0063095093 + - -0.0035533905 + - 0.020446777 + - 0.029968262 + - -0.002008438 + - 0.03253174 + - 0.029891968 + - 0.019577026 + - -0.002922058 + - -0.009994507 + - 0.029418945 + - 0.049987793 + - 0.046295166 + - -0.0072898865 + - 0.019638062 + - 0.042816162 + - 0.0066108704 + - 0.06591797 + - 0.04714966 + - -0.026062012 + - -0.019470215 + - 0.009979248 + - 0.018081665 + - 9.059906E-06 + - -0.043060303 + - -0.0043907166 + - 0.064331055 + - 0.051605225 + - -0.0040893555 + - 0.018081665 + - -0.024749756 + - -0.014915466 + - -0.048614502 + - 0.023483276 + - 0.013282776 + - -0.011741638 + - -0.036346436 + - -0.0076293945 + - 0.023086548 + - -0.051849365 + - 0.023223877 + - 0.033721924 + - -0.003929138 + - -0.044647217 + - 0.020019531 + - -0.029678345 + - -0.0031986237 + - 0.030548096 + - -0.040161133 + - -0.020874023 + - 0.028793335 + - 0.037872314 + - 0.011314392 + - -0.030838013 + - -0.051818848 + - -0.007774353 + - 0.0070724487 + - 0.02507019 + - -0.0112838745 + - 0.014930725 + - 0.010543823 + - 0.085998535 + - 0.019332886 + - 0.0107803345 + - 0.00014901161 + - 0.001613617 + - -0.024993896 + - -0.04940796 + - 0.010643005 + - 0.04269409 + - -0.02571106 + - 0.001124382 + - -0.018844604 + - -0.014953613 + - 0.027786255 + - 0.033447266 + - 0.0038719177 + - 0.011268616 + - 0.004295349 + - 0.028656006 + - -0.078063965 + - -0.012619019 + - -0.03527832 + - -0.061279297 + - 0.0625 + - 0.038116455 + - -0.008308411 + - -0.017913818 + - 0.031311035 + - -0.018722534 + - 0.0362854 + - -0.019363403 + - 0.021362305 + - -0.0029010773 + - -0.030288696 + - -0.07293701 + - 0.008544922 + - 0.006755829 + - -0.068237305 + - 0.0491333 + - 0.016494751 + - -0.021621704 + - 0.020980835 + - 0.026443481 + - 0.051879883 + - 0.035583496 + - 0.030548096 + - -0.03366089 + - -0.017532349 + - 0.066101074 + - 0.03930664 + - 0.013633728 + - -0.008621216 + - 0.031982422 + - -0.042388916 + - -0.00042247772 + - -0.020492554 + - 0.04006958 + - 0.052825928 + - -0.0044136047 + - -0.02243042 + - -0.04260254 + - 0.02418518 + - -0.020584106 + - -0.0027770996 + - -0.05908203 + - 0.026611328 + - -0.046051025 + - -0.03451538 + - 0.017944336 + - 0.054260254 + - 0.019348145 + - 0.0070114136 + - 0.014205933 + - -0.019454956 + - -0.021514893 + - 0.010383606 + - 0.050109863 + - 0.020584106 + - -0.031677246 + - -0.048187256 + - 0.01449585 + - 0.04650879 + - 0.025222778 + - 0.004135132 + - 0.02017212 + - 0.044311523 + - -0.03427124 + - -0.023757935 + - 0.03479004 + - -0.012031555 + - -0.030380249 + - -0.021560669 + - -0.010375977 + - -0.05041504 + - -0.060821533 + - 0.012283325 + - -0.026367188 + - 0.061920166 + - 0.026367188 + - -0.037078857 + - -0.015136719 + - 0.033355713 + - -0.010055542 + - 0.025314331 + - -0.027893066 + - -0.010032654 + - 0.017684937 + - -2.783537E-05 + - -0.061157227 + - 0.030273438 + - -0.103759766 + - 0.035583496 + - -0.028167725 + - 0.07171631 + - -0.0211792 + - -0.013725281 + - 0.04437256 + - 0.041137695 + - 0.027145386 + - 0.032073975 + - 0.008926392 + - -0.021560669 + - 0.007381439 + - 0.019165039 + - 0.0012969971 + - -0.01928711 + - 0.026672363 + - -0.01222229 + - -0.056365967 + - 0.010398865 + - -0.02255249 + - 0.00093221664 + - -0.009353638 + - 0.016082764 + - 0.022872925 + - 0.025024414 + - -0.024459839 + - 0.040618896 + - -0.049224854 + - -0.0035133362 + - -0.047698975 + - 0.01727295 + - 0.034057617 + - -0.004096985 + - -0.009361267 + - 0.011291504 + - -0.010093689 + - -0.017990112 + - 0.04107666 + - -0.058563232 + - -0.03387451 + - -0.046905518 + - 0.015411377 + - -0.02003479 + - -0.010528564 + - -0.01689148 + - 0.010391235 + - -0.040618896 + - 0.029205322 + - -0.020492554 + - -0.082092285 + - 0.0004811287 + - 0.043518066 + - -0.044830322 + - 0.020141602 + - -0.02319336 + - 0.0024662018 + - 0.012825012 + - 0.04977417 + - 0.06225586 + - 0.027801514 + - 0.005153656 + - 0.04147339 + - 0.0011873245 + - 0.004486084 + - -0.02494812 + - 0.061706543 + - 0.012184143 + - -0.0027637482 + - -0.018447876 + - -0.008987427 + - -0.0362854 + - 0.10205078 + - 0.026138306 + - -0.056549072 + - 0.015899658 + - 0.04449463 + - -0.017837524 + - -0.0044898987 + - -0.04348755 + - 0.06689453 + - 0.008728027 + - 0.047454834 + - 0.03289795 + - -0.034851074 + - 0.04675293 + - -0.058807373 + - 0.03164673 + - 0.01322937 + - -0.06958008 + - -0.042816162 + - -0.022918701 + - -0.019760132 + - 0.008293152 + - 0.02709961 + - -0.05822754 + - 0.011459351 + - -0.0008597374 + - -0.01574707 + - 0.027954102 + - -0.029785156 + - -0.03665161 + - 0.017562866 + - -0.027297974 + - -0.024017334 + - -0.0423584 + - -0.039245605 + - 0.0028457642 + - -0.0010719299 + - 0.01763916 + - 0.009902954 + - -0.023849487 + - -0.009399414 + - -0.016464233 + - 0.045074463 + - -0.0056762695 + - 0.04537964 + - -0.04397583 + - -0.025817871 + - 0.037353516 + - -0.018737793 + - 0.01084137 + - 0.0038528442 + - -0.04547119 + - -0.024475098 + - -0.05545044 + - -0.005756378 + - 0.008132935 + - 0.014541626 + - -0.0020751953 + - 0.03793335 + - -0.004421234 + - -0.037261963 + - -0.00818634 + - 0.026733398 + - 0.04776001 + - -0.012313843 + - 0.0019369125 + - -0.0006084442 + - 0.01335907 + - -0.033813477 + - -0.024459839 + - 0.046783447 + - -0.006389618 + - -0.055999756 + - -0.059295654 + - 0.008743286 + - -0.033966064 + - 0.022537231 + - -0.018722534 + - -0.041259766 + - 0.040039062 + - 0.028747559 + - -0.03515625 + - 0.0019016266 + - 0.041778564 + - -0.0046539307 + - 0.00014257431 + - 0.011451721 + - 0.016998291 + - 0.00522995 + - -0.04837036 + - -0.024520874 + - 0.025466919 + - -0.020706177 + - 0.017608643 + - 0.062042236 + - -0.0039596558 + - -0.021911621 + - -0.013893127 + - -8.85129E-05 + - 0.00075626373 + - 0.03414917 + - 0.011314392 + - 0.018661499 + - -0.009719849 + - 0.012748718 + - -0.026809692 + - -0.01436615 + - 0.021469116 + - -0.036254883 + - 0.00907135 + - -0.026016235 + - -0.01625061 + - 0.030075073 + - 0.011817932 + - -0.0038528442 + - -0.0028858185 + - -0.021820068 + - 0.037475586 + - 0.0115356445 + - -0.0077285767 + - -0.05328369 + - -0.051361084 + - 0.040649414 + - -0.005958557 + - -0.02279663 + - 0.01953125 + - -0.016937256 + - 0.03781128 + - -0.0016212463 + - 0.015098572 + - -0.01626587 + - 0.0067443848 + - 0.027175903 + - 0.011459351 + - 0.038513184 + - 0.06222534 + - -0.0073547363 + - -0.010383606 + - 0.0017681122 + - 0.045043945 + - -0.044921875 + - -0.0104599 + - 0.035858154 + - -0.008323669 + - 0.0025901794 + - 0.021514893 + - -0.010971069 + - 0.016738892 + - 0.0018157959 + - -0.0071258545 + - -0.029022217 + - -0.047027588 + - -0.02670288 + - 0.029220581 + - -0.022750854 + - 0.025054932 + - -0.008544922 + - 0.006164551 + - -0.029052734 + - -0.031066895 + - 0.06304932 + - -0.044647217 + - -0.017562866 + - -0.0068511963 + - 0.06604004 + - 0.039916992 + - -0.007041931 + - -0.02772522 + - -0.05795288 + - -0.022247314 + - -0.02810669 + - -0.03845215 + - 0.045074463 + - -0.014060974 + - -0.016174316 + - 0.046722412 + - -0.0006046295 + - -0.019500732 + - -0.025985718 + - 0.032989502 + - 0.028366089 + - 0.0021324158 + - 0.0020503998 + - 0.051574707 + - 0.009117126 + - -0.03112793 + - -0.006565094 + - 0.019226074 + - 0.009971619 + - -0.0064735413 + - -0.017700195 + - 0.0024414062 + - -0.0008454323 + - -0.04071045 + - -0.034820557 + - -0.031066895 + - -0.044677734 + - 0.039398193 + - -0.012580872 + - -0.06549072 + - 0.027130127 + - -0.0309906 + - 0.023727417 + - -0.019760132 + - 0.0066490173 + - -0.004798889 + - 0.009155273 + - -0.009902954 + - 0.047576904 + - 0.005466461 + - 0.001537323 + - 0.014862061 + - -0.0027828217 + - -0.0079956055 + - 0.043182373 + - 0.0051841736 + - 0.034484863 + - -0.028015137 + - -0.012870789 + - -0.019714355 + - 0.036071777 + - 0.015716553 + - -0.016860962 + - 0.0034122467 + - -0.014289856 + - 0.039031982 + - 0.017730713 + - -0.013549805 + - 0.046691895 + - 0.022094727 + - 0.04647827 + - 0.008033752 + - 0.028747559 + - -0.030288696 + - -0.018722534 + - -0.015113831 + - 0.051971436 + - -0.040893555 + - -0.039978027 + - -0.0042266846 + - -0.008346558 + - 0.059814453 + - 0.0011167526 + - 0.056030273 + - -0.08166504 + - -0.059631348 + - -0.015731812 + - 0.009529114 + - 0.025756836 + - 0.022232056 + - -0.0049819946 + - 0.021118164 + - -0.020446777 + - 0.0032253265 + - 0.017105103 + - -0.030944824 + - 0.010154724 + - -0.021881104 + - -0.018081665 + - 0.029342651 + - 0.024047852 + - 0.017700195 + - -0.02268982 + - 0.018356323 + - 0.026519775 + - 0.032226562 + - -0.004711151 + - 0.018753052 + - 0.007789612 + - 0.033172607 + - -0.034423828 + - 0.035247803 + - -0.019729614 + - -0.021194458 + - 0.0071411133 + - -0.014549255 + - -0.0073165894 + - -0.05596924 + - 0.015060425 + - -0.014305115 + - -0.030090332 + - 0.001613617 + - -0.026809692 + - -0.02571106 + - -0.0041275024 + - 0.027389526 + - -0.0059509277 + - 0.0473938 + - -0.0002002716 + - 0.00037145615 + - 0.0031642914 + - -0.0044441223 + - 0.0023765564 + - 0.0121154785 + - 0.04260254 + - -0.035736084 + - 0.019424438 + - -0.005558014 + - 0.0038166046 + - 0.03717041 + - -0.0031261444 + - 0.0446167 + - 0.015098572 + - -0.0022087097 + - 0.0385437 + - 0.024505615 + - -0.03353882 + - -0.028533936 + - 0.06048584 + - -0.019332886 + - -0.046539307 + - 0.007232666 + - -0.031585693 + - 0.02168274 + - 0.0046195984 + - -0.041412354 + - 0.032592773 + - 0.056671143 + - 0.031173706 + - -0.011398315 + - 0.033416748 + - 0.01802063 + - -0.0259552 + - -0.0028705597 + - 0.046539307 + - -0.040008545 + - 0.022567749 + - 0.020980835 + - 0.024383545 + - 0.02861023 + - 0.010574341 + - -0.008300781 + - 0.024261475 + - 0.030319214 + - -0.011238098 + - -0.030197144 + - 0.013389587 + - 0.010879517 + - -0.031311035 + - 0.035308838 + - -0.014755249 + - 0.01612854 + - 0.05722046 + - -0.019470215 + - -0.014045715 + - 0.022842407 + - -0.085998535 + - 0.017166138 + - 0.011474609 + - 0.018325806 + - 0.010398865 + - 0.00434494 + - -0.013153076 + - 0.025482178 + - 0.007217407 + - -0.0017223358 + - 0.041046143 + - 0.036895752 + - -0.028656006 + - -0.008026123 + - 0.026550293 + - -0.0146102905 + - 0.0053215027 + - -0.057037354 + - 0.008743286 + - 0.018066406 + - 0.0025310516 + - -0.0035171509 + - -0.02230835 + - -0.018218994 + - 0.0069618225 + - -0.006111145 + - 0.017532349 + - 0.034210205 + - -0.040496826 + - 0.031433105 + - -0.006587982 + - -0.031097412 + - -0.0154418945 + - -0.009414673 + - 0.006729126 + - 0.004711151 + - 0.00920105 + - 0.0025501251 + - -0.0016479492 + - -0.0107803345 + - -0.070129395 + - -0.046203613 + - 0.06616211 + - -0.019622803 + - -0.06298828 + - -0.022628784 + - 0.04156494 + - 0.026672363 + - -0.11505127 + - -0.080200195 + - -0.0491333 + - -0.03744507 + - -0.0178833 + - 0.016326904 + - 0.03201294 + - -0.013259888 + - -0.042114258 + - 0.0023727417 + - 0.005683899 + - -0.027908325 + - 0.040039062 + - -0.055847168 + - -0.03781128 + - -0.018753052 + - 0.03274536 + - 0.0121536255 + - 0.04360962 + - -0.0110321045 + - 0.017913818 + - -0.0231781 + - -0.018936157 + - -0.002658844 + - 0.011222839 + - -0.0082473755 + - -0.0039043427 + - 0.011512756 + - -0.014328003 + - 0.037994385 + - -0.020767212 + - 0.025314331 + - -0.023727417 + - 0.030303955 + - 0.03302002 + - 0.0040512085 + - -0.074401855 + - 0.027450562 + - -0.030838013 + - 0.042053223 + - -0.04425049 + - -0.022613525 + - 0.0025463104 + - 0.029449463 + - -0.0023975372 + - 0.03717041 + - 0.020751953 + - -9.357929E-06 + - -0.06842041 + - -0.045074463 + - -0.035980225 + - 0.03060913 + - 0.00049352646 + - -0.0013618469 + - 0.018676758 + - 0.00070238113 + - -0.015472412 + - -0.035736084 + - -0.008995056 + - 0.008773804 + - 0.009635925 + - 0.023330688 + - -0.027008057 + - -0.0074501038 + - -0.0040893555 + - 0.010391235 + - -0.030014038 + - -0.04119873 + - -0.06329346 + - 0.049926758 + - -0.016952515 + - -0.015045166 + - -0.0010814667 + - 0.020309448 + - -0.0034770966 + - 0.05996704 + - -0.043273926 + - -0.035491943 + - 0.017654419 + - 0.033325195 + - -0.015403748 + - 0.03942871 + - -0.003692627 + - -0.008995056 + - -0.012290955 + - -0.004722595 + - 0.010276794 + - -0.027023315 + - -0.0052871704 + - 0.019729614 + - 0.026519775 + - -0.029541016 + - -0.05505371 + - 0.007499695 + - -0.030639648 + - 0.00042963028 + - -0.016693115 + - 0.03125 + - 0.03543091 + - 0.010482788 + - 0.018081665 + - 0.030441284 + - 0.030960083 + - -0.008422852 + - -0.00983429 + - 0.047332764 + - 0.0023212433 + - 0.0052719116 + meta: + api_version: + version: '1' + billed_units: + input_tokens: 2 + response_type: embeddings_floats + /v1/embed-jobs: + post: + tags: + - /embed-jobs + summary: Create an Embed Job + description: 'This API launches an async Embed job for a [Dataset](https://docs.cohere.com/docs/datasets) of type `embed-input`. The result of a completed embed job is new Dataset of type `embed-output`, which contains the original text entries and the corresponding embeddings.' + operationId: create-embed-job + parameters: + - $ref: '#/components/parameters/RequestSource' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateEmbedJobRequest' + responses: + '200': + description: OK + headers: + X-API-Warning: + description: Warning description for incorrect usage of the API + schema: + type: string + x-fern-audiences: + - public + content: + application/json: + schema: + $ref: '#/components/schemas/CreateEmbedJobResponse' + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' + '422': + $ref: '#/components/responses/UnprocessableEntity' + '429': + $ref: '#/components/responses/RateLimit' + '498': + $ref: '#/components/responses/InvalidToken' + '499': + $ref: '#/components/responses/RequestCancelled' + '500': + $ref: '#/components/responses/InternalServerError' + '501': + $ref: '#/components/responses/NotImplemented' + '503': + $ref: '#/components/responses/ServiceUnavailable' + '504': + $ref: '#/components/responses/GatewayTimeout' + x-fern-audiences: + - public + x-fern-sdk-group-name: embed-jobs + x-fern-sdk-method-name: create + x-fern-examples: + - code-samples: + - sdk: go + name: Cohere Go SDK + code: "package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(\"<>\"))\n\n\tresp, err := co.EmbedJobs.Create(\n\t\tcontext.TODO(),\n\t\t&cohere.CreateEmbedJobRequest{\n\t\t\tDatasetId: \"dataset_id\",\n\t\t\tInputType: cohere.EmbedInputTypeSearchDocument,\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n" + - sdk: python + name: Sync + code: "import cohere\n\nco = cohere.Client(\"<>\")\n\n# start an embed job\njob = co.embed_jobs.create(\n dataset_id=\"my-dataset-id\", input_type=\"search_document\", model=\"embed-english-v3.0\"\n)\n\n# poll the server until the job is complete\nresponse = co.wait(job)\n\nprint(response)\n" + - sdk: python + name: Async + code: "import cohere\nimport asyncio\n\nco = cohere.AsyncClient(\"<>\")\n\n\nasync def main():\n # start an embed job\n job = await co.embed_jobs.create(\n dataset_id=\"my-dataset-id\", input_type=\"search_document\", model=\"embed-english-v3.0\"\n )\n\n # poll the server until the job is complete\n response = await co.wait(job)\n\n print(response)\n\nasyncio.run(main())\n" + - sdk: java + name: Cohere java SDK + code: "import com.cohere.api.Cohere;\nimport com.cohere.api.resources.embedjobs.requests.CreateEmbedJobRequest;\nimport com.cohere.api.types.CreateEmbedJobResponse;\nimport com.cohere.api.types.EmbedInputType;\n\n\npublic class EmbedJobsPost {\n public static void main(String[] args) {\n Cohere cohere = Cohere.builder().token(\"<>\").clientName(\"snippet\").build();\n\n CreateEmbedJobResponse response = cohere.embedJobs().create(CreateEmbedJobRequest.builder().model(\"embed-english-v3.0\").datasetId(\"ds.id\").inputType(EmbedInputType.SEARCH_DOCUMENT).build());\n\n System.out.println(response);\n }\n}\n" + - sdk: typescript + name: Cohere TypeScript SDK + code: "const { CohereClient } = require('cohere-ai');\n\nconst cohere = new CohereClient({\n token: '<>',\n});\n\n(async () => {\n const embedJob = await cohere.embedJobs.create({\n datasetId: 'my-dataset',\n inputType: 'search_document',\n model: 'embed-english-v3.0',\n });\n\n console.log(embedJob);\n})();\n" + - sdk: curl + name: cURL + code: "curl --request POST \\\n --url https://api.cohere.com/v1/embed-jobs \\\n --header 'accept: application/json' \\\n --header 'content-type: application/json' \\\n --header \"Authorization: bearer $CO_API_KEY\" \\\n --data '{\n \"model\": \"embed-english-v3.0\",\n \"dataset_id\": \"my-dataset\"\n }'" + get: + tags: + - /embed-jobs + summary: List Embed Jobs + description: The list embed job endpoint allows users to view all embed jobs history for that specific user. + operationId: list-embed-jobs + parameters: + - $ref: '#/components/parameters/RequestSource' + responses: + '200': + description: OK + headers: + X-API-Warning: + description: Warning description for incorrect usage of the API + schema: + type: string + x-fern-audiences: + - public + content: + application/json: + schema: + $ref: '#/components/schemas/ListEmbedJobResponse' + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' + '422': + $ref: '#/components/responses/UnprocessableEntity' + '429': + $ref: '#/components/responses/RateLimit' + '498': + $ref: '#/components/responses/InvalidToken' + '499': + $ref: '#/components/responses/RequestCancelled' + '500': + $ref: '#/components/responses/InternalServerError' + '501': + $ref: '#/components/responses/NotImplemented' + '503': + $ref: '#/components/responses/ServiceUnavailable' + '504': + $ref: '#/components/responses/GatewayTimeout' + x-fern-audiences: + - public + x-fern-sdk-group-name: embed-jobs + x-fern-sdk-method-name: list + x-fern-examples: + - code-samples: + - sdk: go + name: Cohere Go SDK + code: "package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(\"<>\"))\n\n\tresp, err := co.EmbedJobs.Get(context.TODO(), \"embed_job_id\")\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n" + - sdk: python + name: Sync + code: "import cohere\n\nco = cohere.Client(\"<>\")\n\n# list embed jobs\nresponse = co.embed_jobs.list()\n\nprint(response)\n" + - sdk: python + name: Async + code: "import cohere\nimport asyncio\n\nco = cohere.AsyncClient(\"<>\")\n\n\nasync def main():\n response = await co.embed_jobs.list()\n\n print(response)\n\nasyncio.run(main())\n" + - sdk: java + name: Cohere java SDK + code: "import com.cohere.api.Cohere;\nimport com.cohere.api.types.ListEmbedJobResponse;\n\n\npublic class EmbedJobsGet {\n public static void main(String[] args) {\n Cohere cohere = Cohere.builder().token(\"<>\").clientName(\"snippet\").build();\n\n ListEmbedJobResponse response = cohere.embedJobs().list();\n\n System.out.println(response);\n }\n}\n" + - sdk: typescript + name: Cohere TypeScript SDK + code: "const { CohereClient } = require('cohere-ai');\n\nconst cohere = new CohereClient({\n token: '<>',\n});\n\n(async () => {\n const embedJobs = await cohere.embedJobs.list();\n\n console.log(embedJobs);\n})();\n" + - sdk: curl + name: cURL + code: "curl --request GET \\\n --url https://api.cohere.com/v1/embed-jobs \\\n --header 'accept: application/json' \\\n --header \"Authorization: bearer $CO_API_KEY\"" + '/v1/embed-jobs/{id}': + get: + tags: + - /embed-jobs + summary: Fetch an Embed Job + description: This API retrieves the details about an embed job started by the same user. + operationId: get-embed-job + parameters: + - name: id + in: path + description: The ID of the embed job to retrieve. + required: true + schema: + type: string + x-fern-audiences: + - public + - $ref: '#/components/parameters/RequestSource' + responses: + '200': + description: OK + headers: + X-API-Warning: + description: Warning message for potentially incorrect usage of the API + schema: + type: string + x-fern-audiences: + - public + content: + application/json: + schema: + $ref: '#/components/schemas/EmbedJob' + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' + '422': + $ref: '#/components/responses/UnprocessableEntity' + '429': + $ref: '#/components/responses/RateLimit' + '498': + $ref: '#/components/responses/InvalidToken' + '499': + $ref: '#/components/responses/RequestCancelled' + '500': + $ref: '#/components/responses/InternalServerError' + '501': + $ref: '#/components/responses/NotImplemented' + '503': + $ref: '#/components/responses/ServiceUnavailable' + '504': + $ref: '#/components/responses/GatewayTimeout' + x-fern-audiences: + - public + x-fern-sdk-group-name: embed-jobs + x-fern-sdk-method-name: get + x-fern-examples: + - code-samples: + - sdk: go + name: Cohere Go SDK + code: "package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(\"<>\"))\n\n\tresp, err := co.EmbedJobs.List(context.TODO())\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n" + - sdk: python + name: Sync + code: "import cohere\n\nco = cohere.Client(\"<>\")\n\n# get embed job\nresponse = co.embed_jobs.get(\"job_id\")\n\nprint(response)\n" + - sdk: python + name: Async + code: "import cohere\nimport asyncio\n\nco = cohere.AsyncClient(\"<>\")\n\n\nasync def main():\n response = await co.embed_jobs.get(\"job_id\")\n\n print(response)\n\nasyncio.run(main())\n" + - sdk: java + name: Cohere java SDK + code: "import com.cohere.api.Cohere;\nimport com.cohere.api.types.ListEmbedJobResponse;\n\n\npublic class EmbedJobsGet {\n public static void main(String[] args) {\n Cohere cohere = Cohere.builder().token(\"<>\").clientName(\"snippet\").build();\n\n ListEmbedJobResponse response = cohere.embedJobs().list();\n\n System.out.println(response);\n }\n}\n" + - sdk: typescript + name: Cohere TypeScript SDK + code: "const { CohereClient } = require('cohere-ai');\n\nconst cohere = new CohereClient({\n token: '<>',\n});\n\n(async () => {\n const embedJob = await cohere.embedJobs.get('job_id');\n\n console.log(embedJob);\n})();\n" + - sdk: curl + name: cURL + code: "curl --request GET \\\n --url https://api.cohere.com/v1/embed-jobs/id \\\n --header 'accept: application/json' \\\n --header \"Authorization: bearer $CO_API_KEY\"" + '/v1/embed-jobs/{id}/cancel': + post: + tags: + - /embed-jobs + summary: Cancel an Embed Job + description: 'This API allows users to cancel an active embed job. Once invoked, the embedding process will be terminated, and users will be charged for the embeddings processed up to the cancellation point. It''s important to note that partial results will not be available to users after cancellation.' + operationId: cancel-embed-job + parameters: + - name: id + in: path + description: The ID of the embed job to cancel. + required: true + schema: + type: string + x-fern-audiences: + - public + - $ref: '#/components/parameters/RequestSource' + responses: + '200': + description: OK + headers: + X-API-Warning: + description: Warning description for incorrect usage of the API + schema: + type: string + x-fern-audiences: + - public + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' + '422': + $ref: '#/components/responses/UnprocessableEntity' + '429': + $ref: '#/components/responses/RateLimit' + '498': + $ref: '#/components/responses/InvalidToken' + '499': + $ref: '#/components/responses/RequestCancelled' + '500': + $ref: '#/components/responses/InternalServerError' + '501': + $ref: '#/components/responses/NotImplemented' + '503': + $ref: '#/components/responses/ServiceUnavailable' + '504': + $ref: '#/components/responses/GatewayTimeout' + x-fern-audiences: + - public + x-fern-sdk-group-name: embed-jobs + x-fern-sdk-method-name: cancel + x-fern-examples: + - code-samples: + - sdk: go + name: Cohere Go SDK + code: "package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(\"<>\"))\n\n\terr := co.EmbedJobs.Cancel(context.TODO(), \"embed_job_id\")\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n}\n" + - sdk: python + name: Sync + code: "import cohere\n\nco = cohere.Client(\"<>\")\n\n# cancel an embed job\nco.embed_jobs.cancel(\"job_id\")\n" + - sdk: python + name: Async + code: "import cohere\nimport asyncio\n\nco = cohere.AsyncClient(\"<>\")\n\n\nasync def main():\n await co.embed_jobs.cancel(\"job_id\")\n" + - sdk: java + name: Cohere java SDK + code: "import com.cohere.api.Cohere;\n\n\npublic class EmbedJobsCancel {\n public static void main(String[] args) {\n Cohere cohere = Cohere.builder().token(\"<>\").clientName(\"snippet\").build();\n\n cohere.embedJobs().cancel(\"job_id\");\n }\n}\n" + - sdk: typescript + name: Cohere TypeScript SDK + code: "const { CohereClient } = require('cohere-ai');\n\nconst cohere = new CohereClient({\n token: '<>',\n});\n\n(async () => {\n const embedJob = await cohere.embedJobs.cancel('job_id');\n\n console.log(embedJob);\n})();\n" + - sdk: curl + name: cURL + code: "curl --request POST \\\n --url https://api.cohere.com/v1/embed-jobs/id/cancel \\\n --header 'accept: application/json' \\\n --header 'content-type: application/json' \\\n --header \"Authorization: bearer $CO_API_KEY\"" + /v1/rerank: + post: + summary: Rerank + description: This endpoint takes in a query and a list of texts and produces an ordered array with each text assigned a relevance score. + operationId: rerank + parameters: + - $ref: '#/components/parameters/RequestSource' + requestBody: + description: '' + content: + application/json: + schema: + required: + - query + - documents + type: object + properties: + model: + type: string + description: 'The identifier of the model to use, one of : `rerank-english-v3.0`, `rerank-multilingual-v3.0`, `rerank-english-v2.0`, `rerank-multilingual-v2.0`' + x-fern-audiences: + - public + query: + type: string + description: The search query + x-fern-audiences: + - public + documents: + type: array + items: + oneOf: + - type: string + - $ref: '#/components/schemas/RerankDocument' + description: "A list of document objects or strings to rerank.\nIf a document is provided the text fields is required and all other fields will be preserved in the response.\n\nThe total max chunks (length of documents * max_chunks_per_doc) must be less than 10000.\n\nWe recommend a maximum of 1,000 documents for optimal endpoint performance." + x-fern-audiences: + - public + top_n: + minimum: 1 + type: integer + description: 'The number of most relevant documents or indices to return, defaults to the length of the documents' + x-fern-audiences: + - public + rank_fields: + type: array + items: + type: string + x-fern-audiences: + - public + description: 'If a JSON object is provided, you can specify which keys you would like to have considered for reranking. The model will rerank based on order of the fields passed in (i.e. rank_fields=[''title'',''author'',''text''] will rerank using the values in title, author, text sequentially. If the length of title, author, and text exceeds the context length of the model, the chunking will not re-consider earlier fields). If not provided, the model will use the default text field for ranking.' + x-fern-audiences: + - public + return_documents: + type: boolean + description: "- If false, returns results without the doc text - the api will return a list of {index, relevance score} where index is inferred from the list passed into the request.\n- If true, returns results with the doc text passed in - the api will return an ordered list of {index, text, relevance score} where index + text refers to the list passed into the request." + default: false + x-fern-audiences: + - public + max_chunks_per_doc: + type: integer + description: The maximum number of chunks to produce internally from a document + default: 10 + x-fern-audiences: + - public + x-fern-audiences: + - public + responses: + '200': + description: OK + content: + application/json: + schema: + required: + - results + type: object + properties: + id: + type: string + x-fern-audiences: + - public + results: + type: array + items: + required: + - index + - relevance_score + type: object + properties: + document: + required: + - text + type: object + properties: + text: + type: string + description: The text of the document to rerank + x-fern-audiences: + - public + description: 'If `return_documents` is set as `false` this will return none, if `true` it will return the documents passed in' + x-fern-audiences: + - public + index: + type: integer + description: 'Corresponds to the index in the original list of documents to which the ranked document belongs. (i.e. if the first value in the `results` object has an `index` value of 3, it means in the list of documents passed in, the document at `index=3` had the highest relevance)' + x-fern-audiences: + - public + relevance_score: + type: number + description: 'Relevance scores are normalized to be in the range `[0, 1]`. Scores close to `1` indicate a high relevance to the query, and scores closer to `0` indicate low relevance. It is not accurate to assume a score of 0.9 means the document is 2x more relevant than a document with a score of 0.45' + format: float + readOnly: true + x-fern-audiences: + - public + x-fern-audiences: + - public + description: An ordered list of ranked documents + x-fern-audiences: + - public + meta: + $ref: '#/components/schemas/ApiMeta' + x-fern-audiences: + - public + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' + '422': + $ref: '#/components/responses/UnprocessableEntity' + '429': + $ref: '#/components/responses/RateLimit' + '498': + $ref: '#/components/responses/InvalidToken' + '499': + $ref: '#/components/responses/RequestCancelled' + '500': + $ref: '#/components/responses/InternalServerError' + '501': + $ref: '#/components/responses/NotImplemented' + '503': + $ref: '#/components/responses/ServiceUnavailable' + '504': + $ref: '#/components/responses/GatewayTimeout' + x-fern-audiences: + - public + x-fern-examples: + - code-samples: + - sdk: go + name: Cohere Go SDK + code: "package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(\"<>\"))\n\n\tresp, err := co.Rerank(\n\t\tcontext.TODO(),\n\t\t&cohere.RerankRequest{\n\t\t\tQuery: \"What is the capital of the United States?\",\n\t\t\tDocuments: []*cohere.RerankRequestDocumentsItem{\n\t\t\t\t{String: \"Carson City is the capital city of the American state of Nevada.\"},\n\t\t\t\t{String: \"The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan.\"},\n\t\t\t\t{String: \"Capitalization or capitalisation in English grammar is the use of a capital letter at the start of a word. English usage varies from capitalization in other languages.\"},\n\t\t\t\t{String: \"Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district.\"},\n\t\t\t},\n\t\t\tModel: cohere.String(\"rerank-english-v3.0\"),\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n" + - sdk: typescript + name: Cohere TypeScript SDK + code: "const { CohereClient } = require('cohere-ai');\n\nconst cohere = new CohereClient({\n token: '<>',\n});\n\n(async () => {\n const rerank = await cohere.rerank({\n documents: [\n { text: 'Carson City is the capital city of the American state of Nevada.' },\n {\n text: 'The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan.',\n },\n {\n text: 'Capitalization or capitalisation in English grammar is the use of a capital letter at the start of a word. English usage varies from capitalization in other languages.',\n },\n {\n text: 'Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district.',\n },\n {\n text: 'Capital punishment (the death penalty) has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states.',\n },\n ],\n query: 'What is the capital of the United States?',\n topN: 3,\n model: 'rerank-english-v3.0',\n });\n\n console.log(rerank);\n})();\n" + - sdk: python + name: Sync + code: "import cohere\n\nco = cohere.Client(\"<>\")\n\ndocs = [\n \"Carson City is the capital city of the American state of Nevada.\",\n \"The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan.\",\n \"Capitalization or capitalisation in English grammar is the use of a capital letter at the start of a word. English usage varies from capitalization in other languages.\",\n \"Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district.\",\n \"Capital punishment (the death penalty) has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states.\",\n]\n\nresponse = co.rerank(\n model=\"rerank-english-v3.0\",\n query=\"What is the capital of the United States?\",\n documents=docs,\n top_n=3,\n)\nprint(response)\n" + - sdk: python + name: Async + code: "import cohere\nimport asyncio\n\nco = cohere.AsyncClient(\"<>\")\n\ndocs = [\n \"Carson City is the capital city of the American state of Nevada.\",\n \"The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan.\",\n \"Capitalization or capitalisation in English grammar is the use of a capital letter at the start of a word. English usage varies from capitalization in other languages.\",\n \"Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district.\",\n \"Capital punishment (the death penalty) has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states.\",\n]\n\n\nasync def main():\n response = await co.rerank(\n model=\"rerank-english-v2.0\",\n query=\"What is the capital of the United States?\",\n documents=docs,\n top_n=3,\n )\n print(response)\n\nasyncio.run(main())\n" + - sdk: java + name: Cohere java SDK + code: "import com.cohere.api.Cohere;\nimport com.cohere.api.requests.RerankRequest;\nimport com.cohere.api.types.RerankRequestDocumentsItem;\nimport com.cohere.api.types.RerankResponse;\n\nimport java.util.List;\n\n\npublic class RerankPost {\n public static void main(String[] args) {\n Cohere cohere = Cohere.builder().token(\"<>\").clientName(\"snippet\").build();\n\n RerankResponse response = cohere.rerank(RerankRequest.builder().query(\"What is the capital of the United States?\").documents(List.of(\n RerankRequestDocumentsItem.of(\"Carson City is the capital city of the American state of Nevada.\"),\n RerankRequestDocumentsItem.of(\"The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan.\"),\n RerankRequestDocumentsItem.of(\"Capitalization or capitalisation in English grammar is the use of a capital letter at the start of a word. English usage varies from capitalization in other languages.\"),\n RerankRequestDocumentsItem.of(\"Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district.\"),\n RerankRequestDocumentsItem.of(\"Capital punishment (the death penalty) has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states.\")\n )).model(\"rerank-english-v3.0\").topN(3).build());\n\n System.out.println(response);\n }\n}\n" + - sdk: curl + name: cURL + code: "curl --request POST \\\n --url https://api.cohere.com/v1/rerank \\\n --header 'accept: application/json' \\\n --header 'content-type: application/json' \\\n --header \"Authorization: bearer $CO_API_KEY\" \\\n --data '{\n \"model\": \"rerank-english-v3.0\",\n \"query\": \"What is the capital of the United States?\",\n \"top_n\": 3,\n \"documents\": [\"Carson City is the capital city of the American state of Nevada.\",\n \"The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan.\",\n \"Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district.\",\n \"Capitalization or capitalisation in English grammar is the use of a capital letter at the start of a word. English usage varies from capitalization in other languages.\",\n \"Capital punishment (the death penalty) has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states.\"]\n }'" + request: + documents: + - text: Carson City is the capital city of the American state of Nevada. + - text: The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan. + - text: Capitalization or capitalisation in English grammar is the use of a capital letter at the start of a word. English usage varies from capitalization in other languages. + - text: 'Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district.' + - text: 'Capital punishment (the death penalty) has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states.' + query: What is the capital of the United States? + top_n: 3 + model: rerank-english-v3.0 + response: + body: + id: 8bc745a3-7871-4597-822e-18c95d5df48c + results: + - index: 3 + relevance_score: 0.999071 + - index: 4 + relevance_score: 0.7867867 + - index: 0 + relevance_score: 0.32713068 + meta: + api_version: + version: '1' + billed_units: + search_units: 1 + /v1/classify: + post: + summary: Classify + description: "This endpoint makes a prediction about which label fits the specified text inputs best. To make a prediction, Classify uses the provided `examples` of text + label pairs as a reference.\nNote: [Fine-tuned models](https://docs.cohere.com/docs/classify-fine-tuning) trained on classification examples don't require the `examples` parameter to be passed in explicitly." + operationId: classify + parameters: + - $ref: '#/components/parameters/RequestSource' + requestBody: + description: '' + content: + application/json: + schema: + required: + - inputs + type: object + properties: + inputs: + maxItems: 96 + type: array + items: + type: string + writeOnly: true + x-fern-audiences: + - public + description: "A list of up to 96 texts to be classified. Each one must be a non-empty string.\nThere is, however, no consistent, universal limit to the length a particular input can be. We perform classification on the first `x` tokens of each input, and `x` varies depending on which underlying model is powering classification. The maximum token length for each model is listed in the \"max tokens\" column [here](https://docs.cohere.com/docs/models).\nNote: by default the `truncate` parameter is set to `END`, so tokens exceeding the limit will be automatically dropped. This behavior can be disabled by setting `truncate` to `NONE`, which will result in validation errors for longer texts." + writeOnly: true + x-fern-audiences: + - public + examples: + maxItems: 2500 + type: array + items: + $ref: '#/components/schemas/ClassifyExample' + description: "An array of examples to provide context to the model. Each example is a text string and its associated label/class. Each unique label requires at least 2 examples associated with it; the maximum number of examples is 2500, and each example has a maximum length of 512 tokens. The values should be structured as `{text: \"...\",label: \"...\"}`.\nNote: [Fine-tuned Models](https://docs.cohere.com/docs/classify-fine-tuning) trained on classification examples don't require the `examples` parameter to be passed in explicitly." + writeOnly: true + x-fern-audiences: + - public + model: + type: string + description: 'The identifier of the model. Currently available models are `embed-multilingual-v2.0`, `embed-english-light-v2.0`, and `embed-english-v2.0` (default). Smaller "light" models are faster, while larger models will perform better. [Fine-tuned models](https://docs.cohere.com/docs/fine-tuning) can also be supplied with their full ID.' + writeOnly: true + x-fern-audiences: + - public + preset: + type: string + description: 'The ID of a custom playground preset. You can create presets in the [playground](https://dashboard.cohere.com/playground/classify?model=large). If you use a preset, all other parameters become optional, and any included parameters will override the preset''s parameters.' + writeOnly: true + example: my-preset-a58sbd + x-fern-audiences: + - public + truncate: + enum: + - NONE + - START + - END + type: string + description: "One of `NONE|START|END` to specify how the API will handle inputs longer than the maximum token length.\nPassing `START` will discard the start of the input. `END` will discard the end of the input. In both cases, input is discarded until the remaining input is exactly the maximum input token length for the model.\nIf `NONE` is selected, when the input exceeds the maximum input token length an error will be returned." + default: END + writeOnly: true + x-fern-audiences: + - public + x-fern-audiences: + - public + responses: + '200': + description: OK + headers: + X-API-Warning: + description: Warning description for incorrect usage of the API + schema: + type: string + x-fern-audiences: + - public + content: + application/json: + schema: + required: + - id + - classifications + type: object + properties: + id: + type: string + readOnly: true + x-fern-audiences: + - public + classifications: + type: array + items: + required: + - id + - predictions + - confidences + - labels + - classification_type + type: object + properties: + id: + type: string + readOnly: true + x-fern-audiences: + - public + input: + type: string + description: The input text that was classified + readOnly: true + x-fern-audiences: + - public + prediction: + type: string + description: The predicted label for the associated query (only filled for single-label models) + readOnly: true + deprecated: true + x-fern-audiences: + - public + predictions: + type: array + items: + type: string + x-fern-audiences: + - public + description: An array containing the predicted labels for the associated query (only filled for single-label classification) + readOnly: true + x-fern-audiences: + - public + confidence: + type: number + description: The confidence score for the top predicted class (only filled for single-label classification) + format: float + readOnly: true + deprecated: true + x-fern-audiences: + - public + confidences: + type: array + items: + type: number + format: float + x-fern-audiences: + - public + description: An array containing the confidence scores of all the predictions in the same order + readOnly: true + x-fern-audiences: + - public + labels: + type: object + additionalProperties: + type: object + properties: + confidence: + type: number + format: float + readOnly: true + x-fern-audiences: + - public + readOnly: true + x-fern-audiences: + - public + description: 'A map containing each label and its confidence score according to the classifier. All the confidence scores add up to 1 for single-label classification. For multi-label classification the label confidences are independent of each other, so they don''t have to sum up to 1.' + readOnly: true + x-fern-audiences: + - public + classification_type: + enum: + - single-label + - multi-label + type: string + description: The type of classification performed + readOnly: true + x-fern-audiences: + - public + readOnly: true + x-fern-audiences: + - public + readOnly: true + x-fern-audiences: + - public + meta: + $ref: '#/components/schemas/ApiMeta' + x-fern-audiences: + - public + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' + '422': + $ref: '#/components/responses/UnprocessableEntity' + '429': + $ref: '#/components/responses/RateLimit' + '498': + $ref: '#/components/responses/InvalidToken' + '499': + $ref: '#/components/responses/RequestCancelled' + '500': + $ref: '#/components/responses/InternalServerError' + '501': + $ref: '#/components/responses/NotImplemented' + '503': + $ref: '#/components/responses/ServiceUnavailable' + '504': + $ref: '#/components/responses/GatewayTimeout' + x-fern-audiences: + - public + x-fern-examples: + - code-samples: + - sdk: go + name: Cohere Go SDK + code: "package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(\"<>\"))\n\n\tresp, err := co.Classify(\n\t\tcontext.TODO(),\n\t\t&cohere.ClassifyRequest{\n\t\t\tExamples: []*cohere.ClassifyExample{\n\t\t\t\t{\n\t\t\t\t\tText: cohere.String(\"orange\"),\n\t\t\t\t\tLabel: cohere.String(\"fruit\"),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tText: cohere.String(\"pear\"),\n\t\t\t\t\tLabel: cohere.String(\"fruit\"),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tText: cohere.String(\"lettuce\"),\n\t\t\t\t\tLabel: cohere.String(\"vegetable\"),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tText: cohere.String(\"cauliflower\"),\n\t\t\t\t\tLabel: cohere.String(\"vegetable\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tInputs: []string{\"peach\"},\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n" + - sdk: typescript + name: Cohere TypeScript SDK + code: "const { CohereClient } = require('cohere-ai');\n\nconst cohere = new CohereClient({\n token: '<>',\n});\n\n(async () => {\n const classify = await cohere.classify({\n examples: [\n { text: \"Dermatologists don't like her!\", label: 'Spam' },\n { text: \"'Hello, open to this?'\", label: 'Spam' },\n { text: 'I need help please wire me $1000 right now', label: 'Spam' },\n { text: 'Nice to know you ;)', label: 'Spam' },\n { text: 'Please help me?', label: 'Spam' },\n { text: 'Your parcel will be delivered today', label: 'Not spam' },\n { text: 'Review changes to our Terms and Conditions', label: 'Not spam' },\n { text: 'Weekly sync notes', label: 'Not spam' },\n { text: \"'Re: Follow up from today's meeting'\", label: 'Not spam' },\n { text: 'Pre-read for tomorrow', label: 'Not spam' },\n ],\n inputs: ['Confirm your email address', 'hey i need u to send some $'],\n });\n\n console.log(classify);\n})();\n" + - sdk: python + name: Sync + code: "import cohere\nfrom cohere import ClassifyExample\n\nco = cohere.Client(\"<>\")\nexamples = [\n ClassifyExample(text=\"Dermatologists don't like her!\", label=\"Spam\"),\n ClassifyExample(text=\"'Hello, open to this?'\", label=\"Spam\"),\n ClassifyExample(\n text=\"I need help please wire me $1000 right now\", label=\"Spam\"),\n ClassifyExample(text=\"Nice to know you ;)\", label=\"Spam\"),\n ClassifyExample(text=\"Please help me?\", label=\"Spam\"),\n ClassifyExample(text=\"Your parcel will be delivered today\",\n label=\"Not spam\"),\n ClassifyExample(\n text=\"Review changes to our Terms and Conditions\", label=\"Not spam\"\n ),\n ClassifyExample(text=\"Weekly sync notes\", label=\"Not spam\"),\n ClassifyExample(text=\"'Re: Follow up from today's meeting'\",\n label=\"Not spam\"),\n ClassifyExample(text=\"Pre-read for tomorrow\", label=\"Not spam\"),\n]\ninputs = [\n \"Confirm your email address\",\n \"hey i need u to send some $\",\n]\nresponse = co.classify(\n inputs=inputs,\n examples=examples,\n)\nprint(response)\n" + - sdk: python + name: Async + code: "import cohere\nimport asyncio\nfrom cohere import ClassifyExample\n\nco = cohere.AsyncClient(\"<>\")\nexamples = [\n ClassifyExample(text=\"Dermatologists don't like her!\", label=\"Spam\"),\n ClassifyExample(text=\"'Hello, open to this?'\", label=\"Spam\"),\n ClassifyExample(\n text=\"I need help please wire me $1000 right now\", label=\"Spam\"),\n ClassifyExample(text=\"Nice to know you ;)\", label=\"Spam\"),\n ClassifyExample(text=\"Please help me?\", label=\"Spam\"),\n ClassifyExample(text=\"Your parcel will be delivered today\",\n label=\"Not spam\"),\n ClassifyExample(\n text=\"Review changes to our Terms and Conditions\", label=\"Not spam\"\n ),\n ClassifyExample(text=\"Weekly sync notes\", label=\"Not spam\"),\n ClassifyExample(text=\"'Re: Follow up from today's meeting'\",\n label=\"Not spam\"),\n ClassifyExample(text=\"Pre-read for tomorrow\", label=\"Not spam\"),\n]\ninputs = [\n \"Confirm your email address\",\n \"hey i need u to send some $\",\n]\n\n\nasync def main():\n response = await co.classify(\n inputs=inputs,\n examples=examples,\n )\n print(response)\n\nasyncio.run(main())\n" + - sdk: java + name: Cohere java SDK + code: "import com.cohere.api.Cohere;\nimport com.cohere.api.requests.ClassifyRequest;\nimport com.cohere.api.types.ClassifyExample;\nimport com.cohere.api.types.ClassifyResponse;\n\nimport java.util.List;\n\n\npublic class ClassifyPost {\n public static void main(String[] args) {\n Cohere cohere = Cohere.builder().token(\"<>\").clientName(\"snippet\").build();\n\n ClassifyResponse response = cohere.classify(ClassifyRequest.builder().addAllInputs(\n List.of(\"Confirm your email address\", \"hey i need u to send some $\")\n ).examples(List.of(\n ClassifyExample.builder().text(\"Dermatologists don't like her!\").label(\"Spam\").build(),\n ClassifyExample.builder().text(\"'Hello, open to this?'\").label(\"Spam\").build(),\n ClassifyExample.builder().text(\"I need help please wire me $1000 right now\").label(\"Spam\").build(),\n ClassifyExample.builder().text(\"Nice to know you ;)\").label(\"Spam\").build(),\n ClassifyExample.builder().text(\"Please help me?\").label(\"Spam\").build(),\n ClassifyExample.builder().text(\"Your parcel will be delivered today\").label(\"Not spam\").build(),\n ClassifyExample.builder().text(\"Review changes to our Terms and Conditions\").label(\"Not spam\").build(),\n ClassifyExample.builder().text(\"Weekly sync notes\").label(\"Not spam\").build(),\n ClassifyExample.builder().text(\"'Re: Follow up from today's meeting'\").label(\"Not spam\").build(),\n ClassifyExample.builder().text(\"Pre-read for tomorrow\").label(\"Not spam\").build()\n )).build());\n\n System.out.println(response);\n }\n}\n" + - sdk: curl + name: cURL + code: "curl --request POST \\\n --url https://api.cohere.com/v1/classify \\\n --header 'accept: application/json' \\\n --header 'content-type: application/json' \\\n --header \"Authorization: bearer $CO_API_KEY\" \\\n --data '{\n \"inputs\": [\"Confirm your email address\", \"hey i need u to send some $\"],\n \"examples\": [\n {\"text\": \"Dermatologists don'\\''t like her!\",\"label\": \"Spam\"},\n {\"text\": \"'\\''Hello, open to this?'\\''\",\"label\": \"Spam\"},\n {\"text\": \"I need help please wire me $1000 right now\",\"label\": \"Spam\"},\n {\"text\": \"Nice to know you ;)\",\"label\": \"Spam\"},\n {\"text\": \"Please help me?\",\"label\": \"Spam\"},\n {\"text\": \"Your parcel will be delivered today\",\"label\": \"Not spam\"},\n {\"text\": \"Review changes to our Terms and Conditions\",\"label\": \"Not spam\"},\n {\"text\": \"Weekly sync notes\",\"label\": \"Not spam\"},\n {\"text\": \"'\\''Re: Follow up from today'\\''s meeting'\\''\",\"label\": \"Not spam\"},\n {\"text\": \"Pre-read for tomorrow\",\"label\": \"Not spam\"}\n ]\n }'" + request: + examples: + - text: Dermatologists don't like her! + label: Spam + - text: '''Hello, open to this?''' + label: Spam + - text: I need help please wire me $1000 right now + label: Spam + - text: Nice to know you ;) + label: Spam + - text: Please help me? + label: Spam + - text: Your parcel will be delivered today + label: Not spam + - text: Review changes to our Terms and Conditions + label: Not spam + - text: Weekly sync notes + label: Not spam + - text: '''Re: Follow up from today''s meeting''' + label: Not spam + - text: Pre-read for tomorrow + label: Not spam + inputs: + - Confirm your email address + - hey i need u to send some $ + response: + body: + id: 86886163-b3f3-4e36-8554-60eca7696216 + classifications: + - classification_type: single-label + confidence: 0.5661598 + confidences: + - 0.5661598 + id: 842d12fe-934b-4b71-82c2-c581eca00718 + input: Confirm your email address + labels: + Not spam: + confidence: 0.5661598 + Spam: + confidence: 0.43384025 + prediction: Not spam + predictions: + - Not spam + - classification_type: single-label + confidence: 0.9909811 + confidences: + - 0.9909811 + id: e1a39b3e-1ecd-41d2-be75-90ed726f7b9e + input: hey i need u to send some $ + labels: + Not spam: + confidence: 0.009018883 + Spam: + confidence: 0.9909811 + prediction: Spam + predictions: + - Spam + meta: + api_version: + version: '1' + billed_units: + classifications: 2 + /v1/datasets: + post: + tags: + - /datasets + summary: Create a Dataset + description: 'Create a dataset by uploading a file. See [''Dataset Creation''](https://docs.cohere.com/docs/datasets#dataset-creation) for more information.' + operationId: create-dataset + parameters: + - name: name + in: query + description: The name of the uploaded dataset. + required: true + schema: + type: string + x-fern-audiences: + - public + - name: type + in: query + description: 'The dataset type, which is used to validate the data. Valid types are `embed-input`, `reranker-finetune-input`, `single-label-classification-finetune-input`, `chat-finetune-input`, and `multi-label-classification-finetune-input`.' + required: true + schema: + $ref: '#/components/schemas/DatasetType' + - name: keep_original_file + in: query + description: Indicates if the original file should be stored. + schema: + type: boolean + x-fern-audiences: + - public + - name: skip_malformed_input + in: query + description: Indicates whether rows with malformed input should be dropped (instead of failing the validation check). Dropped rows will be returned in the warnings field. + schema: + type: boolean + x-fern-audiences: + - public + - name: keep_fields + in: query + description: 'List of names of fields that will be persisted in the Dataset. By default the Dataset will retain only the required fields indicated in the [schema for the corresponding Dataset type](https://docs.cohere.com/docs/datasets#dataset-types). For example, datasets of type `embed-input` will drop all fields other than the required `text` field. If any of the fields in `keep_fields` are missing from the uploaded file, Dataset validation will fail.' + schema: + type: array + items: + type: string + x-fern-audiences: + - public + - name: optional_fields + in: query + description: 'List of names of fields that will be persisted in the Dataset. By default the Dataset will retain only the required fields indicated in the [schema for the corresponding Dataset type](https://docs.cohere.com/docs/datasets#dataset-types). For example, Datasets of type `embed-input` will drop all fields other than the required `text` field. If any of the fields in `optional_fields` are missing from the uploaded file, Dataset validation will pass.' + schema: + type: array + items: + type: string + x-fern-audiences: + - public + - name: text_separator + in: query + description: Raw .txt uploads will be split into entries using the text_separator value. + schema: + type: string + x-fern-audiences: + - public + - name: csv_delimiter + in: query + description: The delimiter used for .csv uploads. + schema: + type: string + x-fern-audiences: + - public + - $ref: '#/components/parameters/RequestSource' + requestBody: + content: + multipart/form-data: + schema: + required: + - data + type: object + properties: + data: + type: string + description: The file to upload + format: binary + x-fern-audiences: + - public + eval_data: + type: string + description: An optional evaluation file to upload + format: binary + x-fern-audiences: + - public + x-fern-audiences: + - public + responses: + '200': + description: A successful response. + content: + application/json: + schema: + type: object + properties: + id: + type: string + description: The dataset ID + x-fern-audiences: + - public + x-fern-audiences: + - public + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' + '422': + $ref: '#/components/responses/UnprocessableEntity' + '429': + $ref: '#/components/responses/RateLimit' + '498': + $ref: '#/components/responses/InvalidToken' + '499': + $ref: '#/components/responses/RequestCancelled' + '500': + $ref: '#/components/responses/InternalServerError' + '501': + $ref: '#/components/responses/NotImplemented' + '503': + $ref: '#/components/responses/ServiceUnavailable' + '504': + $ref: '#/components/responses/GatewayTimeout' + x-fern-audiences: + - public + x-fern-sdk-group-name: datasets + x-fern-sdk-method-name: create + x-fern-examples: + - code-samples: + - sdk: go + name: Cohere Go SDK + code: "package main\n\nimport (\n\t\"context\"\n\t\"io\"\n\t\"log\"\n\t\"strings\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\ntype MyReader struct {\n\tio.Reader\n\tname string\n}\n\nfunc (m *MyReader) Name() string {\n\treturn m.name\n}\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(\"<>\"))\n\n\tresp, err := co.Datasets.Create(\n\t\tcontext.TODO(),\n\t\t&MyReader{Reader: strings.NewReader(`{\"text\": \"The quick brown fox jumps over the lazy dog\"}`), name: \"test.jsonl\"},\n\t\t&MyReader{Reader: strings.NewReader(\"\"), name: \"a.jsonl\"},\n\t\t&cohere.DatasetsCreateRequest{\n\t\t\tName: \"prompt-completion-dataset\",\n\t\t\tType: cohere.DatasetTypeEmbedResult,\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n" + - sdk: python + name: Sync + code: "import cohere\n\nco = cohere.Client(\"<>\")\n\n# upload a dataset\nmy_dataset = co.datasets.create(\n name=\"prompt-completion-dataset\",\n data=open(\"./prompt-completion.jsonl\", \"rb\"),\n type=\"prompt-completion-finetune-input\",\n)\n\n# wait for validation to complete\nresponse = co.wait(my_dataset)\n\nprint(response)\n" + - sdk: python + name: Async + code: "import cohere\nimport asyncio\n\nco = cohere.AsyncClient(\"<>\")\n\n\nasync def main():\n\n # upload a dataset\n response = await co.datasets.create(\n name=\"prompt-completion-dataset\",\n data=open(\"./prompt-completion.jsonl\", \"rb\"),\n type=\"prompt-completion-finetune-input\",\n )\n\n # wait for validation to complete\n response = await co.wait(response)\n\n print(response)\n\nasyncio.run(main())\n" + - sdk: java + name: Cohere java SDK + code: "import com.cohere.api.Cohere;\nimport com.cohere.api.resources.datasets.requests.DatasetsCreateRequest;\nimport com.cohere.api.resources.datasets.types.DatasetsCreateResponse;\nimport com.cohere.api.types.DatasetType;\n\nimport java.util.Optional;\n\n\npublic class DatasetPost {\n public static void main(String[] args) {\n Cohere cohere = Cohere.builder().token(\"<>\").clientName(\"snippet\").build();\n\n DatasetsCreateResponse response = cohere.datasets().create(null, Optional.empty(), DatasetsCreateRequest.builder().name(\"prompt-completion-dataset\").type(DatasetType.PROMPT_COMPLETION_FINETUNE_INPUT).build());\n\n System.out.println(response);\n }\n}\n" + - sdk: typescript + name: Cohere TypeScript SDK + code: "const { CohereClient } = require('cohere-ai');\nconst fs = require('fs');\n\nconst cohere = new CohereClient({\n token: '<>',\n});\n\n(async () => {\n const file = fs.createReadStream('embed_jobs_sample_data.jsonl'); // {\"text\": \"The quick brown fox jumps over the lazy dog\"}\n\n const dataset = await cohere.datasets.create({ name: 'my-dataset', type: 'embed-input' }, file);\n\n console.log(dataset);\n})();\n" + - sdk: curl + name: cURL + code: "curl --request POST \\\n --url \"https://api.cohere.com/v1/datasets?name=my-dataset&type=generative-finetune-input\" \\\n --header 'Content-Type: multipart/form-data' \\\n --header \"Authorization: Bearer $CO_API_KEY\" \\\n --form file=@./path/to/file.jsonl" + get: + tags: + - /datasets + summary: List Datasets + description: List datasets that have been created. + operationId: list-datasets + parameters: + - name: datasetType + in: query + description: optional filter by dataset type + schema: + type: string + x-fern-audiences: + - public + - name: before + in: query + description: optional filter before a date + schema: + type: string + format: date-time + x-fern-audiences: + - public + - name: after + in: query + description: optional filter after a date + schema: + type: string + format: date-time + x-fern-audiences: + - public + - name: limit + in: query + description: optional limit to number of results + schema: + type: number + x-fern-audiences: + - public + - name: offset + in: query + description: optional offset to start of results + schema: + type: number + x-fern-audiences: + - public + - name: validationStatus + in: query + description: optional filter by validation status + schema: + $ref: '#/components/schemas/DatasetValidationStatus' + - $ref: '#/components/parameters/RequestSource' + responses: + '200': + description: A successful response. + content: + application/json: + schema: + type: object + properties: + datasets: + type: array + items: + $ref: '#/components/schemas/Dataset' + x-fern-audiences: + - public + x-fern-audiences: + - public + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' + '422': + $ref: '#/components/responses/UnprocessableEntity' + '429': + $ref: '#/components/responses/RateLimit' + '498': + $ref: '#/components/responses/InvalidToken' + '499': + $ref: '#/components/responses/RequestCancelled' + '500': + $ref: '#/components/responses/InternalServerError' + '501': + $ref: '#/components/responses/NotImplemented' + '503': + $ref: '#/components/responses/ServiceUnavailable' + '504': + $ref: '#/components/responses/GatewayTimeout' + x-fern-audiences: + - public + x-fern-sdk-group-name: datasets + x-fern-sdk-method-name: list + x-fern-examples: + - code-samples: + - sdk: go + name: Cohere Go SDK + code: "package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(\"<>\"))\n\n\tresp, err := co.Datasets.Get(context.TODO(), \"dataset_id\")\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n" + - sdk: python + name: Sync + code: "import cohere\n\nco = cohere.Client(\"<>\")\n\n# get dataset\nresponse = co.datasets.get(id=\"<>\")\n\nprint(response)\n" + - sdk: python + name: Async + code: "import cohere\nimport asyncio\n\nco = cohere.AsyncClient(\"<>\")\n\n\nasync def main():\n response = await co.datasets.get(id=\"<>\")\n\n print(response)\n\nasyncio.run(main())\n" + - sdk: java + name: Cohere java SDK + code: "import com.cohere.api.Cohere;\nimport com.cohere.api.resources.datasets.types.DatasetsGetResponse;\n\n\npublic class DatasetGet {\n public static void main(String[] args) {\n Cohere cohere = Cohere.builder().token(\"<>\").clientName(\"snippet\").build();\n\n DatasetsGetResponse response = cohere.datasets().get(\"dataset_id\");\n\n System.out.println(response);\n }\n}\n" + - sdk: typescript + name: Cohere TypeScript SDK + code: "const { CohereClient } = require('cohere-ai');\n\nconst cohere = new CohereClient({\n token: '<>',\n});\n\n(async () => {\n const datasets = await cohere.datasets.get('<>');\n\n console.log(datasets);\n})();\n" + - sdk: curl + name: cURL + code: "curl --request GET \\\n --url https://api.cohere.com/v1/datasets \\\n --header 'accept: application/json' \\\n --header \"Authorization: bearer $CO_API_KEY\"" + /v1/datasets/usage: + get: + tags: + - /datasets + summary: Get Dataset Usage + description: View the dataset storage usage for your Organization. Each Organization can have up to 10GB of storage across all their users. + operationId: get-dataset-usage + parameters: + - $ref: '#/components/parameters/RequestSource' + responses: + '200': + description: A successful response. + content: + application/json: + schema: + type: object + properties: + organization_usage: + type: number + description: The total number of bytes used by the organization. + format: int64 + x-fern-audiences: + - public + x-fern-audiences: + - public + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' + '422': + $ref: '#/components/responses/UnprocessableEntity' + '429': + $ref: '#/components/responses/RateLimit' + '498': + $ref: '#/components/responses/InvalidToken' + '499': + $ref: '#/components/responses/RequestCancelled' + '500': + $ref: '#/components/responses/InternalServerError' + '501': + $ref: '#/components/responses/NotImplemented' + '503': + $ref: '#/components/responses/ServiceUnavailable' + '504': + $ref: '#/components/responses/GatewayTimeout' + x-fern-audiences: + - public + x-fern-sdk-group-name: datasets + x-fern-sdk-method-name: getUsage + x-fern-examples: + - code-samples: + - sdk: go + name: Cohere Go SDK + code: "package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(\"<>\"))\n\n\tresp, err := co.Datasets.GetUsage(context.TODO())\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n" + - sdk: python + name: Sync + code: "import cohere\n\nco = cohere.Client(\"<>\")\n\n# get usage\nresponse = co.datasets.get_usage()\n\nprint(response)\n" + - sdk: python + name: Async + code: "import cohere\nimport asyncio\n\nco = cohere.AsyncClient(\"<>\")\n\n\nasync def main():\n response = await co.datasets.get_usage()\n\n print(response)\n\nasyncio.run(main())\n" + - sdk: java + name: Cohere java SDK + code: "import com.cohere.api.Cohere;\nimport com.cohere.api.resources.datasets.types.DatasetsGetUsageResponse;\n\n\npublic class DatasetUsageGet {\n public static void main(String[] args) {\n Cohere cohere = Cohere.builder().token(\"<>\").clientName(\"snippet\").build();\n\n DatasetsGetUsageResponse response = cohere.datasets().getUsage();\n\n System.out.println(response);\n }\n}\n" + - sdk: typescript + name: Cohere TypeScript SDK + code: "const { CohereClient } = require('cohere-ai');\n\nconst cohere = new CohereClient({\n token: '<>',\n});\n\n(async () => {\n const usage = await cohere.datasets.getUsage('id');\n\n console.log(usage);\n})();\n" + - sdk: curl + name: cURL + code: "curl --request GET \\\n --url https://api.cohere.com/v1/datasets/usage \\\n --header 'accept: application/json' \\\n --header \"Authorization: bearer $CO_API_KEY\"" + '/v1/datasets/{id}': + get: + tags: + - /datasets + summary: Get a Dataset + description: 'Retrieve a dataset by ID. See [''Datasets''](https://docs.cohere.com/docs/datasets) for more information.' + operationId: get-dataset + parameters: + - name: id + in: path + required: true + schema: + pattern: ^(?!usage$).*$ + type: string + x-fern-audiences: + - public + - $ref: '#/components/parameters/RequestSource' + responses: + '200': + description: A successful response. + content: + application/json: + schema: + required: + - dataset + type: object + properties: + dataset: + $ref: '#/components/schemas/Dataset' + x-fern-audiences: + - public + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' + '422': + $ref: '#/components/responses/UnprocessableEntity' + '429': + $ref: '#/components/responses/RateLimit' + '498': + $ref: '#/components/responses/InvalidToken' + '499': + $ref: '#/components/responses/RequestCancelled' + '500': + $ref: '#/components/responses/InternalServerError' + '501': + $ref: '#/components/responses/NotImplemented' + '503': + $ref: '#/components/responses/ServiceUnavailable' + '504': + $ref: '#/components/responses/GatewayTimeout' + x-fern-audiences: + - public + x-fern-sdk-group-name: datasets + x-fern-sdk-method-name: get + x-fern-examples: + - code-samples: + - sdk: go + name: Cohere Go SDK + code: "package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(\"<>\"))\n\n\tresp, err := co.Datasets.Get(context.TODO(), \"dataset_id\")\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n" + - sdk: python + name: Sync + code: "import cohere\n\nco = cohere.Client(\"<>\")\n\n# get dataset\nresponse = co.datasets.get(id=\"<>\")\n\nprint(response)\n" + - sdk: python + name: Async + code: "import cohere\nimport asyncio\n\nco = cohere.AsyncClient(\"<>\")\n\n\nasync def main():\n response = await co.datasets.get(id=\"<>\")\n\n print(response)\n\nasyncio.run(main())\n" + - sdk: java + name: Cohere java SDK + code: "import com.cohere.api.Cohere;\nimport com.cohere.api.resources.datasets.types.DatasetsGetResponse;\n\n\npublic class DatasetGet {\n public static void main(String[] args) {\n Cohere cohere = Cohere.builder().token(\"<>\").clientName(\"snippet\").build();\n\n DatasetsGetResponse response = cohere.datasets().get(\"dataset_id\");\n\n System.out.println(response);\n }\n}\n" + - sdk: typescript + name: Cohere TypeScript SDK + code: "const { CohereClient } = require('cohere-ai');\n\nconst cohere = new CohereClient({\n token: '<>',\n});\n\n(async () => {\n const datasets = await cohere.datasets.get('<>');\n\n console.log(datasets);\n})();\n" + - sdk: curl + name: cURL + code: "curl --request GET \\\n --url https://api.cohere.com/v1/datasets \\\n --header 'accept: application/json' \\\n --header \"Authorization: bearer $CO_API_KEY\"" + delete: + tags: + - /datasets + summary: Delete a Dataset + description: 'Delete a dataset by ID. Datasets are automatically deleted after 30 days, but they can also be deleted manually.' + operationId: delete-dataset + parameters: + - name: id + in: path + required: true + schema: + pattern: ^(?!usage$).*$ + type: string + x-fern-audiences: + - public + - $ref: '#/components/parameters/RequestSource' + responses: + '200': + description: A successful response. + content: + application/json: + schema: + type: object + x-fern-audiences: + - public + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' + '422': + $ref: '#/components/responses/UnprocessableEntity' + '429': + $ref: '#/components/responses/RateLimit' + '498': + $ref: '#/components/responses/InvalidToken' + '499': + $ref: '#/components/responses/RequestCancelled' + '500': + $ref: '#/components/responses/InternalServerError' + '501': + $ref: '#/components/responses/NotImplemented' + '503': + $ref: '#/components/responses/ServiceUnavailable' + '504': + $ref: '#/components/responses/GatewayTimeout' + x-fern-audiences: + - public + x-fern-sdk-group-name: datasets + x-fern-sdk-method-name: delete + x-fern-examples: + - code-samples: + - sdk: go + name: Cohere Go SDK + code: "package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(\"<>\"))\n\n\t_, err := co.Datasets.Delete(context.TODO(), \"dataset_id\")\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n}\n" + - sdk: python + name: Sync + code: "import cohere\n\nco = cohere.Client(\"<>\")\n\n# delete dataset\nco.datasets.delete(\"id\")\n" + - sdk: python + name: Async + code: "import cohere\nimport asyncio\n\nco = cohere.AsyncClient(\"<>\")\n\n\nasync def main():\n await co.delete_dataset(\"id\")\n\nasyncio.run(main())\n" + - sdk: java + name: Cohere java SDK + code: "import com.cohere.api.Cohere;\n\n\npublic class DatasetDelete {\n public static void main(String[] args) {\n Cohere cohere = Cohere.builder().token(\"<>\").clientName(\"snippet\").build();\n\n cohere.datasets().delete(\"id\");\n\n }\n}\n" + - sdk: curl + name: cURL + code: "curl --request DELETE \\\n --url https://api.cohere.com/v1/datasets/id \\\n --header 'accept: application/json' \\\n --header 'content-type: application/json' \\\n --header \"Authorization: bearer $CO_API_KEY\"" + /v1/summarize: + post: + summary: Summarize + description: "\nThis API is marked as \"Legacy\" and is no longer maintained. Follow the [migration guide](/docs/migrating-from-cogenerate-to-cochat) to start using the Chat API.\n\nGenerates a summary in English for a given text.\n" + operationId: summarize + parameters: + - $ref: '#/components/parameters/RequestSource' + requestBody: + description: '' + content: + application/json: + schema: + required: + - text + type: object + properties: + text: + maxLength: 50000 + minLength: 250 + type: string + description: 'The text to generate a summary for. Can be up to 100,000 characters long. Currently the only supported language is English.' + writeOnly: true + x-fern-audiences: + - public + length: + enum: + - short + - medium + - long + type: string + description: 'One of `short`, `medium`, `long`, or `auto` defaults to `auto`. Indicates the approximate length of the summary. If `auto` is selected, the best option will be picked based on the input text.' + default: medium + writeOnly: true + x-fern-audiences: + - public + format: + enum: + - paragraph + - bullets + type: string + description: 'One of `paragraph`, `bullets`, or `auto`, defaults to `auto`. Indicates the style in which the summary will be delivered - in a free form paragraph or in bullet points. If `auto` is selected, the best option will be picked based on the input text.' + default: paragraph + writeOnly: true + x-fern-audiences: + - public + model: + type: string + description: 'The identifier of the model to generate the summary with. Currently available models are `command` (default), `command-nightly` (experimental), `command-light`, and `command-light-nightly` (experimental). Smaller, "light" models are faster, while larger models will perform better.' + writeOnly: true + x-fern-audiences: + - public + extractiveness: + enum: + - low + - medium + - high + type: string + description: 'One of `low`, `medium`, `high`, or `auto`, defaults to `auto`. Controls how close to the original text the summary is. `high` extractiveness summaries will lean towards reusing sentences verbatim, while `low` extractiveness summaries will tend to paraphrase more. If `auto` is selected, the best option will be picked based on the input text.' + default: low + writeOnly: true + x-fern-audiences: + - public + temperature: + maximum: 5 + minimum: 0 + type: number + description: 'Ranges from 0 to 5. Controls the randomness of the output. Lower values tend to generate more “predictable” output, while higher values tend to generate more “creative” output. The sweet spot is typically between 0 and 1.' + default: 0.3 + writeOnly: true + x-fern-audiences: + - public + additional_command: + type: string + description: A free-form instruction for modifying how the summaries get generated. Should complete the sentence "Generate a summary _". Eg. "focusing on the next steps" or "written by Yoda" + writeOnly: true + x-fern-audiences: + - public + x-fern-audiences: + - public + responses: + '200': + description: OK + headers: + X-API-Warning: + description: Warning description for incorrect usage of the API + schema: + type: string + x-fern-audiences: + - public + content: + application/json: + schema: + type: object + properties: + id: + type: string + description: Generated ID for the summary + x-fern-audiences: + - public + summary: + type: string + description: Generated summary for the text + x-fern-audiences: + - public + meta: + $ref: '#/components/schemas/ApiMeta' + x-fern-audiences: + - public + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' + '422': + $ref: '#/components/responses/UnprocessableEntity' + '429': + $ref: '#/components/responses/RateLimit' + '498': + $ref: '#/components/responses/InvalidToken' + '499': + $ref: '#/components/responses/RequestCancelled' + '500': + $ref: '#/components/responses/InternalServerError' + '501': + $ref: '#/components/responses/NotImplemented' + '503': + $ref: '#/components/responses/ServiceUnavailable' + '504': + $ref: '#/components/responses/GatewayTimeout' + x-fern-audiences: + - public + x-fern-examples: + - code-samples: + - sdk: go + name: Cohere Go SDK + code: "package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(\"<>\"))\n\n\tresp, err := co.Summarize(\n\t\tcontext.TODO(),\n\t\t&cohere.SummarizeRequest{\n\t\t\tText: \"the quick brown fox jumped over the lazy dog and then the dog jumped over the fox the quick brown fox jumped over the lazy dog the quick brown fox jumped over the lazy dog the quick brown fox jumped over the lazy dog the quick brown fox jumped over the lazy dog\",\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n" + - sdk: typescript + name: Cohere TypeScript SDK + code: "const { CohereClient } = require('cohere-ai');\n\nconst cohere = new CohereClient({\n token: '<>',\n});\n\n(async () => {\n const summarize = await cohere.summarize({\n text:\n 'Ice cream is a sweetened frozen food typically eaten as a snack or dessert. ' +\n 'It may be made from milk or cream and is flavoured with a sweetener, ' +\n 'either sugar or an alternative, and a spice, such as cocoa or vanilla, ' +\n 'or with fruit such as strawberries or peaches. ' +\n 'It can also be made by whisking a flavored cream base and liquid nitrogen together. ' +\n 'Food coloring is sometimes added, in addition to stabilizers. ' +\n 'The mixture is cooled below the freezing point of water and stirred to incorporate air spaces ' +\n 'and to prevent detectable ice crystals from forming. The result is a smooth, ' +\n 'semi-solid foam that is solid at very low temperatures (below 2 °C or 35 °F). ' +\n 'It becomes more malleable as its temperature increases.\\n\\n' +\n 'The meaning of the name \"ice cream\" varies from one country to another. ' +\n 'In some countries, such as the United States, \"ice cream\" applies only to a specific variety, ' +\n 'and most governments regulate the commercial use of the various terms according to the ' +\n 'relative quantities of the main ingredients, notably the amount of cream. ' +\n 'Products that do not meet the criteria to be called ice cream are sometimes labelled ' +\n '\"frozen dairy dessert\" instead. In other countries, such as Italy and Argentina, ' +\n 'one word is used fo\\r all variants. Analogues made from dairy alternatives, ' +\n \"such as goat's or sheep's milk, or milk substitutes \" +\n '(e.g., soy, cashew, coconut, almond milk or tofu), are available for those who are ' +\n 'lactose intolerant, allergic to dairy protein or vegan.',\n });\n\n console.log(summarize);\n})();\n" + - sdk: python + name: Sync + code: "import cohere\n\nco = cohere.Client(\"<>\")\n\ntext = (\n \"Ice cream is a sweetened frozen food typically eaten as a snack or dessert. \"\n \"It may be made from milk or cream and is flavoured with a sweetener, \"\n \"either sugar or an alternative, and a spice, such as cocoa or vanilla, \"\n \"or with fruit such as strawberries or peaches. \"\n \"It can also be made by whisking a flavored cream base and liquid nitrogen together. \"\n \"Food coloring is sometimes added, in addition to stabilizers. \"\n \"The mixture is cooled below the freezing point of water and stirred to incorporate air spaces \"\n \"and to prevent detectable ice crystals from forming. The result is a smooth, \"\n \"semi-solid foam that is solid at very low temperatures (below 2 °C or 35 °F). \"\n \"It becomes more malleable as its temperature increases.\\n\\n\"\n 'The meaning of the name \"ice cream\" varies from one country to another. '\n 'In some countries, such as the United States, \"ice cream\" applies only to a specific variety, '\n \"and most governments regulate the commercial use of the various terms according to the \"\n \"relative quantities of the main ingredients, notably the amount of cream. \"\n \"Products that do not meet the criteria to be called ice cream are sometimes labelled \"\n '\"frozen dairy dessert\" instead. In other countries, such as Italy and Argentina, '\n \"one word is used fo\\r all variants. Analogues made from dairy alternatives, \"\n \"such as goat's or sheep's milk, or milk substitutes \"\n \"(e.g., soy, cashew, coconut, almond milk or tofu), are available for those who are \"\n \"lactose intolerant, allergic to dairy protein or vegan.\"\n)\n\nresponse = co.summarize(\n text=text,\n)\nprint(response)\n" + - sdk: python + name: Async + code: "import cohere\nimport asyncio\n\nco = cohere.AsyncClient(\"<>\")\n\ntext = (\n \"Ice cream is a sweetened frozen food typically eaten as a snack or dessert. \"\n \"It may be made from milk or cream and is flavoured with a sweetener, \"\n \"either sugar or an alternative, and a spice, such as cocoa or vanilla, \"\n \"or with fruit such as strawberries or peaches. \"\n \"It can also be made by whisking a flavored cream base and liquid nitrogen together. \"\n \"Food coloring is sometimes added, in addition to stabilizers. \"\n \"The mixture is cooled below the freezing point of water and stirred to incorporate air spaces \"\n \"and to prevent detectable ice crystals from forming. The result is a smooth, \"\n \"semi-solid foam that is solid at very low temperatures (below 2 °C or 35 °F). \"\n \"It becomes more malleable as its temperature increases.\\n\\n\"\n 'The meaning of the name \"ice cream\" varies from one country to another. '\n 'In some countries, such as the United States, \"ice cream\" applies only to a specific variety, '\n \"and most governments regulate the commercial use of the various terms according to the \"\n \"relative quantities of the main ingredients, notably the amount of cream. \"\n \"Products that do not meet the criteria to be called ice cream are sometimes labelled \"\n '\"frozen dairy dessert\" instead. In other countries, such as Italy and Argentina, '\n \"one word is used fo\\r all variants. Analogues made from dairy alternatives, \"\n \"such as goat's or sheep's milk, or milk substitutes \"\n \"(e.g., soy, cashew, coconut, almond milk or tofu), are available for those who are \"\n \"lactose intolerant, allergic to dairy protein or vegan.\"\n)\n\n\nasync def main():\n response = await co.summarize(\n text=text,\n )\n print(response)\n\nasyncio.run(main())\n" + - sdk: java + name: Cohere java SDK + code: "import com.cohere.api.Cohere;\nimport com.cohere.api.requests.SummarizeRequest;\nimport com.cohere.api.types.SummarizeResponse;\n\n\npublic class SummarizePost {\n public static void main(String[] args) {\n Cohere cohere = Cohere.builder().token(\"<>\").clientName(\"snippet\").build();\n\n SummarizeResponse response = cohere.summarize(SummarizeRequest.builder().text(\n \"\"\"\n Ice cream is a sweetened frozen food typically eaten as a snack or dessert.\\s\n It may be made from milk or cream and is flavoured with a sweetener,\\s\n either sugar or an alternative, and a spice, such as cocoa or vanilla,\\s\n or with fruit such as strawberries or peaches.\\s\n It can also be made by whisking a flavored cream base and liquid nitrogen together.\\s\n Food coloring is sometimes added, in addition to stabilizers.\\s\n The mixture is cooled below the freezing point of water and stirred to incorporate air spaces\\s\n and to prevent detectable ice crystals from forming. The result is a smooth,\\s\n semi-solid foam that is solid at very low temperatures (below 2 °C or 35 °F).\\s\n It becomes more malleable as its temperature increases.\\\\n\\\\n\n The meaning of the name \"ice cream\" varies from one country to another.\\s\n In some countries, such as the United States, \"ice cream\" applies only to a specific variety,\\s\n and most governments regulate the commercial use of the various terms according to the\\s\n relative quantities of the main ingredients, notably the amount of cream.\\s\n Products that do not meet the criteria to be called ice cream are sometimes labelled\\s\n \"frozen dairy dessert\" instead. In other countries, such as Italy and Argentina,\\s\n one word is used fo\\\\r all variants. Analogues made from dairy alternatives,\\s\n such as goat's or sheep's milk, or milk substitutes\\s\n (e.g., soy, cashew, coconut, almond milk or tofu), are available for those who are\\s\n lactose intolerant, allergic to dairy protein or vegan.\n \"\"\"\n ).build());\n\n System.out.println(response);\n }\n}\n" + - sdk: curl + name: cURL + code: "curl --request POST \\\n --url https://api.cohere.com/v1/summarize \\\n --header 'accept: application/json' \\\n --header 'content-type: application/json' \\\n --header \"Authorization: bearer $CO_API_KEY\" \\\n --data '{\n \"text\": \"Ice cream is a sweetened frozen food typically eaten as a snack or dessert. It may be made from milk or cream and is flavoured with a sweetener, either sugar or an alternative, and a spice, such as cocoa or vanilla, or with fruit such as strawberries or peaches. It can also be made by whisking a flavored cream base and liquid nitrogen together. Food coloring is sometimes added, in addition to stabilizers. The mixture is cooled below the freezing point of water and stirred to incorporate air spaces and to prevent detectable ice crystals from forming. The result is a smooth, semi-solid foam that is solid at very low temperatures (below 2 °C or 35 °F). It becomes more malleable as its temperature increases.\\n\\nThe meaning of the name \\\"ice cream\\\" varies from one country to another. In some countries, such as the United States, \\\"ice cream\\\" applies only to a specific variety, and most governments regulate the commercial use of the various terms according to the relative quantities of the main ingredients, notably the amount of cream. Products that do not meet the criteria to be called ice cream are sometimes labelled \\\"frozen dairy dessert\\\" instead. In other countries, such as Italy and Argentina, one word is used for all variants. Analogues made from dairy alternatives, such as goat'\\''s or sheep'\\''s milk, or milk substitutes (e.g., soy, cashew, coconut, almond milk or tofu), are available for those who are lactose intolerant, allergic to dairy protein or vegan.\"\n }'" + request: + text: "Ice cream is a sweetened frozen food typically eaten as a snack or dessert. It may be made from milk or cream and is flavoured with a sweetener, either sugar or an alternative, and a spice, such as cocoa or vanilla, or with fruit such as strawberries or peaches. It can also be made by whisking a flavored cream base and liquid nitrogen together. Food coloring is sometimes added, in addition to stabilizers. The mixture is cooled below the freezing point of water and stirred to incorporate air spaces and to prevent detectable ice crystals from forming. The result is a smooth, semi-solid foam that is solid at very low temperatures (below 2 °C or 35 °F). It becomes more malleable as its temperature increases.\n\nThe meaning of the name \"ice cream\" varies from one country to another. In some countries, such as the United States, \"ice cream\" applies only to a specific variety, and most governments regulate the commercial use of the various terms according to the relative quantities of the main ingredients, notably the amount of cream. Products that do not meet the criteria to be called ice cream are sometimes labelled \"frozen dairy dessert\" instead. In other countries, such as Italy and Argentina, one word is used fo\r all variants. Analogues made from dairy alternatives, such as goat's or sheep's milk, or milk substitutes (e.g., soy, cashew, coconut, almond milk or tofu), are available for those who are lactose intolerant, allergic to dairy protein or vegan." + response: + body: + id: aa0b828e-f9cf-484d-a84d-cb62f556e841 + summary: 'Ice cream is a frozen dessert made by whipping a cream base and liquid nitrogen together. It is then flavoured with sweeteners, spices and fruits. Ice cream can also be made using alternative milks, such as soy or almond, for those who are lactose intolerant or vegan.' + meta: + api_version: + version: '1' + billed_units: + input_tokens: 321 + output_tokens: 55 + /v1/tokenize: + post: + summary: Tokenize + description: 'This endpoint splits input text into smaller units called tokens using byte-pair encoding (BPE). To learn more about tokenization and byte pair encoding, see the tokens page.' + operationId: tokenize + parameters: + - $ref: '#/components/parameters/RequestSource' + requestBody: + description: '' + content: + application/json: + schema: + required: + - text + - model + type: object + properties: + text: + maxLength: 65536 + minLength: 1 + type: string + description: 'The string to be tokenized, the minimum text length is 1 character, and the maximum text length is 65536 characters.' + x-fern-audiences: + - public + model: + type: string + description: An optional parameter to provide the model name. This will ensure that the tokenization uses the tokenizer used by that model. + x-fern-audiences: + - public + x-fern-audiences: + - public + examples: + Example: + value: + text: tokenize me! :D + model: command + responses: + '200': + description: OK + headers: + X-API-Warning: + description: Warning description for incorrect usage of the API + schema: + type: string + x-fern-audiences: + - public + content: + application/json: + schema: + required: + - tokens + - token_strings + type: object + properties: + tokens: + type: array + items: + type: integer + readOnly: true + x-fern-audiences: + - public + description: 'An array of tokens, where each token is an integer.' + readOnly: true + x-fern-audiences: + - public + token_strings: + type: array + items: + type: string + x-fern-audiences: + - public + x-fern-audiences: + - public + meta: + $ref: '#/components/schemas/ApiMeta' + x-fern-audiences: + - public + examples: + Example: + value: + tokens: + - 34160 + - 974 + - 514 + - 34 + - 1420 + - 69 + token_strings: + - token + - ize' + - ' me' + - '!' + - ' :' + - D + meta: + api_version: + version: '1' + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' + '422': + $ref: '#/components/responses/UnprocessableEntity' + '429': + $ref: '#/components/responses/RateLimit' + '498': + $ref: '#/components/responses/InvalidToken' + '499': + $ref: '#/components/responses/RequestCancelled' + '500': + $ref: '#/components/responses/InternalServerError' + '501': + $ref: '#/components/responses/NotImplemented' + '503': + $ref: '#/components/responses/ServiceUnavailable' + '504': + $ref: '#/components/responses/GatewayTimeout' + x-fern-audiences: + - public + x-fern-examples: + - code-samples: + - sdk: go + name: Cohere Go SDK + code: "package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(\"<>\"))\n\n\tresp, err := co.Tokenize(\n\t\tcontext.TODO(),\n\t\t&cohere.TokenizeRequest{\n\t\t\tText: \"cohere <3\",\n\t\t\tModel: \"base\",\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n" + - sdk: typescript + name: Cohere TypeScript SDK + code: "const cohere = require('cohere-ai');\ncohere.init('<>')(async () => {\n const response = await cohere.tokenize({\n text: 'tokenize me! :D',\n model: 'command', // optional\n });\n console.log(response);\n})();\n" + - sdk: python + name: Sync + code: "import cohere\n\nco = cohere.Client(\"<>\")\n\nresponse = co.tokenize(text=\"tokenize me! :D\", model=\"command\") # optional\nprint(response)\n" + - sdk: python + name: Async + code: "import cohere\nimport asyncio\n\nco = cohere.AsyncClient(\"<>\")\n\n\nasync def main():\n response = await co.tokenize(text=\"tokenize me! :D\", model=\"command\")\n print(response)\n\nasyncio.run(main())\n" + - sdk: java + name: Cohere java SDK + code: "import com.cohere.api.Cohere;\nimport com.cohere.api.requests.TokenizeRequest;\nimport com.cohere.api.types.TokenizeResponse;\n\n\npublic class TokenizePost {\n public static void main(String[] args) {\n Cohere cohere = Cohere.builder().token(\"<>\").clientName(\"snippet\").build();\n\n TokenizeResponse response = cohere.tokenize(TokenizeRequest.builder().text(\"tokenize me\").model(\"command\").build());\n\n System.out.println(response);\n }\n}\n" + - sdk: typescript + name: Cohere Node.js SDK + code: "const cohere = require('cohere-ai');\ncohere.init('<>')(async () => {\n const response = await cohere.tokenize({\n text: 'tokenize me! :D',\n model: 'command', // optional\n });\n console.log(response);\n})();\n" + - sdk: curl + name: cURL + code: "curl --request POST \\\n --url https://api.cohere.com/v1/tokenize \\\n --header 'accept: application/json' \\\n --header 'content-type: application/json' \\\n --header \"Authorization: bearer $CO_API_KEY\" \\\n --data '{\n \"model\": \"command\",\n \"text\": \"tokenize me! :D\"\n }'" + request: + text: tokenize me! :D + model: command + response: + body: + tokens: + - 10002 + - 2261 + - 2012 + - 8 + - 2792 + - 43 + token_strings: + - token + - ize + - ' me' + - '!' + - ' :' + - D + meta: + api_version: + version: '1' + /v1/detokenize: + post: + summary: Detokenize + description: 'This endpoint takes tokens using byte-pair encoding and returns their text representation. To learn more about tokenization and byte pair encoding, see the tokens page.' + operationId: detokenize + parameters: + - $ref: '#/components/parameters/RequestSource' + requestBody: + description: '' + content: + application/json: + schema: + required: + - tokens + - model + type: object + properties: + tokens: + maxItems: 65536 + minItems: 1 + type: array + items: + type: integer + x-fern-audiences: + - public + description: The list of tokens to be detokenized. + writeOnly: true + x-fern-audiences: + - public + model: + type: string + description: An optional parameter to provide the model name. This will ensure that the detokenization is done by the tokenizer used by that model. + x-fern-audiences: + - public + x-fern-audiences: + - public + responses: + '200': + description: OK + headers: + X-API-Warning: + description: Warning description for incorrect usage of the API + schema: + type: string + x-fern-audiences: + - public + content: + application/json: + schema: + required: + - text + type: object + properties: + text: + type: string + description: A string representing the list of tokens. + readOnly: true + x-fern-audiences: + - public + meta: + $ref: '#/components/schemas/ApiMeta' + x-fern-audiences: + - public + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' + '422': + $ref: '#/components/responses/UnprocessableEntity' + '429': + $ref: '#/components/responses/RateLimit' + '498': + $ref: '#/components/responses/InvalidToken' + '499': + $ref: '#/components/responses/RequestCancelled' + '500': + $ref: '#/components/responses/InternalServerError' + '501': + $ref: '#/components/responses/NotImplemented' + '503': + $ref: '#/components/responses/ServiceUnavailable' + '504': + $ref: '#/components/responses/GatewayTimeout' + x-fern-audiences: + - public + x-fern-examples: + - code-samples: + - sdk: go + name: Cohere Go SDK + code: "package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(\"<>\"))\n\n\tresp, err := co.Detokenize(\n\t\tcontext.TODO(),\n\t\t&cohere.DetokenizeRequest{\n\t\t\tTokens: []int{10002, 1706, 1722, 5169, 4328},\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n" + - sdk: typescript + name: Cohere TypeScript SDK + code: "const { CohereClient } = require('cohere-ai');\n\nconst cohere = new CohereClient({\n token: '<>',\n});\n\n(async () => {\n const detokenize = await cohere.detokenize({\n tokens: [10002, 2261, 2012, 8, 2792, 43],\n model: 'command',\n });\n\n console.log(detokenize);\n})();\n" + - sdk: python + name: Sync + code: "import cohere\n\nco = cohere.Client(\"<>\")\n\nresponse = co.detokenize(\n tokens=[8466, 5169, 2594, 8, 2792, 43], model=\"command\" # optional\n)\nprint(response)\n" + - sdk: python + name: Async + code: "import cohere\nimport asyncio\n\nco = cohere.AsyncClient(\"<>\")\n\n\nasync def main():\n response = await co.detokenize(\n tokens=[8466, 5169, 2594, 8, 2792, 43], model=\"command\" # optional\n )\n print(response)\n\nasyncio.run(main())\n" + - sdk: java + name: Cohere java SDK + code: "import com.cohere.api.Cohere;\nimport com.cohere.api.requests.DetokenizeRequest;\nimport com.cohere.api.types.DetokenizeResponse;\n\nimport java.util.List;\n\n\npublic class DetokenizePost {\n public static void main(String[] args) {\n Cohere cohere = Cohere.builder().token(\"<>\").clientName(\"snippet\").build();\n\n DetokenizeResponse response = cohere.detokenize(\n DetokenizeRequest.builder().model(\"command\").tokens(List.of(8466, 5169, 2594, 8, 2792, 43)).build()\n );\n\n System.out.println(response);\n }\n}\n" + - sdk: curl + name: cURL + code: "curl --request POST \\\n --url https://api.cohere.com/v1/detokenize \\\n --header 'accept: application/json' \\\n --header 'content-type: application/json' \\\n --header \"Authorization: bearer $CO_API_KEY\" \\\n --data '{\n \"model\": \"command\",\n \"tokens\": [8466, 5169, 2594, 8, 2792, 43]\n }'" + request: + tokens: + - 10002 + - 2261 + - 2012 + - 8 + - 2792 + - 43 + model: command + response: + body: + text: tokenize me! :D + meta: + api_version: + version: '1' + /v1/connectors: + get: + tags: + - /connectors + summary: List Connectors + description: 'Returns a list of connectors ordered by descending creation date (newer first). See [''Managing your Connector''](https://docs.cohere.com/docs/managing-your-connector) for more information.' + operationId: list-connectors + parameters: + - name: limit + in: query + description: 'Maximum number of connectors to return [0, 100].' + schema: + type: number + default: 30 + x-fern-audiences: + - public + - name: offset + in: query + description: 'Number of connectors to skip before returning results [0, inf].' + schema: + type: number + default: 0 + x-fern-audiences: + - public + - $ref: '#/components/parameters/RequestSource' + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ListConnectorsResponse' + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' + '422': + $ref: '#/components/responses/UnprocessableEntity' + '429': + $ref: '#/components/responses/RateLimit' + '498': + $ref: '#/components/responses/InvalidToken' + '499': + $ref: '#/components/responses/RequestCancelled' + '500': + $ref: '#/components/responses/InternalServerError' + '501': + $ref: '#/components/responses/NotImplemented' + '503': + $ref: '#/components/responses/ServiceUnavailable' + '504': + $ref: '#/components/responses/GatewayTimeout' + x-fern-audiences: + - public + x-fern-sdk-method-name: list + x-fern-sdk-group-name: connectors + x-fern-examples: + - code-samples: + - sdk: go + name: Cohere Go SDK + code: "package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(\"<>\"))\n\n\tresp, err := co.Connectors.List(\n\t\tcontext.TODO(),\n\t\t&cohere.ConnectorsListRequest{})\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n" + - sdk: python + name: Sync + code: "import cohere\n\nco = cohere.Client(\"<>\")\nresponse = co.connectors.list()\nprint(response)\n" + - sdk: python + name: Async + code: "import cohere\nimport asyncio\n\nco = cohere.AsyncClient(\"<>\")\n\n\nasync def main():\n response = await co.connectors.list()\n print(response)\n\nasyncio.run(main())\n" + - sdk: java + name: Cohere java SDK + code: "import com.cohere.api.Cohere;\nimport com.cohere.api.types.ListConnectorsResponse;\n\n\npublic class ConnectorsList {\n public static void main(String[] args) {\n Cohere cohere = Cohere.builder().token(\"<>\").clientName(\"snippet\").build();\n\n ListConnectorsResponse list = cohere.connectors().list();\n\n System.out.println(list);\n }\n}\n" + - sdk: typescript + name: Cohere TypeScript SDK + code: "const { CohereClient } = require('cohere-ai');\n\nconst cohere = new CohereClient({\n token: '<>',\n});\n\n(async () => {\n const connectors = await cohere.connectors.list();\n\n console.log(connectors);\n})();\n" + - sdk: curl + name: cURL + code: "curl --request GET \\\n --url https://api.cohere.com/v1/connectors \\\n --header 'accept: application/json' \\\n --header \"Authorization: bearer $CO_API_KEY\"" + post: + tags: + - /connectors + summary: Create a Connector + description: 'Creates a new connector. The connector is tested during registration and will cancel registration when the test is unsuccessful. See [''Creating and Deploying a Connector''](https://docs.cohere.com/docs/creating-and-deploying-a-connector) for more information.' + operationId: create-connector + parameters: + - $ref: '#/components/parameters/RequestSource' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateConnectorRequest' + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/CreateConnectorResponse' + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' + '422': + $ref: '#/components/responses/UnprocessableEntity' + '429': + $ref: '#/components/responses/RateLimit' + '498': + $ref: '#/components/responses/InvalidToken' + '499': + $ref: '#/components/responses/RequestCancelled' + '500': + $ref: '#/components/responses/InternalServerError' + '501': + $ref: '#/components/responses/NotImplemented' + '503': + $ref: '#/components/responses/ServiceUnavailable' + '504': + $ref: '#/components/responses/GatewayTimeout' + x-fern-audiences: + - public + x-fern-sdk-method-name: create + x-fern-sdk-group-name: connectors + x-fern-examples: + - code-samples: + - sdk: go + name: Cohere Go SDK + code: "package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(\"<>\"))\n\n\tresp, err := co.Connectors.Create(\n\t\tcontext.TODO(),\n\t\t&cohere.CreateConnectorRequest{\n\t\t\tName: \"Example connector\",\n\t\t\tUrl: \"https://you-connector-url\",\n\t\t\tServiceAuth: &cohere.CreateConnectorServiceAuth{\n\t\t\t\tToken: \"dummy-connector-token\",\n\t\t\t\tType: \"bearer\",\n\t\t\t},\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n" + - sdk: python + name: Sync + code: "import cohere\n\nco = cohere.Client(\"<>\")\nresponse = co.connectors.create(\n name=\"Example connector\",\n url=\"https://connector-example.com/search\",\n)\nprint(response)\n" + - sdk: python + name: Async + code: "import cohere\nimport asyncio\n\nco = cohere.AsyncClient(\"<>\")\n\n\nasync def main():\n response = await co.connectors.create(\n name=\"Example connector\",\n url=\"https://connector-example.com/search\",\n )\n print(response)\n\nasyncio.run(main())\n" + - sdk: java + name: Cohere java SDK + code: "import com.cohere.api.Cohere;\nimport com.cohere.api.resources.connectors.requests.CreateConnectorRequest;\nimport com.cohere.api.types.CreateConnectorResponse;\n\n\npublic class ConnectorCreate {\n public static void main(String[] args) {\n Cohere cohere = Cohere.builder().token(\"<>\").clientName(\"snippet\").build();\n\n CreateConnectorResponse response = cohere.connectors().create(CreateConnectorRequest.builder()\n .name(\"Example connector\")\n .url(\"https://connector-example.com/search\").build());\n\n System.out.println(response);\n }\n}\n" + - sdk: typescript + name: Cohere TypeScript SDK + code: "const { CohereClient } = require('cohere-ai');\n\nconst cohere = new CohereClient({\n token: '<>',\n});\n\n(async () => {\n const connector = await cohere.connectors.create({\n name: 'test-connector',\n url: 'https://example.com/search',\n description: 'A test connector',\n });\n\n console.log(connector);\n})();\n" + - sdk: curl + name: Curl + code: "curl --request POST \\\n --url https://api.cohere.com/v1/connectors \\\n --header 'accept: application/json' \\\n --header 'content-type: application/json' \\\n --header \"Authorization: bearer $CO_API_KEY\" \\\n --data '{\n \"name\": \"Example connector\",\n \"url\": \"https://connector-example.com/search\"\n }'" + '/v1/connectors/{id}': + get: + tags: + - /connectors + summary: Get a Connector + description: 'Retrieve a connector by ID. See [''Connectors''](https://docs.cohere.com/docs/connectors) for more information.' + operationId: get-connector + parameters: + - name: id + in: path + description: The ID of the connector to retrieve. + required: true + schema: + type: string + x-fern-audiences: + - public + - $ref: '#/components/parameters/RequestSource' + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/GetConnectorResponse' + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' + '422': + $ref: '#/components/responses/UnprocessableEntity' + '429': + $ref: '#/components/responses/RateLimit' + '498': + $ref: '#/components/responses/InvalidToken' + '499': + $ref: '#/components/responses/RequestCancelled' + '500': + $ref: '#/components/responses/InternalServerError' + '501': + $ref: '#/components/responses/NotImplemented' + '503': + $ref: '#/components/responses/ServiceUnavailable' + '504': + $ref: '#/components/responses/GatewayTimeout' + x-fern-audiences: + - public + x-fern-sdk-method-name: get + x-fern-sdk-group-name: connectors + x-fern-examples: + - code-samples: + - sdk: go + name: Cohere Go SDK + code: "package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(\"<>\"))\n\n\tresp, err := co.Connectors.Get(context.TODO(), \"connector_id\")\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n" + - sdk: python + name: Sync + code: "import cohere\n\nco = cohere.Client(\"<>\")\nresponse = co.connectors.get(\"test-id\")\nprint(response)\n" + - sdk: python + name: Async + code: "import cohere\nimport asyncio\n\nco = cohere.AsyncClient(\"<>\")\n\n\nasync def main():\n response = await co.connectors.get(\"test-id\")\n print(response)\n\nasyncio.run(main())\n" + - sdk: java + name: Cohere java SDK + code: "import com.cohere.api.Cohere;\nimport com.cohere.api.types.GetConnectorResponse;\n\n\npublic class ConnectorGet {\n public static void main(String[] args) {\n Cohere cohere = Cohere.builder().token(\"<>\").clientName(\"snippet\").build();\n\n GetConnectorResponse response = cohere.connectors().get(\"test-id\");\n\n System.out.println(response);\n }\n}\n" + - sdk: typescript + name: Cohere TypeScript SDK + code: "const { CohereClient } = require('cohere-ai');\n\nconst cohere = new CohereClient({\n token: '<>',\n});\n\n(async () => {\n const connector = await cohere.connectors.get('connector-id');\n\n console.log(connector);\n})();\n" + - sdk: curl + name: cURL + code: "curl --request GET \\\n --url https://api.cohere.com/v1/connectors/id \\\n --header 'accept: application/json' \\\n --header \"Authorization: bearer $CO_API_KEY\"" + patch: + tags: + - /connectors + summary: Update a Connector + description: 'Update a connector by ID. Omitted fields will not be updated. See [''Managing your Connector''](https://docs.cohere.com/docs/managing-your-connector) for more information.' + operationId: update-connector + parameters: + - name: id + in: path + description: The ID of the connector to update. + required: true + schema: + type: string + x-fern-audiences: + - public + - $ref: '#/components/parameters/RequestSource' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateConnectorRequest' + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateConnectorResponse' + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' + '422': + $ref: '#/components/responses/UnprocessableEntity' + '429': + $ref: '#/components/responses/RateLimit' + '498': + $ref: '#/components/responses/InvalidToken' + '499': + $ref: '#/components/responses/RequestCancelled' + '500': + $ref: '#/components/responses/InternalServerError' + '501': + $ref: '#/components/responses/NotImplemented' + '503': + $ref: '#/components/responses/ServiceUnavailable' + '504': + $ref: '#/components/responses/GatewayTimeout' + x-fern-audiences: + - public + x-fern-sdk-method-name: update + x-fern-sdk-group-name: connectors + x-fern-examples: + - code-samples: + - sdk: go + name: Cohere Go SDK + code: "package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(\"<>\"))\n\n\tresp, err := co.Connectors.Update(\n\t\tcontext.TODO(),\n\t\t\"connector_id\",\n\t\t&cohere.UpdateConnectorRequest{\n\t\t\tName: cohere.String(\"Example connector renamed\"),\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n" + - sdk: python + name: Sync + code: "import cohere\n\nco = cohere.Client(\"<>\")\nresponse = co.connectors.update(\n connector_id=\"test-id\", name=\"new name\", url=\"https://example.com/search\"\n)\nprint(response)\n" + - sdk: python + name: Async + code: "import cohere\nimport asyncio\n\nco = cohere.AsyncClient(\"<>\")\n\n\nasync def main():\n response = await co.connectors.update(\n connector_id=\"test-id\", name=\"new name\", url=\"https://example.com/search\"\n )\n print(response)\n\nasyncio.run(main())\n" + - sdk: java + name: Cohere java SDK + code: "import com.cohere.api.Cohere;\nimport com.cohere.api.resources.connectors.requests.UpdateConnectorRequest;\n\n\npublic class ConnectorPatch {\n public static void main(String[] args) {\n Cohere cohere = Cohere.builder().token(\"<>\").clientName(\"snippet\").build();\n\n cohere.connectors().update(\"test-id\", UpdateConnectorRequest.builder()\n .name(\"new name\")\n .url(\"https://connector-example.com/search\").build());\n }\n}\n" + - sdk: typescript + name: Cohere TypeScript SDK + code: "const { CohereClient } = require('cohere-ai');\n\nconst cohere = new CohereClient({\n token: '<>',\n});\n\n(async () => {\n const connector = await cohere.connectors.update(connector.id, {\n name: 'test-connector-renamed',\n description: 'A test connector renamed',\n });\n\n console.log(connector);\n})();\n" + - sdk: curl + name: Curl + code: "curl --request PATCH \\\n --url https://api.cohere.com/v1/connectors/id \\\n --header 'accept: application/json' \\\n --header 'content-type: application/json' \\\n --header \"Authorization: bearer $CO_API_KEY\" \\\n --data '{\n \"name\": \"new name\",\n \"url\": \"https://example.com/search\"\n }'" + delete: + tags: + - /connectors + summary: Delete a Connector + description: 'Delete a connector by ID. See [''Connectors''](https://docs.cohere.com/docs/connectors) for more information.' + operationId: delete-connector + parameters: + - name: id + in: path + description: The ID of the connector to delete. + required: true + schema: + type: string + x-fern-audiences: + - public + - $ref: '#/components/parameters/RequestSource' + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteConnectorResponse' + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' + '422': + $ref: '#/components/responses/UnprocessableEntity' + '429': + $ref: '#/components/responses/RateLimit' + '498': + $ref: '#/components/responses/InvalidToken' + '499': + $ref: '#/components/responses/RequestCancelled' + '500': + $ref: '#/components/responses/InternalServerError' + '501': + $ref: '#/components/responses/NotImplemented' + '503': + $ref: '#/components/responses/ServiceUnavailable' + '504': + $ref: '#/components/responses/GatewayTimeout' + x-fern-audiences: + - public + x-fern-sdk-method-name: delete + x-fern-sdk-group-name: connectors + x-fern-examples: + - code-samples: + - sdk: go + name: Cohere Go SDK + code: "package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(\"<>\"))\n\n\tresp, err := co.Connectors.Delete(context.TODO(), \"connector_id\")\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n" + - sdk: typescript + name: Cohere TypeScript SDK + code: "const { CohereClient } = require('cohere-ai');\n\nconst cohere = new CohereClient({\n token: '<>',\n});\n\n(async () => {\n await cohere.connectors.delete('connector-id');\n})();\n" + - sdk: python + name: Sync + code: "import cohere\n\nco = cohere.Client(\"<>\")\nco.connectors.delete(\"test-id\")\n" + - sdk: python + name: Async + code: "import cohere\nimport asyncio\n\nco = cohere.AsyncClient(\"<>\")\n\n\nasync def main():\n await co.connectors.delete(\"test-id\")\n\nasyncio.run(main())\n" + - sdk: java + name: Cohere java SDK + code: "import com.cohere.api.Cohere;\n\n\npublic class ConnectorDelete {\n public static void main(String[] args) {\n Cohere cohere = Cohere.builder().token(\"<>\").clientName(\"snippet\").build();\n\n cohere.connectors().delete(\"test-id\");\n }\n}\n\n" + - sdk: curl + name: cURL + code: "curl --request DELETE \\\n --url https://api.cohere.com/v1/connectors/id \\\n --header 'accept: application/json' \\\n --header \"Authorization: bearer $CO_API_KEY\"" + '/v1/connectors/{id}/oauth/authorize': + post: + tags: + - /connectors + summary: Authorize with oAuth + description: 'Authorize the connector with the given ID for the connector oauth app. See [''Connector Authentication''](https://docs.cohere.com/docs/connector-authentication) for more information.' + operationId: oAuthAuthorize-connector + parameters: + - name: id + in: path + description: The ID of the connector to authorize. + required: true + schema: + type: string + x-fern-audiences: + - public + - name: after_token_redirect + in: query + description: The URL to redirect to after the connector has been authorized. + schema: + type: string + x-fern-audiences: + - public + - $ref: '#/components/parameters/RequestSource' + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/OAuthAuthorizeResponse' + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' + '422': + $ref: '#/components/responses/UnprocessableEntity' + '429': + $ref: '#/components/responses/RateLimit' + '498': + $ref: '#/components/responses/InvalidToken' + '499': + $ref: '#/components/responses/RequestCancelled' + '500': + $ref: '#/components/responses/InternalServerError' + '501': + $ref: '#/components/responses/NotImplemented' + '503': + $ref: '#/components/responses/ServiceUnavailable' + '504': + $ref: '#/components/responses/GatewayTimeout' + x-fern-audiences: + - public + x-fern-sdk-method-name: oAuthAuthorize + x-fern-sdk-group-name: connectors + x-fern-examples: + - code-samples: + - sdk: go + name: Cohere Go SDK + code: "package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(\"<>\"))\n\n\tresp, err := co.Connectors.OAuthAuthorize(\n\t\tcontext.TODO(),\n\t\t\"connector_id\",\n\t\t&cohere.ConnectorsOAuthAuthorizeRequest{\n\t\t\tAfterTokenRedirect: cohere.String(\"https://test.com\"),\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n" + - sdk: python + name: Sync + code: "import cohere\n\nco = cohere.Client(\"<>\")\nresponse = co.connectors.o_auth_authorize(\n connector_id=\"test-id\", after_token_redirect=\"https://test.com\"\n)\nprint(response)\n" + - sdk: python + name: Async + code: "import cohere\nimport asyncio\n\nco = cohere.AsyncClient(\"<>\")\n\n\nasync def main():\n response = await co.connectors.o_auth_authorize(\n connector_id=\"test-id\", after_token_redirect=\"https://test.com\"\n )\n print(response)\n\nasyncio.run(main())\n" + - sdk: java + name: Cohere java SDK + code: "import com.cohere.api.Cohere;\nimport com.cohere.api.resources.connectors.requests.ConnectorsOAuthAuthorizeRequest;\nimport com.cohere.api.types.OAuthAuthorizeResponse;\n\n\npublic class ConnectorsIdOauthAuthorizePost {\n public static void main(String[] args) {\n Cohere cohere = Cohere.builder().token(\"<>\").clientName(\"snippet\").build();\n\n OAuthAuthorizeResponse response = cohere.connectors().oAuthAuthorize(\"test-id\", ConnectorsOAuthAuthorizeRequest.builder().afterTokenRedirect(\"https://connector-example.com/search\").build());\n\n System.out.println(response);\n }\n}\n" + - sdk: typescript + name: Cohere TypeScript SDK + code: "const { CohereClient } = require('cohere-ai');\n\nconst cohere = new CohereClient({\n token: '<>',\n});\n\n(async () => {\n const connector = await cohere.connectors.oAuthAuthorize('connector-id', {\n redirect_uri: 'https://example.com/oauth/callback',\n });\n\n console.log(connector);\n})();\n" + - sdk: curl + name: cURL + code: "curl --request POST \\\n --url https://api.cohere.com/v1/connectors/id/oauth/authorize \\\n --header 'accept: application/json' \\\n --header \"Authorization: bearer $CO_API_KEY\"" + '/v1/models/{model}': + get: + tags: + - /models + summary: Get a Model + description: 'Returns the details of a model, provided its name.' + operationId: get-model + parameters: + - name: model + in: path + required: true + schema: + type: string + example: command-r + x-fern-audiences: + - public + - $ref: '#/components/parameters/RequestSource' + responses: + '200': + description: OK + headers: + X-API-Warning: + description: Warning description for incorrect usage of the API + schema: + type: string + x-fern-audiences: + - public + content: + application/json: + schema: + $ref: '#/components/schemas/GetModelResponse' + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' + '422': + $ref: '#/components/responses/UnprocessableEntity' + '429': + $ref: '#/components/responses/RateLimit' + '498': + $ref: '#/components/responses/InvalidToken' + '499': + $ref: '#/components/responses/RequestCancelled' + '500': + $ref: '#/components/responses/InternalServerError' + '501': + $ref: '#/components/responses/NotImplemented' + '503': + $ref: '#/components/responses/ServiceUnavailable' + '504': + $ref: '#/components/responses/GatewayTimeout' + x-fern-sdk-method-name: get + x-fern-sdk-group-name: models + x-fern-audiences: + - public + /v1/models: + get: + tags: + - /models + summary: List Models + description: Returns a list of models available for use. The list contains models from Cohere as well as your fine-tuned models. + operationId: list-models + parameters: + - name: page_size + in: query + description: "Maximum number of models to include in a page\nDefaults to `20`, min value of `1`, max value of `1000`." + schema: + type: number + x-fern-audiences: + - public + - name: page_token + in: query + description: Page token provided in the `next_page_token` field of a previous response. + schema: + type: string + x-fern-audiences: + - public + - name: endpoint + in: query + description: 'When provided, filters the list of models to only those that are compatible with the specified endpoint.' + schema: + $ref: '#/components/schemas/CompatibleEndpoint' + - name: default_only + in: query + description: 'When provided, filters the list of models to only the default model to the endpoint. This parameter is only valid when `endpoint` is provided.' + schema: + type: boolean + x-fern-audiences: + - public + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ListModelsResponse' + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' + '422': + $ref: '#/components/responses/UnprocessableEntity' + '429': + $ref: '#/components/responses/RateLimit' + '498': + $ref: '#/components/responses/InvalidToken' + '499': + $ref: '#/components/responses/RequestCancelled' + '500': + $ref: '#/components/responses/InternalServerError' + '501': + $ref: '#/components/responses/NotImplemented' + '503': + $ref: '#/components/responses/ServiceUnavailable' + '504': + $ref: '#/components/responses/GatewayTimeout' + x-fern-audiences: + - public + x-fern-sdk-method-name: list + x-fern-sdk-group-name: models + x-fern-examples: + - code-samples: + - sdk: python + name: Sync + code: "import cohere\n\nco = cohere.Client(\"<>\")\nresponse = co.models.list()\nprint(response)\n" + - sdk: python + name: Async + code: "import cohere\nimport asyncio\n\nco = cohere.AsyncClient(\"<>\")\n\n\nasync def main():\n response = await co.models.list()\n print(response)\n\nasyncio.run(main())\n" + - sdk: java + name: Cohere java SDK + code: "import com.cohere.api.Cohere;\nimport com.cohere.api.types.ListModelsResponse;\n\n\npublic class ModelsListGet {\n public static void main(String[] args) {\n Cohere cohere = Cohere.builder().token(\"<>\").clientName(\"snippet\").build();\n\n ListModelsResponse response = cohere.models().list();\n\n System.out.println(response);\n }\n}\n" + - sdk: curl + name: cURL + code: "curl --request GET \\\n --url https://api.cohere.com/v1/models \\\n --header 'accept: application/json' \\\n --header \"Authorization: bearer $CO_API_KEY\"" + - sdk: typescript + name: Cohere TypeScript SDK + code: "const { CohereClient } = require('cohere-ai');\n\nconst cohere = new CohereClient({\n token: '<>',\n});\n\n(async () => {\n const models = await cohere.models.list();\n\n console.log(models);\n})();\n" + - sdk: go + name: Cohere Go SDK + code: "package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(\"<>\"))\n\n\tresp, err := co.Models.List(context.TODO(), &cohere.ModelsListRequest{})\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n" + /v1/check-api-key: + post: + summary: Check API key + description: "Checks that the api key in the Authorization header is valid and active\n" + operationId: checkAPIKey + parameters: + - $ref: '#/components/parameters/RequestSource' + responses: + '200': + description: OK + content: + application/json: + schema: + required: + - valid + type: object + properties: + valid: + type: boolean + organization_id: + type: string + owner_id: + type: string + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' + '422': + $ref: '#/components/responses/UnprocessableEntity' + '429': + $ref: '#/components/responses/RateLimit' + '498': + $ref: '#/components/responses/InvalidToken' + '499': + $ref: '#/components/responses/RequestCancelled' + '500': + $ref: '#/components/responses/InternalServerError' + '501': + $ref: '#/components/responses/NotImplemented' + '503': + $ref: '#/components/responses/ServiceUnavailable' + '504': + $ref: '#/components/responses/GatewayTimeout' + x-fern-audiences: + - public + /v1/finetuning/finetuned-models: + get: + tags: + - /finetuning + summary: Lists fine-tuned models. + operationId: ListFinetunedModels + parameters: + - name: page_size + in: query + description: "Maximum number of results to be returned by the server. If 0, defaults to\n50." + schema: + type: integer + format: int32 + - name: page_token + in: query + description: Request a specific page of the list results. + schema: + type: string + - name: order_by + in: query + description: "Comma separated list of fields. For example: \"created_at,name\". The default\nsorting order is ascending. To specify descending order for a field, append\n\" desc\" to the field name. For example: \"created_at desc,name\".\n\nSupported sorting fields:\n - created_at (default)" + schema: + type: string + - $ref: '#/components/parameters/RequestSource' + responses: + '200': + description: A successful response. + content: + application/json: + schema: + $ref: '#/components/schemas/ListFinetunedModelsResponse' + example: + finetuned_models: + - id: fee37446-7fc7-42f9-a026-c6ba2fcc422d + name: prompt-completion-ft + creator_id: 7a317d97-4d05-427d-9396-f31b9fb92c55 + organization_id: 6bdca3d5-3eae-4de0-ac34-786d8063b7ee + settings: + base_model: + name: medium + version: 14.2.0 + base_type: BASE_TYPE_GENERATIVE + strategy: STRATEGY_TFEW + dataset_id: my-dataset-d701tr + hyperparameters: + early_stopping_patience: 6 + early_stopping_threshold: 0.01 + train_batch_size: 16 + train_epochs: 1 + learning_rate: 0.01 + status: STATUS_READY + created_at: '2024-01-17T20:11:42.9071120+00:00' + updated_at: '2024-01-17T20:31:06.4640150+00:00' + completed_at: '2024-01-17T20:31:05.0470660+00:00' + - id: 9d927c5e-7598-4772-98b7-cdf2014e8874 + name: rerank-ft + creator_id: 7a317d97-4d05-427d-9396-f31b9fb92c55 + organization_id: 6bdca3d5-3eae-4de0-ac34-786d8063b7ee + settings: + base_model: + name: english + version: 2.0.0 + base_type: BASE_TYPE_RERANK + strategy: STRATEGY_VANILLA + dataset_id: rerank-dataset-d820xf + status: STATUS_READY + created_at: '2024-01-17T20:17:16.9976080+00:00' + updated_at: '2024-01-17T20:50:11.1487690+00:00' + completed_at: '2024-01-17T20:42:55.8210510+00:00' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '503': + description: Status Service Unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + x-fern-examples: + - code-samples: + - sdk: java + name: Cohere java SDK + code: "package finetuning;\n\nimport com.cohere.api.Cohere;\nimport com.cohere.api.resources.finetuning.finetuning.types.ListFinetunedModelsResponse;\n\n\npublic class ListFinetunedModels {\n public static void main(String[] args) {\n Cohere cohere = Cohere.builder().token(\"<>\").clientName(\"snippet\").build();\n\n ListFinetunedModelsResponse response = cohere.finetuning().listFinetunedModels();\n\n System.out.println(response);\n }\n}\n" + - sdk: go + name: Cohere Go SDK + code: "package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\t\"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(\"<>\"))\n\n\tresp, err := co.Finetuning.ListFinetunedModels(context.TODO(), nil)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp.FinetunedModels)\n}\n" + - sdk: typescript + name: Cohere TypeScript SDK + code: "const { CohereClient } = require('cohere-ai');\n\nconst cohere = new CohereClient({\n token: '<>',\n});\n\n(async () => {\n const finetunedModels = await cohere.finetuning.listFinetunedModels();\n\n console.log(finetunedModels);\n})();\n" + - sdk: python + name: Sync + code: "import cohere\n\nco = cohere.Client(\"<>\")\nresponse = co.finetuning.list_finetuned_models()\nprint(response)\n" + - sdk: python + name: Async + code: "import cohere\nimport asyncio\n\nco = cohere.AsyncClient(\"<>\")\n\n\nasync def main():\n response = await co.finetuning.list_finetuned_models()\n print(response)\n\nasyncio.run(main())\n" + - sdk: curl + name: cURL + code: "curl --request GET \\\n --url https://api.cohere.com/v1/finetuning/finetuned-models \\\n --header 'accept: application/json' \\\n --header \"Authorization: bearer $CO_API_KEY\"\n" + x-fern-sdk-group-name: finetuning + x-fern-audiences: + - public + x-fern-request-name: FinetuningListFinetunedModelsRequest + post: + tags: + - /finetuning + summary: Trains and deploys a fine-tuned model. + operationId: CreateFinetunedModel + parameters: + - $ref: '#/components/parameters/RequestSource' + requestBody: + description: Information about the fine-tuned model. Must contain name and settings. + content: + application/json: + schema: + $ref: '#/components/schemas/FinetunedModel' + example: + name: api-test + settings: + base_model: + base_type: BASE_TYPE_GENERATIVE + dataset_id: my-dataset-id + required: true + responses: + '200': + description: A successful response. + content: + application/json: + schema: + $ref: '#/components/schemas/CreateFinetunedModelResponse' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '503': + description: Status Service Unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + x-fern-examples: + - code-samples: + - sdk: java + name: Cohere java SDK + code: "package finetuning;\n\nimport com.cohere.api.Cohere;\nimport com.cohere.api.resources.finetuning.finetuning.types.*;\n\npublic class CreateFinetunedModel {\n public static void main(String[] args) {\n Cohere cohere = Cohere.builder().token(\"<>\").clientName(\"snippet\").build();\n\n CreateFinetunedModelResponse response = cohere.finetuning().createFinetunedModel(FinetunedModel.builder().name(\"test-finetuned-model\").settings(Settings.builder().baseModel(BaseModel.builder().baseType(BaseType.BASE_TYPE_GENERATIVE).build()).datasetId(\"my-dataset-id\").build()).build());\n\n System.out.println(response);\n }\n}\n\n\n" + - sdk: go + name: Cohere Go SDK + code: "package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\t\"github.com/cohere-ai/cohere-go/v2/client\"\n\t\"github.com/cohere-ai/cohere-go/v2/finetuning\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(\"<>\"))\n\n\tresp, err := co.Finetuning.CreateFinetunedModel(\n\t\tcontext.TODO(),\n\t\t&finetuning.FinetunedModel{\n\t\t\tName: \"test-finetuned-model\",\n\t\t\tSettings: &finetuning.Settings{\n\t\t\t\tDatasetId: \"my-dataset-id\",\n\t\t\t\tBaseModel: &finetuning.BaseModel{\n\t\t\t\t\tBaseType: finetuning.BaseTypeBaseTypeGenerative,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp.FinetunedModel)\n}\n" + - sdk: typescript + name: Cohere TypeScript SDK + code: "const { Cohere, CohereClient } = require('cohere-ai');\n\nconst cohere = new CohereClient({\n token: '<>',\n});\n\n(async () => {\n const finetunedModel = await cohere.finetuning.createFinetunedModel({\n name: 'test-finetuned-model',\n settings: {\n base_model: {\n base_type: Cohere.Finetuning.BaseType.BaseTypeGenerative,\n },\n dataset_id: 'test-dataset-id',\n },\n });\n\n console.log(finetunedModel);\n})();\n" + - sdk: python + name: Sync + code: "from cohere.finetuning import (\n BaseModel,\n FinetunedModel,\n Hyperparameters,\n Settings,\n WandbConfig\n)\nimport cohere\n\nco = cohere.Client(\"<>\")\nhp = Hyperparameters(\n early_stopping_patience=10,\n early_stopping_threshold=0.001,\n train_batch_size=16,\n train_epoch=1,\n learning_rate=0.01,\n)\nwnb_config = WandbConfig(\n project=\"test-project\",\n api_key=\"<>\",\n entity=\"test-entity\",\n)\nfinetuned_model = co.finetuning.create_finetuned_model(\n request=FinetunedModel(\n name=\"test-finetuned-model\",\n settings=Settings(\n base_model=BaseModel(\n base_type=\"BASE_TYPE_CHAT\",\n ),\n dataset_id=\"my-dataset-id\",\n hyperparameters=hp,\n wandb=wnb_config,\n ),\n )\n)\nprint(finetuned_model)\n" + - sdk: python + name: Async + code: "from cohere.finetuning import (\n BaseModel,\n BaseType,\n FinetunedModel,\n Settings,\n)\nimport cohere\nimport asyncio\n\nco = cohere.AsyncClient(\"<>\")\n\n\nasync def main():\n response = await co.finetuning.create_finetuned_model(\n request=FinetunedModel(\n name=\"test-finetuned-model\",\n settings=Settings(\n base_model=BaseModel(\n base_type=BaseType.BASE_TYPE_CHAT,\n ),\n dataset_id=\"my-dataset-id\",\n ),\n )\n )\n print(response)\n\nasyncio.run(main())\n" + - sdk: curl + name: cURL + code: "curl --request POST \\\n --url https://api.cohere.com/v1/finetuning/finetuned-models \\\n --header 'accept: application/json' \\\n --header 'content-type: application/json' \\\n --header \"Authorization: bearer $CO_API_KEY\" \\\n --data '{\n \"name\": \"test-finetuned-model\",\n \"settings\": {\n \"base_model\": {\n \"base_type\": \"BASE_TYPE_GENERATIVE\",\n },\n \"dataset_id\": \"test-dataset-id\"\n }\n }'\n" + x-fern-sdk-group-name: finetuning + x-fern-audiences: + - public + '/v1/finetuning/finetuned-models/{id}': + patch: + tags: + - /finetuning + summary: Updates a fine-tuned model. + operationId: UpdateFinetunedModel + parameters: + - name: id + in: path + description: FinetunedModel ID. + required: true + schema: + type: string + - $ref: '#/components/parameters/RequestSource' + requestBody: + description: Information about the fine-tuned model. Must contain name and settings. + content: + application/json: + schema: + title: Information about the fine-tuned model. Must contain name and settings. + required: + - name + - settings + type: object + properties: + name: + type: string + description: FinetunedModel name (e.g. `foobar`). + creator_id: + type: string + description: User ID of the creator. + readOnly: true + organization_id: + type: string + description: Organization ID. + readOnly: true + settings: + $ref: '#/components/schemas/Settings' + status: + $ref: '#/components/schemas/Status' + created_at: + type: string + description: Creation timestamp. + format: date-time + readOnly: true + updated_at: + type: string + description: Latest update timestamp. + format: date-time + readOnly: true + completed_at: + type: string + description: Timestamp for the completed fine-tuning. + format: date-time + readOnly: true + last_used: + type: string + description: Timestamp for the latest request to this fine-tuned model. + format: date-time + readOnly: true + required: true + responses: + '200': + description: A successful response. + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateFinetunedModelResponse' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '503': + description: Status Service Unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + x-fern-examples: + - code-samples: + - sdk: java + name: Cohere java SDK + code: "package finetuning;\n\nimport com.cohere.api.Cohere;\nimport com.cohere.api.resources.finetuning.finetuning.types.BaseModel;\nimport com.cohere.api.resources.finetuning.finetuning.types.BaseType;\nimport com.cohere.api.resources.finetuning.finetuning.types.Settings;\nimport com.cohere.api.resources.finetuning.finetuning.types.UpdateFinetunedModelResponse;\nimport com.cohere.api.resources.finetuning.requests.FinetuningUpdateFinetunedModelRequest;\n\n\npublic class UpdateFinetunedModel {\n public static void main(String[] args) {\n Cohere cohere = Cohere.builder().token(\"<>\").clientName(\"snippet\").build();\n\n UpdateFinetunedModelResponse response = cohere.finetuning().updateFinetunedModel(\"test-id\", FinetuningUpdateFinetunedModelRequest.builder().name(\"new name\").settings(Settings.builder().baseModel(BaseModel.builder().baseType(BaseType.BASE_TYPE_GENERATIVE).build()).datasetId(\"my-dataset-id\").build()).build());\n\n System.out.println(response);\n }\n}\n" + - sdk: go + name: Cohere Go SDK + code: "package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\t\"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(\"<>\"))\n\n\tresp, err := co.Finetuning.UpdateFinetunedModel(\n\t\tcontext.TODO(),\n\t\t\"test-id\",\n\t\t&cohere.FinetuningUpdateFinetunedModelRequest{\n\t\t\tName: \"new-name\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp.FinetunedModel)\n}\n" + - sdk: typescript + name: Cohere TypeScript SDK + code: "const { CohereClient } = require('cohere-ai');\n\nconst cohere = new CohereClient({\n token: '<>',\n});\n\n(async () => {\n const finetunedModel = await cohere.finetuning.updateFinetunedModel('test-id', {\n name: 'new name',\n });\n\n console.log(finetunedModel);\n})();\n" + - sdk: python + name: Sync + code: "from cohere.finetuning import (\n BaseModel,\n Settings,\n)\nimport cohere\n\nco = cohere.Client(\"<>\")\nfinetuned_model = co.finetuning.update_finetuned_model(\n id=\"test-id\",\n name=\"new name\",\n settings=Settings(\n base_model=BaseModel(\n base_type=\"BASE_TYPE_CHAT\",\n ),\n dataset_id=\"my-dataset-id\",)\n)\n\nprint(finetuned_model)\n" + - sdk: python + name: Async + code: "import cohere\nimport asyncio\n\nco = cohere.AsyncClient(\"<>\")\n\n\nasync def main():\n response = await co.finetuning.update_finetuned_model(id=\"test-id\", name=\"new name\")\n print(response)\n\nasyncio.run(main())\n" + - sdk: curl + name: cURL + code: "curl --request PATCH \\\n --url https://api.cohere.com/v1/finetuning/finetuned-models/test-id \\\n --header 'accept: application/json' \\\n --header 'content-type: application/json' \\\n --header \"Authorization: bearer $CO_API_KEY\" \\\n --data '{ \"name\": \"new name\" }'\n" + x-fern-sdk-group-name: finetuning + x-fern-audiences: + - public + x-fern-request-name: FinetuningUpdateFinetunedModelRequest + get: + tags: + - /finetuning + summary: Returns a fine-tuned model by ID. + operationId: GetFinetunedModel + parameters: + - name: id + in: path + description: The fine-tuned model ID. + required: true + schema: + type: string + - $ref: '#/components/parameters/RequestSource' + responses: + '200': + description: A successful response. + content: + application/json: + schema: + $ref: '#/components/schemas/GetFinetunedModelResponse' + example: + finetuned_model: + id: fee37446-7fc7-42f9-a026-c6ba2fcc422d + name: prompt-completion-ft + creator_id: 7a317d97-4d05-427d-9396-f31b9fb92c55 + organization_id: 6bdca3d5-3eae-4de0-ac34-786d8063b7ee + settings: + base_model: + name: medium + version: 14.2.0 + base_type: BASE_TYPE_GENERATIVE + strategy: STRATEGY_TFEW + dataset_id: my-dataset-d701tr + hyperparameters: + early_stopping_patience: 6 + early_stopping_threshold: 0.01 + train_batch_size: 16 + train_epochs: 1 + learning_rate: 0.01 + status: STATUS_READY + created_at: '2024-01-17T20:11:42.9071120+00:00' + updated_at: '2024-01-17T20:31:06.4640150+00:00' + completed_at: '2024-01-17T20:31:05.0470660+00:00' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '503': + description: Status Service Unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + x-fern-examples: + - code-samples: + - sdk: java + name: Cohere java SDK + code: "package finetuning;\n\nimport com.cohere.api.Cohere;\nimport com.cohere.api.resources.finetuning.finetuning.types.GetFinetunedModelResponse;\n\npublic class GetFinetunedModel {\n public static void main(String[] args) {\n Cohere cohere = Cohere.builder().token(\"<>\").clientName(\"snippet\").build();\n\n GetFinetunedModelResponse response = cohere.finetuning().getFinetunedModel(\"test-id\");\n\n System.out.println(response);\n }\n}\n\n" + - sdk: go + name: Cohere Go SDK + code: "package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\t\"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(\"<>\"))\n\n\tresp, err := co.Finetuning.GetFinetunedModel(context.TODO(), \"test-id\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp.FinetunedModel)\n}\n" + - sdk: typescript + name: Cohere TypeScript SDK + code: "const { CohereClient } = require('cohere-ai');\n\nconst cohere = new CohereClient({\n token: '<>',\n});\n\n(async () => {\n const finetunedModel = await cohere.finetuning.getFinetunedModel('test-id');\n\n console.log(finetunedModel);\n})();\n" + - sdk: python + name: Sync + code: "import cohere\n\nco = cohere.Client(\"<>\")\nresponse = co.finetuning.get_finetuned_model(\"test-id\")\nprint(response)\n" + - sdk: python + name: Async + code: "import cohere\nimport asyncio\n\nco = cohere.AsyncClient(\"<>\")\n\n\nasync def main():\n response = await co.finetuning.get_finetuned_model(\"test-id\")\n print(response)\n\nasyncio.run(main())\n" + - sdk: curl + name: cURL + code: "curl --request GET \\\n --url https://api.cohere.com/v1/finetuning/finetuned-models/test-id \\\n --header 'accept: application/json' \\\n --header \"Authorization: bearer $CO_API_KEY\"\n" + x-fern-sdk-group-name: finetuning + x-fern-audiences: + - public + x-fern-request-name: FinetuningGetFinetunedModelRequest + delete: + tags: + - /finetuning + summary: Deletes a fine-tuned model. + operationId: DeleteFinetunedModel + parameters: + - name: id + in: path + description: The fine-tuned model ID. + required: true + schema: + type: string + - $ref: '#/components/parameters/RequestSource' + responses: + '200': + description: A successful response. + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteFinetunedModelResponse' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '503': + description: Status Service Unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + x-fern-examples: + - code-samples: + - sdk: java + name: Cohere java SDK + code: "package finetuning;\n\nimport com.cohere.api.Cohere;\n\n\npublic class DeleteFinetunedModel {\n public static void main(String[] args) {\n Cohere cohere = Cohere.builder().token(\"<>\").clientName(\"snippet\").build();\n\n cohere.finetuning().deleteFinetunedModel(\"test-id\");\n }\n}\n" + - sdk: go + name: Cohere Go SDK + code: "package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\t\"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(\"<>\"))\n\n\t_, err := co.Finetuning.DeleteFinetunedModel(context.TODO(), \"test-id\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n}\n" + - sdk: typescript + name: Cohere TypeScript SDK + code: "const { CohereClient } = require('cohere-ai');\n\nconst cohere = new CohereClient({\n token: '<>',\n});\n\n(async () => {\n await cohere.finetuning.deleteFinetunedModel('test-id');\n})();\n" + - sdk: python + name: Sync + code: "import cohere\n\nco = cohere.Client(\"<>\")\nco.finetuning.delete_finetuned_model(\"test-id\")\n" + - sdk: python + name: Async + code: "import cohere\nimport asyncio\n\nco = cohere.AsyncClient(\"<>\")\n\n\nasync def main():\n await co.finetuning.delete_finetuned_model(\"test-id\")\n\nasyncio.run(main())\n" + - sdk: curl + name: cURL + code: "curl --request DELETE \\\n --url https://api.cohere.com/v1/finetuning/finetuned-models/test-id \\\n --header 'accept: application/json' \\\n --header \"Authorization: bearer $CO_API_KEY\"\n" + x-fern-sdk-group-name: finetuning + x-fern-audiences: + - public + '/v1/finetuning/finetuned-models/{finetuned_model_id}/events': + get: + tags: + - /finetuning + summary: Retrieves the chronology of statuses the fine-tuned model has been through. + operationId: ListEvents + parameters: + - name: finetuned_model_id + in: path + description: The parent fine-tuned model ID. + required: true + schema: + type: string + - name: page_size + in: query + description: "Maximum number of results to be returned by the server. If 0, defaults to\n50." + schema: + type: integer + format: int32 + - name: page_token + in: query + description: Request a specific page of the list results. + schema: + type: string + - name: order_by + in: query + description: "Comma separated list of fields. For example: \"created_at,name\". The default\nsorting order is ascending. To specify descending order for a field, append\n\" desc\" to the field name. For example: \"created_at desc,name\".\n\nSupported sorting fields:\n - created_at (default)" + schema: + type: string + - $ref: '#/components/parameters/RequestSource' + responses: + '200': + description: A successful response. + content: + application/json: + schema: + $ref: '#/components/schemas/ListEventsResponse' + example: + events: + - user_id: 7a317d97-4d05-427d-9396-f31b9fb92c55 + status: STATUS_QUEUED + created_at: '2024-01-17T20:11:45.2679600+00:00' + - user_id: 7a317d97-4d05-427d-9396-f31b9fb92c55 + status: STATUS_FINETUNING + created_at: '2024-01-17T20:11:46.0008620+00:00' + - user_id: 7a317d97-4d05-427d-9396-f31b9fb92c55 + status: STATUS_DEPLOYING_API + created_at: '2024-01-17T20:31:05.0470660+00:00' + - status: STATUS_READY + created_at: '2024-01-17T20:31:06.9886550+00:00' + total_size: 5 + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '503': + description: Status Service Unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + x-fern-examples: + - code-samples: + - sdk: java + name: Cohere java SDK + code: "package finetuning;\n\nimport com.cohere.api.Cohere;\nimport com.cohere.api.resources.finetuning.finetuning.types.ListEventsResponse;\n\npublic class ListEvents {\n public static void main(String[] args) {\n Cohere cohere = Cohere.builder().token(\"<>\").clientName(\"snippet\").build();\n\n ListEventsResponse response = cohere.finetuning().listEvents(\"test-id\");\n\n System.out.println(response);\n }\n}\n" + - sdk: go + name: Cohere Go SDK + code: "package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\t\"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(\"<>\"))\n\n\tresp, err := co.Finetuning.ListEvents(\n\t\tcontext.TODO(),\n\t\t\"test-finetuned-model-id\",\n\t\tnil,\n\t)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp.Events)\n}\n" + - sdk: typescript + name: Cohere TypeScript SDK + code: "const { CohereClient } = require('cohere-ai');\n\nconst cohere = new CohereClient({\n token: '<>',\n});\n\n(async () => {\n const events = await cohere.finetuning.listEvents('test-finetuned-model-id');\n\n console.log(events);\n})();\n" + - sdk: python + name: Sync + code: "import cohere\n\nco = cohere.Client(\"<>\")\nresponse = co.finetuning.list_events(finetuned_model_id=\"test-id\")\nprint(response)\n" + - sdk: python + name: Async + code: "import cohere\nimport asyncio\n\nco = cohere.AsyncClient(\"<>\")\n\n\nasync def main():\n response = await co.finetuning.list_events(finetuned_model_id=\"test-id\")\n print(response)\n\nasyncio.run(main())\n" + - sdk: curl + name: cURL + code: "curl --request GET \\\n --url https://api.cohere.com/v1/finetuning/finetuned-models/test-id/events \\\n --header 'accept: application/json' \\\n --header \"Authorization: bearer $CO_API_KEY\"\n" + x-fern-sdk-group-name: finetuning + x-fern-audiences: + - public + x-fern-request-name: FinetuningListEventsRequest + '/v1/finetuning/finetuned-models/{finetuned_model_id}/training-step-metrics': + get: + tags: + - /finetuning + summary: Retrieves metrics measured during the training of a fine-tuned model. + operationId: ListTrainingStepMetrics + parameters: + - name: finetuned_model_id + in: path + description: The parent fine-tuned model ID. + required: true + schema: + type: string + - name: page_size + in: query + description: "Maximum number of results to be returned by the server. If 0, defaults to\n50." + schema: + type: integer + format: int32 + - name: page_token + in: query + description: Request a specific page of the list results. + schema: + type: string + - $ref: '#/components/parameters/RequestSource' + responses: + '200': + description: A successful response. + content: + application/json: + schema: + $ref: '#/components/schemas/ListTrainingStepMetricsResponse' + example: + step_metrics: + - created_at: '2024-01-17T20:24:26.9528027+00:00' + metrics: + accuracy: 0.4557601809501648 + cross_entropy: 4.264331340789795 + generation_accuracy: 0.4557601809501648 + generation_cross_entropy: 4.264331340789795 + step: 0 + - created_at: '2024-01-17T20:25:19.3319402+00:00' + step_number: 9 + metrics: + accuracy: 0.7393720149993896 + cross_entropy: 0.7702581286430359 + generation_accuracy: 0.7393720149993896 + generation_cross_entropy: 0.7702581286430359 + step: 9 + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '500': + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '503': + description: Status Service Unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + x-fern-examples: + - code-samples: + - sdk: java + name: Cohere java SDK + code: "package finetuning;\n\nimport com.cohere.api.Cohere;\nimport com.cohere.api.resources.finetuning.finetuning.types.ListTrainingStepMetricsResponse;\n\n\npublic class ListTrainingStepMetrics {\n public static void main(String[] args) {\n Cohere cohere = Cohere.builder().token(\"<>\").clientName(\"snippet\").build();\n\n ListTrainingStepMetricsResponse response = cohere.finetuning().listTrainingStepMetrics(\"test-id\");\n\n System.out.println(response);\n }\n}\n" + - sdk: go + name: Cohere Go SDK + code: "package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\t\"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(\"<>\"))\n\n\tresp, err := co.Finetuning.ListTrainingStepMetrics(\n\t\tcontext.TODO(),\n\t\t\"test-finetuned-model-id\",\n\t\tnil,\n\t)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp.StepMetrics)\n}\n" + - sdk: typescript + name: Cohere TypeScript SDK + code: "const { CohereClient } = require('cohere-ai');\n\nconst cohere = new CohereClient({\n token: '<>',\n});\n\n(async () => {\n const trainingStepMetrics = await cohere.finetuning.listTrainingStepMetrics(\n 'test-finetuned-model-id'\n );\n\n console.log(trainingStepMetrics);\n})();\n" + - sdk: python + name: Sync + code: "import cohere\n\nco = cohere.Client(\"<>\")\ntrain_step_metrics = co.finetuning.list_training_step_metrics(\n finetuned_model_id=\"test-id\")\nprint(train_step_metrics)\n" + - sdk: python + name: Async + code: "import cohere\nimport asyncio\n\nco = cohere.AsyncClient(\"<>\")\n\n\nasync def main():\n response = await co.finetuning.list_train_step_metrics(finetuned_model_id=\"test-id\")\n print(response)\n\nasyncio.run(main())\n" + - sdk: curl + name: cURL + code: "curl --request GET \\\n --url https://api.cohere.com/v1/finetuning/finetuned-models/test-id/training-step-metrics \\\n --header 'accept: application/json' \\\n --header \"Authorization: bearer $CO_API_KEY\"\n" + x-fern-sdk-group-name: finetuning + x-fern-audiences: + - public + x-fern-request-name: FinetuningListTrainingStepMetricsRequest +components: + schemas: + ChatRole: + enum: + - CHATBOT + - SYSTEM + - USER + - TOOL + type: string + description: "One of `CHATBOT`, `SYSTEM`, `TOOL` or `USER` to identify who the message is coming from.\n" + ToolCall: + required: + - name + - parameters + type: object + properties: + name: + type: string + description: Name of the tool to call. + x-fern-audiences: + - public + parameters: + type: object + description: The name and value of the parameters to use when invoking a tool. + x-fern-audiences: + - public + description: "Contains the tool calls generated by the model. Use it to invoke your tools.\n" + ChatMessage: + required: + - role + - message + properties: + role: + $ref: '#/components/schemas/ChatRole' + message: + minLength: 1 + type: string + description: "Contents of the chat message.\n" + x-fern-audiences: + - public + tool_calls: + type: array + items: + $ref: '#/components/schemas/ToolCall' + x-fern-audiences: + - public + description: "Represents a single message in the chat history, excluding the current user turn. It has two properties: `role` and `message`. The `role` identifies the sender (`CHATBOT`, `SYSTEM`, or `USER`), while the `message` contains the text content.\n\nThe chat_history parameter should not be used for `SYSTEM` messages in most cases. Instead, to add a `SYSTEM` role message at the beginning of a conversation, the `preamble` parameter should be used.\n" + ToolResult: + required: + - call + - outputs + type: object + properties: + call: + $ref: '#/components/schemas/ToolCall' + outputs: + minItems: 0 + type: array + items: + type: object + ToolMessage: + required: + - role + properties: + role: + $ref: '#/components/schemas/ChatRole' + tool_results: + type: array + items: + $ref: '#/components/schemas/ToolResult' + description: "Represents tool result in the chat history.\n" + Message: + oneOf: + - $ref: '#/components/schemas/ChatMessage' + - $ref: '#/components/schemas/ToolMessage' + ChatConnector: + required: + - id + type: object + properties: + id: + minLength: 1 + type: string + description: "The identifier of the connector.\n" + x-fern-audiences: + - public + user_access_token: + type: string + description: "When specified, this user access token will be passed to the connector in the Authorization header instead of the Cohere generated one.\n" + x-fern-audiences: + - public + continue_on_failure: + type: boolean + description: "Defaults to `false`.\n\nWhen `true`, the request will continue if this connector returned an error.\n" + x-fern-audiences: + - public + options: + type: object + description: "Provides the connector with different settings at request time. The key/value pairs of this object are specific to each connector.\n\nFor example, the connector `web-search` supports the `site` option, which limits search results to the specified domain.\n" + x-fern-audiences: + - public + description: "The connector used for fetching documents.\n" + ChatDocument: + type: object + properties: + id: + type: string + description: Unique identifier for this document. + x-fern-audiences: + - public + additionalProperties: + type: string + x-fern-audiences: + - public + description: "Relevant information that could be used by the model to generate a more accurate reply.\nThe contents of each document are generally short (under 300 words), and are passed in the form of a\ndictionary of strings. Some suggested keys are \"text\", \"author\", \"date\". Both the key name and the value will be\npassed to the model.\n" + x-fern-type: 'map' + Tool: + required: + - name + - description + type: object + properties: + name: + type: string + description: "The name of the tool to be called. Valid names contain only the characters `a-z`, `A-Z`, `0-9`, `_` and must not begin with a digit.\n" + description: + type: string + description: "The description of what the tool does, the model uses the description to choose when and how to call the function.\n" + parameter_definitions: + type: object + additionalProperties: + required: + - type + type: object + properties: + description: + type: string + description: "The description of the parameter.\n" + type: + type: string + description: "The type of the parameter. Must be a valid Python type.\n" + required: + type: boolean + description: "Denotes whether the parameter is always present (required) or not. Defaults to not required.\n" + default: false + description: "The input parameters of the tool. Accepts a dictionary where the key is the name of the parameter and the value is the parameter spec. Valid parameter names contain only the characters `a-z`, `A-Z`, `0-9`, `_` and must not begin with a digit.\n```\n{\n \"my_param\": {\n \"description\": ,\n \"type\": , // any python data type, such as 'str', 'bool'\n \"required\": \n }\n}\n```\n" + ResponseFormatType: + enum: + - text + - json_object + type: string + description: "Defaults to `\"text\"`.\n\nWhen set to `\"json_object\"`, the model's output will be a valid JSON Object.\n" + x-fern-audiences: + - public + TextResponseFormat: + required: + - type + type: object + properties: + type: + $ref: '#/components/schemas/ResponseFormatType' + x-fern-audiences: + - public + JSONResponseFormat: + required: + - type + type: object + properties: + type: + $ref: '#/components/schemas/ResponseFormatType' + schema: + type: object + description: "A JSON schema object that the output will adhere to. There are some restrictions we have on the schema, refer to [our guide](/docs/structured-outputs-json#schema-constraints) for more information.\nExample (required name and age object):\n```json\n{\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\"type\": \"string\"},\n \"age\": {\"type\": \"integer\"}\n },\n \"required\": [\"name\", \"age\"]\n}\n```\n\n**Note**: This field must not be specified when the `type` is set to `\"text\"`.\n" + x-fern-availability: beta + x-fern-audiences: + - public + ResponseFormat: + oneOf: + - $ref: '#/components/schemas/TextResponseFormat' + - $ref: '#/components/schemas/JSONResponseFormat' + description: "Configuration for forcing the model output to adhere to the specified format. Supported on [Command R](https://docs.cohere.com/docs/command-r), [Command R+](https://docs.cohere.com/docs/command-r-plus) and newer models.\n\nThe model can be forced into outputting JSON objects (with up to 5 levels of nesting) by setting `{ \"type\": \"json_object\" }`.\n\nA [JSON Schema](https://json-schema.org/) can optionally be provided, to ensure a specific structure.\n\n**Note**: When using `{ \"type\": \"json_object\" }` your `message` should always explicitly instruct the model to generate a JSON (eg: _\"Generate a JSON ...\"_) . Otherwise the model may end up getting stuck generating an infinite stream of characters and eventually run out of context length.\n**Limitation**: The parameter is not supported in RAG mode (when any of `connectors`, `documents`, `tools`, `tool_results` are provided).\n" + ChatCitation: + required: + - start + - end + - text + - document_ids + properties: + start: + type: integer + description: "The index of text that the citation starts at, counting from zero. For example, a generation of `Hello, world!` with a citation on `world` would have a start value of `7`. This is because the citation starts at `w`, which is the seventh character.\n" + x-fern-audiences: + - public + end: + type: integer + description: "The index of text that the citation ends after, counting from zero. For example, a generation of `Hello, world!` with a citation on `world` would have an end value of `11`. This is because the citation ends after `d`, which is the eleventh character.\n" + x-fern-audiences: + - public + text: + minLength: 1 + type: string + description: "The text of the citation. For example, a generation of `Hello, world!` with a citation of `world` would have a text value of `world`.\n" + x-fern-audiences: + - public + document_ids: + minItems: 1 + type: array + items: + type: string + x-fern-audiences: + - public + description: "Identifiers of documents cited by this section of the generated reply.\n" + x-fern-audiences: + - public + description: "A section of the generated reply which cites external knowledge.\n" + ChatSearchQuery: + required: + - text + - generation_id + type: object + properties: + text: + type: string + description: "The text of the search query.\n" + x-fern-audiences: + - public + generation_id: + type: string + description: "Unique identifier for the generated search query. Useful for submitting feedback.\n" + format: uuid + x-fern-audiences: + - public + description: "The generated search query. Contains the text of the query and a unique identifier for the query.\n" + ChatSearchResultConnector: + required: + - id + type: object + properties: + id: + minLength: 1 + type: string + description: "The identifier of the connector.\n" + x-fern-audiences: + - public + description: "The connector used for fetching documents.\n" + ChatSearchResult: + required: + - connector + - document_ids + type: object + properties: + search_query: + $ref: '#/components/schemas/ChatSearchQuery' + connector: + $ref: '#/components/schemas/ChatSearchResultConnector' + document_ids: + minLength: 0 + type: array + items: + minLength: 1 + type: string + x-fern-audiences: + - public + description: "Identifiers of documents found by this search query.\n" + x-fern-audiences: + - public + error_message: + type: string + description: "An error message if the search failed.\n" + x-fern-audiences: + - public + continue_on_failure: + type: boolean + description: "Whether a chat request should continue or not if the request to this connector fails.\n" + x-fern-audiences: + - public + FinishReason: + enum: + - COMPLETE + - STOP_SEQUENCE + - ERROR + - ERROR_TOXIC + - ERROR_LIMIT + - USER_CANCEL + - MAX_TOKENS + type: string + ApiMeta: + type: object + properties: + api_version: + required: + - version + type: object + properties: + version: + type: string + x-fern-audiences: + - public + is_deprecated: + type: boolean + x-fern-audiences: + - public + is_experimental: + type: boolean + x-fern-audiences: + - public + x-fern-audiences: + - public + billed_units: + type: object + properties: + input_tokens: + type: number + description: "The number of billed input tokens.\n" + x-fern-audiences: + - public + output_tokens: + type: number + description: "The number of billed output tokens.\n" + x-fern-audiences: + - public + search_units: + type: number + description: "The number of billed search units.\n" + x-fern-audiences: + - public + classifications: + type: number + description: "The number of billed classifications units.\n" + x-fern-audiences: + - public + x-fern-audiences: + - public + tokens: + type: object + properties: + input_tokens: + type: number + description: "The number of tokens used as input to the model.\n" + x-fern-audiences: + - public + output_tokens: + type: number + description: "The number of tokens produced by the model.\n" + x-fern-audiences: + - public + x-fern-audiences: + - public + warnings: + type: array + items: + type: string + x-fern-audiences: + - public + x-fern-audiences: + - public + NonStreamedChatResponse: + required: + - text + properties: + text: + minLength: 1 + type: string + description: Contents of the reply generated by the model. + x-fern-audiences: + - public + generation_id: + type: string + description: Unique identifier for the generated reply. Useful for submitting feedback. + format: uuid + x-fern-audiences: + - public + citations: + minItems: 0 + type: array + items: + $ref: '#/components/schemas/ChatCitation' + description: Inline citations for the generated reply. + x-fern-audiences: + - public + documents: + minItems: 0 + type: array + items: + $ref: '#/components/schemas/ChatDocument' + description: Documents seen by the model when generating the reply. + x-fern-audiences: + - public + is_search_required: + type: boolean + description: Denotes that a search for documents is required during the RAG flow. + x-fern-audiences: + - public + search_queries: + type: array + items: + $ref: '#/components/schemas/ChatSearchQuery' + description: 'Generated search queries, meant to be used as part of the RAG flow.' + x-fern-audiences: + - public + search_results: + minItems: 0 + type: array + items: + $ref: '#/components/schemas/ChatSearchResult' + description: Documents retrieved from each of the conducted searches. + x-fern-audiences: + - public + finish_reason: + $ref: '#/components/schemas/FinishReason' + tool_calls: + type: array + items: + $ref: '#/components/schemas/ToolCall' + x-fern-audiences: + - public + chat_history: + minItems: 0 + type: array + items: + $ref: '#/components/schemas/Message' + description: "A list of previous messages between the user and the model, meant to give the model conversational context for responding to the user's `message`.\n" + x-fern-audiences: + - public + meta: + $ref: '#/components/schemas/ApiMeta' + x-fern-type-name: NonStreamedChatResponse + ChatStreamEvent: + required: + - event_type + properties: + event_type: + enum: + - stream-start + - search-queries-generation + - search-results + - text-generation + - citation-generation + - stream-end + type: string + x-fern-audiences: + - public + ChatStreamStartEvent: + allOf: + - $ref: '#/components/schemas/ChatStreamEvent' + - required: + - generation_id + type: object + properties: + generation_id: + minLength: 1 + type: string + description: "Unique identifier for the generated reply. Useful for submitting feedback.\n" + format: uuid + x-fern-audiences: + - public + ChatSearchQueriesGenerationEvent: + allOf: + - $ref: '#/components/schemas/ChatStreamEvent' + - required: + - search_queries + type: object + properties: + search_queries: + type: array + items: + $ref: '#/components/schemas/ChatSearchQuery' + description: 'Generated search queries, meant to be used as part of the RAG flow.' + x-fern-audiences: + - public + ChatSearchResultsEvent: + allOf: + - $ref: '#/components/schemas/ChatStreamEvent' + - type: object + properties: + search_results: + minItems: 0 + type: array + items: + $ref: '#/components/schemas/ChatSearchResult' + description: "Conducted searches and the ids of documents retrieved from each of them.\n" + x-fern-audiences: + - public + documents: + minItems: 0 + type: array + items: + $ref: '#/components/schemas/ChatDocument' + description: "Documents fetched from searches or provided by the user.\n" + x-fern-audiences: + - public + ChatTextGenerationEvent: + allOf: + - $ref: '#/components/schemas/ChatStreamEvent' + - required: + - text + type: object + properties: + text: + minLength: 1 + type: string + description: "The next batch of text generated by the model.\n" + x-fern-audiences: + - public + ChatCitationGenerationEvent: + allOf: + - $ref: '#/components/schemas/ChatStreamEvent' + - required: + - citations + type: object + properties: + citations: + type: array + items: + $ref: '#/components/schemas/ChatCitation' + description: "Citations for the generated reply.\n" + x-fern-audiences: + - public + ChatToolCallsGenerationEvent: + allOf: + - $ref: '#/components/schemas/ChatStreamEvent' + - required: + - tool_calls + type: object + properties: + text: + type: string + description: "The text generated related to the tool calls generated\n" + x-fern-audiences: + - public + tool_calls: + type: array + items: + $ref: '#/components/schemas/ToolCall' + x-fern-audiences: + - public + ChatStreamEndEvent: + allOf: + - $ref: '#/components/schemas/ChatStreamEvent' + - required: + - finish_reason + - response + type: object + properties: + finish_reason: + enum: + - COMPLETE + - ERROR_LIMIT + - MAX_TOKENS + - ERROR + - ERROR_TOXIC + type: string + description: "- `COMPLETE` - the model sent back a finished reply\n- `ERROR_LIMIT` - the reply was cut off because the model reached the maximum number of tokens for its context length\n- `MAX_TOKENS` - the reply was cut off because the model reached the maximum number of tokens specified by the max_tokens parameter\n- `ERROR` - something went wrong when generating the reply\n- `ERROR_TOXIC` - the model generated a reply that was deemed toxic\n" + x-fern-audiences: + - public + response: + $ref: '#/components/schemas/NonStreamedChatResponse' + ToolCallDelta: + type: object + properties: + name: + type: string + description: "Name of the tool call\n" + x-fern-audiences: + - public + index: + type: number + description: "Index of the tool call generated\n" + x-fern-audiences: + - public + parameters: + type: string + description: "Chunk of the tool parameters\n" + x-fern-audiences: + - public + text: + type: string + description: "Chunk of the tool plan text\n" + x-fern-audiences: + - public + description: "Contains the chunk of the tool call generation in the stream.\n" + ChatToolCallsChunkEvent: + allOf: + - $ref: '#/components/schemas/ChatStreamEvent' + - required: + - tool_call_delta + type: object + properties: + tool_call_delta: + $ref: '#/components/schemas/ToolCallDelta' + StreamedChatResponse: + oneOf: + - $ref: '#/components/schemas/ChatStreamStartEvent' + - $ref: '#/components/schemas/ChatSearchQueriesGenerationEvent' + - $ref: '#/components/schemas/ChatSearchResultsEvent' + - $ref: '#/components/schemas/ChatTextGenerationEvent' + - $ref: '#/components/schemas/ChatCitationGenerationEvent' + - $ref: '#/components/schemas/ChatToolCallsGenerationEvent' + - $ref: '#/components/schemas/ChatStreamEndEvent' + - $ref: '#/components/schemas/ChatToolCallsChunkEvent' + description: StreamedChatResponse is returned in streaming mode (specified with `stream=True` in the request). + x-fern-type-name: StreamedChatResponse + TextContent: + required: + - type + - text + type: object + properties: + type: + enum: + - text + type: string + text: + type: string + description: Text content of the message. + x-fern-sdk-group-name: v2 + Content: + oneOf: + - $ref: '#/components/schemas/TextContent' + description: A Content block which contains information about the content type and the content itself. + x-fern-sdk-group-name: v2 + UserMessage: + required: + - role + - content + type: object + properties: + role: + enum: + - user + type: string + content: + oneOf: + - type: string + - type: array + items: + $ref: '#/components/schemas/Content' + description: "The content of the message. This can be a string or a list of content blocks.\nIf a string is provided, it will be treated as a text content block.\n" + documents: + minItems: 0 + type: array + items: + $ref: '#/components/schemas/ChatDocument' + description: Documents seen by the model when generating the reply. + description: A message from the user. + x-fern-sdk-group-name: v2 + ToolCall-2: + type: object + properties: + id: + type: string + type: + enum: + - function + type: string + function: + type: object + properties: + name: + type: string + arguments: + type: string + description: A array of tool calls to be made. + x-fern-sdk-group-name: v2 + ToolSource: + type: object + properties: + id: + type: string + description: The unique identifier of the document + tool_output: + type: object + x-fern-sdk-group-name: v2 + DocumentSource: + type: object + properties: + id: + type: string + description: The unique identifier of the document + document: + type: object + description: A document source object containing the unique identifier of the document and the document itself. + x-fern-sdk-group-name: v2 + Source: + oneOf: + - $ref: '#/components/schemas/ToolSource' + - $ref: '#/components/schemas/DocumentSource' + description: A source object containing information about the source of the data cited. + x-fern-sdk-group-name: v2 + Citation: + type: object + properties: + start: + type: integer + end: + type: integer + text: + type: string + sources: + type: array + items: + $ref: '#/components/schemas/Source' + description: Citation information containing sources and the text cited. + x-fern-sdk-group-name: v2 + AssistantMessage: + required: + - role + type: object + properties: + role: + enum: + - assistant + type: string + tool_calls: + type: array + items: + $ref: '#/components/schemas/ToolCall-2' + tool_plan: + type: string + content: + oneOf: + - type: string + - type: array + items: + oneOf: + - $ref: '#/components/schemas/TextContent' + citations: + type: array + items: + $ref: '#/components/schemas/Citation' + description: A message from the assistant role can contain text and tool call information. + x-fern-sdk-group-name: v2 + SystemMessage: + required: + - role + - content + type: object + properties: + role: + enum: + - system + type: string + content: + oneOf: + - type: string + - type: array + items: + oneOf: + - $ref: '#/components/schemas/TextContent' + description: A message from the system. + x-fern-sdk-group-name: v2 + ToolContent: + required: + - type + - output + type: object + properties: + type: + enum: + - tool_result_object + type: string + output: + type: object + description: Tool content result object + x-fern-sdk-group-name: v2 + ToolMessage-2: + required: + - role + - tool_call_id + - tool_content + type: object + properties: + role: + enum: + - tool + type: string + tool_call_id: + type: string + tool_content: + type: array + items: + oneOf: + - $ref: '#/components/schemas/ToolContent' + description: A message from the system. + x-fern-sdk-group-name: v2 + ChatMessage-2: + oneOf: + - $ref: '#/components/schemas/UserMessage' + - $ref: '#/components/schemas/AssistantMessage' + - $ref: '#/components/schemas/SystemMessage' + - $ref: '#/components/schemas/ToolMessage-2' + description: Represents a single message in the chat history from a given role. + discriminator: + propertyName: role + mapping: + user: '#/components/schemas/UserMessage' + assistant: '#/components/schemas/AssistantMessage' + system: '#/components/schemas/SystemMessage' + tool: '#/components/schemas/ToolMessage-2' + x-fern-sdk-group-name: v2 + ChatMessages: + type: array + items: + $ref: '#/components/schemas/ChatMessage-2' + description: "A list of chat messages in chronological order, representing a conversation between the user and the model.\n\nMessages can be from `User`, `Assistant`, `Tool` and `System` roles. Learn more about messages and roles in [the Chat API guide](https://docs.cohere.com/docs/chat-api).\n" + x-fern-sdk-group-name: v2 + Tool-2: + type: object + properties: + type: + enum: + - function + type: string + function: + type: object + properties: + name: + type: string + description: The name of the function. + description: + type: string + description: The description of the function. + parameters: + type: object + description: The parameters of the function as a JSON schema. + description: The function to be executed. + x-fern-sdk-group-name: v2 + JSONResponseFormat-2: + required: + - type + type: object + properties: + type: + $ref: '#/components/schemas/ResponseFormatType' + json_schema: + type: object + description: "[BETA] A JSON schema object that the output will adhere to. There are some restrictions we have on the schema, refer to [our guide](/docs/structured-outputs-json#schema-constraints) for more information.\nExample (required name and age object):\n```json\n{\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\"type\": \"string\"},\n \"age\": {\"type\": \"integer\"}\n },\n \"required\": [\"name\", \"age\"]\n}\n```\n\n**Note**: This field must not be specified when the `type` is set to `\"text\"`.\n" + x-fern-audiences: + - public + ResponseFormat-2: + oneOf: + - $ref: '#/components/schemas/TextResponseFormat' + - $ref: '#/components/schemas/JSONResponseFormat-2' + description: "Configuration for forcing the model output to adhere to the specified format. Supported on [Command R](https://docs.cohere.com/docs/command-r), [Command R+](https://docs.cohere.com/docs/command-r-plus) and newer models.\n\nThe model can be forced into outputting JSON objects (with up to 5 levels of nesting) by setting `{ \"type\": \"json_object\" }`.\n\nA [JSON Schema](https://json-schema.org/) can optionally be provided, to ensure a specific structure.\n\n**Note**: When using `{ \"type\": \"json_object\" }` your `message` should always explicitly instruct the model to generate a JSON (eg: _\"Generate a JSON ...\"_) . Otherwise the model may end up getting stuck generating an infinite stream of characters and eventually run out of context length.\n**Limitation**: The parameter is not supported in RAG mode (when any of `connectors`, `documents`, `tools`, `tool_results` are provided).\n" + discriminator: + propertyName: type + mapping: + text: '#/components/schemas/TextResponseFormat' + json_object: '#/components/schemas/JSONResponseFormat-2' + ChatFinishReason: + enum: + - complete + - stop_sequence + - max_tokens + - tool_call + - error + - content_blocked + - error_limit + type: string + description: The reason a chat request has finished. + x-fern-sdk-group-name: v2 + AssistantMessageResponse: + required: + - role + type: object + properties: + role: + enum: + - assistant + type: string + tool_calls: + type: array + items: + $ref: '#/components/schemas/ToolCall-2' + tool_plan: + type: string + content: + type: array + items: + oneOf: + - $ref: '#/components/schemas/TextContent' + discriminator: + propertyName: type + mapping: + text: '#/components/schemas/TextContent' + citations: + type: array + items: + $ref: '#/components/schemas/Citation' + description: A message from the assistant role can contain text and tool call information. + x-fern-sdk-group-name: v2 + Usage: + type: object + properties: + billed_units: + type: object + properties: + input_tokens: + type: number + description: "The number of billed input tokens.\n" + output_tokens: + type: number + description: "The number of billed output tokens.\n" + search_units: + type: number + description: "The number of billed search units.\n" + classifications: + type: number + description: "The number of billed classifications units.\n" + tokens: + type: object + properties: + input_tokens: + type: number + description: "The number of tokens used as input to the model.\n" + output_tokens: + type: number + description: "The number of tokens produced by the model.\n" + x-fern-sdk-group-name: v2 + NonStreamedChatResponse-2: + required: + - id + - finish_reason + - messages + properties: + id: + type: string + description: Unique identifier for the generated reply. Useful for submitting feedback. + finish_reason: + $ref: '#/components/schemas/ChatFinishReason' + message: + $ref: '#/components/schemas/AssistantMessageResponse' + usage: + $ref: '#/components/schemas/Usage' + x-fern-sdk-group-name: v2 + ChatStreamEventType: + required: + - type + properties: + type: + enum: + - message-start + - content-start + - content-delta + - content-end + - tool-call-start + - tool-call-delta + - tool-call-end + - tool-plan-delta + - citation-start + - citation-end + - message-end + type: string + description: The streamed event types + x-fern-sdk-group-name: v2 + ChatMessageStartEvent: + allOf: + - $ref: '#/components/schemas/ChatStreamEventType' + - type: object + properties: + id: + type: string + description: Unique identifier for the generated reply. + delta: + type: object + properties: + message: + type: object + properties: + role: + enum: + - assistant + type: string + description: The role of the message. + description: A streamed event which signifies that a stream has started. + x-fern-sdk-group-name: v2 + ChatContentStartEvent: + allOf: + - $ref: '#/components/schemas/ChatStreamEventType' + - type: object + properties: + index: + type: integer + delta: + type: object + properties: + message: + type: object + properties: + content: + type: object + properties: + text: + type: string + type: + enum: + - text + type: string + description: A streamed delta event which signifies that a new content block has started. + x-fern-sdk-group-name: v2 + ChatContentDeltaEvent: + allOf: + - $ref: '#/components/schemas/ChatStreamEventType' + - type: object + properties: + index: + type: integer + delta: + type: object + properties: + message: + type: object + properties: + content: + type: object + properties: + text: + type: string + description: A streamed delta event which contains a delta of chat text content. + x-fern-sdk-group-name: v2 + ChatContentEndEvent: + allOf: + - $ref: '#/components/schemas/ChatStreamEventType' + - type: object + properties: + index: + type: integer + description: A streamed delta event which signifies that the content block has ended. + x-fern-sdk-group-name: v2 + ChatToolPlanDeltaEvent: + allOf: + - $ref: '#/components/schemas/ChatStreamEventType' + - type: object + properties: + delta: + type: object + properties: + tool_plan: + type: string + description: A streamed event which contains a delta of tool plan text. + x-fern-sdk-group-name: v2 + ChatToolCallStartEvent: + allOf: + - $ref: '#/components/schemas/ChatStreamEventType' + - type: object + properties: + index: + type: integer + delta: + type: object + properties: + tool_call: + type: object + properties: + id: + type: string + type: + enum: + - function + type: string + function: + type: object + properties: + name: + type: string + arguments: + type: string + description: A streamed event delta which signifies a tool call has started streaming. + x-fern-sdk-group-name: v2 + ChatToolCallDeltaEvent: + allOf: + - $ref: '#/components/schemas/ChatStreamEventType' + - type: object + properties: + index: + type: integer + delta: + type: object + properties: + tool_call: + type: object + properties: + function: + type: object + properties: + arguments: + type: string + description: A streamed event delta which signifies a delta in tool call arguments. + x-fern-sdk-group-name: v2 + ChatToolCallEndEvent: + allOf: + - $ref: '#/components/schemas/ChatStreamEventType' + - type: object + properties: + index: + type: integer + description: A streamed event delta which signifies a tool call has finished streaming. + x-fern-sdk-group-name: v2 + CitationStartEvent: + allOf: + - $ref: '#/components/schemas/ChatStreamEventType' + - type: object + properties: + index: + type: integer + delta: + type: object + properties: + message: + type: object + properties: + citations: + $ref: '#/components/schemas/Citation' + description: A streamed event which signifies a citation has been created. + CitationEndEvent: + allOf: + - $ref: '#/components/schemas/ChatStreamEventType' + - type: object + properties: + index: + type: integer + description: A streamed event which signifies a citation has finished streaming. + ChatMessageEndEvent: + allOf: + - $ref: '#/components/schemas/ChatStreamEventType' + - type: object + properties: + id: + type: string + delta: + type: object + properties: + finish_reason: + $ref: '#/components/schemas/ChatFinishReason' + usage: + $ref: '#/components/schemas/Usage' + description: A streamed event which signifies that the chat message has ended. + x-fern-sdk-group-name: v2 + StreamedChatResponse-2: + oneOf: + - $ref: '#/components/schemas/ChatMessageStartEvent' + - $ref: '#/components/schemas/ChatContentStartEvent' + - $ref: '#/components/schemas/ChatContentDeltaEvent' + - $ref: '#/components/schemas/ChatContentEndEvent' + - $ref: '#/components/schemas/ChatToolPlanDeltaEvent' + - $ref: '#/components/schemas/ChatToolCallStartEvent' + - $ref: '#/components/schemas/ChatToolCallDeltaEvent' + - $ref: '#/components/schemas/ChatToolCallEndEvent' + - $ref: '#/components/schemas/ChatMessageEndEvent' + description: StreamedChatResponse is returned in streaming mode (specified with `stream=True` in the request). + x-fern-sdk-group-name: v2 + SingleGeneration: + required: + - text + - id + type: object + properties: + id: + type: string + x-fern-audiences: + - public + text: + type: string + x-fern-audiences: + - public + index: + type: integer + description: Refers to the nth generation. Only present when `num_generations` is greater than zero. + x-fern-audiences: + - public + likelihood: + type: number + x-fern-audiences: + - public + token_likelihoods: + type: array + items: + required: + - id + - token + - likelihood + type: object + properties: + token: + type: string + x-fern-audiences: + - public + likelihood: + type: number + x-fern-audiences: + - public + x-fern-audiences: + - public + description: 'Only returned if `return_likelihoods` is set to `GENERATION` or `ALL`. The likelihood refers to the average log-likelihood of the entire specified string, which is useful for [evaluating the performance of your model](likelihood-eval), especially if you''ve created a [custom model](/docs/training-custom-models). Individual token likelihoods provide the log-likelihood of each token. The first token will not have a likelihood.' + x-fern-audiences: + - public + Generation: + required: + - id + - generations + type: object + properties: + id: + type: string + x-fern-audiences: + - public + prompt: + type: string + description: Prompt used for generations. + x-fern-audiences: + - public + generations: + type: array + items: + $ref: '#/components/schemas/SingleGeneration' + description: List of generated results + x-fern-audiences: + - public + meta: + $ref: '#/components/schemas/ApiMeta' + x-fern-type-name: Generation + GenerateStreamEvent: + required: + - event_type + properties: + event_type: + enum: + - text-generation + - stream-end + - stream-error + type: string + GenerateStreamText: + allOf: + - $ref: '#/components/schemas/GenerateStreamEvent' + - required: + - is_finished + - text + type: object + properties: + text: + type: string + description: A segment of text of the generation. + index: + type: integer + description: 'Refers to the nth generation. Only present when `num_generations` is greater than zero, and only when text responses are being streamed.' + is_finished: + type: boolean + SingleGenerationInStream: + required: + - text + - id + - finish_reason + type: object + properties: + id: + type: string + x-fern-audiences: + - public + text: + type: string + description: Full text of the generation. + x-fern-audiences: + - public + index: + type: integer + description: Refers to the nth generation. Only present when `num_generations` is greater than zero. + x-fern-audiences: + - public + finish_reason: + $ref: '#/components/schemas/FinishReason' + GenerateStreamEnd: + allOf: + - $ref: '#/components/schemas/GenerateStreamEvent' + - required: + - is_finished + - finish_response + - response + type: object + properties: + is_finished: + type: boolean + x-fern-audiences: + - public + finish_reason: + $ref: '#/components/schemas/FinishReason' + response: + required: + - id + type: object + properties: + id: + type: string + x-fern-audiences: + - public + prompt: + type: string + x-fern-audiences: + - public + generations: + type: array + items: + $ref: '#/components/schemas/SingleGenerationInStream' + x-fern-audiences: + - public + x-fern-audiences: + - public + GenerateStreamError: + allOf: + - $ref: '#/components/schemas/GenerateStreamEvent' + - required: + - is_finished + - finish_reason + - err + type: object + properties: + index: + type: integer + description: Refers to the nth generation. Only present when `num_generations` is greater than zero. + x-fern-audiences: + - public + is_finished: + type: boolean + x-fern-audiences: + - public + finish_reason: + $ref: '#/components/schemas/FinishReason' + err: + type: string + description: Error message + x-fern-audiences: + - public + GenerateStreamedResponse: + oneOf: + - $ref: '#/components/schemas/GenerateStreamText' + - $ref: '#/components/schemas/GenerateStreamEnd' + - $ref: '#/components/schemas/GenerateStreamError' + description: Response in content type stream when `stream` is `true` in the request parameters. Generation tokens are streamed with the GenerationStream response. The final response is of type GenerationFinalResponse. + x-fern-type-name: GenerateStreamedResponse + EmbedInputType: + enum: + - search_document + - search_query + - classification + - clustering + type: string + description: "Specifies the type of input passed to the model. Required for embedding models v3 and higher.\n\n- `\"search_document\"`: Used for embeddings stored in a vector database for search use-cases.\n- `\"search_query\"`: Used for embeddings of search queries run against a vector DB to find relevant documents.\n- `\"classification\"`: Used for embeddings passed through a text classifier.\n- `\"clustering\"`: Used for the embeddings run through a clustering algorithm.\n" + EmbeddingType: + enum: + - float + - int8 + - uint8 + - binary + - ubinary + type: string + writeOnly: true + x-fern-audiences: + - public + EmbedFloatsResponse: + required: + - id + - embeddings + - texts + - api_version + type: object + properties: + response_type: + enum: + - embeddings_floats + - embeddings_by_type + type: string + x-fern-audiences: + - public + id: + type: string + x-fern-audiences: + - public + embeddings: + type: array + items: + type: array + items: + type: number + x-fern-audiences: + - public + readOnly: true + x-fern-audiences: + - public + description: 'An array of embeddings, where each embedding is an array of floats. The length of the `embeddings` array will be the same as the length of the original `texts` array.' + readOnly: true + x-fern-audiences: + - public + texts: + type: array + items: + type: string + x-fern-audiences: + - public + description: The text entries for which embeddings were returned. + x-fern-audiences: + - public + meta: + $ref: '#/components/schemas/ApiMeta' + x-examples: + Example: + value: + id: bc57846a-3e56-4327-8acc-588ca1a37b8a + texts: + - hello world + embeddings: + - + - -0.039520264 + - -0.04574585 + - -0.08807373 + - -0.084106445 + - -0.009742737 + - -0.0090408325 + - -0.048187256 + - 0.07128906 + - 0.010688782 + - 0.016067505 + - -0.02822876 + - 0.036224365 + - 0.037994385 + - -0.041992188 + - 0.052124023 + - -0.027297974 + - 0.048309326 + - 0.017410278 + - 0.004283905 + - -0.0058555603 + - -0.012992859 + - 0.023040771 + - 0.00121212 + - 0.02078247 + - 0.04827881 + - -0.021530151 + - 0.017807007 + - 0.0075531006 + - -0.047912598 + - -0.042633057 + - 0.0016927719 + - 0.04547119 + - 0.0143585205 + - 0.022354126 + - 0.0017910004 + - 0.048614502 + - -0.02609253 + - 0.007850647 + - 0.00907135 + - 0.0035381317 + - 0.015289307 + - -0.008132935 + - 0.016296387 + - -0.02859497 + - -0.023712158 + - 0.008857727 + - -0.04309082 + - -0.025115967 + - 0.032928467 + - -0.029663086 + - 0.00434494 + - -0.022338867 + - -0.004371643 + - -0.0075035095 + - -0.009529114 + - 0.0038223267 + - -0.06048584 + - -0.018127441 + - 0.010131836 + - 0.08380127 + - 0.03652954 + - 0.0030384064 + - 0.006034851 + - -0.006286621 + - 0.016784668 + - -0.00308609 + - 0.01612854 + - 0.011413574 + - 0.022491455 + - 0.02482605 + - 0.0047683716 + - 0.012245178 + - -0.017593384 + - -0.023254395 + - -0.012641907 + - 0.030181885 + - -0.015365601 + - 0.031021118 + - 0.015144348 + - 0.016708374 + - 0.02180481 + - 0.010765076 + - -0.015586853 + - -0.05819702 + - 0.02128601 + - -0.021713257 + - -0.013320923 + - -0.0064849854 + - -0.001657486 + - -0.030715942 + - -0.008666992 + - 0.060668945 + - -0.0011959076 + - -0.032104492 + - -0.057006836 + - -0.015655518 + - -0.014015198 + - 0.036987305 + - 0.011016846 + - 0.037475586 + - -0.015319824 + - -0.016479492 + - 0.0030403137 + - -0.028167725 + - -0.0067825317 + - -0.00894928 + - -0.026107788 + - 0.010231018 + - 0.031707764 + - 0.050354004 + - -0.016220093 + - 0.04345703 + - -0.008888245 + - -0.0037784576 + - -0.034576416 + - 0.002565384 + - -0.0018634796 + - 0.013954163 + - 0.012062073 + - 0.046813965 + - 0.033081055 + - 0.028778076 + - 0.0051231384 + - 0.022094727 + - -0.021881104 + - -0.009788513 + - -0.04647827 + - -0.025482178 + - 0.066833496 + - -0.040863037 + - -0.019714355 + - 0.06866455 + - -0.07519531 + - -0.045532227 + - -0.020507812 + - 0.021331787 + - 0.036376953 + - -0.034210205 + - 0.017669678 + - 0.0155181885 + - 0.047698975 + - -0.010368347 + - 0.010879517 + - 0.016555786 + - -0.028076172 + - 0.03225708 + - -0.0056152344 + - -0.020690918 + - 0.00011438131 + - -0.021011353 + - -0.04425049 + - -0.029922485 + - -0.0014362335 + - 0.013618469 + - 0.011260986 + - 0.017532349 + - -0.043426514 + - 0.012557983 + - 0.026748657 + - 0.039154053 + - -0.030944824 + - 0.024169922 + - 0.06573486 + - -0.03817749 + - -0.025314331 + - -0.039794922 + - -0.050445557 + - -0.0020828247 + - -0.0010194778 + - 0.01725769 + - 0.0017976761 + - 0.029067993 + - 0.0115356445 + - 0.005214691 + - 0.0066604614 + - -0.014801025 + - -0.033172607 + - 0.023956299 + - 0.008865356 + - 0.09539795 + - 0.062286377 + - -0.0076408386 + - -0.035125732 + - 0.09082031 + - -0.015350342 + - -0.015625 + - -0.0090789795 + - -0.01876831 + - 0.05239868 + - -0.010406494 + - 0.05078125 + - -0.013694763 + - -0.07244873 + - 0.018539429 + - -0.016983032 + - -0.03353882 + - 0.01739502 + - 0.004055023 + - -0.010147095 + - -0.0027599335 + - -0.002714157 + - -0.0107040405 + - 0.021438599 + - -0.029525757 + - 0.01902771 + - -0.025909424 + - 0.0008072853 + - 0.026672363 + - 0.0019044876 + - 0.016937256 + - -0.018814087 + - -0.03668213 + - 0.03338623 + - -0.09240723 + - -0.024765015 + - -0.019378662 + - -0.051757812 + - 0.050109863 + - 0.018859863 + - 0.01687622 + - 0.020111084 + - -0.041534424 + - 0.009559631 + - -0.018859863 + - 5.853176E-05 + - 0.032684326 + - -0.04058838 + - 0.015823364 + - -0.038635254 + - 0.0055656433 + - -0.021560669 + - 0.012481689 + - -0.050872803 + - -0.036071777 + - -0.046844482 + - -0.041900635 + - -0.06561279 + - 0.014785767 + - 0.010124207 + - 0.030426025 + - 0.024261475 + - 0.0057411194 + - -0.026275635 + - -0.006919861 + - 0.022750854 + - -0.015167236 + - 0.022964478 + - -0.0033664703 + - 0.02734375 + - 0.03201294 + - 0.025939941 + - 0.019104004 + - 0.028030396 + - -0.014328003 + - -0.01574707 + - 0.06982422 + - -0.008026123 + - 0.006816864 + - -0.0019035339 + - 0.026245117 + - -0.028945923 + - 0.014968872 + - 0.0054244995 + - -0.00028896332 + - -0.02243042 + - -0.0030822754 + - -0.02558899 + - -0.022918701 + - -0.017089844 + - -0.0035190582 + - 0.029953003 + - -0.037078857 + - -0.02507019 + - -0.017303467 + - 0.064331055 + - -0.028533936 + - -0.07287598 + - 0.028839111 + - -0.0029792786 + - -0.02104187 + - -0.01663208 + - -0.016571045 + - -0.015106201 + - 0.0027313232 + - 0.031051636 + - -0.025680542 + - 0.004722595 + - 0.032348633 + - 0.020019531 + - 0.056365967 + - 0.07208252 + - 0.01235199 + - 0.00084495544 + - 0.035369873 + - -0.018569946 + - -0.0063552856 + - 0.03161621 + - 0.064575195 + - -0.02557373 + - -0.007232666 + - -0.017700195 + - -0.003835678 + - 0.007381439 + - -0.0385437 + - -0.0019102097 + - -0.023223877 + - -0.0124435425 + - 0.013343811 + - 0.020996094 + - -0.014022827 + - -0.01939392 + - 0.044128418 + - 0.0052757263 + - -0.00068950653 + - -0.04876709 + - -0.05609131 + - -0.020874023 + - -0.00806427 + - -0.13391113 + - -0.06323242 + - -0.021865845 + - -0.021072388 + - 0.005832672 + - -0.015701294 + - -0.006286621 + - -0.012954712 + - -0.017288208 + - 0.0036773682 + - -0.0084991455 + - -0.03213501 + - 0.021987915 + - -0.010322571 + - -0.029144287 + - 0.003824234 + - 0.02708435 + - 0.0026187897 + - 0.05496216 + - -0.04916382 + - 0.005466461 + - -0.0070648193 + - 0.0793457 + - -0.040863037 + - 0.012641907 + - 0.016448975 + - 0.02041626 + - -0.029006958 + - -0.008491516 + - 0.0023422241 + - 0.043640137 + - 0.0121536255 + - -0.0043525696 + - -0.030899048 + - 0.0062332153 + - -0.013038635 + - 0.007904053 + - -0.03390503 + - -0.034729004 + - -0.0647583 + - -0.0052375793 + - -0.08154297 + - 0.015960693 + - 0.016235352 + - -0.012130737 + - -0.021469116 + - -0.03253174 + - -0.014465332 + - 0.016448975 + - 0.004589081 + - -0.05291748 + - 0.018005371 + - -0.002981186 + - -0.01247406 + - 0.023147583 + - -0.055419922 + - -0.08526611 + - 0.016723633 + - 0.012939453 + - -0.039031982 + - 0.016677856 + - 0.016937256 + - 0.023147583 + - 0.034576416 + - -0.010635376 + - 0.03466797 + - 0.037750244 + - 0.020141602 + - -0.0046539307 + - 0.0059432983 + - 0.05609131 + - 0.027709961 + - 0.01838684 + - 0.015022278 + - -0.039215088 + - -0.0048828125 + - 0.047546387 + - 0.0138549805 + - -0.046203613 + - 0.036193848 + - -0.109680176 + - 0.0019550323 + - -0.03125 + - 0.0084991455 + - -0.0020256042 + - -0.001739502 + - -0.06756592 + - 0.03491211 + - -0.05633545 + - -0.008491516 + - 0.0048446655 + - 0.042663574 + - 0.025054932 + - -0.022247314 + - -0.0044555664 + - 0.0022335052 + - -0.0071907043 + - -0.003982544 + - -0.073913574 + - -0.011253357 + - 0.029220581 + - -0.0047073364 + - -0.04626465 + - 0.05670166 + - -0.041503906 + - 0.014579773 + - -0.016174316 + - 0.021560669 + - -0.019332886 + - 0.01550293 + - 0.02709961 + - 0.010528564 + - 0.012786865 + - -0.023849487 + - -0.016937256 + - -0.04626465 + - -0.04397583 + - 0.026245117 + - -0.017868042 + - 0.021072388 + - -0.02128601 + - -0.012161255 + - -0.004776001 + - -0.0088272095 + - 0.009246826 + - -0.012313843 + - 0.0096206665 + - -0.0047950745 + - -0.0079956055 + - 0.052520752 + - -0.06616211 + - 0.0014686584 + - -0.046081543 + - 0.03289795 + - -0.03656006 + - 0.055389404 + - 0.009773254 + - 0.0013818741 + - 0.043823242 + - 0.034942627 + - 0.055236816 + - -0.011833191 + - -0.024353027 + - 0.011398315 + - -0.051574707 + - -0.019882202 + - 0.0018358231 + - -0.005859375 + - 0.06677246 + - -0.0009851456 + - -0.026809692 + - 0.0075798035 + - -0.021347046 + - -0.01146698 + - 0.03262329 + - 0.031585693 + - -0.006729126 + - 0.008659363 + - -0.025665283 + - 0.02947998 + - -0.03744507 + - 0.02027893 + - -0.026062012 + - 0.018585205 + - -0.004463196 + - -0.036865234 + - -0.043670654 + - 0.021392822 + - -0.062561035 + - -0.080078125 + - 0.011451721 + - 0.06762695 + - 0.039001465 + - -0.016799927 + - 0.049072266 + - 0.041412354 + - -0.03062439 + - 0.011795044 + - -0.016555786 + - 0.046569824 + - 0.010688782 + - -0.01902771 + - -0.031097412 + - -0.023391724 + - -0.01651001 + - 0.009399414 + - 0.049041748 + - -0.025817871 + - -0.018356323 + - 0.02154541 + - -0.0029411316 + - 0.074157715 + - 0.017059326 + - -0.0017595291 + - 0.00390625 + - 0.02645874 + - -0.0010709763 + - 0.040222168 + - -0.034423828 + - 0.0231781 + - -0.016693115 + - -0.022094727 + - 0.004383087 + - 0.007331848 + - 0.018676758 + - 0.023773193 + - -0.0069770813 + - 0.0029773712 + - -0.023712158 + - -0.0051956177 + - -0.011810303 + - -0.0519104 + - 0.07244873 + - 0.032409668 + - 0.016662598 + - 0.015716553 + - -0.03640747 + - 0.03918457 + - -0.046722412 + - -0.0046081543 + - 0.006061554 + - -0.011940002 + - -0.0004878044 + - 0.01260376 + - 0.0073280334 + - 0.0015096664 + - 0.005844116 + - 0.029129028 + - 0.047668457 + - 0.05960083 + - -0.0647583 + - 0.064697266 + - -0.017440796 + - -0.01889038 + - 0.037628174 + - 0.0048065186 + - -0.023101807 + - -0.048675537 + - -0.02508545 + - -0.007965088 + - 0.0015897751 + - 0.06866455 + - -0.0099487305 + - -0.0022964478 + - -0.030014038 + - -0.007713318 + - -0.034362793 + - 0.013931274 + - 0.0026836395 + - -0.0014476776 + - 0.02532959 + - -0.020584106 + - -0.039001465 + - -0.062347412 + - -0.04736328 + - -0.024368286 + - -0.045776367 + - 0.03149414 + - -0.012825012 + - 0.028076172 + - 0.0058784485 + - 0.08062744 + - 0.0104599 + - 0.014579773 + - -0.041137695 + - 0.04244995 + - -0.021011353 + - 0.06390381 + - 0.0010871887 + - 0.04147339 + - -0.0053138733 + - 0.02268982 + - -0.028182983 + - -0.022628784 + - -0.021408081 + - -0.006088257 + - 0.028030396 + - 0.025146484 + - 0.00881958 + - -0.04244995 + - 0.027938843 + - 0.013916016 + - -0.04647827 + - 0.0072288513 + - 0.017745972 + - -0.02381897 + - -0.010147095 + - 0.0096588135 + - -0.04586792 + - -0.014480591 + - -0.0027217865 + - -0.03111267 + - 0.04522705 + - -0.02772522 + - -0.0013189316 + - 0.017807007 + - -0.0135269165 + - -0.014175415 + - -0.00019681454 + - 0.03161621 + - 0.0041007996 + - -0.024871826 + - 0.0039367676 + - -0.026916504 + - 0.03237915 + - 0.007068634 + - 0.029647827 + - -0.0102005005 + - 0.0076675415 + - 0.0051078796 + - -0.008041382 + - -0.0062942505 + - 0.0010309219 + - 0.010543823 + - -0.010101318 + - -0.013496399 + - 0.00920105 + - 0.0546875 + - -0.02784729 + - -0.0056762695 + - -0.08679199 + - -0.050048828 + - 0.03378296 + - 0.010124207 + - 0.019058228 + - -0.037872314 + - -0.0063323975 + - 0.0014324188 + - -0.010002136 + - -0.015731812 + - -0.036071777 + - -0.0028915405 + - -0.0082092285 + - 0.0037841797 + - -0.020629883 + - 0.01725769 + - -0.026000977 + - 0.00012862682 + - 0.021621704 + - 0.07086182 + - -0.008049011 + - -0.012634277 + - -0.064941406 + - -0.0073013306 + - -0.02760315 + - -0.040649414 + - 0.02809143 + - 0.009849548 + - 0.0011720657 + - 0.059936523 + - -0.032806396 + - 0.06311035 + - 0.009536743 + - 0.014801025 + - 0.03390503 + - -0.002620697 + - -0.04650879 + - -0.015365601 + - 0.03741455 + - -0.0067443848 + - -0.008888245 + - -0.0013017654 + - -0.010154724 + - 0.0027217865 + - 0.016052246 + - 0.025100708 + - -0.030532837 + - 0.032318115 + - 0.014564514 + - -0.009109497 + - 0.009628296 + - -0.021438599 + - -0.049926758 + - -0.00088214874 + - -0.019638062 + - -0.020126343 + - 0.055847168 + - -0.006729126 + - -0.044921875 + - -0.01890564 + - -0.0026683807 + - 0.0038547516 + - 0.004600525 + - -0.013977051 + - 0.018341064 + - -0.05178833 + - 0.011054993 + - 0.019927979 + - 0.011436462 + - 0.010391235 + - -0.012680054 + - -0.017669678 + - 0.01928711 + - 0.025115967 + - -0.07757568 + - -0.030960083 + - 0.013137817 + - -0.066467285 + - -0.054473877 + - -0.04244995 + - -0.027526855 + - 0.02973938 + - -0.024017334 + - -0.03918457 + - 0.0154800415 + - -0.036315918 + - 0.015510559 + - -0.020385742 + - -0.0390625 + - -0.00137043 + - 0.0016002655 + - -0.010238647 + - 0.014656067 + - 0.029373169 + - -0.027023315 + - 0.0076141357 + - -0.001917839 + - 0.03451538 + - 0.004814148 + - 0.024887085 + - 0.036315918 + - -0.006500244 + - -0.070495605 + - -0.0071754456 + - 0.025863647 + - 0.022994995 + - 0.007217407 + - 0.032165527 + - 0.016830444 + - 0.02859497 + - -0.011123657 + - 0.020126343 + - -0.0014410019 + - 0.0021781921 + - 0.053619385 + - 0.015625 + - 0.017150879 + - -0.03326416 + - -0.04626465 + - 0.034332275 + - 0.07165527 + - -0.040740967 + - -0.06628418 + - -0.024291992 + - -0.0066871643 + - 0.065979004 + - 0.034851074 + - 0.07678223 + - 0.053009033 + - 0.0317688 + - -0.04019165 + - 0.030288696 + - 0.062347412 + - -0.011734009 + - 0.0024604797 + - 0.006095886 + - -0.0152282715 + - 0.056762695 + - 0.021270752 + - -0.011154175 + - -0.0143966675 + - 0.0057754517 + - -0.0003619194 + - 0.0053367615 + - -0.030639648 + - 0.0024776459 + - -0.031799316 + - -0.012710571 + - 0.048828125 + - 0.029632568 + - 0.013244629 + - 0.087890625 + - -0.01134491 + - 0.028656006 + - -0.014778137 + - 0.06695557 + - 0.026275635 + - -0.016113281 + - 0.018859863 + - -0.008239746 + - 0.024383545 + - -0.039154053 + - -0.006252289 + - 0.049224854 + - -0.04638672 + - 0.0031967163 + - -0.04849243 + - -0.04058838 + - 0.038757324 + - 0.00730896 + - -0.04345703 + - 0.04296875 + - -0.0024299622 + - -0.05670166 + - 0.019119263 + - -0.011802673 + - 0.038970947 + - -0.03366089 + - 0.03591919 + - -0.0009088516 + - 0.013259888 + - -0.07342529 + - 0.004299164 + - 0.0395813 + - 0.013420105 + - -0.004459381 + - -0.0084991455 + - 0.031982422 + - 0.018249512 + - -0.0038604736 + - -0.022323608 + - -0.013031006 + - 0.0513916 + - -0.007068634 + - -0.003545761 + - 0.010292053 + - -0.010322571 + - -0.0037841797 + - 0.043701172 + - -0.012672424 + - 0.013725281 + - 0.021575928 + - -0.03942871 + - -0.0105896 + - -0.01878357 + - -0.017623901 + - -0.03414917 + - 0.02142334 + - 0.026550293 + - -0.022903442 + - 0.008598328 + - 0.03100586 + - 0.049957275 + - 0.021438599 + - 0.016204834 + - -0.014129639 + - 0.0079193115 + - -0.004535675 + - 0.0010051727 + - -0.038208008 + - -0.014923096 + - -0.01436615 + - -0.009666443 + - 0.0006933212 + - 0.0132369995 + - 0.01486969 + - 0.028762817 + - 0.011329651 + - -0.042663574 + - 0.014961243 + - -0.018127441 + - -0.007232666 + - 0.008369446 + - 0.027557373 + - 0.006706238 + - -0.05038452 + - -0.023666382 + - -0.0072898865 + - -0.007865906 + - -0.008926392 + - -0.013137817 + - 0.08886719 + - 0.030929565 + - 0.021255493 + - -0.0020389557 + - -0.08337402 + - -0.020385742 + - 0.03866577 + - -0.020523071 + - 0.021881104 + - 0.005756378 + - 0.022003174 + - 0.021209717 + - -0.06161499 + - -0.020309448 + - -0.0057258606 + - -0.033813477 + - 0.0017337799 + - -0.052612305 + - 0.01461792 + - -0.017944336 + - 0.042816162 + - -0.053710938 + - -0.041259766 + - -0.014549255 + - 0.020843506 + - -0.019760132 + - 0.004890442 + - -0.0007162094 + - -0.009429932 + - -0.01966858 + - -0.014320374 + - 0.041259766 + - 0.00075244904 + - -0.0064430237 + - 0.028961182 + - -0.01876831 + - 0.0027942657 + - -0.051116943 + - 0.00093746185 + - 0.0037384033 + - -0.06982422 + - -0.0107040405 + - 0.030090332 + - -0.019104004 + - -0.016647339 + - -0.037475586 + - 0.0140686035 + - -0.051086426 + - -0.032409668 + - -0.011131287 + - -0.023620605 + - -0.04159546 + - -0.034851074 + - -0.064941406 + - -0.03451538 + - 0.0047416687 + - -0.04510498 + - 0.020477295 + - -0.03024292 + - -0.034179688 + - 0.058410645 + - 0.008514404 + - 0.0049858093 + - 0.02331543 + - 0.03704834 + - -0.017333984 + - 0.014389038 + - 0.013786316 + - 0.008583069 + - -0.009643555 + - 0.020095825 + - 0.013496399 + - -0.01991272 + - -0.0446167 + - 0.0075149536 + - 0.0071029663 + - 0.0446167 + - -0.03933716 + - 0.009902954 + - 0.011077881 + - 0.008781433 + - -0.001701355 + - 0.016235352 + - 0.01802063 + - -0.010765076 + - -0.03427124 + - 0.0112838745 + - -0.023208618 + - -0.009979248 + - -0.010696411 + - -0.023208618 + - -0.026748657 + - -0.02923584 + - 0.013801575 + - -0.050323486 + - -0.0059661865 + - -0.004837036 + - 0.01940918 + - 0.00018620491 + - 0.0016450882 + - 0.019012451 + - -0.048034668 + - 0.034423828 + - -0.033599854 + - 0.020126343 + - -0.04949951 + - 0.071899414 + - -0.06060791 + - -0.043395996 + - 0.012138367 + - 0.022476196 + - 0.029006958 + - 0.04550171 + - -0.03564453 + - -0.015090942 + - 0.055541992 + - 0.014884949 + - 0.020767212 + - -0.01071167 + - 0.046905518 + - 0.033813477 + - -0.04260254 + - -0.00094127655 + - 0.016708374 + - -0.0011367798 + - -0.030426025 + - -0.03427124 + - 0.01763916 + - -0.012634277 + - 0.030517578 + - -0.055480957 + - -0.054992676 + - 0.056274414 + - -0.0007033348 + - -0.058624268 + - 0.0061531067 + - -0.008613586 + - 0.016067505 + - 0.003376007 + - -0.01586914 + - -0.025146484 + - 0.008491516 + - 0.053222656 + - -0.02923584 + - 0.021408081 + meta: + api_version: + version: '1' + api_version: v1 + EmbedByTypeResponse: + required: + - id + - embeddings + - texts + - api_version + type: object + properties: + response_type: + enum: + - embeddings_floats + - embeddings_by_type + type: string + x-fern-audiences: + - public + id: + type: string + x-fern-audiences: + - public + embeddings: + type: object + items: + type: array + items: + type: number + x-fern-audiences: + - public + readOnly: true + x-fern-audiences: + - public + properties: + float: + type: array + items: + type: array + items: + type: number + x-fern-audiences: + - public + readOnly: true + x-fern-audiences: + - public + description: An array of float embeddings. + readOnly: true + x-fern-audiences: + - public + int8: + type: array + items: + type: array + items: + type: integer + x-fern-audiences: + - public + readOnly: true + x-fern-audiences: + - public + description: An array of signed int8 embeddings. Each value is between -128 and 127. + readOnly: true + x-fern-audiences: + - public + uint8: + type: array + items: + type: array + items: + type: integer + x-fern-audiences: + - public + readOnly: true + x-fern-audiences: + - public + description: An array of unsigned int8 embeddings. Each value is between 0 and 255. + readOnly: true + x-fern-audiences: + - public + binary: + type: array + items: + type: array + items: + type: integer + x-fern-audiences: + - public + readOnly: true + x-fern-audiences: + - public + description: An array of packed signed binary embeddings. The length of each binary embedding is 1/8 the length of the float embeddings of the provided model. Each value is between -128 and 127. + readOnly: true + x-fern-audiences: + - public + ubinary: + type: array + items: + type: array + items: + type: integer + x-fern-audiences: + - public + readOnly: true + x-fern-audiences: + - public + description: An array of packed unsigned binary embeddings. The length of each binary embedding is 1/8 the length of the float embeddings of the provided model. Each value is between 0 and 255. + x-fern-audiences: + - public + description: An object with different embedding types. The length of each embedding type array will be the same as the length of the original `texts` array. + readOnly: true + x-fern-audiences: + - public + texts: + type: array + items: + type: string + x-fern-audiences: + - public + description: The text entries for which embeddings were returned. + x-fern-audiences: + - public + meta: + $ref: '#/components/schemas/ApiMeta' + x-examples: + Example: + value: + id: bc57846a-3e56-4327-8acc-588ca1a37b8a + texts: + - hello world + embeddings: + float: + - + - -0.039520264 + - -0.04574585 + - -0.08807373 + - -0.084106445 + - -0.009742737 + - -0.0090408325 + - -0.048187256 + - 0.07128906 + - 0.010688782 + - 0.016067505 + - -0.02822876 + - 0.036224365 + - 0.037994385 + - -0.041992188 + - 0.052124023 + - -0.027297974 + - 0.048309326 + - 0.017410278 + - 0.004283905 + - -0.0058555603 + - -0.012992859 + - 0.023040771 + - 0.00121212 + - 0.02078247 + - 0.04827881 + - -0.021530151 + - 0.017807007 + - 0.0075531006 + - -0.047912598 + - -0.042633057 + - 0.0016927719 + - 0.04547119 + - 0.0143585205 + - 0.022354126 + - 0.0017910004 + - 0.048614502 + - -0.02609253 + - 0.007850647 + - 0.00907135 + - 0.0035381317 + - 0.015289307 + - -0.008132935 + - 0.016296387 + - -0.02859497 + - -0.023712158 + - 0.008857727 + - -0.04309082 + - -0.025115967 + - 0.032928467 + - -0.029663086 + - 0.00434494 + - -0.022338867 + - -0.004371643 + - -0.0075035095 + - -0.009529114 + - 0.0038223267 + - -0.06048584 + - -0.018127441 + - 0.010131836 + - 0.08380127 + - 0.03652954 + - 0.0030384064 + - 0.006034851 + - -0.006286621 + - 0.016784668 + - -0.00308609 + - 0.01612854 + - 0.011413574 + - 0.022491455 + - 0.02482605 + - 0.0047683716 + - 0.012245178 + - -0.017593384 + - -0.023254395 + - -0.012641907 + - 0.030181885 + - -0.015365601 + - 0.031021118 + - 0.015144348 + - 0.016708374 + - 0.02180481 + - 0.010765076 + - -0.015586853 + - -0.05819702 + - 0.02128601 + - -0.021713257 + - -0.013320923 + - -0.0064849854 + - -0.001657486 + - -0.030715942 + - -0.008666992 + - 0.060668945 + - -0.0011959076 + - -0.032104492 + - -0.057006836 + - -0.015655518 + - -0.014015198 + - 0.036987305 + - 0.011016846 + - 0.037475586 + - -0.015319824 + - -0.016479492 + - 0.0030403137 + - -0.028167725 + - -0.0067825317 + - -0.00894928 + - -0.026107788 + - 0.010231018 + - 0.031707764 + - 0.050354004 + - -0.016220093 + - 0.04345703 + - -0.008888245 + - -0.0037784576 + - -0.034576416 + - 0.002565384 + - -0.0018634796 + - 0.013954163 + - 0.012062073 + - 0.046813965 + - 0.033081055 + - 0.028778076 + - 0.0051231384 + - 0.022094727 + - -0.021881104 + - -0.009788513 + - -0.04647827 + - -0.025482178 + - 0.066833496 + - -0.040863037 + - -0.019714355 + - 0.06866455 + - -0.07519531 + - -0.045532227 + - -0.020507812 + - 0.021331787 + - 0.036376953 + - -0.034210205 + - 0.017669678 + - 0.0155181885 + - 0.047698975 + - -0.010368347 + - 0.010879517 + - 0.016555786 + - -0.028076172 + - 0.03225708 + - -0.0056152344 + - -0.020690918 + - 0.00011438131 + - -0.021011353 + - -0.04425049 + - -0.029922485 + - -0.0014362335 + - 0.013618469 + - 0.011260986 + - 0.017532349 + - -0.043426514 + - 0.012557983 + - 0.026748657 + - 0.039154053 + - -0.030944824 + - 0.024169922 + - 0.06573486 + - -0.03817749 + - -0.025314331 + - -0.039794922 + - -0.050445557 + - -0.0020828247 + - -0.0010194778 + - 0.01725769 + - 0.0017976761 + - 0.029067993 + - 0.0115356445 + - 0.005214691 + - 0.0066604614 + - -0.014801025 + - -0.033172607 + - 0.023956299 + - 0.008865356 + - 0.09539795 + - 0.062286377 + - -0.0076408386 + - -0.035125732 + - 0.09082031 + - -0.015350342 + - -0.015625 + - -0.0090789795 + - -0.01876831 + - 0.05239868 + - -0.010406494 + - 0.05078125 + - -0.013694763 + - -0.07244873 + - 0.018539429 + - -0.016983032 + - -0.03353882 + - 0.01739502 + - 0.004055023 + - -0.010147095 + - -0.0027599335 + - -0.002714157 + - -0.0107040405 + - 0.021438599 + - -0.029525757 + - 0.01902771 + - -0.025909424 + - 0.0008072853 + - 0.026672363 + - 0.0019044876 + - 0.016937256 + - -0.018814087 + - -0.03668213 + - 0.03338623 + - -0.09240723 + - -0.024765015 + - -0.019378662 + - -0.051757812 + - 0.050109863 + - 0.018859863 + - 0.01687622 + - 0.020111084 + - -0.041534424 + - 0.009559631 + - -0.018859863 + - 5.853176E-05 + - 0.032684326 + - -0.04058838 + - 0.015823364 + - -0.038635254 + - 0.0055656433 + - -0.021560669 + - 0.012481689 + - -0.050872803 + - -0.036071777 + - -0.046844482 + - -0.041900635 + - -0.06561279 + - 0.014785767 + - 0.010124207 + - 0.030426025 + - 0.024261475 + - 0.0057411194 + - -0.026275635 + - -0.006919861 + - 0.022750854 + - -0.015167236 + - 0.022964478 + - -0.0033664703 + - 0.02734375 + - 0.03201294 + - 0.025939941 + - 0.019104004 + - 0.028030396 + - -0.014328003 + - -0.01574707 + - 0.06982422 + - -0.008026123 + - 0.006816864 + - -0.0019035339 + - 0.026245117 + - -0.028945923 + - 0.014968872 + - 0.0054244995 + - -0.00028896332 + - -0.02243042 + - -0.0030822754 + - -0.02558899 + - -0.022918701 + - -0.017089844 + - -0.0035190582 + - 0.029953003 + - -0.037078857 + - -0.02507019 + - -0.017303467 + - 0.064331055 + - -0.028533936 + - -0.07287598 + - 0.028839111 + - -0.0029792786 + - -0.02104187 + - -0.01663208 + - -0.016571045 + - -0.015106201 + - 0.0027313232 + - 0.031051636 + - -0.025680542 + - 0.004722595 + - 0.032348633 + - 0.020019531 + - 0.056365967 + - 0.07208252 + - 0.01235199 + - 0.00084495544 + - 0.035369873 + - -0.018569946 + - -0.0063552856 + - 0.03161621 + - 0.064575195 + - -0.02557373 + - -0.007232666 + - -0.017700195 + - -0.003835678 + - 0.007381439 + - -0.0385437 + - -0.0019102097 + - -0.023223877 + - -0.0124435425 + - 0.013343811 + - 0.020996094 + - -0.014022827 + - -0.01939392 + - 0.044128418 + - 0.0052757263 + - -0.00068950653 + - -0.04876709 + - -0.05609131 + - -0.020874023 + - -0.00806427 + - -0.13391113 + - -0.06323242 + - -0.021865845 + - -0.021072388 + - 0.005832672 + - -0.015701294 + - -0.006286621 + - -0.012954712 + - -0.017288208 + - 0.0036773682 + - -0.0084991455 + - -0.03213501 + - 0.021987915 + - -0.010322571 + - -0.029144287 + - 0.003824234 + - 0.02708435 + - 0.0026187897 + - 0.05496216 + - -0.04916382 + - 0.005466461 + - -0.0070648193 + - 0.0793457 + - -0.040863037 + - 0.012641907 + - 0.016448975 + - 0.02041626 + - -0.029006958 + - -0.008491516 + - 0.0023422241 + - 0.043640137 + - 0.0121536255 + - -0.0043525696 + - -0.030899048 + - 0.0062332153 + - -0.013038635 + - 0.007904053 + - -0.03390503 + - -0.034729004 + - -0.0647583 + - -0.0052375793 + - -0.08154297 + - 0.015960693 + - 0.016235352 + - -0.012130737 + - -0.021469116 + - -0.03253174 + - -0.014465332 + - 0.016448975 + - 0.004589081 + - -0.05291748 + - 0.018005371 + - -0.002981186 + - -0.01247406 + - 0.023147583 + - -0.055419922 + - -0.08526611 + - 0.016723633 + - 0.012939453 + - -0.039031982 + - 0.016677856 + - 0.016937256 + - 0.023147583 + - 0.034576416 + - -0.010635376 + - 0.03466797 + - 0.037750244 + - 0.020141602 + - -0.0046539307 + - 0.0059432983 + - 0.05609131 + - 0.027709961 + - 0.01838684 + - 0.015022278 + - -0.039215088 + - -0.0048828125 + - 0.047546387 + - 0.0138549805 + - -0.046203613 + - 0.036193848 + - -0.109680176 + - 0.0019550323 + - -0.03125 + - 0.0084991455 + - -0.0020256042 + - -0.001739502 + - -0.06756592 + - 0.03491211 + - -0.05633545 + - -0.008491516 + - 0.0048446655 + - 0.042663574 + - 0.025054932 + - -0.022247314 + - -0.0044555664 + - 0.0022335052 + - -0.0071907043 + - -0.003982544 + - -0.073913574 + - -0.011253357 + - 0.029220581 + - -0.0047073364 + - -0.04626465 + - 0.05670166 + - -0.041503906 + - 0.014579773 + - -0.016174316 + - 0.021560669 + - -0.019332886 + - 0.01550293 + - 0.02709961 + - 0.010528564 + - 0.012786865 + - -0.023849487 + - -0.016937256 + - -0.04626465 + - -0.04397583 + - 0.026245117 + - -0.017868042 + - 0.021072388 + - -0.02128601 + - -0.012161255 + - -0.004776001 + - -0.0088272095 + - 0.009246826 + - -0.012313843 + - 0.0096206665 + - -0.0047950745 + - -0.0079956055 + - 0.052520752 + - -0.06616211 + - 0.0014686584 + - -0.046081543 + - 0.03289795 + - -0.03656006 + - 0.055389404 + - 0.009773254 + - 0.0013818741 + - 0.043823242 + - 0.034942627 + - 0.055236816 + - -0.011833191 + - -0.024353027 + - 0.011398315 + - -0.051574707 + - -0.019882202 + - 0.0018358231 + - -0.005859375 + - 0.06677246 + - -0.0009851456 + - -0.026809692 + - 0.0075798035 + - -0.021347046 + - -0.01146698 + - 0.03262329 + - 0.031585693 + - -0.006729126 + - 0.008659363 + - -0.025665283 + - 0.02947998 + - -0.03744507 + - 0.02027893 + - -0.026062012 + - 0.018585205 + - -0.004463196 + - -0.036865234 + - -0.043670654 + - 0.021392822 + - -0.062561035 + - -0.080078125 + - 0.011451721 + - 0.06762695 + - 0.039001465 + - -0.016799927 + - 0.049072266 + - 0.041412354 + - -0.03062439 + - 0.011795044 + - -0.016555786 + - 0.046569824 + - 0.010688782 + - -0.01902771 + - -0.031097412 + - -0.023391724 + - -0.01651001 + - 0.009399414 + - 0.049041748 + - -0.025817871 + - -0.018356323 + - 0.02154541 + - -0.0029411316 + - 0.074157715 + - 0.017059326 + - -0.0017595291 + - 0.00390625 + - 0.02645874 + - -0.0010709763 + - 0.040222168 + - -0.034423828 + - 0.0231781 + - -0.016693115 + - -0.022094727 + - 0.004383087 + - 0.007331848 + - 0.018676758 + - 0.023773193 + - -0.0069770813 + - 0.0029773712 + - -0.023712158 + - -0.0051956177 + - -0.011810303 + - -0.0519104 + - 0.07244873 + - 0.032409668 + - 0.016662598 + - 0.015716553 + - -0.03640747 + - 0.03918457 + - -0.046722412 + - -0.0046081543 + - 0.006061554 + - -0.011940002 + - -0.0004878044 + - 0.01260376 + - 0.0073280334 + - 0.0015096664 + - 0.005844116 + - 0.029129028 + - 0.047668457 + - 0.05960083 + - -0.0647583 + - 0.064697266 + - -0.017440796 + - -0.01889038 + - 0.037628174 + - 0.0048065186 + - -0.023101807 + - -0.048675537 + - -0.02508545 + - -0.007965088 + - 0.0015897751 + - 0.06866455 + - -0.0099487305 + - -0.0022964478 + - -0.030014038 + - -0.007713318 + - -0.034362793 + - 0.013931274 + - 0.0026836395 + - -0.0014476776 + - 0.02532959 + - -0.020584106 + - -0.039001465 + - -0.062347412 + - -0.04736328 + - -0.024368286 + - -0.045776367 + - 0.03149414 + - -0.012825012 + - 0.028076172 + - 0.0058784485 + - 0.08062744 + - 0.0104599 + - 0.014579773 + - -0.041137695 + - 0.04244995 + - -0.021011353 + - 0.06390381 + - 0.0010871887 + - 0.04147339 + - -0.0053138733 + - 0.02268982 + - -0.028182983 + - -0.022628784 + - -0.021408081 + - -0.006088257 + - 0.028030396 + - 0.025146484 + - 0.00881958 + - -0.04244995 + - 0.027938843 + - 0.013916016 + - -0.04647827 + - 0.0072288513 + - 0.017745972 + - -0.02381897 + - -0.010147095 + - 0.0096588135 + - -0.04586792 + - -0.014480591 + - -0.0027217865 + - -0.03111267 + - 0.04522705 + - -0.02772522 + - -0.0013189316 + - 0.017807007 + - -0.0135269165 + - -0.014175415 + - -0.00019681454 + - 0.03161621 + - 0.0041007996 + - -0.024871826 + - 0.0039367676 + - -0.026916504 + - 0.03237915 + - 0.007068634 + - 0.029647827 + - -0.0102005005 + - 0.0076675415 + - 0.0051078796 + - -0.008041382 + - -0.0062942505 + - 0.0010309219 + - 0.010543823 + - -0.010101318 + - -0.013496399 + - 0.00920105 + - 0.0546875 + - -0.02784729 + - -0.0056762695 + - -0.08679199 + - -0.050048828 + - 0.03378296 + - 0.010124207 + - 0.019058228 + - -0.037872314 + - -0.0063323975 + - 0.0014324188 + - -0.010002136 + - -0.015731812 + - -0.036071777 + - -0.0028915405 + - -0.0082092285 + - 0.0037841797 + - -0.020629883 + - 0.01725769 + - -0.026000977 + - 0.00012862682 + - 0.021621704 + - 0.07086182 + - -0.008049011 + - -0.012634277 + - -0.064941406 + - -0.0073013306 + - -0.02760315 + - -0.040649414 + - 0.02809143 + - 0.009849548 + - 0.0011720657 + - 0.059936523 + - -0.032806396 + - 0.06311035 + - 0.009536743 + - 0.014801025 + - 0.03390503 + - -0.002620697 + - -0.04650879 + - -0.015365601 + - 0.03741455 + - -0.0067443848 + - -0.008888245 + - -0.0013017654 + - -0.010154724 + - 0.0027217865 + - 0.016052246 + - 0.025100708 + - -0.030532837 + - 0.032318115 + - 0.014564514 + - -0.009109497 + - 0.009628296 + - -0.021438599 + - -0.049926758 + - -0.00088214874 + - -0.019638062 + - -0.020126343 + - 0.055847168 + - -0.006729126 + - -0.044921875 + - -0.01890564 + - -0.0026683807 + - 0.0038547516 + - 0.004600525 + - -0.013977051 + - 0.018341064 + - -0.05178833 + - 0.011054993 + - 0.019927979 + - 0.011436462 + - 0.010391235 + - -0.012680054 + - -0.017669678 + - 0.01928711 + - 0.025115967 + - -0.07757568 + - -0.030960083 + - 0.013137817 + - -0.066467285 + - -0.054473877 + - -0.04244995 + - -0.027526855 + - 0.02973938 + - -0.024017334 + - -0.03918457 + - 0.0154800415 + - -0.036315918 + - 0.015510559 + - -0.020385742 + - -0.0390625 + - -0.00137043 + - 0.0016002655 + - -0.010238647 + - 0.014656067 + - 0.029373169 + - -0.027023315 + - 0.0076141357 + - -0.001917839 + - 0.03451538 + - 0.004814148 + - 0.024887085 + - 0.036315918 + - -0.006500244 + - -0.070495605 + - -0.0071754456 + - 0.025863647 + - 0.022994995 + - 0.007217407 + - 0.032165527 + - 0.016830444 + - 0.02859497 + - -0.011123657 + - 0.020126343 + - -0.0014410019 + - 0.0021781921 + - 0.053619385 + - 0.015625 + - 0.017150879 + - -0.03326416 + - -0.04626465 + - 0.034332275 + - 0.07165527 + - -0.040740967 + - -0.06628418 + - -0.024291992 + - -0.0066871643 + - 0.065979004 + - 0.034851074 + - 0.07678223 + - 0.053009033 + - 0.0317688 + - -0.04019165 + - 0.030288696 + - 0.062347412 + - -0.011734009 + - 0.0024604797 + - 0.006095886 + - -0.0152282715 + - 0.056762695 + - 0.021270752 + - -0.011154175 + - -0.0143966675 + - 0.0057754517 + - -0.0003619194 + - 0.0053367615 + - -0.030639648 + - 0.0024776459 + - -0.031799316 + - -0.012710571 + - 0.048828125 + - 0.029632568 + - 0.013244629 + - 0.087890625 + - -0.01134491 + - 0.028656006 + - -0.014778137 + - 0.06695557 + - 0.026275635 + - -0.016113281 + - 0.018859863 + - -0.008239746 + - 0.024383545 + - -0.039154053 + - -0.006252289 + - 0.049224854 + - -0.04638672 + - 0.0031967163 + - -0.04849243 + - -0.04058838 + - 0.038757324 + - 0.00730896 + - -0.04345703 + - 0.04296875 + - -0.0024299622 + - -0.05670166 + - 0.019119263 + - -0.011802673 + - 0.038970947 + - -0.03366089 + - 0.03591919 + - -0.0009088516 + - 0.013259888 + - -0.07342529 + - 0.004299164 + - 0.0395813 + - 0.013420105 + - -0.004459381 + - -0.0084991455 + - 0.031982422 + - 0.018249512 + - -0.0038604736 + - -0.022323608 + - -0.013031006 + - 0.0513916 + - -0.007068634 + - -0.003545761 + - 0.010292053 + - -0.010322571 + - -0.0037841797 + - 0.043701172 + - -0.012672424 + - 0.013725281 + - 0.021575928 + - -0.03942871 + - -0.0105896 + - -0.01878357 + - -0.017623901 + - -0.03414917 + - 0.02142334 + - 0.026550293 + - -0.022903442 + - 0.008598328 + - 0.03100586 + - 0.049957275 + - 0.021438599 + - 0.016204834 + - -0.014129639 + - 0.0079193115 + - -0.004535675 + - 0.0010051727 + - -0.038208008 + - -0.014923096 + - -0.01436615 + - -0.009666443 + - 0.0006933212 + - 0.0132369995 + - 0.01486969 + - 0.028762817 + - 0.011329651 + - -0.042663574 + - 0.014961243 + - -0.018127441 + - -0.007232666 + - 0.008369446 + - 0.027557373 + - 0.006706238 + - -0.05038452 + - -0.023666382 + - -0.0072898865 + - -0.007865906 + - -0.008926392 + - -0.013137817 + - 0.08886719 + - 0.030929565 + - 0.021255493 + - -0.0020389557 + - -0.08337402 + - -0.020385742 + - 0.03866577 + - -0.020523071 + - 0.021881104 + - 0.005756378 + - 0.022003174 + - 0.021209717 + - -0.06161499 + - -0.020309448 + - -0.0057258606 + - -0.033813477 + - 0.0017337799 + - -0.052612305 + - 0.01461792 + - -0.017944336 + - 0.042816162 + - -0.053710938 + - -0.041259766 + - -0.014549255 + - 0.020843506 + - -0.019760132 + - 0.004890442 + - -0.0007162094 + - -0.009429932 + - -0.01966858 + - -0.014320374 + - 0.041259766 + - 0.00075244904 + - -0.0064430237 + - 0.028961182 + - -0.01876831 + - 0.0027942657 + - -0.051116943 + - 0.00093746185 + - 0.0037384033 + - -0.06982422 + - -0.0107040405 + - 0.030090332 + - -0.019104004 + - -0.016647339 + - -0.037475586 + - 0.0140686035 + - -0.051086426 + - -0.032409668 + - -0.011131287 + - -0.023620605 + - -0.04159546 + - -0.034851074 + - -0.064941406 + - -0.03451538 + - 0.0047416687 + - -0.04510498 + - 0.020477295 + - -0.03024292 + - -0.034179688 + - 0.058410645 + - 0.008514404 + - 0.0049858093 + - 0.02331543 + - 0.03704834 + - -0.017333984 + - 0.014389038 + - 0.013786316 + - 0.008583069 + - -0.009643555 + - 0.020095825 + - 0.013496399 + - -0.01991272 + - -0.0446167 + - 0.0075149536 + - 0.0071029663 + - 0.0446167 + - -0.03933716 + - 0.009902954 + - 0.011077881 + - 0.008781433 + - -0.001701355 + - 0.016235352 + - 0.01802063 + - -0.010765076 + - -0.03427124 + - 0.0112838745 + - -0.023208618 + - -0.009979248 + - -0.010696411 + - -0.023208618 + - -0.026748657 + - -0.02923584 + - 0.013801575 + - -0.050323486 + - -0.0059661865 + - -0.004837036 + - 0.01940918 + - 0.00018620491 + - 0.0016450882 + - 0.019012451 + - -0.048034668 + - 0.034423828 + - -0.033599854 + - 0.020126343 + - -0.04949951 + - 0.071899414 + - -0.06060791 + - -0.043395996 + - 0.012138367 + - 0.022476196 + - 0.029006958 + - 0.04550171 + - -0.03564453 + - -0.015090942 + - 0.055541992 + - 0.014884949 + - 0.020767212 + - -0.01071167 + - 0.046905518 + - 0.033813477 + - -0.04260254 + - -0.00094127655 + - 0.016708374 + - -0.0011367798 + - -0.030426025 + - -0.03427124 + - 0.01763916 + - -0.012634277 + - 0.030517578 + - -0.055480957 + - -0.054992676 + - 0.056274414 + - -0.0007033348 + - -0.058624268 + - 0.0061531067 + - -0.008613586 + - 0.016067505 + - 0.003376007 + - -0.01586914 + - -0.025146484 + - 0.008491516 + - 0.053222656 + - -0.02923584 + - 0.021408081 + ubinary: + - + - 1 + - 218 + - 231 + - 179 + - 247 + - 164 + - 161 + - 62 + - 191 + - 23 + - 200 + - 16 + - 114 + - 29 + - 23 + - 240 + - 145 + - 187 + - 72 + - 119 + - 96 + - 126 + - 121 + - 10 + - 76 + - 43 + - 200 + - 122 + - 213 + - 7 + - 202 + - 249 + - 86 + - 2 + - 36 + - 27 + - 252 + - 194 + - 25 + - 128 + - 33 + - 39 + - 171 + - 156 + - 160 + - 195 + - 73 + - 189 + - 223 + - 53 + - 68 + - 228 + - 37 + - 94 + - 20 + - 41 + - 87 + - 228 + - 164 + - 213 + - 68 + - 237 + - 97 + - 150 + - 212 + - 244 + - 61 + - 39 + - 244 + - 195 + - 6 + - 129 + - 125 + - 116 + - 59 + - 100 + - 36 + - 107 + - 179 + - 48 + - 228 + - 21 + - 192 + - 247 + - 136 + - 118 + - 130 + - 26 + - 243 + - 33 + - 40 + - 181 + - 227 + - 245 + - 230 + - 31 + - 109 + - 149 + - 61 + - 106 + - 83 + - 74 + - 174 + - 98 + - 75 + - 6 + - 250 + - 135 + - 211 + - 129 + - 197 + - 225 + - 81 + - 67 + - 86 + - 68 + - 2 + - 159 + - 118 + - 119 + - 100 + - 8 + - 245 + - 79 + - 59 + - 34 + - 146 + - 205 + meta: + api_version: + version: '1' + api_version: v2 + EmbedJob: + required: + - job_id + - status + - created_at + - input_dataset_id + - model + - truncate + type: object + properties: + job_id: + type: string + description: ID of the embed job + x-fern-audiences: + - public + name: + type: string + description: The name of the embed job + x-fern-audiences: + - public + status: + enum: + - processing + - complete + - cancelling + - cancelled + - failed + type: string + description: The status of the embed job + x-fern-audiences: + - public + created_at: + type: string + description: The creation date of the embed job + format: date-time + x-fern-audiences: + - public + input_dataset_id: + type: string + description: ID of the input dataset + x-fern-audiences: + - public + output_dataset_id: + type: string + description: ID of the resulting output dataset + x-fern-audiences: + - public + model: + type: string + description: ID of the model used to embed + x-fern-audiences: + - public + truncate: + enum: + - START + - END + type: string + description: The truncation option used + x-fern-audiences: + - public + meta: + $ref: '#/components/schemas/ApiMeta' + ListEmbedJobResponse: + type: object + properties: + embed_jobs: + type: array + items: + $ref: '#/components/schemas/EmbedJob' + x-fern-audiences: + - public + CreateEmbedJobRequest: + required: + - model + - dataset_id + - input_type + type: object + properties: + model: + type: string + description: "ID of the embedding model.\n\nAvailable models and corresponding embedding dimensions:\n\n- `embed-english-v3.0` : 1024\n- `embed-multilingual-v3.0` : 1024\n- `embed-english-light-v3.0` : 384\n- `embed-multilingual-light-v3.0` : 384\n" + format: string + x-fern-audiences: + - public + dataset_id: + type: string + description: 'ID of a [Dataset](https://docs.cohere.com/docs/datasets). The Dataset must be of type `embed-input` and must have a validation status `Validated`' + x-fern-audiences: + - public + input_type: + $ref: '#/components/schemas/EmbedInputType' + name: + type: string + description: The name of the embed job. + x-fern-audiences: + - public + embedding_types: + type: array + items: + $ref: '#/components/schemas/EmbeddingType' + description: "Specifies the types of embeddings you want to get back. Not required and default is None, which returns the Embed Floats response type. Can be one or more of the following types.\n\n* `\"float\"`: Use this when you want to get back the default float embeddings. Valid for all models.\n* `\"int8\"`: Use this when you want to get back signed int8 embeddings. Valid for only v3 models.\n* `\"uint8\"`: Use this when you want to get back unsigned int8 embeddings. Valid for only v3 models.\n* `\"binary\"`: Use this when you want to get back signed binary embeddings. Valid for only v3 models.\n* `\"ubinary\"`: Use this when you want to get back unsigned binary embeddings. Valid for only v3 models." + x-fern-audiences: + - public + truncate: + enum: + - START + - END + type: string + description: "One of `START|END` to specify how the API will handle inputs longer than the maximum token length.\n\nPassing `START` will discard the start of the input. `END` will discard the end of the input. In both cases, input is discarded until the remaining input is exactly the maximum input token length for the model.\n" + default: END + x-fern-audiences: + - public + CreateEmbedJobResponse: + required: + - job_id + type: object + properties: + job_id: + type: string + x-fern-audiences: + - public + meta: + $ref: '#/components/schemas/ApiMeta' + description: Response from creating an embed job. + RerankDocument: + required: + - text + type: object + properties: + text: + type: string + description: The text of the document to rerank. + x-fern-audiences: + - public + x-fern-type: 'map' + ClassifyExample: + type: object + properties: + text: + type: string + writeOnly: true + x-fern-audiences: + - public + label: + type: string + writeOnly: true + x-fern-audiences: + - public + writeOnly: true + DatasetValidationStatus: + enum: + - unknown + - queued + - processing + - failed + - validated + - skipped + type: string + description: The validation status of the dataset + x-fern-audiences: + - public + DatasetType: + enum: + - embed-input + - embed-result + - cluster-result + - cluster-outliers + - reranker-finetune-input + - single-label-classification-finetune-input + - chat-finetune-input + - multi-label-classification-finetune-input + type: string + description: The type of the dataset + x-fern-audiences: + - public + DatasetPart: + required: + - id + - name + type: object + properties: + id: + type: string + description: The dataset part ID + x-fern-audiences: + - public + name: + type: string + description: The name of the dataset part + x-fern-audiences: + - public + url: + type: string + description: The download url of the file + x-fern-audiences: + - public + index: + type: integer + description: The index of the file + format: int32 + x-fern-audiences: + - public + size_bytes: + type: integer + description: The size of the file in bytes + format: int32 + x-fern-audiences: + - public + num_rows: + type: integer + description: The number of rows in the file + format: int32 + x-fern-audiences: + - public + original_url: + type: string + description: The download url of the original file + x-fern-audiences: + - public + samples: + type: array + items: + type: string + x-fern-audiences: + - public + description: The first few rows of the parsed file + x-fern-audiences: + - public + ParseInfo: + type: object + properties: + separator: + type: string + writeOnly: true + x-fern-audiences: + - public + delimiter: + type: string + writeOnly: true + x-fern-audiences: + - public + writeOnly: true + RerankerDataMetrics: + type: object + properties: + num_train_queries: + type: number + description: The number of training queries. + format: int64 + x-fern-audiences: + - public + num_train_relevant_passages: + type: number + description: The sum of all relevant passages of valid training examples. + format: int64 + x-fern-audiences: + - public + num_train_hard_negatives: + type: number + description: The sum of all hard negatives of valid training examples. + format: int64 + x-fern-audiences: + - public + num_eval_queries: + type: number + description: The number of evaluation queries. + format: int64 + x-fern-audiences: + - public + num_eval_relevant_passages: + type: number + description: The sum of all relevant passages of valid eval examples. + format: int64 + x-fern-audiences: + - public + num_eval_hard_negatives: + type: number + description: The sum of all hard negatives of valid eval examples. + format: int64 + x-fern-audiences: + - public + ChatDataMetrics: + type: object + properties: + num_train_turns: + type: number + description: The sum of all turns of valid train examples. + format: int64 + x-fern-audiences: + - public + num_eval_turns: + type: number + description: The sum of all turns of valid eval examples. + format: int64 + x-fern-audiences: + - public + preamble: + type: string + description: The preamble of this dataset. + x-fern-audiences: + - public + LabelMetric: + type: object + properties: + total_examples: + type: number + description: Total number of examples for this label + format: int64 + x-fern-audiences: + - public + label: + type: string + description: value of the label + x-fern-audiences: + - public + samples: + type: array + items: + type: string + description: samples for this label + x-fern-audiences: + - public + ClassifyDataMetrics: + type: object + properties: + label_metrics: + type: array + items: + $ref: '#/components/schemas/LabelMetric' + FinetuneDatasetMetrics: + type: object + properties: + trainable_token_count: + type: number + description: The number of tokens of valid examples that can be used for training. + format: int64 + x-fern-audiences: + - public + total_examples: + type: number + description: The overall number of examples. + format: int64 + x-fern-audiences: + - public + train_examples: + type: number + description: The number of training examples. + format: int64 + x-fern-audiences: + - public + train_size_bytes: + type: number + description: The size in bytes of all training examples. + format: int64 + x-fern-audiences: + - public + eval_examples: + type: number + description: Number of evaluation examples. + format: int64 + x-fern-audiences: + - public + eval_size_bytes: + type: number + description: The size in bytes of all eval examples. + format: int64 + x-fern-audiences: + - public + reranker_data_metrics: + $ref: '#/components/schemas/RerankerDataMetrics' + chat_data_metrics: + $ref: '#/components/schemas/ChatDataMetrics' + classify_data_metrics: + $ref: '#/components/schemas/ClassifyDataMetrics' + Metrics: + type: object + properties: + finetune_dataset_metrics: + $ref: '#/components/schemas/FinetuneDatasetMetrics' + Dataset: + required: + - id + - name + - created_at + - updated_at + - dataset_type + - validation_status + type: object + properties: + id: + type: string + description: The dataset ID + x-fern-audiences: + - public + name: + type: string + description: The name of the dataset + x-fern-audiences: + - public + created_at: + type: string + description: The creation date + format: date-time + x-fern-audiences: + - public + updated_at: + type: string + description: The last update date + format: date-time + x-fern-audiences: + - public + dataset_type: + $ref: '#/components/schemas/DatasetType' + validation_status: + $ref: '#/components/schemas/DatasetValidationStatus' + validation_error: + type: string + description: Errors found during validation + x-fern-audiences: + - public + schema: + type: string + description: the avro schema of the dataset + x-fern-audiences: + - public + required_fields: + type: array + items: + type: string + x-fern-audiences: + - public + x-fern-audiences: + - public + preserve_fields: + type: array + items: + type: string + x-fern-audiences: + - public + x-fern-audiences: + - public + dataset_parts: + type: array + items: + $ref: '#/components/schemas/DatasetPart' + description: the underlying files that make up the dataset + x-fern-audiences: + - public + validation_warnings: + type: array + items: + type: string + x-fern-audiences: + - public + description: warnings found during validation + x-fern-audiences: + - public + parse_info: + $ref: '#/components/schemas/ParseInfo' + metrics: + $ref: '#/components/schemas/Metrics' + ConnectorOAuth: + required: + - authorize_url + - token_url + type: object + properties: + client_id: + type: string + description: The OAuth 2.0 client ID. This field is encrypted at rest. + x-fern-audiences: + - public + client_secret: + type: string + description: The OAuth 2.0 client Secret. This field is encrypted at rest and never returned in a response. + x-fern-audiences: + - public + authorize_url: + type: string + description: The OAuth 2.0 /authorize endpoint to use when users authorize the connector. + x-fern-audiences: + - public + token_url: + type: string + description: The OAuth 2.0 /token endpoint to use when users authorize the connector. + x-fern-audiences: + - public + scope: + type: string + description: The OAuth scopes to request when users authorize the connector. + x-fern-audiences: + - public + Connector: + required: + - id + - name + - created_at + - updated_at + type: object + properties: + id: + type: string + description: "The unique identifier of the connector (used in both `/connectors` & `/chat` endpoints).\nThis is automatically created from the name of the connector upon registration." + x-fern-audiences: + - public + organization_id: + type: string + description: "The organization to which this connector belongs. This is automatically set to\nthe organization of the user who created the connector." + x-fern-audiences: + - public + name: + type: string + description: A human-readable name for the connector. + x-fern-audiences: + - public + description: + type: string + description: A description of the connector. + x-fern-audiences: + - public + url: + type: string + description: The URL of the connector that will be used to search for documents. + x-fern-audiences: + - public + created_at: + type: string + description: The UTC time at which the connector was created. + format: date-time + x-fern-audiences: + - public + updated_at: + type: string + description: The UTC time at which the connector was last updated. + format: date-time + x-fern-audiences: + - public + excludes: + type: array + items: + type: string + x-fern-audiences: + - public + description: A list of fields to exclude from the prompt (fields remain in the document). + x-fern-audiences: + - public + auth_type: + type: string + description: 'The type of authentication/authorization used by the connector. Possible values: [oauth, service_auth]' + format: enum + x-fern-audiences: + - public + oauth: + $ref: '#/components/schemas/ConnectorOAuth' + auth_status: + enum: + - valid + - expired + type: string + description: 'The OAuth status for the user making the request. One of ["valid", "expired", ""]. Empty string (field is omitted) means the user has not authorized the connector yet.' + x-fern-audiences: + - public + active: + type: boolean + description: Whether the connector is active or not. + x-fern-audiences: + - public + continue_on_failure: + type: boolean + description: Whether a chat request should continue or not if the request to this connector fails. + x-fern-audiences: + - public + description: "A connector allows you to integrate data sources with the '/chat' endpoint to create grounded generations with citations to the data source.\ndocuments to help answer users." + ListConnectorsResponse: + required: + - connectors + type: object + properties: + connectors: + type: array + items: + $ref: '#/components/schemas/Connector' + x-fern-audiences: + - public + total_count: + type: number + description: Total number of connectors. + readOnly: true + x-fern-audiences: + - public + CreateConnectorOAuth: + required: + - clientId + - clientSecret + - authorizeUrl + - tokenUrl + type: object + properties: + client_id: + type: string + description: The OAuth 2.0 client ID. This fields is encrypted at rest. + x-fern-audiences: + - public + client_secret: + type: string + description: The OAuth 2.0 client Secret. This field is encrypted at rest and never returned in a response. + x-fern-audiences: + - public + authorize_url: + type: string + description: The OAuth 2.0 /authorize endpoint to use when users authorize the connector. + x-fern-audiences: + - public + token_url: + type: string + description: The OAuth 2.0 /token endpoint to use when users authorize the connector. + x-fern-audiences: + - public + scope: + type: string + description: The OAuth scopes to request when users authorize the connector. + x-fern-audiences: + - public + AuthTokenType: + enum: + - bearer + - basic + - noscheme + type: string + description: 'The token_type specifies the way the token is passed in the Authorization header. Valid values are "bearer", "basic", and "noscheme".' + default: noscheme + CreateConnectorServiceAuth: + required: + - type + - token + type: object + properties: + type: + $ref: '#/components/schemas/AuthTokenType' + token: + type: string + description: The token that will be used in the HTTP Authorization header when making requests to the connector. This field is encrypted at rest and never returned in a response. + x-fern-audiences: + - public + CreateConnectorRequest: + required: + - name + - url + type: object + properties: + name: + type: string + description: A human-readable name for the connector. + x-fern-audiences: + - public + description: + type: string + description: A description of the connector. + x-fern-audiences: + - public + url: + type: string + description: The URL of the connector that will be used to search for documents. + x-fern-audiences: + - public + excludes: + type: array + items: + type: string + x-fern-audiences: + - public + description: A list of fields to exclude from the prompt (fields remain in the document). + x-fern-audiences: + - public + oauth: + $ref: '#/components/schemas/CreateConnectorOAuth' + active: + type: boolean + description: Whether the connector is active or not. + default: true + x-fern-audiences: + - public + continue_on_failure: + type: boolean + description: Whether a chat request should continue or not if the request to this connector fails. + default: false + x-fern-audiences: + - public + service_auth: + $ref: '#/components/schemas/CreateConnectorServiceAuth' + CreateConnectorResponse: + required: + - connector + type: object + properties: + connector: + $ref: '#/components/schemas/Connector' + GetConnectorResponse: + required: + - connector + type: object + properties: + connector: + $ref: '#/components/schemas/Connector' + DeleteConnectorResponse: + type: object + UpdateConnectorRequest: + type: object + properties: + name: + type: string + description: A human-readable name for the connector. + x-fern-audiences: + - public + url: + type: string + description: The URL of the connector that will be used to search for documents. + x-fern-audiences: + - public + excludes: + type: array + items: + type: string + x-fern-audiences: + - public + description: A list of fields to exclude from the prompt (fields remain in the document). + x-fern-audiences: + - public + oauth: + $ref: '#/components/schemas/CreateConnectorOAuth' + active: + type: boolean + default: true + x-fern-audiences: + - public + continue_on_failure: + type: boolean + default: false + x-fern-audiences: + - public + service_auth: + $ref: '#/components/schemas/CreateConnectorServiceAuth' + UpdateConnectorResponse: + required: + - connector + type: object + properties: + connector: + $ref: '#/components/schemas/Connector' + OAuthAuthorizeResponse: + type: object + properties: + redirect_url: + type: string + description: The OAuth 2.0 redirect url. Redirect the user to this url to authorize the connector. + x-fern-audiences: + - public + ConnectorLog: + required: + - id + - connector_id + - request_id + - user_id + - organization_id + - created_at + - status_code + - duration_millis + type: object + properties: + id: + type: string + description: Unique identifier for the connector log + connector_id: + type: string + description: Unique identifier for the connector + request_id: + type: string + description: Unique identifier for the request + user_id: + type: string + description: Unique identifier for the user + organization_id: + type: string + description: Unique identifier for the organization + created_at: + type: string + description: Time of connector log creation in RFC3339 format + format: date-time + example: '2023-04-28T21:00:56.6462570+00:00' + status_code: + type: integer + description: HTTP status code of the request + duration_millis: + type: integer + description: Duration of the request in milliseconds + error_message: + type: string + description: Error message of the request + GetConnectorsLogsResponse: + required: + - connector_logs + - total + type: object + properties: + connector_logs: + type: array + items: + $ref: '#/components/schemas/ConnectorLog' + total: + type: number + description: Total number of connector logs + readOnly: true + TokenLikelihood: + type: object + properties: + encoded: + type: integer + description: Tokenized text + x-fern-audiences: + - public + decoded: + type: string + description: Detokenized text + x-fern-audiences: + - public + log_likelihood: + type: number + description: Non normalized probability of the token + x-fern-audiences: + - public + LogLikelihoodResponse: + required: + - id + - prompt_tokens + - completion_tokens + - raw_prompt_tokens + type: object + properties: + id: + type: string + x-fern-audiences: + - public + prompt_tokens: + type: array + items: + $ref: '#/components/schemas/TokenLikelihood' + description: Probabilities for tokens in the request prompt + x-fern-audiences: + - public + completion_tokens: + type: array + items: + $ref: '#/components/schemas/TokenLikelihood' + description: Probabilities for tokens in the request completion + x-fern-audiences: + - public + raw_prompt_tokens: + type: array + items: + $ref: '#/components/schemas/TokenLikelihood' + description: Probabilities for tokens in the request raw_prompt + x-fern-audiences: + - public + meta: + $ref: '#/components/schemas/ApiMeta' + Cluster: + type: object + properties: + id: + type: string + x-fern-audiences: + - public + keywords: + type: array + items: + type: string + x-fern-audiences: + - public + x-fern-audiences: + - public + description: + type: string + x-fern-audiences: + - public + size: + type: integer + x-fern-audiences: + - public + sample_elements: + type: array + items: + type: string + x-fern-audiences: + - public + x-fern-audiences: + - public + GetClusterJobResponse: + required: + - job_id + type: object + properties: + job_id: + type: string + x-fern-audiences: + - public + created_at: + type: string + description: Time of job creation in RFC3339 format + format: date-time + readOnly: true + example: '2023-04-28T21:00:56.6462570+00:00' + x-fern-audiences: + - public + embeddings_url: + type: string + description: The input file URL used for the job + readOnly: true + x-fern-audiences: + - public + input_dataset_id: + type: string + description: The input dataset ID used for the job + readOnly: true + x-fern-audiences: + - public + min_cluster_size: + type: integer + description: The parameter used in the job creation. Please refer to the job creation endpoint for more details + readOnly: true + x-fern-audiences: + - public + n_neighbors: + type: integer + description: The parameter used in the job creation. Please refer to the job creation endpoint for more details + readOnly: true + x-fern-audiences: + - public + is_deterministic: + type: boolean + description: The parameter used in the job creation. Please refer to the job creation endpoint for more details + readOnly: true + x-fern-audiences: + - public + status: + enum: + - unknown + - processing + - failed + - complete + - queued + type: string + x-fern-audiences: + - public + is_final_state: + type: boolean + description: 'A boolean indicating whether the job is in a final state, whether completed or failed' + readOnly: true + x-fern-audiences: + - public + output_clusters_url: + type: string + description: The output file URL for the clusters (signed url that expires) + readOnly: true + x-fern-audiences: + - public + output_outliers_url: + type: string + description: The output file URL for the outliers (signed url that expires) + readOnly: true + x-fern-audiences: + - public + clusters: + type: array + items: + $ref: '#/components/schemas/Cluster' + description: The list of cluster summaries for the job + readOnly: true + x-fern-audiences: + - public + error: + type: string + x-fern-audiences: + - public + meta: + $ref: '#/components/schemas/ApiMeta' + description: Response for getting a cluster job. + ListClusterJobsResponse: + required: + - jobs + type: object + properties: + jobs: + type: array + items: + $ref: '#/components/schemas/GetClusterJobResponse' + x-fern-audiences: + - public + total_count: + type: integer + x-fern-audiences: + - public + meta: + $ref: '#/components/schemas/ApiMeta' + CreateClusterJobRequest: + required: + - embeddings_url + type: object + properties: + embeddings_url: + type: string + x-fern-audiences: + - public + input_dataset_id: + type: string + x-fern-audiences: + - public + min_cluster_size: + minimum: 1 + type: integer + description: Defaults to `10`. Parameter for HDBSCAN. Only clusters with this number of elements will be returned with a positive cluster number. + default: 10 + x-fern-audiences: + - public + n_neighbors: + maximum: 100 + minimum: 2 + type: integer + description: Parameter for UMAP. A scalar governing how to balance global vs local structure in the data. + default: 15 + x-fern-audiences: + - public + is_deterministic: + type: boolean + description: Parameter for UMAP. A boolean governing whether the embeddings from UMAP (that will be clustered with HDBSCAN) are deterministic. + default: true + x-fern-audiences: + - public + generate_descriptions: + type: boolean + x-fern-audiences: + - public + CreateClusterJobResponse: + required: + - job_id + type: object + properties: + job_id: + type: string + x-fern-audiences: + - public + description: Response for creating a cluster job. + UpdateClusterJobRequest: + type: object + properties: + status: + enum: + - unknown + - processing + - failed + - complete + - queued + type: string + x-fern-audiences: + - public + clusters: + type: array + items: + $ref: '#/components/schemas/Cluster' + x-fern-audiences: + - public + output_clusters_gs_path: + type: string + x-fern-audiences: + - public + output_outliers_gs_path: + type: string + x-fern-audiences: + - public + error: + type: string + x-fern-audiences: + - public + input_tracking_metrics: + type: object + x-fern-audiences: + - public + output_tracking_metrics: + type: object + x-fern-audiences: + - public + UpdateClusterJobResponse: + required: + - job_id + type: object + properties: + job_id: + type: string + x-fern-audiences: + - public + description: Response for updating a cluster job. + CompatibleEndpoint: + enum: + - chat + - embed + - classify + - summarize + - rerank + - rate + - generate + type: string + description: One of the Cohere API endpoints that the model can be used with. + GetModelResponse: + type: object + properties: + name: + type: string + description: Specify this name in the `model` parameter of API requests to use your chosen model. + x-fern-audiences: + - public + endpoints: + type: array + items: + $ref: '#/components/schemas/CompatibleEndpoint' + description: The API endpoints that the model is compatible with. + x-fern-audiences: + - public + finetuned: + type: boolean + description: Whether the model has been fine-tuned or not. + x-fern-audiences: + - public + context_length: + type: number + description: The maximum number of tokens that the model can process in a single request. Note that not all of these tokens are always available due to special tokens and preambles that Cohere has added by default. + x-fern-audiences: + - public + tokenizer_url: + type: string + description: Public URL to the tokenizer's configuration file. + x-fern-audiences: + - public + default_endpoints: + type: array + items: + $ref: '#/components/schemas/CompatibleEndpoint' + description: The API endpoints that the model is default to. + x-fern-audiences: + - public + description: Contains information about the model and which API endpoints it can be used with. + ListModelsResponse: + required: + - models + type: object + properties: + models: + type: array + items: + $ref: '#/components/schemas/GetModelResponse' + x-fern-audiences: + - public + next_page_token: + type: string + description: A token to retrieve the next page of results. Provide in the page_token parameter of the next request. + x-fern-audiences: + - public + BaseType: + enum: + - BASE_TYPE_UNSPECIFIED + - BASE_TYPE_GENERATIVE + - BASE_TYPE_CLASSIFICATION + - BASE_TYPE_RERANK + - BASE_TYPE_CHAT + type: string + description: "The possible types of fine-tuned models.\n\n - BASE_TYPE_UNSPECIFIED: Unspecified model.\n - BASE_TYPE_GENERATIVE: Generative model.\n - BASE_TYPE_CLASSIFICATION: Classification model.\n - BASE_TYPE_RERANK: Rerank model.\n - BASE_TYPE_CHAT: Chat model." + default: BASE_TYPE_UNSPECIFIED + x-fern-sdk-group-name: + - finetuning + - finetuning + Strategy: + enum: + - STRATEGY_UNSPECIFIED + - STRATEGY_VANILLA + - STRATEGY_TFEW + type: string + description: "The possible strategy used to serve a fine-tuned models.\n\n - STRATEGY_UNSPECIFIED: Unspecified strategy.\n - STRATEGY_VANILLA: Serve the fine-tuned model on a dedicated GPU.\n - STRATEGY_TFEW: Serve the fine-tuned model on a shared GPU." + default: STRATEGY_UNSPECIFIED + x-fern-sdk-group-name: + - finetuning + - finetuning + BaseModel: + required: + - base_type + type: object + properties: + name: + type: string + description: The name of the base model. + version: + type: string + description: read-only. The version of the base model. + readOnly: true + base_type: + $ref: '#/components/schemas/BaseType' + strategy: + $ref: '#/components/schemas/Strategy' + description: The base model used for fine-tuning. + x-fern-sdk-group-name: + - finetuning + - finetuning + Hyperparameters: + type: object + properties: + early_stopping_patience: + type: integer + description: "Stops training if the loss metric does not improve beyond the value of\n`early_stopping_threshold` after this many times of evaluation." + format: int32 + early_stopping_threshold: + type: number + description: How much the loss must improve to prevent early stopping. + format: double + train_batch_size: + type: integer + description: "The batch size is the number of training examples included in a single\ntraining pass." + format: int32 + train_epochs: + type: integer + description: The number of epochs to train for. + format: int32 + learning_rate: + type: number + description: The learning rate to be used during training. + format: double + description: The fine-tuning hyperparameters. + x-fern-sdk-group-name: + - finetuning + - finetuning + WandbConfig: + required: + - project + - api_key + type: object + properties: + project: + type: string + description: The WandB project name to be used during training. + api_key: + type: string + description: The WandB API key to be used during training. + entity: + type: string + description: The WandB entity name to be used during training. + description: The Weights & Biases configuration. + x-fern-sdk-group-name: + - finetuning + - finetuning + Settings: + required: + - base_model + - dataset_id + type: object + properties: + base_model: + $ref: '#/components/schemas/BaseModel' + dataset_id: + type: string + description: The data used for training and evaluating the fine-tuned model. + hyperparameters: + $ref: '#/components/schemas/Hyperparameters' + multi_label: + type: boolean + description: read-only. Whether the model is single-label or multi-label (only for classification). + readOnly: true + wandb: + $ref: '#/components/schemas/WandbConfig' + description: The configuration used for fine-tuning. + x-fern-sdk-group-name: + - finetuning + - finetuning + Status: + enum: + - STATUS_UNSPECIFIED + - STATUS_FINETUNING + - STATUS_DEPLOYING_API + - STATUS_READY + - STATUS_FAILED + - STATUS_DELETED + - STATUS_TEMPORARILY_OFFLINE + - STATUS_PAUSED + - STATUS_QUEUED + type: string + description: "The possible stages of a fine-tuned model life-cycle.\n\n - STATUS_UNSPECIFIED: Unspecified status.\n - STATUS_FINETUNING: The fine-tuned model is being fine-tuned.\n - STATUS_DEPLOYING_API: The fine-tuned model is being deployed.\n - STATUS_READY: The fine-tuned model is ready to receive requests.\n - STATUS_FAILED: The fine-tuned model failed.\n - STATUS_DELETED: The fine-tuned model was deleted.\n - STATUS_TEMPORARILY_OFFLINE: The fine-tuned model is temporarily unavailable.\n - STATUS_PAUSED: The fine-tuned model is paused (Vanilla only).\n - STATUS_QUEUED: The fine-tuned model is queued for training." + default: STATUS_UNSPECIFIED + x-fern-sdk-group-name: + - finetuning + - finetuning + FinetunedModel: + required: + - name + - settings + type: object + properties: + id: + type: string + description: read-only. FinetunedModel ID. + readOnly: true + name: + type: string + description: FinetunedModel name (e.g. `foobar`). + creator_id: + type: string + description: read-only. User ID of the creator. + readOnly: true + organization_id: + type: string + description: read-only. Organization ID. + readOnly: true + settings: + $ref: '#/components/schemas/Settings' + status: + $ref: '#/components/schemas/Status' + created_at: + type: string + description: read-only. Creation timestamp. + format: date-time + readOnly: true + updated_at: + type: string + description: read-only. Latest update timestamp. + format: date-time + readOnly: true + completed_at: + type: string + description: read-only. Timestamp for the completed fine-tuning. + format: date-time + readOnly: true + last_used: + type: string + description: read-only. Timestamp for the latest request to this fine-tuned model. + format: date-time + readOnly: true + description: This resource represents a fine-tuned model. + x-fern-sdk-group-name: + - finetuning + - finetuning + ListFinetunedModelsResponse: + type: object + properties: + finetuned_models: + type: array + items: + $ref: '#/components/schemas/FinetunedModel' + description: List of fine-tuned models matching the request. + next_page_token: + type: string + description: "Pagination token to retrieve the next page of results. If the value is \"\",\nit means no further results for the request." + total_size: + type: integer + description: Total count of results. + format: int32 + description: Response to a request to list fine-tuned models. + x-fern-sdk-group-name: + - finetuning + - finetuning + Error: + type: object + properties: + message: + type: string + description: A developer-facing error message. + description: Error is the response for any unsuccessful event. + x-fern-sdk-group-name: + - finetuning + - finetuning + CreateFinetunedModelResponse: + type: object + properties: + finetuned_model: + $ref: '#/components/schemas/FinetunedModel' + description: Response to request to create a fine-tuned model. + x-fern-sdk-group-name: + - finetuning + - finetuning + GetFinetunedModelResponse: + type: object + properties: + finetuned_model: + $ref: '#/components/schemas/FinetunedModel' + description: Response to a request to get a fine-tuned model. + x-fern-sdk-group-name: + - finetuning + - finetuning + DeleteFinetunedModelResponse: + type: object + description: Response to request to delete a fine-tuned model. + x-fern-sdk-group-name: + - finetuning + - finetuning + UpdateFinetunedModelResponse: + type: object + properties: + finetuned_model: + $ref: '#/components/schemas/FinetunedModel' + description: Response to a request to update a fine-tuned model. + x-fern-sdk-group-name: + - finetuning + - finetuning + Event: + type: object + properties: + user_id: + type: string + description: ID of the user who initiated the event. Empty if initiated by the system. + status: + $ref: '#/components/schemas/Status' + created_at: + type: string + description: Timestamp when the event happened. + format: date-time + description: A change in status of a fine-tuned model. + x-fern-sdk-group-name: + - finetuning + - finetuning + ListEventsResponse: + type: object + properties: + events: + type: array + items: + $ref: '#/components/schemas/Event' + description: List of events for the fine-tuned model. + next_page_token: + type: string + description: "Pagination token to retrieve the next page of results. If the value is \"\",\nit means no further results for the request." + total_size: + type: integer + description: Total count of results. + format: int32 + description: Response to a request to list events of a fine-tuned model. + x-fern-sdk-group-name: + - finetuning + - finetuning + TrainingStepMetrics: + type: object + properties: + created_at: + type: string + description: Creation timestamp. + format: date-time + step_number: + type: integer + description: Step number. + format: int32 + metrics: + type: object + additionalProperties: + type: number + format: double + description: Map of names and values for each evaluation metrics. + description: The evaluation metrics at a given step of the training of a fine-tuned model. + x-fern-sdk-group-name: + - finetuning + - finetuning + ListTrainingStepMetricsResponse: + type: object + properties: + step_metrics: + type: array + items: + $ref: '#/components/schemas/TrainingStepMetrics' + description: The metrics for each step the evaluation was run on. + next_page_token: + type: string + description: "Pagination token to retrieve the next page of results. If the value is \"\",\nit means no further results for the request." + description: Response to a request to list training-step metrics of a fine-tuned model. + x-fern-sdk-group-name: + - finetuning + - finetuning + responses: + BadRequest: + description: "This error is returned when the request is not well formed. This could be because:\n - JSON is invalid\n - The request is missing required fields\n - The request contains an invalid combination of fields\n" + content: + application/json: + schema: + type: object + properties: + data: + type: string + Unauthorized: + description: "This error indicates that the operation attempted to be performed is not allowed. This could be because:\n - The api token is invalid\n - The user does not have the necessary permissions\n" + content: + application/json: + schema: + type: object + properties: + data: + type: string + Forbidden: + description: "This error indicates that the operation attempted to be performed is not allowed. This could be because:\n - The api token is invalid\n - The user does not have the necessary permissions\n" + content: + application/json: + schema: + type: object + properties: + data: + type: string + NotFound: + description: "This error is returned when a resource is not found. This could be because:\n - The endpoint does not exist\n - The resource does not exist eg model id, dataset id\n" + content: + application/json: + schema: + type: object + properties: + data: + type: string + UnprocessableEntity: + description: "This error is returned when the request is not well formed. This could be because:\n - JSON is invalid\n - The request is missing required fields\n - The request contains an invalid combination of fields\n" + content: + application/json: + schema: + type: object + properties: + data: + type: string + RateLimit: + description: Too many requests + content: + application/json: + schema: + type: object + properties: + data: + type: string + InvalidToken: + description: "This error is returned when a request or response contains a deny-listed token.\n" + content: + application/json: + schema: + type: object + properties: + data: + type: string + RequestCancelled: + description: "This error is returned when a request is cancelled by the user.\n" + content: + application/json: + schema: + type: object + properties: + data: + type: string + InternalServerError: + description: "This error is returned when an uncategorised internal server error occurs.\n" + content: + application/json: + schema: + type: object + properties: + data: + type: string + NotImplemented: + description: "This error is returned when the requested feature is not implemented.\n" + content: + application/json: + schema: + type: object + properties: + data: + type: string + ServiceUnavailable: + description: "This error is returned when the service is unavailable. This could be due to:\n - Too many users trying to access the service at the same time\n" + content: + application/json: + schema: + type: object + properties: + data: + type: string + GatewayTimeout: + description: "This error is returned when a request to the server times out. This could be due to:\n - An internal services taking too long to respond\n" + content: + application/json: + schema: + type: object + properties: + data: + type: string + parameters: + RequestSource: + name: X-Client-Name + in: header + description: "The name of the project that is making the request.\n" + schema: + type: string + example: my-cool-project + x-fern-audiences: + - public + securitySchemes: + bearerAuth: + type: http + scheme: bearer + x-fern-audiences: + - public + x-fern-bearer: + env: CO_API_KEY +security: + - bearerAuth: [ ] +tags: + - name: /datasets + description: Datasets API + - name: /connectors + description: Connectors API + - name: /embed-jobs + description: Embed Jobs API + - name: /finetuning + description: Finetuning API (Beta) \ No newline at end of file diff --git a/specs/huggingface.yaml b/specs/huggingface.yaml new file mode 100644 index 0000000000..8c74aea64e --- /dev/null +++ b/specs/huggingface.yaml @@ -0,0 +1,171 @@ +openapi: 3.0.0 +info: + title: HuggingFace API + description: APIs for sampling from and fine-tuning language models + version: '1.0.0' +servers: + - url: https://api-inference.huggingface.co/ +tags: + - name: HuggingFace + description: The HuggingFace REST API +paths: + /models/{modelId}: + post: + operationId: generateText + parameters: + - in: path + name: modelId + schema: + type: string + required: true + description: Model ID of the user to get + tags: + - HuggingFace + summary: Creates a completion for the provided prompt and parameters. + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/GenerateTextRequest' + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/GenerateTextResponse' + +components: + schemas: + ErrorResponse: + type: object + properties: + error: + anyOf: + - type: string + - type: array + items: + type: string + required: + - error + + GenerateTextRequest: + type: object + properties: + inputs: + description: | + The prompt that you want to complete. + nullable: true + type: string + default: '' + example: "This is a test." + parameters: + $ref: '#/components/schemas/GenerateTextRequestParameters' + options: + $ref: '#/components/schemas/GenerateTextRequestOptions' + required: + - inputs + + GenerateTextRequestParameters: + type: object + properties: + top_k: + type: integer + example: 1 + nullable: true + description: &completions_top_k_description | + Integer to define the top tokens considered within the sample operation to create new text. + top_p: + type: number + example: 1 + nullable: true + description: | + Float to define the tokens that are within the sample operation of text generation. + Add tokens in the sample for more probable to least probable until the sum of the probabilities is greater than top_p. + temperature: + type: number + minimum: 0 + maximum: 100 + default: 1 + example: 1 + nullable: true + description: | + The temperature of the sampling operation. + + 1 means regular sampling, + 0 means always take the highest score, + 100.0 is getting closer to uniform probability. + repetition_penalty: + type: number + minimum: 0 + maximum: 100 + example: 1 + nullable: true + description: | + The more a token is used within generation the more it is penalized to not be picked in successive generation passes. + max_new_tokens: + type: integer + minimum: 1 + maximum: 250 + example: 250 + nullable: true + description: | + The amount of new tokens to be generated, this does not include the input length it is a estimate of the size of generated text you want. + Each new tokens slows down the request, so look for balance between response times and length of text generated. + max_time: + type: number + minimum: 0 + maximum: 120 + example: 1 + nullable: true + description: | + The amount of time in seconds that the query should take maximum. Network can cause some overhead so it will be a soft limit. Use that in combination with max_new_tokens for best results. + return_full_text: + description: > + If set to False, the return results will not contain the original query making it easier for prompting. + default: true + num_return_sequences: + type: integer + default: 1 + example: 1 + nullable: true + description: | + The number of proposition you want to be returned. + do_sample: + description: > + Whether or not to use sampling, use greedy decoding otherwise. + default: true + + GenerateTextRequestOptions: + type: object + properties: + use_cache: + description: > + There is a cache layer on the inference API to speedup requests we have already seen. + Most models can use those results as is as models are deterministic (meaning the results will be the same anyway). + However if you use a non deterministic model, + you can set this parameter to prevent the caching mechanism from being used resulting in a real new query. + default: true + wait_for_model: + description: > + If the model is not ready, wait for it instead of receiving 503. + It limits the number of requests required to get your inference done. + It is advised to only set this flag to true after receiving a 503 error as it will limit hanging + in your application to known places. + default: false + + GenerateTextResponse: + type: array + items: + $ref: '#/components/schemas/GenerateTextResponseValue' + + GenerateTextResponseValue: + type: object + properties: + generated_text: + type: string + description: | + The resulting completion up to and excluding the stop sequences. + required: + - generated_text \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/Tests.Ai21_Diagnostics.verified.txt b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/Tests.Ai21_Diagnostics.verified.txt new file mode 100644 index 0000000000..ad47dbb93f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/Tests.Ai21_Diagnostics.verified.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#AllOf.1.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#AllOf.1.g.verified.cs new file mode 100644 index 0000000000..2e5f47dd3f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#AllOf.1.g.verified.cs @@ -0,0 +1,115 @@ +//HintName: AllOf.1.g.cs +using System.Linq; + +#nullable enable + +namespace System +{ + /// + /// + /// + public readonly partial struct AllOf : global::System.IEquatable> + { + /// + /// + /// +#if NET6_0_OR_GREATER + public T1? Value1 { get; init; } +#else + public T1? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator AllOf(T1 value) => new AllOf(value); + + /// + /// + /// + public static implicit operator T1?(AllOf @this) => @this.Value1; + + /// + /// + /// + public AllOf(T1? value) + { + Value1 = value; + } + + /// + /// + /// + public object? Object => + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(T1), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(AllOf other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) + ; + } + + /// + /// + /// + public static bool operator ==(AllOf obj1, AllOf obj2) + { + return global::System.Collections.Generic.EqualityComparer>.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(AllOf obj1, AllOf obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is AllOf o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#AnyOf.2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#AnyOf.2.g.verified.cs new file mode 100644 index 0000000000..8333f3c3e9 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#AnyOf.2.g.verified.cs @@ -0,0 +1,166 @@ +//HintName: AnyOf.2.g.cs +using System.Linq; + +#nullable enable + +namespace System +{ + /// + /// + /// + public readonly partial struct AnyOf : global::System.IEquatable> + { + /// + /// + /// +#if NET6_0_OR_GREATER + public T1? Value1 { get; init; } +#else + public T1? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator AnyOf(T1 value) => new AnyOf(value); + + /// + /// + /// + public static implicit operator T1?(AnyOf @this) => @this.Value1; + + /// + /// + /// + public AnyOf(T1? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public T2? Value2 { get; init; } +#else + public T2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator AnyOf(T2 value) => new AnyOf(value); + + /// + /// + /// + public static implicit operator T2?(AnyOf @this) => @this.Value2; + + /// + /// + /// + public AnyOf(T2? value) + { + Value2 = value; + } + + /// + /// + /// + public AnyOf( + T1? value1, + T2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 || IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(T1), + Value2, + typeof(T2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(AnyOf other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(AnyOf obj1, AnyOf obj2) + { + return global::System.Collections.Generic.EqualityComparer>.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(AnyOf obj1, AnyOf obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is AnyOf o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Api.Authorizations.Bearer.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Api.Authorizations.Bearer.g.verified.cs new file mode 100644 index 0000000000..9e50a716ae --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Api.Authorizations.Bearer.g.verified.cs @@ -0,0 +1,23 @@ +//HintName: G.Api.Authorizations.Bearer.g.cs + +#nullable enable + +namespace G +{ + public sealed partial class Api + { + /// + /// Authorize using bearer authentication. + /// + /// + public void AuthorizeUsingBearer( + string apiKey) + { + apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + + _httpClient.DefaultRequestHeaders.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: "Bearer", + parameter: apiKey); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Api.Constructors.Bearer.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Api.Constructors.Bearer.g.verified.cs new file mode 100644 index 0000000000..1905775566 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Api.Constructors.Bearer.g.verified.cs @@ -0,0 +1,18 @@ +//HintName: G.Api.Constructors.Bearer.g.cs + +#nullable enable + +namespace G +{ + public sealed partial class Api + { + /// + public Api( + string apiKey, + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null) : this(httpClient, baseUri) + { + AuthorizeUsingBearer(apiKey); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Api.ConvertDocumentFileStudioV1ChatFilesConvertPost.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Api.ConvertDocumentFileStudioV1ChatFilesConvertPost.g.verified.cs new file mode 100644 index 0000000000..3b81e8c4e6 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Api.ConvertDocumentFileStudioV1ChatFilesConvertPost.g.verified.cs @@ -0,0 +1,118 @@ +//HintName: G.Api.ConvertDocumentFileStudioV1ChatFilesConvertPost.g.cs +using System.Linq; + +#nullable enable + +namespace G +{ + public partial class Api + { + partial void PrepareConvertDocumentFileStudioV1ChatFilesConvertPostArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.BodyConvertDocumentFileStudioV1ChatFilesConvertPost request); + partial void PrepareConvertDocumentFileStudioV1ChatFilesConvertPostRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.BodyConvertDocumentFileStudioV1ChatFilesConvertPost request); + partial void ProcessConvertDocumentFileStudioV1ChatFilesConvertPostResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessConvertDocumentFileStudioV1ChatFilesConvertPostResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Convert Document File + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ConvertDocumentFileStudioV1ChatFilesConvertPostAsync( + global::G.BodyConvertDocumentFileStudioV1ChatFilesConvertPost request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareConvertDocumentFileStudioV1ChatFilesConvertPostArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/studio/v1/chat/files/convert", global::System.UriKind.RelativeOrAbsolute)); + using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"[{string.Join(",", request.Files.Select(x => x))}]"), + name: "files"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareConvertDocumentFileStudioV1ChatFilesConvertPostRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessConvertDocumentFileStudioV1ChatFilesConvertPostResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessConvertDocumentFileStudioV1ChatFilesConvertPostResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Convert Document File + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ConvertDocumentFileStudioV1ChatFilesConvertPostAsync( + global::System.Collections.Generic.IList files, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.BodyConvertDocumentFileStudioV1ChatFilesConvertPost + { + Files = files, + }; + + return await ConvertDocumentFileStudioV1ChatFilesConvertPostAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Api.V1Answer.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Api.V1Answer.g.verified.cs new file mode 100644 index 0000000000..e2c4669216 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Api.V1Answer.g.verified.cs @@ -0,0 +1,131 @@ +//HintName: G.Api.V1Answer.g.cs + +#nullable enable + +namespace G +{ + public partial class Api + { + partial void PrepareV1AnswerArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.AnswerBody request); + partial void PrepareV1AnswerRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.AnswerBody request); + partial void ProcessV1AnswerResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1AnswerResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Answer + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1AnswerAsync( + global::G.AnswerBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1AnswerArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/studio/v1/answer", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1AnswerRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1AnswerResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1AnswerResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Answer + /// + /// + /// + /// + /// An enumeration. + /// + /// + /// An enumeration. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1AnswerAsync( + string context, + string question, + global::G.AnswerLength? answerLength = default, + global::G.Mode? mode = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.AnswerBody + { + Context = context, + Question = question, + AnswerLength = answerLength, + Mode = mode, + }; + + return await V1AnswerAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Api.V1ConversationalRag.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Api.V1ConversationalRag.g.verified.cs new file mode 100644 index 0000000000..383c6b0e9b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Api.V1ConversationalRag.g.verified.cs @@ -0,0 +1,152 @@ +//HintName: G.Api.V1ConversationalRag.g.cs + +#nullable enable + +namespace G +{ + public partial class Api + { + partial void PrepareV1ConversationalRagArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.ConversationalRagFlowPublicFields request); + partial void PrepareV1ConversationalRagRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.ConversationalRagFlowPublicFields request); + partial void ProcessV1ConversationalRagResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1ConversationalRagResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Conversational Rag + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1ConversationalRagAsync( + global::G.ConversationalRagFlowPublicFields request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1ConversationalRagArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/studio/v1/conversational-rag", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1ConversationalRagRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1ConversationalRagResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1ConversationalRagResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Conversational Rag + /// + /// + /// messages + /// + /// + /// + /// + /// + /// Default Value: 15 + /// + /// + /// Default Value: default + /// + /// + /// Default Value: 0.8 + /// + /// + /// + /// Default Value: 0.98 + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1ConversationalRagAsync( + global::System.Collections.Generic.IList messages, + string? path = default, + global::System.Collections.Generic.IList? labels = default, + global::System.Collections.Generic.IList? fileIds = default, + int maxSegments = 15, + global::G.ConversationalRagFlowPublicFieldsRetrievalStrategy? retrievalStrategy = global::G.ConversationalRagFlowPublicFieldsRetrievalStrategy.Default, + double retrievalSimilarityThreshold = 0.8, + int maxNeighbors = default, + double hybridSearchAlpha = 0.98, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.ConversationalRagFlowPublicFields + { + Messages = messages, + Path = path, + Labels = labels, + FileIds = fileIds, + MaxSegments = maxSegments, + RetrievalStrategy = retrievalStrategy, + RetrievalSimilarityThreshold = retrievalSimilarityThreshold, + MaxNeighbors = maxNeighbors, + HybridSearchAlpha = hybridSearchAlpha, + }; + + return await V1ConversationalRagAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Api.V1Embed.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Api.V1Embed.g.verified.cs new file mode 100644 index 0000000000..8cd2d6abd6 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Api.V1Embed.g.verified.cs @@ -0,0 +1,123 @@ +//HintName: G.Api.V1Embed.g.cs + +#nullable enable + +namespace G +{ + public partial class Api + { + partial void PrepareV1EmbedArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.EmbeddingsBody request); + partial void PrepareV1EmbedRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.EmbeddingsBody request); + partial void ProcessV1EmbedResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1EmbedResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Embed + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1EmbedAsync( + global::G.EmbeddingsBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1EmbedArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/studio/v1/embed", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1EmbedRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1EmbedResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1EmbedResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Embed + /// + /// + /// + /// Default Value: segment + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1EmbedAsync( + global::System.Collections.Generic.IList texts, + global::System.AllOf? type = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.EmbeddingsBody + { + Texts = texts, + Type = type, + }; + + return await V1EmbedAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Api.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Api.g.verified.cs new file mode 100644 index 0000000000..ab271405e6 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Api.g.verified.cs @@ -0,0 +1,121 @@ +//HintName: G.Api.g.cs + +#nullable enable + +namespace G +{ + /// + /// Access our powerful language models using an API that makes you smile
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class Api : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.ai21.com/"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::Newtonsoft.Json.JsonSerializerSettings _jsonSerializerOptions; + + + /// + /// + /// + public JambaCompleteClient JambaComplete => new JambaCompleteClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// + /// + public CompletionClient Completion => new CompletionClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// + /// + public CustomModelsClient CustomModels => new CustomModelsClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// + /// + public DatasetsClient Datasets => new DatasetsClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// + /// + public ParaphraseClient Paraphrase => new ParaphraseClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// + /// + public SummarizeClient Summarize => new SummarizeClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// + /// + public SegmentationClient Segmentation => new SegmentationClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// + /// + public GrammaticalErrorCorrectionsClient GrammaticalErrorCorrections => new GrammaticalErrorCorrectionsClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// + /// + public LibraryManagementClient LibraryManagement => new LibraryManagementClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// + /// + public RAGEngineClient RAGEngine => new RAGEngineClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// + /// + public ChatClient Chat => new ChatClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// + /// + public TokenizeClient Tokenize => new TokenizeClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// Creates a new instance of the Api. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public Api( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::Newtonsoft.Json.JsonSerializerSettings? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::Newtonsoft.Json.JsonSerializerSettings(); + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.ChatClient.V1J2UltraChat.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.ChatClient.V1J2UltraChat.g.verified.cs new file mode 100644 index 0000000000..d2440f5cb2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.ChatClient.V1J2UltraChat.g.verified.cs @@ -0,0 +1,178 @@ +//HintName: G.ChatClient.V1J2UltraChat.g.cs + +#nullable enable + +namespace G +{ + public partial class ChatClient + { + partial void PrepareV1J2UltraChatArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? model, + global::G.LanguageStudioApiServerDataTypesJ2ChatChatRequest request); + partial void PrepareV1J2UltraChatRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? model, + global::G.LanguageStudioApiServerDataTypesJ2ChatChatRequest request); + partial void ProcessV1J2UltraChatResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1J2UltraChatResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// j2-ultra chat + /// + /// + /// Default Value: j2-ultra + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2UltraChatAsync( + string? model, + global::G.LanguageStudioApiServerDataTypesJ2ChatChatRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1J2UltraChatArguments( + httpClient: _httpClient, + model: ref model, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/j2-ultra/chat?model={model}", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1J2UltraChatRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + model: model, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1J2UltraChatResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1J2UltraChatResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// j2-ultra chat + /// + /// + /// Default Value: j2-ultra + /// + /// + /// messages + /// + /// + /// + /// + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 0.7 + /// + /// + /// Default Value: 300 + /// + /// + /// Default Value: 0 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 0 + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2UltraChatAsync( + global::System.Collections.Generic.IList messages, + string system, + string? model = "j2-ultra", + global::System.AllOf? frequencyPenalty = default, + global::System.AllOf? presencePenalty = default, + global::System.AllOf? countPenalty = default, + int numResults = 1, + double temperature = 0.7, + int maxTokens = 300, + int minTokens = 0, + double topP = 1, + int topKReturn = 0, + global::System.Collections.Generic.IList? stopSequences = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.LanguageStudioApiServerDataTypesJ2ChatChatRequest + { + Messages = messages, + System = system, + FrequencyPenalty = frequencyPenalty, + PresencePenalty = presencePenalty, + CountPenalty = countPenalty, + NumResults = numResults, + Temperature = temperature, + MaxTokens = maxTokens, + MinTokens = minTokens, + TopP = topP, + TopKReturn = topKReturn, + StopSequences = stopSequences, + }; + + return await V1J2UltraChatAsync( + model: model, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.ChatClient.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.ChatClient.g.verified.cs new file mode 100644 index 0000000000..6502a02af9 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.ChatClient.g.verified.cs @@ -0,0 +1,60 @@ +//HintName: G.ChatClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class ChatClient : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.ai21.com/"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::Newtonsoft.Json.JsonSerializerSettings _jsonSerializerOptions; + + + /// + /// Creates a new instance of the ChatClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public ChatClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::Newtonsoft.Json.JsonSerializerSettings? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::Newtonsoft.Json.JsonSerializerSettings(); + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2GrandeComplete.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2GrandeComplete.g.verified.cs new file mode 100644 index 0000000000..4d679f64ee --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2GrandeComplete.g.verified.cs @@ -0,0 +1,184 @@ +//HintName: G.CompletionClient.V1J2GrandeComplete.g.cs + +#nullable enable + +namespace G +{ + public partial class CompletionClient + { + partial void PrepareV1J2GrandeCompleteArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? model, + global::G.CompletionBody request); + partial void PrepareV1J2GrandeCompleteRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? model, + global::G.CompletionBody request); + partial void ProcessV1J2GrandeCompleteResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1J2GrandeCompleteResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// j2-grande complete + /// + /// + /// Default Value: j2-grande + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2GrandeCompleteAsync( + string? model, + global::G.CompletionBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1J2GrandeCompleteArguments( + httpClient: _httpClient, + model: ref model, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/j2-grande/complete?model={model}", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1J2GrandeCompleteRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + model: model, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1J2GrandeCompleteResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1J2GrandeCompleteResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// j2-grande complete + /// + /// + /// Default Value: j2-grande + /// + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 16 + /// + /// + /// Default Value: 0 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 0 + /// + /// + /// + /// Default Value: 0 + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2GrandeCompleteAsync( + string prompt, + string? model = "j2-grande", + int numResults = 1, + int maxTokens = 16, + int minTokens = 0, + double temperature = 1, + double topP = 1, + double minP = 0, + global::System.Collections.Generic.IList? stopSequences = default, + int topKReturn = 0, + global::G.CompletionBodyLogitBias? logitBias = default, + global::System.AllOf? frequencyPenalty = default, + global::System.AllOf? presencePenalty = default, + global::System.AllOf? countPenalty = default, + int epoch = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.CompletionBody + { + Prompt = prompt, + NumResults = numResults, + MaxTokens = maxTokens, + MinTokens = minTokens, + Temperature = temperature, + TopP = topP, + MinP = minP, + StopSequences = stopSequences, + TopKReturn = topKReturn, + LogitBias = logitBias, + FrequencyPenalty = frequencyPenalty, + PresencePenalty = presencePenalty, + CountPenalty = countPenalty, + Epoch = epoch, + }; + + return await V1J2GrandeCompleteAsync( + model: model, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2GrandeCustomModelComplete.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2GrandeCustomModelComplete.g.verified.cs new file mode 100644 index 0000000000..7b31057382 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2GrandeCustomModelComplete.g.verified.cs @@ -0,0 +1,193 @@ +//HintName: G.CompletionClient.V1J2GrandeCustomModelComplete.g.cs + +#nullable enable + +namespace G +{ + public partial class CompletionClient + { + partial void PrepareV1J2GrandeCustomModelCompleteArguments( + global::System.Net.Http.HttpClient httpClient, + ref string customModelName, + ref string? customModelType, + global::G.CompletionBody request); + partial void PrepareV1J2GrandeCustomModelCompleteRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string customModelName, + string? customModelType, + global::G.CompletionBody request); + partial void ProcessV1J2GrandeCustomModelCompleteResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1J2GrandeCustomModelCompleteResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Custom j2-grande complete + /// + /// + /// + /// Default Value: j2-grande + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2GrandeCustomModelCompleteAsync( + string customModelName, + string? customModelType, + global::G.CompletionBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1J2GrandeCustomModelCompleteArguments( + httpClient: _httpClient, + customModelName: ref customModelName, + customModelType: ref customModelType, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/j2-grande/{customModelName}/complete?custom_model_type={customModelType}", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1J2GrandeCustomModelCompleteRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + customModelName: customModelName, + customModelType: customModelType, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1J2GrandeCustomModelCompleteResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1J2GrandeCustomModelCompleteResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Custom j2-grande complete + /// + /// + /// + /// Default Value: j2-grande + /// + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 16 + /// + /// + /// Default Value: 0 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 0 + /// + /// + /// + /// Default Value: 0 + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2GrandeCustomModelCompleteAsync( + string customModelName, + string prompt, + string? customModelType = "j2-grande", + int numResults = 1, + int maxTokens = 16, + int minTokens = 0, + double temperature = 1, + double topP = 1, + double minP = 0, + global::System.Collections.Generic.IList? stopSequences = default, + int topKReturn = 0, + global::G.CompletionBodyLogitBias? logitBias = default, + global::System.AllOf? frequencyPenalty = default, + global::System.AllOf? presencePenalty = default, + global::System.AllOf? countPenalty = default, + int epoch = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.CompletionBody + { + Prompt = prompt, + NumResults = numResults, + MaxTokens = maxTokens, + MinTokens = minTokens, + Temperature = temperature, + TopP = topP, + MinP = minP, + StopSequences = stopSequences, + TopKReturn = topKReturn, + LogitBias = logitBias, + FrequencyPenalty = frequencyPenalty, + PresencePenalty = presencePenalty, + CountPenalty = countPenalty, + Epoch = epoch, + }; + + return await V1J2GrandeCustomModelCompleteAsync( + customModelName: customModelName, + customModelType: customModelType, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2GrandeInstructComplete.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2GrandeInstructComplete.g.verified.cs new file mode 100644 index 0000000000..42a5343ee2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2GrandeInstructComplete.g.verified.cs @@ -0,0 +1,184 @@ +//HintName: G.CompletionClient.V1J2GrandeInstructComplete.g.cs + +#nullable enable + +namespace G +{ + public partial class CompletionClient + { + partial void PrepareV1J2GrandeInstructCompleteArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? model, + global::G.CompletionBody request); + partial void PrepareV1J2GrandeInstructCompleteRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? model, + global::G.CompletionBody request); + partial void ProcessV1J2GrandeInstructCompleteResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1J2GrandeInstructCompleteResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// j2-grande-instruct complete + /// + /// + /// Default Value: j2-grande-instruct + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2GrandeInstructCompleteAsync( + string? model, + global::G.CompletionBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1J2GrandeInstructCompleteArguments( + httpClient: _httpClient, + model: ref model, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/j2-grande-instruct/complete?model={model}", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1J2GrandeInstructCompleteRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + model: model, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1J2GrandeInstructCompleteResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1J2GrandeInstructCompleteResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// j2-grande-instruct complete + /// + /// + /// Default Value: j2-grande-instruct + /// + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 16 + /// + /// + /// Default Value: 0 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 0 + /// + /// + /// + /// Default Value: 0 + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2GrandeInstructCompleteAsync( + string prompt, + string? model = "j2-grande-instruct", + int numResults = 1, + int maxTokens = 16, + int minTokens = 0, + double temperature = 1, + double topP = 1, + double minP = 0, + global::System.Collections.Generic.IList? stopSequences = default, + int topKReturn = 0, + global::G.CompletionBodyLogitBias? logitBias = default, + global::System.AllOf? frequencyPenalty = default, + global::System.AllOf? presencePenalty = default, + global::System.AllOf? countPenalty = default, + int epoch = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.CompletionBody + { + Prompt = prompt, + NumResults = numResults, + MaxTokens = maxTokens, + MinTokens = minTokens, + Temperature = temperature, + TopP = topP, + MinP = minP, + StopSequences = stopSequences, + TopKReturn = topKReturn, + LogitBias = logitBias, + FrequencyPenalty = frequencyPenalty, + PresencePenalty = presencePenalty, + CountPenalty = countPenalty, + Epoch = epoch, + }; + + return await V1J2GrandeInstructCompleteAsync( + model: model, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2JumboComplete.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2JumboComplete.g.verified.cs new file mode 100644 index 0000000000..6491d44b83 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2JumboComplete.g.verified.cs @@ -0,0 +1,184 @@ +//HintName: G.CompletionClient.V1J2JumboComplete.g.cs + +#nullable enable + +namespace G +{ + public partial class CompletionClient + { + partial void PrepareV1J2JumboCompleteArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? model, + global::G.CompletionBody request); + partial void PrepareV1J2JumboCompleteRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? model, + global::G.CompletionBody request); + partial void ProcessV1J2JumboCompleteResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1J2JumboCompleteResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// j2-jumbo complete + /// + /// + /// Default Value: j2-jumbo + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2JumboCompleteAsync( + string? model, + global::G.CompletionBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1J2JumboCompleteArguments( + httpClient: _httpClient, + model: ref model, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/j2-jumbo/complete?model={model}", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1J2JumboCompleteRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + model: model, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1J2JumboCompleteResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1J2JumboCompleteResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// j2-jumbo complete + /// + /// + /// Default Value: j2-jumbo + /// + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 16 + /// + /// + /// Default Value: 0 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 0 + /// + /// + /// + /// Default Value: 0 + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2JumboCompleteAsync( + string prompt, + string? model = "j2-jumbo", + int numResults = 1, + int maxTokens = 16, + int minTokens = 0, + double temperature = 1, + double topP = 1, + double minP = 0, + global::System.Collections.Generic.IList? stopSequences = default, + int topKReturn = 0, + global::G.CompletionBodyLogitBias? logitBias = default, + global::System.AllOf? frequencyPenalty = default, + global::System.AllOf? presencePenalty = default, + global::System.AllOf? countPenalty = default, + int epoch = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.CompletionBody + { + Prompt = prompt, + NumResults = numResults, + MaxTokens = maxTokens, + MinTokens = minTokens, + Temperature = temperature, + TopP = topP, + MinP = minP, + StopSequences = stopSequences, + TopKReturn = topKReturn, + LogitBias = logitBias, + FrequencyPenalty = frequencyPenalty, + PresencePenalty = presencePenalty, + CountPenalty = countPenalty, + Epoch = epoch, + }; + + return await V1J2JumboCompleteAsync( + model: model, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2JumboComplete2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2JumboComplete2.g.verified.cs new file mode 100644 index 0000000000..247b4c0afc --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2JumboComplete2.g.verified.cs @@ -0,0 +1,193 @@ +//HintName: G.CompletionClient.V1J2JumboComplete2.g.cs + +#nullable enable + +namespace G +{ + public partial class CompletionClient + { + partial void PrepareV1J2JumboComplete2Arguments( + global::System.Net.Http.HttpClient httpClient, + ref string customModelName, + ref string? customModelType, + global::G.CompletionBody request); + partial void PrepareV1J2JumboComplete2Request( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string customModelName, + string? customModelType, + global::G.CompletionBody request); + partial void ProcessV1J2JumboComplete2Response( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1J2JumboComplete2ResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Custom j2-jumbo complete + /// + /// + /// + /// Default Value: j2-jumbo + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2JumboComplete2Async( + string customModelName, + string? customModelType, + global::G.CompletionBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1J2JumboComplete2Arguments( + httpClient: _httpClient, + customModelName: ref customModelName, + customModelType: ref customModelType, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/j2-jumbo/{customModelName}/complete?custom_model_type={customModelType}", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1J2JumboComplete2Request( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + customModelName: customModelName, + customModelType: customModelType, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1J2JumboComplete2Response( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1J2JumboComplete2ResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Custom j2-jumbo complete + /// + /// + /// + /// Default Value: j2-jumbo + /// + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 16 + /// + /// + /// Default Value: 0 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 0 + /// + /// + /// + /// Default Value: 0 + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2JumboComplete2Async( + string customModelName, + string prompt, + string? customModelType = "j2-jumbo", + int numResults = 1, + int maxTokens = 16, + int minTokens = 0, + double temperature = 1, + double topP = 1, + double minP = 0, + global::System.Collections.Generic.IList? stopSequences = default, + int topKReturn = 0, + global::G.CompletionBodyLogitBias? logitBias = default, + global::System.AllOf? frequencyPenalty = default, + global::System.AllOf? presencePenalty = default, + global::System.AllOf? countPenalty = default, + int epoch = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.CompletionBody + { + Prompt = prompt, + NumResults = numResults, + MaxTokens = maxTokens, + MinTokens = minTokens, + Temperature = temperature, + TopP = topP, + MinP = minP, + StopSequences = stopSequences, + TopKReturn = topKReturn, + LogitBias = logitBias, + FrequencyPenalty = frequencyPenalty, + PresencePenalty = presencePenalty, + CountPenalty = countPenalty, + Epoch = epoch, + }; + + return await V1J2JumboComplete2Async( + customModelName: customModelName, + customModelType: customModelType, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2JumboInstructComplete.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2JumboInstructComplete.g.verified.cs new file mode 100644 index 0000000000..a9c86e3a9a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2JumboInstructComplete.g.verified.cs @@ -0,0 +1,184 @@ +//HintName: G.CompletionClient.V1J2JumboInstructComplete.g.cs + +#nullable enable + +namespace G +{ + public partial class CompletionClient + { + partial void PrepareV1J2JumboInstructCompleteArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? model, + global::G.CompletionBody request); + partial void PrepareV1J2JumboInstructCompleteRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? model, + global::G.CompletionBody request); + partial void ProcessV1J2JumboInstructCompleteResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1J2JumboInstructCompleteResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// j2-jumbo-instruct complete + /// + /// + /// Default Value: j2-jumbo-instruct + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2JumboInstructCompleteAsync( + string? model, + global::G.CompletionBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1J2JumboInstructCompleteArguments( + httpClient: _httpClient, + model: ref model, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/j2-jumbo-instruct/complete?model={model}", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1J2JumboInstructCompleteRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + model: model, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1J2JumboInstructCompleteResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1J2JumboInstructCompleteResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// j2-jumbo-instruct complete + /// + /// + /// Default Value: j2-jumbo-instruct + /// + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 16 + /// + /// + /// Default Value: 0 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 0 + /// + /// + /// + /// Default Value: 0 + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2JumboInstructCompleteAsync( + string prompt, + string? model = "j2-jumbo-instruct", + int numResults = 1, + int maxTokens = 16, + int minTokens = 0, + double temperature = 1, + double topP = 1, + double minP = 0, + global::System.Collections.Generic.IList? stopSequences = default, + int topKReturn = 0, + global::G.CompletionBodyLogitBias? logitBias = default, + global::System.AllOf? frequencyPenalty = default, + global::System.AllOf? presencePenalty = default, + global::System.AllOf? countPenalty = default, + int epoch = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.CompletionBody + { + Prompt = prompt, + NumResults = numResults, + MaxTokens = maxTokens, + MinTokens = minTokens, + Temperature = temperature, + TopP = topP, + MinP = minP, + StopSequences = stopSequences, + TopKReturn = topKReturn, + LogitBias = logitBias, + FrequencyPenalty = frequencyPenalty, + PresencePenalty = presencePenalty, + CountPenalty = countPenalty, + Epoch = epoch, + }; + + return await V1J2JumboInstructCompleteAsync( + model: model, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2LargeComplete.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2LargeComplete.g.verified.cs new file mode 100644 index 0000000000..201bdb4e9e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2LargeComplete.g.verified.cs @@ -0,0 +1,184 @@ +//HintName: G.CompletionClient.V1J2LargeComplete.g.cs + +#nullable enable + +namespace G +{ + public partial class CompletionClient + { + partial void PrepareV1J2LargeCompleteArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? model, + global::G.CompletionBody request); + partial void PrepareV1J2LargeCompleteRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? model, + global::G.CompletionBody request); + partial void ProcessV1J2LargeCompleteResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1J2LargeCompleteResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// j2-large complete + /// + /// + /// Default Value: j2-large + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2LargeCompleteAsync( + string? model, + global::G.CompletionBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1J2LargeCompleteArguments( + httpClient: _httpClient, + model: ref model, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/j2-large/complete?model={model}", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1J2LargeCompleteRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + model: model, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1J2LargeCompleteResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1J2LargeCompleteResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// j2-large complete + /// + /// + /// Default Value: j2-large + /// + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 16 + /// + /// + /// Default Value: 0 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 0 + /// + /// + /// + /// Default Value: 0 + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2LargeCompleteAsync( + string prompt, + string? model = "j2-large", + int numResults = 1, + int maxTokens = 16, + int minTokens = 0, + double temperature = 1, + double topP = 1, + double minP = 0, + global::System.Collections.Generic.IList? stopSequences = default, + int topKReturn = 0, + global::G.CompletionBodyLogitBias? logitBias = default, + global::System.AllOf? frequencyPenalty = default, + global::System.AllOf? presencePenalty = default, + global::System.AllOf? countPenalty = default, + int epoch = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.CompletionBody + { + Prompt = prompt, + NumResults = numResults, + MaxTokens = maxTokens, + MinTokens = minTokens, + Temperature = temperature, + TopP = topP, + MinP = minP, + StopSequences = stopSequences, + TopKReturn = topKReturn, + LogitBias = logitBias, + FrequencyPenalty = frequencyPenalty, + PresencePenalty = presencePenalty, + CountPenalty = countPenalty, + Epoch = epoch, + }; + + return await V1J2LargeCompleteAsync( + model: model, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2LargeCustomModelComplete.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2LargeCustomModelComplete.g.verified.cs new file mode 100644 index 0000000000..1de2dfdeaa --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2LargeCustomModelComplete.g.verified.cs @@ -0,0 +1,193 @@ +//HintName: G.CompletionClient.V1J2LargeCustomModelComplete.g.cs + +#nullable enable + +namespace G +{ + public partial class CompletionClient + { + partial void PrepareV1J2LargeCustomModelCompleteArguments( + global::System.Net.Http.HttpClient httpClient, + ref string customModelName, + ref string? customModelType, + global::G.CompletionBody request); + partial void PrepareV1J2LargeCustomModelCompleteRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string customModelName, + string? customModelType, + global::G.CompletionBody request); + partial void ProcessV1J2LargeCustomModelCompleteResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1J2LargeCustomModelCompleteResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Custom j2-large complete + /// + /// + /// + /// Default Value: j2-large + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2LargeCustomModelCompleteAsync( + string customModelName, + string? customModelType, + global::G.CompletionBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1J2LargeCustomModelCompleteArguments( + httpClient: _httpClient, + customModelName: ref customModelName, + customModelType: ref customModelType, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/j2-large/{customModelName}/complete?custom_model_type={customModelType}", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1J2LargeCustomModelCompleteRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + customModelName: customModelName, + customModelType: customModelType, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1J2LargeCustomModelCompleteResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1J2LargeCustomModelCompleteResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Custom j2-large complete + /// + /// + /// + /// Default Value: j2-large + /// + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 16 + /// + /// + /// Default Value: 0 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 0 + /// + /// + /// + /// Default Value: 0 + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2LargeCustomModelCompleteAsync( + string customModelName, + string prompt, + string? customModelType = "j2-large", + int numResults = 1, + int maxTokens = 16, + int minTokens = 0, + double temperature = 1, + double topP = 1, + double minP = 0, + global::System.Collections.Generic.IList? stopSequences = default, + int topKReturn = 0, + global::G.CompletionBodyLogitBias? logitBias = default, + global::System.AllOf? frequencyPenalty = default, + global::System.AllOf? presencePenalty = default, + global::System.AllOf? countPenalty = default, + int epoch = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.CompletionBody + { + Prompt = prompt, + NumResults = numResults, + MaxTokens = maxTokens, + MinTokens = minTokens, + Temperature = temperature, + TopP = topP, + MinP = minP, + StopSequences = stopSequences, + TopKReturn = topKReturn, + LogitBias = logitBias, + FrequencyPenalty = frequencyPenalty, + PresencePenalty = presencePenalty, + CountPenalty = countPenalty, + Epoch = epoch, + }; + + return await V1J2LargeCustomModelCompleteAsync( + customModelName: customModelName, + customModelType: customModelType, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2LargeInstructComplete.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2LargeInstructComplete.g.verified.cs new file mode 100644 index 0000000000..4ad25d55a0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2LargeInstructComplete.g.verified.cs @@ -0,0 +1,184 @@ +//HintName: G.CompletionClient.V1J2LargeInstructComplete.g.cs + +#nullable enable + +namespace G +{ + public partial class CompletionClient + { + partial void PrepareV1J2LargeInstructCompleteArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? model, + global::G.CompletionBody request); + partial void PrepareV1J2LargeInstructCompleteRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? model, + global::G.CompletionBody request); + partial void ProcessV1J2LargeInstructCompleteResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1J2LargeInstructCompleteResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// j2-large-instruct complete + /// + /// + /// Default Value: j2-large-instruct + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2LargeInstructCompleteAsync( + string? model, + global::G.CompletionBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1J2LargeInstructCompleteArguments( + httpClient: _httpClient, + model: ref model, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/j2-large-instruct/complete?model={model}", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1J2LargeInstructCompleteRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + model: model, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1J2LargeInstructCompleteResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1J2LargeInstructCompleteResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// j2-large-instruct complete + /// + /// + /// Default Value: j2-large-instruct + /// + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 16 + /// + /// + /// Default Value: 0 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 0 + /// + /// + /// + /// Default Value: 0 + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2LargeInstructCompleteAsync( + string prompt, + string? model = "j2-large-instruct", + int numResults = 1, + int maxTokens = 16, + int minTokens = 0, + double temperature = 1, + double topP = 1, + double minP = 0, + global::System.Collections.Generic.IList? stopSequences = default, + int topKReturn = 0, + global::G.CompletionBodyLogitBias? logitBias = default, + global::System.AllOf? frequencyPenalty = default, + global::System.AllOf? presencePenalty = default, + global::System.AllOf? countPenalty = default, + int epoch = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.CompletionBody + { + Prompt = prompt, + NumResults = numResults, + MaxTokens = maxTokens, + MinTokens = minTokens, + Temperature = temperature, + TopP = topP, + MinP = minP, + StopSequences = stopSequences, + TopKReturn = topKReturn, + LogitBias = logitBias, + FrequencyPenalty = frequencyPenalty, + PresencePenalty = presencePenalty, + CountPenalty = countPenalty, + Epoch = epoch, + }; + + return await V1J2LargeInstructCompleteAsync( + model: model, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2LightComplete.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2LightComplete.g.verified.cs new file mode 100644 index 0000000000..38019eecc8 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2LightComplete.g.verified.cs @@ -0,0 +1,184 @@ +//HintName: G.CompletionClient.V1J2LightComplete.g.cs + +#nullable enable + +namespace G +{ + public partial class CompletionClient + { + partial void PrepareV1J2LightCompleteArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? model, + global::G.CompletionBody request); + partial void PrepareV1J2LightCompleteRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? model, + global::G.CompletionBody request); + partial void ProcessV1J2LightCompleteResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1J2LightCompleteResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// j2-light complete + /// + /// + /// Default Value: j2-light + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2LightCompleteAsync( + string? model, + global::G.CompletionBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1J2LightCompleteArguments( + httpClient: _httpClient, + model: ref model, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/j2-light/complete?model={model}", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1J2LightCompleteRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + model: model, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1J2LightCompleteResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1J2LightCompleteResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// j2-light complete + /// + /// + /// Default Value: j2-light + /// + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 16 + /// + /// + /// Default Value: 0 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 0 + /// + /// + /// + /// Default Value: 0 + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2LightCompleteAsync( + string prompt, + string? model = "j2-light", + int numResults = 1, + int maxTokens = 16, + int minTokens = 0, + double temperature = 1, + double topP = 1, + double minP = 0, + global::System.Collections.Generic.IList? stopSequences = default, + int topKReturn = 0, + global::G.CompletionBodyLogitBias? logitBias = default, + global::System.AllOf? frequencyPenalty = default, + global::System.AllOf? presencePenalty = default, + global::System.AllOf? countPenalty = default, + int epoch = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.CompletionBody + { + Prompt = prompt, + NumResults = numResults, + MaxTokens = maxTokens, + MinTokens = minTokens, + Temperature = temperature, + TopP = topP, + MinP = minP, + StopSequences = stopSequences, + TopKReturn = topKReturn, + LogitBias = logitBias, + FrequencyPenalty = frequencyPenalty, + PresencePenalty = presencePenalty, + CountPenalty = countPenalty, + Epoch = epoch, + }; + + return await V1J2LightCompleteAsync( + model: model, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2LightCustomModelComplete.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2LightCustomModelComplete.g.verified.cs new file mode 100644 index 0000000000..1704d66f97 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2LightCustomModelComplete.g.verified.cs @@ -0,0 +1,193 @@ +//HintName: G.CompletionClient.V1J2LightCustomModelComplete.g.cs + +#nullable enable + +namespace G +{ + public partial class CompletionClient + { + partial void PrepareV1J2LightCustomModelCompleteArguments( + global::System.Net.Http.HttpClient httpClient, + ref string customModelName, + ref string? customModelType, + global::G.CompletionBody request); + partial void PrepareV1J2LightCustomModelCompleteRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string customModelName, + string? customModelType, + global::G.CompletionBody request); + partial void ProcessV1J2LightCustomModelCompleteResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1J2LightCustomModelCompleteResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Custom j2-light complete + /// + /// + /// + /// Default Value: j2-light + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2LightCustomModelCompleteAsync( + string customModelName, + string? customModelType, + global::G.CompletionBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1J2LightCustomModelCompleteArguments( + httpClient: _httpClient, + customModelName: ref customModelName, + customModelType: ref customModelType, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/j2-light/{customModelName}/complete?custom_model_type={customModelType}", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1J2LightCustomModelCompleteRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + customModelName: customModelName, + customModelType: customModelType, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1J2LightCustomModelCompleteResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1J2LightCustomModelCompleteResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Custom j2-light complete + /// + /// + /// + /// Default Value: j2-light + /// + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 16 + /// + /// + /// Default Value: 0 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 0 + /// + /// + /// + /// Default Value: 0 + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2LightCustomModelCompleteAsync( + string customModelName, + string prompt, + string? customModelType = "j2-light", + int numResults = 1, + int maxTokens = 16, + int minTokens = 0, + double temperature = 1, + double topP = 1, + double minP = 0, + global::System.Collections.Generic.IList? stopSequences = default, + int topKReturn = 0, + global::G.CompletionBodyLogitBias? logitBias = default, + global::System.AllOf? frequencyPenalty = default, + global::System.AllOf? presencePenalty = default, + global::System.AllOf? countPenalty = default, + int epoch = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.CompletionBody + { + Prompt = prompt, + NumResults = numResults, + MaxTokens = maxTokens, + MinTokens = minTokens, + Temperature = temperature, + TopP = topP, + MinP = minP, + StopSequences = stopSequences, + TopKReturn = topKReturn, + LogitBias = logitBias, + FrequencyPenalty = frequencyPenalty, + PresencePenalty = presencePenalty, + CountPenalty = countPenalty, + Epoch = epoch, + }; + + return await V1J2LightCustomModelCompleteAsync( + customModelName: customModelName, + customModelType: customModelType, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2MidComplete.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2MidComplete.g.verified.cs new file mode 100644 index 0000000000..fcfa9b30bc --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2MidComplete.g.verified.cs @@ -0,0 +1,184 @@ +//HintName: G.CompletionClient.V1J2MidComplete.g.cs + +#nullable enable + +namespace G +{ + public partial class CompletionClient + { + partial void PrepareV1J2MidCompleteArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? model, + global::G.CompletionBody request); + partial void PrepareV1J2MidCompleteRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? model, + global::G.CompletionBody request); + partial void ProcessV1J2MidCompleteResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1J2MidCompleteResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// j2-mid complete + /// + /// + /// Default Value: j2-mid + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2MidCompleteAsync( + string? model, + global::G.CompletionBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1J2MidCompleteArguments( + httpClient: _httpClient, + model: ref model, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/j2-mid/complete?model={model}", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1J2MidCompleteRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + model: model, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1J2MidCompleteResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1J2MidCompleteResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// j2-mid complete + /// + /// + /// Default Value: j2-mid + /// + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 16 + /// + /// + /// Default Value: 0 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 0 + /// + /// + /// + /// Default Value: 0 + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2MidCompleteAsync( + string prompt, + string? model = "j2-mid", + int numResults = 1, + int maxTokens = 16, + int minTokens = 0, + double temperature = 1, + double topP = 1, + double minP = 0, + global::System.Collections.Generic.IList? stopSequences = default, + int topKReturn = 0, + global::G.CompletionBodyLogitBias? logitBias = default, + global::System.AllOf? frequencyPenalty = default, + global::System.AllOf? presencePenalty = default, + global::System.AllOf? countPenalty = default, + int epoch = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.CompletionBody + { + Prompt = prompt, + NumResults = numResults, + MaxTokens = maxTokens, + MinTokens = minTokens, + Temperature = temperature, + TopP = topP, + MinP = minP, + StopSequences = stopSequences, + TopKReturn = topKReturn, + LogitBias = logitBias, + FrequencyPenalty = frequencyPenalty, + PresencePenalty = presencePenalty, + CountPenalty = countPenalty, + Epoch = epoch, + }; + + return await V1J2MidCompleteAsync( + model: model, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2MidCustomModelComplete.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2MidCustomModelComplete.g.verified.cs new file mode 100644 index 0000000000..dbbc2213f0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2MidCustomModelComplete.g.verified.cs @@ -0,0 +1,193 @@ +//HintName: G.CompletionClient.V1J2MidCustomModelComplete.g.cs + +#nullable enable + +namespace G +{ + public partial class CompletionClient + { + partial void PrepareV1J2MidCustomModelCompleteArguments( + global::System.Net.Http.HttpClient httpClient, + ref string customModelName, + ref string? customModelType, + global::G.CompletionBody request); + partial void PrepareV1J2MidCustomModelCompleteRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string customModelName, + string? customModelType, + global::G.CompletionBody request); + partial void ProcessV1J2MidCustomModelCompleteResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1J2MidCustomModelCompleteResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Custom j2-mid complete + /// + /// + /// + /// Default Value: j2-mid + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2MidCustomModelCompleteAsync( + string customModelName, + string? customModelType, + global::G.CompletionBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1J2MidCustomModelCompleteArguments( + httpClient: _httpClient, + customModelName: ref customModelName, + customModelType: ref customModelType, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/j2-mid/{customModelName}/complete?custom_model_type={customModelType}", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1J2MidCustomModelCompleteRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + customModelName: customModelName, + customModelType: customModelType, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1J2MidCustomModelCompleteResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1J2MidCustomModelCompleteResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Custom j2-mid complete + /// + /// + /// + /// Default Value: j2-mid + /// + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 16 + /// + /// + /// Default Value: 0 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 0 + /// + /// + /// + /// Default Value: 0 + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2MidCustomModelCompleteAsync( + string customModelName, + string prompt, + string? customModelType = "j2-mid", + int numResults = 1, + int maxTokens = 16, + int minTokens = 0, + double temperature = 1, + double topP = 1, + double minP = 0, + global::System.Collections.Generic.IList? stopSequences = default, + int topKReturn = 0, + global::G.CompletionBodyLogitBias? logitBias = default, + global::System.AllOf? frequencyPenalty = default, + global::System.AllOf? presencePenalty = default, + global::System.AllOf? countPenalty = default, + int epoch = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.CompletionBody + { + Prompt = prompt, + NumResults = numResults, + MaxTokens = maxTokens, + MinTokens = minTokens, + Temperature = temperature, + TopP = topP, + MinP = minP, + StopSequences = stopSequences, + TopKReturn = topKReturn, + LogitBias = logitBias, + FrequencyPenalty = frequencyPenalty, + PresencePenalty = presencePenalty, + CountPenalty = countPenalty, + Epoch = epoch, + }; + + return await V1J2MidCustomModelCompleteAsync( + customModelName: customModelName, + customModelType: customModelType, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2UltraComplete.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2UltraComplete.g.verified.cs new file mode 100644 index 0000000000..268f464a5b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2UltraComplete.g.verified.cs @@ -0,0 +1,184 @@ +//HintName: G.CompletionClient.V1J2UltraComplete.g.cs + +#nullable enable + +namespace G +{ + public partial class CompletionClient + { + partial void PrepareV1J2UltraCompleteArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? model, + global::G.CompletionBody request); + partial void PrepareV1J2UltraCompleteRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? model, + global::G.CompletionBody request); + partial void ProcessV1J2UltraCompleteResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1J2UltraCompleteResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// j2-ultra complete + /// + /// + /// Default Value: j2-ultra + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2UltraCompleteAsync( + string? model, + global::G.CompletionBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1J2UltraCompleteArguments( + httpClient: _httpClient, + model: ref model, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/j2-ultra/complete?model={model}", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1J2UltraCompleteRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + model: model, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1J2UltraCompleteResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1J2UltraCompleteResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// j2-ultra complete + /// + /// + /// Default Value: j2-ultra + /// + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 16 + /// + /// + /// Default Value: 0 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 0 + /// + /// + /// + /// Default Value: 0 + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2UltraCompleteAsync( + string prompt, + string? model = "j2-ultra", + int numResults = 1, + int maxTokens = 16, + int minTokens = 0, + double temperature = 1, + double topP = 1, + double minP = 0, + global::System.Collections.Generic.IList? stopSequences = default, + int topKReturn = 0, + global::G.CompletionBodyLogitBias? logitBias = default, + global::System.AllOf? frequencyPenalty = default, + global::System.AllOf? presencePenalty = default, + global::System.AllOf? countPenalty = default, + int epoch = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.CompletionBody + { + Prompt = prompt, + NumResults = numResults, + MaxTokens = maxTokens, + MinTokens = minTokens, + Temperature = temperature, + TopP = topP, + MinP = minP, + StopSequences = stopSequences, + TopKReturn = topKReturn, + LogitBias = logitBias, + FrequencyPenalty = frequencyPenalty, + PresencePenalty = presencePenalty, + CountPenalty = countPenalty, + Epoch = epoch, + }; + + return await V1J2UltraCompleteAsync( + model: model, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2UltraComplete2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2UltraComplete2.g.verified.cs new file mode 100644 index 0000000000..e85a30d76d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.V1J2UltraComplete2.g.verified.cs @@ -0,0 +1,193 @@ +//HintName: G.CompletionClient.V1J2UltraComplete2.g.cs + +#nullable enable + +namespace G +{ + public partial class CompletionClient + { + partial void PrepareV1J2UltraComplete2Arguments( + global::System.Net.Http.HttpClient httpClient, + ref string customModelName, + ref string? customModelType, + global::G.CompletionBody request); + partial void PrepareV1J2UltraComplete2Request( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string customModelName, + string? customModelType, + global::G.CompletionBody request); + partial void ProcessV1J2UltraComplete2Response( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1J2UltraComplete2ResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Custom j2-ultra complete + /// + /// + /// + /// Default Value: j2-ultra + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2UltraComplete2Async( + string customModelName, + string? customModelType, + global::G.CompletionBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1J2UltraComplete2Arguments( + httpClient: _httpClient, + customModelName: ref customModelName, + customModelType: ref customModelType, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/j2-ultra/{customModelName}/complete?custom_model_type={customModelType}", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1J2UltraComplete2Request( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + customModelName: customModelName, + customModelType: customModelType, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1J2UltraComplete2Response( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1J2UltraComplete2ResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Custom j2-ultra complete + /// + /// + /// + /// Default Value: j2-ultra + /// + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 16 + /// + /// + /// Default Value: 0 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 0 + /// + /// + /// + /// Default Value: 0 + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2UltraComplete2Async( + string customModelName, + string prompt, + string? customModelType = "j2-ultra", + int numResults = 1, + int maxTokens = 16, + int minTokens = 0, + double temperature = 1, + double topP = 1, + double minP = 0, + global::System.Collections.Generic.IList? stopSequences = default, + int topKReturn = 0, + global::G.CompletionBodyLogitBias? logitBias = default, + global::System.AllOf? frequencyPenalty = default, + global::System.AllOf? presencePenalty = default, + global::System.AllOf? countPenalty = default, + int epoch = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.CompletionBody + { + Prompt = prompt, + NumResults = numResults, + MaxTokens = maxTokens, + MinTokens = minTokens, + Temperature = temperature, + TopP = topP, + MinP = minP, + StopSequences = stopSequences, + TopKReturn = topKReturn, + LogitBias = logitBias, + FrequencyPenalty = frequencyPenalty, + PresencePenalty = presencePenalty, + CountPenalty = countPenalty, + Epoch = epoch, + }; + + return await V1J2UltraComplete2Async( + customModelName: customModelName, + customModelType: customModelType, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.g.verified.cs new file mode 100644 index 0000000000..03e7b8b099 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CompletionClient.g.verified.cs @@ -0,0 +1,60 @@ +//HintName: G.CompletionClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class CompletionClient : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.ai21.com/"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::Newtonsoft.Json.JsonSerializerSettings _jsonSerializerOptions; + + + /// + /// Creates a new instance of the CompletionClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public CompletionClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::Newtonsoft.Json.JsonSerializerSettings? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::Newtonsoft.Json.JsonSerializerSettings(); + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CustomModelsClient.V1CreateCustomModel.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CustomModelsClient.V1CreateCustomModel.g.verified.cs new file mode 100644 index 0000000000..664be72a19 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CustomModelsClient.V1CreateCustomModel.g.verified.cs @@ -0,0 +1,132 @@ +//HintName: G.CustomModelsClient.V1CreateCustomModel.g.cs + +#nullable enable + +namespace G +{ + public partial class CustomModelsClient + { + partial void PrepareV1CreateCustomModelArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.CustomModelInput request); + partial void PrepareV1CreateCustomModelRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.CustomModelInput request); + partial void ProcessV1CreateCustomModelResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1CreateCustomModelResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Create Custom Model + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1CreateCustomModelAsync( + global::G.CustomModelInput request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1CreateCustomModelArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/studio/v1/custom-model", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1CreateCustomModelRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1CreateCustomModelResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1CreateCustomModelResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Create Custom Model + /// + /// + /// An enumeration. + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1CreateCustomModelAsync( + global::G.CustomModelType modelType, + string datasetId, + string modelName, + double learningRate = default, + int numEpochs = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.CustomModelInput + { + ModelType = modelType, + LearningRate = learningRate, + NumEpochs = numEpochs, + DatasetId = datasetId, + ModelName = modelName, + }; + + return await V1CreateCustomModelAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CustomModelsClient.V1GetCustomModel.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CustomModelsClient.V1GetCustomModel.g.verified.cs new file mode 100644 index 0000000000..050b6f4320 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CustomModelsClient.V1GetCustomModel.g.verified.cs @@ -0,0 +1,90 @@ +//HintName: G.CustomModelsClient.V1GetCustomModel.g.cs + +#nullable enable + +namespace G +{ + public partial class CustomModelsClient + { + partial void PrepareV1GetCustomModelArguments( + global::System.Net.Http.HttpClient httpClient, + ref string customModelPid); + partial void PrepareV1GetCustomModelRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string customModelPid); + partial void ProcessV1GetCustomModelResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1GetCustomModelResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get Custom Model + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1GetCustomModelAsync( + string customModelPid, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV1GetCustomModelArguments( + httpClient: _httpClient, + customModelPid: ref customModelPid); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/custom-model/{customModelPid}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1GetCustomModelRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + customModelPid: customModelPid); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1GetCustomModelResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1GetCustomModelResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CustomModelsClient.V1GetCustomModels.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CustomModelsClient.V1GetCustomModels.g.verified.cs new file mode 100644 index 0000000000..729ce2453b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CustomModelsClient.V1GetCustomModels.g.verified.cs @@ -0,0 +1,92 @@ +//HintName: G.CustomModelsClient.V1GetCustomModels.g.cs + +#nullable enable + +namespace G +{ + public partial class CustomModelsClient + { + partial void PrepareV1GetCustomModelsArguments( + global::System.Net.Http.HttpClient httpClient, + ref bool includeMetadata); + partial void PrepareV1GetCustomModelsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + bool includeMetadata); + partial void ProcessV1GetCustomModelsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1GetCustomModelsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get Custom Models List + /// + /// + /// Default Value: false + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1GetCustomModelsAsync( + bool includeMetadata, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV1GetCustomModelsArguments( + httpClient: _httpClient, + includeMetadata: ref includeMetadata); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/custom-model?includeMetadata={includeMetadata}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1GetCustomModelsRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + includeMetadata: includeMetadata); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1GetCustomModelsResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1GetCustomModelsResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CustomModelsClient.V1UpdateCustomModel.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CustomModelsClient.V1UpdateCustomModel.g.verified.cs new file mode 100644 index 0000000000..6c74a76e31 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CustomModelsClient.V1UpdateCustomModel.g.verified.cs @@ -0,0 +1,127 @@ +//HintName: G.CustomModelsClient.V1UpdateCustomModel.g.cs + +#nullable enable + +namespace G +{ + public partial class CustomModelsClient + { + partial void PrepareV1UpdateCustomModelArguments( + global::System.Net.Http.HttpClient httpClient, + ref string customModelPid, + global::G.CustomModelUpdateBody request); + partial void PrepareV1UpdateCustomModelRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string customModelPid, + global::G.CustomModelUpdateBody request); + partial void ProcessV1UpdateCustomModelResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1UpdateCustomModelResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Update Model + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1UpdateCustomModelAsync( + string customModelPid, + global::G.CustomModelUpdateBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1UpdateCustomModelArguments( + httpClient: _httpClient, + customModelPid: ref customModelPid, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Put, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/custom-model/{customModelPid}", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1UpdateCustomModelRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + customModelPid: customModelPid, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1UpdateCustomModelResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1UpdateCustomModelResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Update Model + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1UpdateCustomModelAsync( + string customModelPid, + int defaultEpoch = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.CustomModelUpdateBody + { + DefaultEpoch = defaultEpoch, + }; + + return await V1UpdateCustomModelAsync( + customModelPid: customModelPid, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CustomModelsClient.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CustomModelsClient.g.verified.cs new file mode 100644 index 0000000000..8d3c86f8b4 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.CustomModelsClient.g.verified.cs @@ -0,0 +1,60 @@ +//HintName: G.CustomModelsClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class CustomModelsClient : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.ai21.com/"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::Newtonsoft.Json.JsonSerializerSettings _jsonSerializerOptions; + + + /// + /// Creates a new instance of the CustomModelsClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public CustomModelsClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::Newtonsoft.Json.JsonSerializerSettings? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::Newtonsoft.Json.JsonSerializerSettings(); + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.DatasetsClient.V1DeleteDataset.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.DatasetsClient.V1DeleteDataset.g.verified.cs new file mode 100644 index 0000000000..3974d8eecf --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.DatasetsClient.V1DeleteDataset.g.verified.cs @@ -0,0 +1,90 @@ +//HintName: G.DatasetsClient.V1DeleteDataset.g.cs + +#nullable enable + +namespace G +{ + public partial class DatasetsClient + { + partial void PrepareV1DeleteDatasetArguments( + global::System.Net.Http.HttpClient httpClient, + ref string datasetPid); + partial void PrepareV1DeleteDatasetRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string datasetPid); + partial void ProcessV1DeleteDatasetResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1DeleteDatasetResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Delete Dataset + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1DeleteDatasetAsync( + string datasetPid, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV1DeleteDatasetArguments( + httpClient: _httpClient, + datasetPid: ref datasetPid); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Delete, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/dataset/{datasetPid}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1DeleteDatasetRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + datasetPid: datasetPid); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1DeleteDatasetResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1DeleteDatasetResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.DatasetsClient.V1GetDataset.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.DatasetsClient.V1GetDataset.g.verified.cs new file mode 100644 index 0000000000..d6770a6410 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.DatasetsClient.V1GetDataset.g.verified.cs @@ -0,0 +1,90 @@ +//HintName: G.DatasetsClient.V1GetDataset.g.cs + +#nullable enable + +namespace G +{ + public partial class DatasetsClient + { + partial void PrepareV1GetDatasetArguments( + global::System.Net.Http.HttpClient httpClient, + ref string datasetPid); + partial void PrepareV1GetDatasetRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string datasetPid); + partial void ProcessV1GetDatasetResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1GetDatasetResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Dataset Get + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1GetDatasetAsync( + string datasetPid, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV1GetDatasetArguments( + httpClient: _httpClient, + datasetPid: ref datasetPid); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/dataset/{datasetPid}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1GetDatasetRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + datasetPid: datasetPid); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1GetDatasetResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1GetDatasetResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.DatasetsClient.V1GetDatasetDownloadUrl.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.DatasetsClient.V1GetDatasetDownloadUrl.g.verified.cs new file mode 100644 index 0000000000..ec2dedc69a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.DatasetsClient.V1GetDatasetDownloadUrl.g.verified.cs @@ -0,0 +1,96 @@ +//HintName: G.DatasetsClient.V1GetDatasetDownloadUrl.g.cs + +#nullable enable + +namespace G +{ + public partial class DatasetsClient + { + partial void PrepareV1GetDatasetDownloadUrlArguments( + global::System.Net.Http.HttpClient httpClient, + ref string datasetPid, + ref string datasetName); + partial void PrepareV1GetDatasetDownloadUrlRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string datasetPid, + string datasetName); + partial void ProcessV1GetDatasetDownloadUrlResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1GetDatasetDownloadUrlResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Dataset Download Url + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1GetDatasetDownloadUrlAsync( + string datasetPid, + string datasetName, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV1GetDatasetDownloadUrlArguments( + httpClient: _httpClient, + datasetPid: ref datasetPid, + datasetName: ref datasetName); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/dataset/url/{datasetPid}?dataset_name={datasetName}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1GetDatasetDownloadUrlRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + datasetPid: datasetPid, + datasetName: datasetName); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1GetDatasetDownloadUrlResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1GetDatasetDownloadUrlResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.DatasetsClient.V1GetDatasets.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.DatasetsClient.V1GetDatasets.g.verified.cs new file mode 100644 index 0000000000..6febc57dff --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.DatasetsClient.V1GetDatasets.g.verified.cs @@ -0,0 +1,84 @@ +//HintName: G.DatasetsClient.V1GetDatasets.g.cs + +#nullable enable + +namespace G +{ + public partial class DatasetsClient + { + partial void PrepareV1GetDatasetsArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareV1GetDatasetsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessV1GetDatasetsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1GetDatasetsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Dataset List + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1GetDatasetsAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV1GetDatasetsArguments( + httpClient: _httpClient); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/studio/v1/dataset", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1GetDatasetsRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1GetDatasetsResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1GetDatasetsResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.DatasetsClient.V1UploadDataset.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.DatasetsClient.V1UploadDataset.g.verified.cs new file mode 100644 index 0000000000..f31a228914 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.DatasetsClient.V1UploadDataset.g.verified.cs @@ -0,0 +1,171 @@ +//HintName: G.DatasetsClient.V1UploadDataset.g.cs + +#nullable enable + +namespace G +{ + public partial class DatasetsClient + { + partial void PrepareV1UploadDatasetArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.BodyV1UploadDataset request); + partial void PrepareV1UploadDatasetRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.BodyV1UploadDataset request); + partial void ProcessV1UploadDatasetResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1UploadDatasetResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Add Dataset + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1UploadDatasetAsync( + global::G.BodyV1UploadDataset request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1UploadDatasetArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/studio/v1/dataset", global::System.UriKind.RelativeOrAbsolute)); + using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + __httpRequestContent.Add( + content: new global::System.Net.Http.ByteArrayContent(request.DatasetFile ?? global::System.Array.Empty()) + { + Headers = + { + ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("multipart/form-data"), + }, + }, + name: "dataset_file", + fileName: request.DatasetFilename ?? string.Empty); + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.DatasetName}"), + name: "dataset_name"); + if (request.SelectedColumns != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.SelectedColumns}"), + name: "selected_columns"); + } + if (request.ApproveWhitespaceCorrection != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.ApproveWhitespaceCorrection}"), + name: "approve_whitespace_correction"); + } + if (request.DeleteLongRows != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.DeleteLongRows}"), + name: "delete_long_rows"); + } + if (request.SplitRatio != 0.1) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.SplitRatio}"), + name: "split_ratio"); + } + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1UploadDatasetRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1UploadDatasetResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1UploadDatasetResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Add Dataset + /// + /// + /// + /// + /// + /// + /// + /// + /// Default Value: 0.1 + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1UploadDatasetAsync( + byte[] datasetFile, + string datasetFilename, + string datasetName, + string? selectedColumns = default, + bool approveWhitespaceCorrection = default, + bool deleteLongRows = default, + double splitRatio = 0.1, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.BodyV1UploadDataset + { + DatasetFile = datasetFile, + DatasetFilename = datasetFilename, + DatasetName = datasetName, + SelectedColumns = selectedColumns, + ApproveWhitespaceCorrection = approveWhitespaceCorrection, + DeleteLongRows = deleteLongRows, + SplitRatio = splitRatio, + }; + + return await V1UploadDatasetAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.DatasetsClient.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.DatasetsClient.g.verified.cs new file mode 100644 index 0000000000..c2999b701d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.DatasetsClient.g.verified.cs @@ -0,0 +1,60 @@ +//HintName: G.DatasetsClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class DatasetsClient : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.ai21.com/"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::Newtonsoft.Json.JsonSerializerSettings _jsonSerializerOptions; + + + /// + /// Creates a new instance of the DatasetsClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public DatasetsClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::Newtonsoft.Json.JsonSerializerSettings? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::Newtonsoft.Json.JsonSerializerSettings(); + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.GrammaticalErrorCorrectionsClient.V1Corrections.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.GrammaticalErrorCorrectionsClient.V1Corrections.g.verified.cs new file mode 100644 index 0000000000..5bd958c00e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.GrammaticalErrorCorrectionsClient.V1Corrections.g.verified.cs @@ -0,0 +1,118 @@ +//HintName: G.GrammaticalErrorCorrectionsClient.V1Corrections.g.cs + +#nullable enable + +namespace G +{ + public partial class GrammaticalErrorCorrectionsClient + { + partial void PrepareV1CorrectionsArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.CorrectionsBody request); + partial void PrepareV1CorrectionsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.CorrectionsBody request); + partial void ProcessV1CorrectionsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1CorrectionsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Grammatical Error Corrections + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1CorrectionsAsync( + global::G.CorrectionsBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1CorrectionsArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/studio/v1/gec", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1CorrectionsRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1CorrectionsResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1CorrectionsResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Grammatical Error Corrections + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1CorrectionsAsync( + string text, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.CorrectionsBody + { + Text = text, + }; + + return await V1CorrectionsAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.GrammaticalErrorCorrectionsClient.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.GrammaticalErrorCorrectionsClient.g.verified.cs new file mode 100644 index 0000000000..62332c4994 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.GrammaticalErrorCorrectionsClient.g.verified.cs @@ -0,0 +1,60 @@ +//HintName: G.GrammaticalErrorCorrectionsClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class GrammaticalErrorCorrectionsClient : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.ai21.com/"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::Newtonsoft.Json.JsonSerializerSettings _jsonSerializerOptions; + + + /// + /// Creates a new instance of the GrammaticalErrorCorrectionsClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public GrammaticalErrorCorrectionsClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::Newtonsoft.Json.JsonSerializerSettings? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::Newtonsoft.Json.JsonSerializerSettings(); + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.JambaCompleteClient.V1ChatComplete.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.JambaCompleteClient.V1ChatComplete.g.verified.cs new file mode 100644 index 0000000000..e91abf5ac5 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.JambaCompleteClient.V1ChatComplete.g.verified.cs @@ -0,0 +1,187 @@ +//HintName: G.JambaCompleteClient.V1ChatComplete.g.cs + +#nullable enable + +namespace G +{ + public partial class JambaCompleteClient + { + partial void PrepareV1ChatCompleteArguments( + global::System.Net.Http.HttpClient httpClient, + ref string authorization, + global::G.LanguageStudioApiServerDataTypesChatChatRequest request); + partial void PrepareV1ChatCompleteRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string authorization, + global::G.LanguageStudioApiServerDataTypesChatChatRequest request); + partial void ProcessV1ChatCompleteResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1ChatCompleteResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Chat Complete
+ /// This is the endpoint for the [Jamba Instruct model](https://docs.ai21.com/docs/jamba-models).
+ /// This is a foundation model that supports both single-turn (question answering,
+ /// text completion) and multi-turn (chat style) interactions.
+ /// You can optionally stream results if you want to get the response as each
+ /// token is generated, rather than waiting for the entire response. + ///
+ /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> V1ChatCompleteAsync( + string authorization, + global::G.LanguageStudioApiServerDataTypesChatChatRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1ChatCompleteArguments( + httpClient: _httpClient, + authorization: ref authorization, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/studio/v1/chat/completions", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1ChatCompleteRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + authorization: authorization, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1ChatCompleteResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1ChatCompleteResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject>?>(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Chat Complete
+ /// This is the endpoint for the [Jamba Instruct model](https://docs.ai21.com/docs/jamba-models).
+ /// This is a foundation model that supports both single-turn (question answering,
+ /// text completion) and multi-turn (chat style) interactions.
+ /// You can optionally stream results if you want to get the response as each
+ /// token is generated, rather than waiting for the entire response. + ///
+ /// + /// + /// An enumeration. + /// + /// + /// messages + /// + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 4096 + /// + /// + /// + /// Default Value: 1 + /// + /// + /// + /// Whether or not to stream the result one token at a time using
+ /// [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events).
+ /// This can be useful when waiting for long results where a long wait time for an
+ /// answer can be problematic, such as a chatbot. If set to `True`, then `n` must
+ /// be 1. A streaming response is different than the non-streaming response.
+ /// Default Value: false + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> V1ChatCompleteAsync( + string authorization, + global::G.ModelName model, + global::System.Collections.Generic.IList> messages, + global::System.Collections.Generic.IList? tools = default, + int n = 1, + int maxTokens = 4096, + double temperature = default, + double topP = 1, + global::System.AnyOf>? stop = default, + bool stream = false, + global::G.MockResponseConfig? mockResponse = default, + global::System.Collections.Generic.IList? documents = default, + global::System.AllOf? responseFormat = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.LanguageStudioApiServerDataTypesChatChatRequest + { + Model = model, + Messages = messages, + Tools = tools, + N = n, + MaxTokens = maxTokens, + Temperature = temperature, + TopP = topP, + Stop = stop, + Stream = stream, + MockResponse = mockResponse, + Documents = documents, + ResponseFormat = responseFormat, + }; + + return await V1ChatCompleteAsync( + authorization: authorization, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.JambaCompleteClient.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.JambaCompleteClient.g.verified.cs new file mode 100644 index 0000000000..7ea9367715 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.JambaCompleteClient.g.verified.cs @@ -0,0 +1,60 @@ +//HintName: G.JambaCompleteClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class JambaCompleteClient : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.ai21.com/"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::Newtonsoft.Json.JsonSerializerSettings _jsonSerializerOptions; + + + /// + /// Creates a new instance of the JambaCompleteClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public JambaCompleteClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::Newtonsoft.Json.JsonSerializerSettings? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::Newtonsoft.Json.JsonSerializerSettings(); + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.LibraryManagementClient.V1LibraryDelete.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.LibraryManagementClient.V1LibraryDelete.g.verified.cs new file mode 100644 index 0000000000..01d2b66981 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.LibraryManagementClient.V1LibraryDelete.g.verified.cs @@ -0,0 +1,93 @@ +//HintName: G.LibraryManagementClient.V1LibraryDelete.g.cs + +#nullable enable + +namespace G +{ + public partial class LibraryManagementClient + { + partial void PrepareV1LibraryDeleteArguments( + global::System.Net.Http.HttpClient httpClient, + ref string fileId); + partial void PrepareV1LibraryDeleteRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string fileId); + partial void ProcessV1LibraryDeleteResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1LibraryDeleteResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Delete File
+ /// Delete the specified file from the library.
+ /// **Restrictions**:
+ /// Files in `PROCESSING` status cannot be deleted. Attempts to delete such files will result in a <span style="color:red">422</span> error. + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1LibraryDeleteAsync( + string fileId, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV1LibraryDeleteArguments( + httpClient: _httpClient, + fileId: ref fileId); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Delete, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/library/files/{fileId}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1LibraryDeleteRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + fileId: fileId); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1LibraryDeleteResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1LibraryDeleteResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.LibraryManagementClient.V1LibraryManagement.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.LibraryManagementClient.V1LibraryManagement.g.verified.cs new file mode 100644 index 0000000000..415697dfe0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.LibraryManagementClient.V1LibraryManagement.g.verified.cs @@ -0,0 +1,136 @@ +//HintName: G.LibraryManagementClient.V1LibraryManagement.g.cs +using System.Linq; + +#nullable enable + +namespace G +{ + public partial class LibraryManagementClient + { + partial void PrepareV1LibraryManagementArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? name, + ref string? path, + ref global::G.FileStatus? status, + global::System.Collections.Generic.IList? label, + ref int limit, + ref int offset); + partial void PrepareV1LibraryManagementRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? name, + string? path, + global::G.FileStatus? status, + global::System.Collections.Generic.IList? label, + int limit, + int offset); + partial void ProcessV1LibraryManagementResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1LibraryManagementResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get Organization Files
+ /// Get metadata about a specific file by file ID. The file ID is generated by
+ /// AI21 when you upload the file. + ///
+ /// + /// + /// + /// An enumeration. + /// + /// + /// + /// Default Value: 1000 + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> V1LibraryManagementAsync( + string? name, + string? path, + global::G.FileStatus? status, + global::System.Collections.Generic.IList? label, + int limit, + int offset, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV1LibraryManagementArguments( + httpClient: _httpClient, + name: ref name, + path: ref path, + status: ref status, + label: label, + limit: ref limit, + offset: ref offset); + + var statusValue = status switch + { + global::G.FileStatus.DBRECORDCREATED => "DB_RECORD_CREATED", + global::G.FileStatus.UPLOADED => "UPLOADED", + global::G.FileStatus.UPLOADFAILED => "UPLOAD_FAILED", + global::G.FileStatus.PROCESSED => "PROCESSED", + global::G.FileStatus.PROCESSINGFAILED => "PROCESSING_FAILED", + _ => throw new global::System.NotImplementedException("Enum value not implemented."), + }; + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/library/files?name={name}&path={path}&status={statusValue}&{string.Join("&", label?.Select(static x => $"label={x}") ?? global::System.Array.Empty())}&limit={limit}&offset={offset}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1LibraryManagementRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + name: name, + path: path, + status: status, + label: label, + limit: limit, + offset: offset); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1LibraryManagementResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1LibraryManagementResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject?>(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.LibraryManagementClient.V1LibraryManagement2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.LibraryManagementClient.V1LibraryManagement2.g.verified.cs new file mode 100644 index 0000000000..fda963b39f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.LibraryManagementClient.V1LibraryManagement2.g.verified.cs @@ -0,0 +1,98 @@ +//HintName: G.LibraryManagementClient.V1LibraryManagement2.g.cs + +#nullable enable + +namespace G +{ + public partial class LibraryManagementClient + { + partial void PrepareV1LibraryManagement2Arguments( + global::System.Net.Http.HttpClient httpClient, + ref string fileId); + partial void PrepareV1LibraryManagement2Request( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string fileId); + partial void ProcessV1LibraryManagement2Response( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1LibraryManagement2ResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get File By Id
+ /// Retrieve a list of documents in the user's library. Optionally specify a
+ /// filter to find only files with matching labels or paths. This method
+ /// returns only metadata about files; to download a file, call
+ /// `GET .../files/{file_id}/download`
+ /// When specifying qualifiers with your request, only files that match
+ /// _all_ qualifiers will be returns. So, for example, if you specify
+ /// `label='financial'` and `status='UPLOADED'`, only files with the label
+ /// "financial" AND status UPLOADED will be returned. + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1LibraryManagement2Async( + string fileId, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV1LibraryManagement2Arguments( + httpClient: _httpClient, + fileId: ref fileId); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/library/files/{fileId}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1LibraryManagement2Request( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + fileId: fileId); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1LibraryManagement2Response( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1LibraryManagement2ResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.LibraryManagementClient.V1LibraryManagement3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.LibraryManagementClient.V1LibraryManagement3.g.verified.cs new file mode 100644 index 0000000000..8b600ccfba --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.LibraryManagementClient.V1LibraryManagement3.g.verified.cs @@ -0,0 +1,153 @@ +//HintName: G.LibraryManagementClient.V1LibraryManagement3.g.cs + +#nullable enable + +namespace G +{ + public partial class LibraryManagementClient + { + partial void PrepareV1LibraryManagement3Arguments( + global::System.Net.Http.HttpClient httpClient, + ref string fileId, + global::G.FilesUpdateRequest request); + partial void PrepareV1LibraryManagement3Request( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string fileId, + global::G.FilesUpdateRequest request); + partial void ProcessV1LibraryManagement3Response( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1LibraryManagement3ResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Update File
+ /// Update the specified parameters of a specific document in the user's library.
+ /// This operation currently supports updating the publicUrl and labels parameters.
+ /// > **This operation overwrites the specified items with the new data you provide.**
+ /// > If you wish to add new labels to the labels list without removing the existing ones,
+ /// > you must submit a labels list that includes both the current and new labels.**
+ /// >
+ /// > For instance, if the current labels are "Label A" and "Label B", and you wish to
+ /// > add "New Label C" and "New Label D" to the list, you must specify `"labels": ["Label A", "Label B", "New Label C", "New Label D"]`. + ///
+ /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1LibraryManagement3Async( + string fileId, + global::G.FilesUpdateRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1LibraryManagement3Arguments( + httpClient: _httpClient, + fileId: ref fileId, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Put, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/library/files/{fileId}", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1LibraryManagement3Request( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + fileId: fileId, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1LibraryManagement3Response( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1LibraryManagement3ResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Update File
+ /// Update the specified parameters of a specific document in the user's library.
+ /// This operation currently supports updating the publicUrl and labels parameters.
+ /// > **This operation overwrites the specified items with the new data you provide.**
+ /// > If you wish to add new labels to the labels list without removing the existing ones,
+ /// > you must submit a labels list that includes both the current and new labels.**
+ /// >
+ /// > For instance, if the current labels are "Label A" and "Label B", and you wish to
+ /// > add "New Label C" and "New Label D" to the list, you must specify `"labels": ["Label A", "Label B", "New Label C", "New Label D"]`. + ///
+ /// + /// + /// The public URL of the file, if any. This URL is not validated by
+ /// AI21 or used in any way. It is strictly a piece of metadata that you can
+ /// optionally attach to a file. + /// + /// + /// Any labels to associate with this file. Separate multiple labels with commas. If
+ /// provided, will overwrite all existing labels. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1LibraryManagement3Async( + string fileId, + string? publicUrl = default, + global::System.Collections.Generic.IList? labels = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.FilesUpdateRequest + { + PublicUrl = publicUrl, + Labels = labels, + }; + + return await V1LibraryManagement3Async( + fileId: fileId, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.LibraryManagementClient.V1LibraryUpload.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.LibraryManagementClient.V1LibraryUpload.g.verified.cs new file mode 100644 index 0000000000..8f6718068c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.LibraryManagementClient.V1LibraryUpload.g.verified.cs @@ -0,0 +1,176 @@ +//HintName: G.LibraryManagementClient.V1LibraryUpload.g.cs +using System.Linq; + +#nullable enable + +namespace G +{ + public partial class LibraryManagementClient + { + partial void PrepareV1LibraryUploadArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.BodyV1LibraryUpload request); + partial void PrepareV1LibraryUploadRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.BodyV1LibraryUpload request); + partial void ProcessV1LibraryUploadResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1LibraryUploadResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Upload Organization File
+ /// Upload files to use for [RAG Engine document searches](https://docs.ai21.com/docs/rag-engine-overview).
+ /// You can assign metadata to your files to limit searches to specific files by file metadata.
+ /// There is no bulk upload method; files must be loaded one at a time.
+ /// - **Max number of files:** No limit. The playground limits bulk uploads to 50 files per request.
+ /// - **Max library size:** 1 GB total size. No limit to individual file size.
+ /// - **Supported file types:** PDF, DocX, HTML, TXT + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1LibraryUploadAsync( + global::G.BodyV1LibraryUpload request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1LibraryUploadArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/studio/v1/library/files", global::System.UriKind.RelativeOrAbsolute)); + using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + __httpRequestContent.Add( + content: new global::System.Net.Http.ByteArrayContent(request.File ?? global::System.Array.Empty()) + { + Headers = + { + ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("multipart/form-data"), + }, + }, + name: "file", + fileName: request.Filename ?? string.Empty); + if (request.Path != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Path}"), + name: "path"); + } + if (request.Labels != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"[{string.Join(",", request.Labels.Select(x => x))}]"), + name: "labels"); + } + if (request.PublicUrl != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.PublicUrl}"), + name: "publicUrl"); + } + if (request.CustomConfigs != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.CustomConfigs}"), + name: "custom_configs"); + } + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1LibraryUploadRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1LibraryUploadResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1LibraryUploadResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Upload Organization File
+ /// Upload files to use for [RAG Engine document searches](https://docs.ai21.com/docs/rag-engine-overview).
+ /// You can assign metadata to your files to limit searches to specific files by file metadata.
+ /// There is no bulk upload method; files must be loaded one at a time.
+ /// - **Max number of files:** No limit. The playground limits bulk uploads to 50 files per request.
+ /// - **Max library size:** 1 GB total size. No limit to individual file size.
+ /// - **Supported file types:** PDF, DocX, HTML, TXT + ///
+ /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1LibraryUploadAsync( + byte[] file, + string filename, + string? path = default, + global::System.Collections.Generic.IList? labels = default, + string? publicUrl = default, + string? customConfigs = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.BodyV1LibraryUpload + { + File = file, + Filename = filename, + Path = path, + Labels = labels, + PublicUrl = publicUrl, + CustomConfigs = customConfigs, + }; + + return await V1LibraryUploadAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.LibraryManagementClient.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.LibraryManagementClient.g.verified.cs new file mode 100644 index 0000000000..77ec90768c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.LibraryManagementClient.g.verified.cs @@ -0,0 +1,60 @@ +//HintName: G.LibraryManagementClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class LibraryManagementClient : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.ai21.com/"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::Newtonsoft.Json.JsonSerializerSettings _jsonSerializerOptions; + + + /// + /// Creates a new instance of the LibraryManagementClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public LibraryManagementClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::Newtonsoft.Json.JsonSerializerSettings? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::Newtonsoft.Json.JsonSerializerSettings(); + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.AnswerBody.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.AnswerBody.g.verified.cs new file mode 100644 index 0000000000..4526d9c19f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.AnswerBody.g.verified.cs @@ -0,0 +1,42 @@ +//HintName: G.Models.AnswerBody.g.cs + +#nullable enable + +namespace G +{ + /// + /// This class is to be used as a common class to all Studio API requests payloads + /// + public sealed partial class AnswerBody + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("context", Required = global::Newtonsoft.Json.Required.Always)] + public string Context { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("question", Required = global::Newtonsoft.Json.Required.Always)] + public string Question { get; set; } = default!; + + /// + /// An enumeration. + /// + [global::Newtonsoft.Json.JsonProperty("answerLength")] + public global::G.AnswerLength? AnswerLength { get; set; } + + /// + /// An enumeration. + /// + [global::Newtonsoft.Json.JsonProperty("mode")] + public global::G.Mode? Mode { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.AnswerLength.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.AnswerLength.g.verified.cs new file mode 100644 index 0000000000..aa469cc010 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.AnswerLength.g.verified.cs @@ -0,0 +1,62 @@ +//HintName: G.Models.AnswerLength.g.cs + +#nullable enable + +namespace G +{ + /// + /// An enumeration. + /// + [global::System.Runtime.Serialization.DataContract] + public enum AnswerLength + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="short")] + Short, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="medium")] + Medium, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="long")] + Long, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class AnswerLengthExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this AnswerLength value) + { + return value switch + { + AnswerLength.Short => "short", + AnswerLength.Medium => "medium", + AnswerLength.Long => "long", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static AnswerLength? ToEnum(string value) + { + return value switch + { + "short" => AnswerLength.Short, + "medium" => AnswerLength.Medium, + "long" => AnswerLength.Long, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.AssistantMessage.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.AssistantMessage.g.verified.cs new file mode 100644 index 0000000000..167bffac32 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.AssistantMessage.g.verified.cs @@ -0,0 +1,46 @@ +//HintName: G.Models.AssistantMessage.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class AssistantMessage + { + /// + /// The role of an individual message.
+ /// - `user`: Input provided by the user. Any instructions given here that conflict
+ /// with instructions given in the `system` prompt take precedence over the `system`
+ /// prompt instructions.
+ /// - `assistant`: Response generated by the model.
+ /// - `system`: Initial instructions provided to the system to provide general guidance
+ /// on the tone and voice of the generated message. An initial system message is
+ /// optional but recommended to provide guidance on the tone of the chat. For
+ /// example, "You are a helpful chatbot with a background in earth sciences and a
+ /// charming French accent."
+ /// Default Value: assistant + ///
+ [global::Newtonsoft.Json.JsonProperty("role")] + public global::G.AssistantMessageRole? Role { get; set; } = global::G.AssistantMessageRole.Assistant; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("content")] + public string? Content { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("tool_calls")] + public global::System.Collections.Generic.IList? ToolCalls { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.AssistantMessageRole.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.AssistantMessageRole.g.verified.cs new file mode 100644 index 0000000000..cf2ec0bedf --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.AssistantMessageRole.g.verified.cs @@ -0,0 +1,58 @@ +//HintName: G.Models.AssistantMessageRole.g.cs + +#nullable enable + +namespace G +{ + /// + /// The role of an individual message.
+ /// - `user`: Input provided by the user. Any instructions given here that conflict
+ /// with instructions given in the `system` prompt take precedence over the `system`
+ /// prompt instructions.
+ /// - `assistant`: Response generated by the model.
+ /// - `system`: Initial instructions provided to the system to provide general guidance
+ /// on the tone and voice of the generated message. An initial system message is
+ /// optional but recommended to provide guidance on the tone of the chat. For
+ /// example, "You are a helpful chatbot with a background in earth sciences and a
+ /// charming French accent."
+ /// Default Value: assistant + ///
+ [global::System.Runtime.Serialization.DataContract] + public enum AssistantMessageRole + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="assistant")] + Assistant, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class AssistantMessageRoleExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this AssistantMessageRole value) + { + return value switch + { + AssistantMessageRole.Assistant => "assistant", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static AssistantMessageRole? ToEnum(string value) + { + return value switch + { + "assistant" => AssistantMessageRole.Assistant, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.BodyConvertDocumentFileStudioV1ChatFilesConvertPost.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.BodyConvertDocumentFileStudioV1ChatFilesConvertPost.g.verified.cs new file mode 100644 index 0000000000..ca2ad8045e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.BodyConvertDocumentFileStudioV1ChatFilesConvertPost.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.BodyConvertDocumentFileStudioV1ChatFilesConvertPost.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class BodyConvertDocumentFileStudioV1ChatFilesConvertPost + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("files", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList Files { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.BodyV1LibraryUpload.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.BodyV1LibraryUpload.g.verified.cs new file mode 100644 index 0000000000..33acada86a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.BodyV1LibraryUpload.g.verified.cs @@ -0,0 +1,54 @@ +//HintName: G.Models.BodyV1LibraryUpload.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class BodyV1LibraryUpload + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("file", Required = global::Newtonsoft.Json.Required.Always)] + public byte[] File { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("filename", Required = global::Newtonsoft.Json.Required.Always)] + public string Filename { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("path")] + public string? Path { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("labels")] + public global::System.Collections.Generic.IList? Labels { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("publicUrl")] + public string? PublicUrl { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("custom_configs")] + public string? CustomConfigs { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.BodyV1UploadDataset.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.BodyV1UploadDataset.g.verified.cs new file mode 100644 index 0000000000..3161b630d5 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.BodyV1UploadDataset.g.verified.cs @@ -0,0 +1,60 @@ +//HintName: G.Models.BodyV1UploadDataset.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class BodyV1UploadDataset + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("dataset_file", Required = global::Newtonsoft.Json.Required.Always)] + public byte[] DatasetFile { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("dataset_filename", Required = global::Newtonsoft.Json.Required.Always)] + public string DatasetFilename { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("dataset_name", Required = global::Newtonsoft.Json.Required.Always)] + public string DatasetName { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("selected_columns")] + public string? SelectedColumns { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("approve_whitespace_correction")] + public bool ApproveWhitespaceCorrection { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("delete_long_rows")] + public bool DeleteLongRows { get; set; } + + /// + /// Default Value: 0.1 + /// + [global::Newtonsoft.Json.JsonProperty("split_ratio")] + public double SplitRatio { get; set; } = 0.1; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatCompletion.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatCompletion.g.verified.cs new file mode 100644 index 0000000000..5bb67cb021 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatCompletion.g.verified.cs @@ -0,0 +1,44 @@ +//HintName: G.Models.ChatCompletion.g.cs + +#nullable enable + +namespace G +{ + /// + /// Used for non-streaming responses. Streaming responses return `ChatCompletionVllmStreamingMessage`. + /// + public sealed partial class ChatCompletion + { + /// + /// A unique ID for the request (not the message). Repeated identical requests
+ /// get different IDs. However, for a streaming response, the ID will be the same
+ /// for all responses in the stream. + ///
+ [global::Newtonsoft.Json.JsonProperty("id", Required = global::Newtonsoft.Json.Required.Always)] + public string Id { get; set; } = default!; + + /// + /// One or more responses, depending on the `n` parameter from the request. + /// + [global::Newtonsoft.Json.JsonProperty("choices", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList Choices { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("usage", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.UsageInfo Usage { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("meta")] + public global::G.ChatCompletionMeta? Meta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatCompletionMeta.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatCompletionMeta.g.verified.cs new file mode 100644 index 0000000000..61d0c4c9b9 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatCompletionMeta.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.ChatCompletionMeta.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatCompletionMeta + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatCompletionResponseChoice.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatCompletionResponseChoice.g.verified.cs new file mode 100644 index 0000000000..1acc7a8cd1 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatCompletionResponseChoice.g.verified.cs @@ -0,0 +1,48 @@ +//HintName: G.Models.ChatCompletionResponseChoice.g.cs + +#nullable enable + +namespace G +{ + /// + /// A single possible response generated by the system. For non-streaming replies, There
+ /// can be multiple responses, depending on what `n` value you specified in the request. + ///
+ public sealed partial class ChatCompletionResponseChoice + { + /// + /// Zero-based index of the message in the list of messages. Note that this might not
+ /// correspond with the position in the response list. + ///
+ [global::Newtonsoft.Json.JsonProperty("index", Required = global::Newtonsoft.Json.Required.Always)] + public int Index { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("message", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.AssistantMessage Message { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("logprobs")] + public global::G.Logprobs? Logprobs { get; set; } + + /// + /// Why the message ended. Possible reasons:
+ /// - `stop`: The response ended naturally as a complete answer (due to
+ /// [end-of-sequence token](https://huggingface.co/docs/transformers/v4.32.1/en/llm_tutorial#generate-text))
+ /// or because the model generated a stop sequence provided in the request.
+ /// - `length`: The response ended by reaching `max_tokens`. + ///
+ [global::Newtonsoft.Json.JsonProperty("finish_reason")] + public string? FinishReason { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatCompletionResponseDeltaChoice.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatCompletionResponseDeltaChoice.g.verified.cs new file mode 100644 index 0000000000..ac01b3cd68 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatCompletionResponseDeltaChoice.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: G.Models.ChatCompletionResponseDeltaChoice.g.cs + +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatCompletionResponseDeltaChoice + { + /// + /// Always zero in streamed responses. + /// + [global::Newtonsoft.Json.JsonProperty("index", Required = global::Newtonsoft.Json.Required.Always)] + public int Index { get; set; } = default!; + + /// + /// - **The first message** in the stream will be an object set to `{"role":"assistant"}`.
+ /// - **Subsequent messages** will have an object `{"content": __token__}` with the generated token. + ///
+ [global::Newtonsoft.Json.JsonProperty("delta", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.AnyOf Delta { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("logprobs")] + public global::G.Logprobs? Logprobs { get; set; } + + /// + /// One of the following string values:
+ /// - `null`: All messages but the last will return null for `finish_reason`.
+ /// - `stop`: The response ended naturally as a complete answer (due to
+ /// [end-of-sequence token](https://huggingface.co/docs/transformers/v4.32.1/en/llm_tutorial#generate-text))
+ /// or because the model generated a stop sequence provided in the request.
+ /// - `length`: The response ended by reaching `max_tokens`. + ///
+ [global::Newtonsoft.Json.JsonProperty("finish_reason")] + public string? FinishReason { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatCompletionVllmStreamingMessage.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatCompletionVllmStreamingMessage.g.verified.cs new file mode 100644 index 0000000000..5860f96fa6 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatCompletionVllmStreamingMessage.g.verified.cs @@ -0,0 +1,44 @@ +//HintName: G.Models.ChatCompletionVllmStreamingMessage.g.cs + +#nullable enable + +namespace G +{ + /// + /// Returned for streaming messages. Non-streaming responses return `ChatCompletion`. + /// + public sealed partial class ChatCompletionVllmStreamingMessage + { + /// + /// A unique ID for the request (not the message). Repeated identical requests
+ /// get different IDs. However, for a streaming response, the ID will be the same
+ /// for all responses in the stream. + ///
+ [global::Newtonsoft.Json.JsonProperty("id", Required = global::Newtonsoft.Json.Required.Always)] + public string Id { get; set; } = default!; + + /// + /// The message + /// + [global::Newtonsoft.Json.JsonProperty("choices", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList Choices { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("usage")] + public global::G.UsageInfo? Usage { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("meta")] + public global::G.ChatCompletionVllmStreamingMessageMeta? Meta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatCompletionVllmStreamingMessageMeta.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatCompletionVllmStreamingMessageMeta.g.verified.cs new file mode 100644 index 0000000000..79d327349b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatCompletionVllmStreamingMessageMeta.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.ChatCompletionVllmStreamingMessageMeta.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatCompletionVllmStreamingMessageMeta + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatMessage.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatMessage.g.verified.cs new file mode 100644 index 0000000000..54d67b8672 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatMessage.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.ChatMessage.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatMessage + { + /// + /// An enumeration. + /// + [global::Newtonsoft.Json.JsonProperty("role", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.RoleType Role { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("text", Required = global::Newtonsoft.Json.Required.Always)] + public string Text { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatOutput.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatOutput.g.verified.cs new file mode 100644 index 0000000000..e18d87eb3c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatOutput.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.ChatOutput.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatOutput + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("text", Required = global::Newtonsoft.Json.Required.Always)] + public string Text { get; set; } = default!; + + /// + /// An enumeration. + /// + [global::Newtonsoft.Json.JsonProperty("role", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.RoleType Role { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("finishReason", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.FinishReason FinishReason { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatResponse.g.verified.cs new file mode 100644 index 0000000000..045d27bac5 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatResponse.g.verified.cs @@ -0,0 +1,32 @@ +//HintName: G.Models.ChatResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatResponse + { + /// + /// A unique ID for the request (not the message). Repeated identical requests
+ /// get different IDs. However, for a streaming response, the ID will be the same
+ /// for all responses in the stream. + ///
+ [global::Newtonsoft.Json.JsonProperty("id", Required = global::Newtonsoft.Json.Required.Always)] + public string Id { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("outputs", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList Outputs { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatStreamingContentDelta.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatStreamingContentDelta.g.verified.cs new file mode 100644 index 0000000000..54cb0a4906 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatStreamingContentDelta.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatStreamingContentDelta.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatStreamingContentDelta + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("content", Required = global::Newtonsoft.Json.Required.Always)] + public string Content { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatStreamingFirstDelta.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatStreamingFirstDelta.g.verified.cs new file mode 100644 index 0000000000..7d7e8e6d88 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatStreamingFirstDelta.g.verified.cs @@ -0,0 +1,33 @@ +//HintName: G.Models.ChatStreamingFirstDelta.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatStreamingFirstDelta + { + /// + /// The role of an individual message.
+ /// - `user`: Input provided by the user. Any instructions given here that conflict
+ /// with instructions given in the `system` prompt take precedence over the `system`
+ /// prompt instructions.
+ /// - `assistant`: Response generated by the model.
+ /// - `system`: Initial instructions provided to the system to provide general guidance
+ /// on the tone and voice of the generated message. An initial system message is
+ /// optional but recommended to provide guidance on the tone of the chat. For
+ /// example, "You are a helpful chatbot with a background in earth sciences and a
+ /// charming French accent." + ///
+ [global::Newtonsoft.Json.JsonProperty("role", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.ChatStreamingFirstDeltaRole Role { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatStreamingFirstDeltaRole.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatStreamingFirstDeltaRole.g.verified.cs new file mode 100644 index 0000000000..d38e9b89e1 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ChatStreamingFirstDeltaRole.g.verified.cs @@ -0,0 +1,78 @@ +//HintName: G.Models.ChatStreamingFirstDeltaRole.g.cs + +#nullable enable + +namespace G +{ + /// + /// The role of an individual message.
+ /// - `user`: Input provided by the user. Any instructions given here that conflict
+ /// with instructions given in the `system` prompt take precedence over the `system`
+ /// prompt instructions.
+ /// - `assistant`: Response generated by the model.
+ /// - `system`: Initial instructions provided to the system to provide general guidance
+ /// on the tone and voice of the generated message. An initial system message is
+ /// optional but recommended to provide guidance on the tone of the chat. For
+ /// example, "You are a helpful chatbot with a background in earth sciences and a
+ /// charming French accent." + ///
+ [global::System.Runtime.Serialization.DataContract] + public enum ChatStreamingFirstDeltaRole + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="system")] + System, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="user")] + User, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="assistant")] + Assistant, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="tool")] + Tool, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ChatStreamingFirstDeltaRoleExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ChatStreamingFirstDeltaRole value) + { + return value switch + { + ChatStreamingFirstDeltaRole.System => "system", + ChatStreamingFirstDeltaRole.User => "user", + ChatStreamingFirstDeltaRole.Assistant => "assistant", + ChatStreamingFirstDeltaRole.Tool => "tool", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ChatStreamingFirstDeltaRole? ToEnum(string value) + { + return value switch + { + "system" => ChatStreamingFirstDeltaRole.System, + "user" => ChatStreamingFirstDeltaRole.User, + "assistant" => ChatStreamingFirstDeltaRole.Assistant, + "tool" => ChatStreamingFirstDeltaRole.Tool, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.CompletionBody.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.CompletionBody.g.verified.cs new file mode 100644 index 0000000000..57376df461 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.CompletionBody.g.verified.cs @@ -0,0 +1,104 @@ +//HintName: G.Models.CompletionBody.g.cs + +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CompletionBody + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("prompt", Required = global::Newtonsoft.Json.Required.Always)] + public string Prompt { get; set; } = default!; + + /// + /// Default Value: 1 + /// + [global::Newtonsoft.Json.JsonProperty("numResults")] + public int NumResults { get; set; } = 1; + + /// + /// Default Value: 16 + /// + [global::Newtonsoft.Json.JsonProperty("maxTokens")] + public int MaxTokens { get; set; } = 16; + + /// + /// Default Value: 0 + /// + [global::Newtonsoft.Json.JsonProperty("minTokens")] + public int MinTokens { get; set; } = 0; + + /// + /// Default Value: 1 + /// + [global::Newtonsoft.Json.JsonProperty("temperature")] + public double Temperature { get; set; } = 1; + + /// + /// Default Value: 1 + /// + [global::Newtonsoft.Json.JsonProperty("topP")] + public double TopP { get; set; } = 1; + + /// + /// Default Value: 0 + /// + [global::Newtonsoft.Json.JsonProperty("minP")] + public double MinP { get; set; } = 0; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("stopSequences")] + public global::System.Collections.Generic.IList? StopSequences { get; set; } + + /// + /// Default Value: 0 + /// + [global::Newtonsoft.Json.JsonProperty("topKReturn")] + public int TopKReturn { get; set; } = 0; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("logitBias")] + public global::G.CompletionBodyLogitBias? LogitBias { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("frequencyPenalty")] + public global::System.AllOf? FrequencyPenalty { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("presencePenalty")] + public global::System.AllOf? PresencePenalty { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("countPenalty")] + public global::System.AllOf? CountPenalty { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("epoch")] + public int Epoch { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.CompletionBodyLogitBias.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.CompletionBodyLogitBias.g.verified.cs new file mode 100644 index 0000000000..5ee01938c1 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.CompletionBodyLogitBias.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.CompletionBodyLogitBias.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CompletionBodyLogitBias + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ConversationalRagFlowPublicFields.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ConversationalRagFlowPublicFields.g.verified.cs new file mode 100644 index 0000000000..49bceb1f05 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ConversationalRagFlowPublicFields.g.verified.cs @@ -0,0 +1,72 @@ +//HintName: G.Models.ConversationalRagFlowPublicFields.g.cs + +#nullable enable + +namespace G +{ + /// + /// This class is to be used as a common class to all Studio API requests payloads + /// + public sealed partial class ConversationalRagFlowPublicFields + { + /// + /// messages + /// + [global::Newtonsoft.Json.JsonProperty("messages", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList Messages { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("path")] + public string? Path { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("labels")] + public global::System.Collections.Generic.IList? Labels { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("file_ids")] + public global::System.Collections.Generic.IList? FileIds { get; set; } + + /// + /// Default Value: 15 + /// + [global::Newtonsoft.Json.JsonProperty("max_segments")] + public int MaxSegments { get; set; } = 15; + + /// + /// Default Value: default + /// + [global::Newtonsoft.Json.JsonProperty("retrieval_strategy")] + public global::G.ConversationalRagFlowPublicFieldsRetrievalStrategy? RetrievalStrategy { get; set; } = global::G.ConversationalRagFlowPublicFieldsRetrievalStrategy.Default; + + /// + /// Default Value: 0.8 + /// + [global::Newtonsoft.Json.JsonProperty("retrieval_similarity_threshold")] + public double RetrievalSimilarityThreshold { get; set; } = 0.8; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("max_neighbors")] + public int MaxNeighbors { get; set; } + + /// + /// Default Value: 0.98 + /// + [global::Newtonsoft.Json.JsonProperty("hybrid_search_alpha")] + public double HybridSearchAlpha { get; set; } = 0.98; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ConversationalRagFlowPublicFieldsRetrievalStrategy.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ConversationalRagFlowPublicFieldsRetrievalStrategy.g.verified.cs new file mode 100644 index 0000000000..b0eb5c648b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ConversationalRagFlowPublicFieldsRetrievalStrategy.g.verified.cs @@ -0,0 +1,69 @@ +//HintName: G.Models.ConversationalRagFlowPublicFieldsRetrievalStrategy.g.cs + +#nullable enable + +namespace G +{ + /// + /// Default Value: default + /// + [global::System.Runtime.Serialization.DataContract] + public enum ConversationalRagFlowPublicFieldsRetrievalStrategy + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="default")] + Default, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="segments")] + Segments, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="add_neighbors")] + AddNeighbors, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="full_doc")] + FullDoc, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ConversationalRagFlowPublicFieldsRetrievalStrategyExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ConversationalRagFlowPublicFieldsRetrievalStrategy value) + { + return value switch + { + ConversationalRagFlowPublicFieldsRetrievalStrategy.Default => "default", + ConversationalRagFlowPublicFieldsRetrievalStrategy.Segments => "segments", + ConversationalRagFlowPublicFieldsRetrievalStrategy.AddNeighbors => "add_neighbors", + ConversationalRagFlowPublicFieldsRetrievalStrategy.FullDoc => "full_doc", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ConversationalRagFlowPublicFieldsRetrievalStrategy? ToEnum(string value) + { + return value switch + { + "default" => ConversationalRagFlowPublicFieldsRetrievalStrategy.Default, + "segments" => ConversationalRagFlowPublicFieldsRetrievalStrategy.Segments, + "add_neighbors" => ConversationalRagFlowPublicFieldsRetrievalStrategy.AddNeighbors, + "full_doc" => ConversationalRagFlowPublicFieldsRetrievalStrategy.FullDoc, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ConversationalRagResult.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ConversationalRagResult.g.verified.cs new file mode 100644 index 0000000000..6f720a79a8 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ConversationalRagResult.g.verified.cs @@ -0,0 +1,56 @@ +//HintName: G.Models.ConversationalRagResult.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ConversationalRagResult + { + /// + /// A unique ID for the request (not the message). Repeated identical requests
+ /// get different IDs. However, for a streaming response, the ID will be the same
+ /// for all responses in the stream. + ///
+ [global::Newtonsoft.Json.JsonProperty("id", Required = global::Newtonsoft.Json.Required.Always)] + public string Id { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("choices", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList Choices { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("search_queries")] + public global::System.Collections.Generic.IList? SearchQueries { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("context_retrieved", Required = global::Newtonsoft.Json.Required.Always)] + public bool ContextRetrieved { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("answer_in_context", Required = global::Newtonsoft.Json.Required.Always)] + public bool AnswerInContext { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("sources", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList Sources { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ConversationalRagSource.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ConversationalRagSource.g.verified.cs new file mode 100644 index 0000000000..bcb32fbbe8 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ConversationalRagSource.g.verified.cs @@ -0,0 +1,60 @@ +//HintName: G.Models.ConversationalRagSource.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ConversationalRagSource + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("text", Required = global::Newtonsoft.Json.Required.Always)] + public string Text { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("file_id", Required = global::Newtonsoft.Json.Required.Always)] + public string FileId { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("file_name", Required = global::Newtonsoft.Json.Required.Always)] + public string FileName { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("score", Required = global::Newtonsoft.Json.Required.Always)] + public double Score { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("order")] + public int Order { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("public_url")] + public string? PublicUrl { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("labels")] + public global::System.Collections.Generic.IList? Labels { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ConvertDocumentFileStudioV1ChatFilesConvertPostResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ConvertDocumentFileStudioV1ChatFilesConvertPostResponse.g.verified.cs new file mode 100644 index 0000000000..f9a4c116e1 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ConvertDocumentFileStudioV1ChatFilesConvertPostResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.ConvertDocumentFileStudioV1ChatFilesConvertPostResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ConvertDocumentFileStudioV1ChatFilesConvertPostResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.Correction.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.Correction.g.verified.cs new file mode 100644 index 0000000000..40939739ee --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.Correction.g.verified.cs @@ -0,0 +1,48 @@ +//HintName: G.Models.Correction.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Correction + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("suggestion", Required = global::Newtonsoft.Json.Required.Always)] + public string Suggestion { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("startIndex", Required = global::Newtonsoft.Json.Required.Always)] + public int StartIndex { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("endIndex", Required = global::Newtonsoft.Json.Required.Always)] + public int EndIndex { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("originalText", Required = global::Newtonsoft.Json.Required.Always)] + public string OriginalText { get; set; } = default!; + + /// + /// An enumeration. + /// + [global::Newtonsoft.Json.JsonProperty("correctionType", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.CorrectionType CorrectionType { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.CorrectionType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.CorrectionType.g.verified.cs new file mode 100644 index 0000000000..282549676a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.CorrectionType.g.verified.cs @@ -0,0 +1,83 @@ +//HintName: G.Models.CorrectionType.g.cs + +#nullable enable + +namespace G +{ + /// + /// An enumeration. + /// + [global::System.Runtime.Serialization.DataContract] + public enum CorrectionType + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="Grammar")] + Grammar, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="Missing Word")] + MissingWord, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="Punctuation")] + Punctuation, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="Spelling")] + Spelling, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="Word Repetition")] + WordRepetition, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="Wrong Word")] + WrongWord, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CorrectionTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CorrectionType value) + { + return value switch + { + CorrectionType.Grammar => "Grammar", + CorrectionType.MissingWord => "Missing Word", + CorrectionType.Punctuation => "Punctuation", + CorrectionType.Spelling => "Spelling", + CorrectionType.WordRepetition => "Word Repetition", + CorrectionType.WrongWord => "Wrong Word", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CorrectionType? ToEnum(string value) + { + return value switch + { + "Grammar" => CorrectionType.Grammar, + "Missing Word" => CorrectionType.MissingWord, + "Punctuation" => CorrectionType.Punctuation, + "Spelling" => CorrectionType.Spelling, + "Word Repetition" => CorrectionType.WordRepetition, + "Wrong Word" => CorrectionType.WrongWord, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.CorrectionsBody.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.CorrectionsBody.g.verified.cs new file mode 100644 index 0000000000..ad3f8e4f93 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.CorrectionsBody.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CorrectionsBody.g.cs + +#nullable enable + +namespace G +{ + /// + /// This class is to be used as a common class to all Studio API requests payloads + /// + public sealed partial class CorrectionsBody + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("text", Required = global::Newtonsoft.Json.Required.Always)] + public string Text { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.CorrectionsResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.CorrectionsResponse.g.verified.cs new file mode 100644 index 0000000000..020467e3dd --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.CorrectionsResponse.g.verified.cs @@ -0,0 +1,32 @@ +//HintName: G.Models.CorrectionsResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CorrectionsResponse + { + /// + /// A unique ID for the request (not the message). Repeated identical requests
+ /// get different IDs. However, for a streaming response, the ID will be the same
+ /// for all responses in the stream. + ///
+ [global::Newtonsoft.Json.JsonProperty("id", Required = global::Newtonsoft.Json.Required.Always)] + public string Id { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("corrections", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList Corrections { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.CustomModelInput.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.CustomModelInput.g.verified.cs new file mode 100644 index 0000000000..0226778fcd --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.CustomModelInput.g.verified.cs @@ -0,0 +1,48 @@ +//HintName: G.Models.CustomModelInput.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CustomModelInput + { + /// + /// An enumeration. + /// + [global::Newtonsoft.Json.JsonProperty("model_type", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.CustomModelType ModelType { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("learning_rate")] + public double LearningRate { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("num_epochs")] + public int NumEpochs { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("dataset_id", Required = global::Newtonsoft.Json.Required.Always)] + public string DatasetId { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("model_name", Required = global::Newtonsoft.Json.Required.Always)] + public string ModelName { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.CustomModelType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.CustomModelType.g.verified.cs new file mode 100644 index 0000000000..c54a1bdf83 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.CustomModelType.g.verified.cs @@ -0,0 +1,83 @@ +//HintName: G.Models.CustomModelType.g.cs + +#nullable enable + +namespace G +{ + /// + /// An enumeration. + /// + [global::System.Runtime.Serialization.DataContract] + public enum CustomModelType + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="j2-large")] + J2Large, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="j2-grande")] + J2Grande, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="j2-jumbo")] + J2Jumbo, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="j2-light")] + J2Light, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="j2-mid")] + J2Mid, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="j2-ultra")] + J2Ultra, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CustomModelTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CustomModelType value) + { + return value switch + { + CustomModelType.J2Large => "j2-large", + CustomModelType.J2Grande => "j2-grande", + CustomModelType.J2Jumbo => "j2-jumbo", + CustomModelType.J2Light => "j2-light", + CustomModelType.J2Mid => "j2-mid", + CustomModelType.J2Ultra => "j2-ultra", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CustomModelType? ToEnum(string value) + { + return value switch + { + "j2-large" => CustomModelType.J2Large, + "j2-grande" => CustomModelType.J2Grande, + "j2-jumbo" => CustomModelType.J2Jumbo, + "j2-light" => CustomModelType.J2Light, + "j2-mid" => CustomModelType.J2Mid, + "j2-ultra" => CustomModelType.J2Ultra, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.CustomModelUpdateBody.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.CustomModelUpdateBody.g.verified.cs new file mode 100644 index 0000000000..37f6ee7184 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.CustomModelUpdateBody.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CustomModelUpdateBody.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CustomModelUpdateBody + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("defaultEpoch")] + public int DefaultEpoch { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.DocumentSchema.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.DocumentSchema.g.verified.cs new file mode 100644 index 0000000000..f147232476 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.DocumentSchema.g.verified.cs @@ -0,0 +1,38 @@ +//HintName: G.Models.DocumentSchema.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DocumentSchema + { + /// + /// A unique ID for the request (not the message). Repeated identical requests
+ /// get different IDs. However, for a streaming response, the ID will be the same
+ /// for all responses in the stream. + ///
+ [global::Newtonsoft.Json.JsonProperty("id")] + public string? Id { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("content", Required = global::Newtonsoft.Json.Required.Always)] + public string Content { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("metadata")] + public global::G.DocumentSchemaMetadata? Metadata { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.DocumentSchemaMetadata.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.DocumentSchemaMetadata.g.verified.cs new file mode 100644 index 0000000000..c8a4af169a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.DocumentSchemaMetadata.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.DocumentSchemaMetadata.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DocumentSchemaMetadata + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.DocumentType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.DocumentType.g.verified.cs new file mode 100644 index 0000000000..70aba8fb0a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.DocumentType.g.verified.cs @@ -0,0 +1,55 @@ +//HintName: G.Models.DocumentType.g.cs + +#nullable enable + +namespace G +{ + /// + /// An enumeration. + /// + [global::System.Runtime.Serialization.DataContract] + public enum DocumentType + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="URL")] + URL, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="TEXT")] + TEXT, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class DocumentTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this DocumentType value) + { + return value switch + { + DocumentType.URL => "URL", + DocumentType.TEXT => "TEXT", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static DocumentType? ToEnum(string value) + { + return value switch + { + "URL" => DocumentType.URL, + "TEXT" => DocumentType.TEXT, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.EmbedType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.EmbedType.g.verified.cs new file mode 100644 index 0000000000..932d7c618d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.EmbedType.g.verified.cs @@ -0,0 +1,55 @@ +//HintName: G.Models.EmbedType.g.cs + +#nullable enable + +namespace G +{ + /// + /// An enumeration. + /// + [global::System.Runtime.Serialization.DataContract] + public enum EmbedType + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="query")] + Query, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="segment")] + Segment, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class EmbedTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this EmbedType value) + { + return value switch + { + EmbedType.Query => "query", + EmbedType.Segment => "segment", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static EmbedType? ToEnum(string value) + { + return value switch + { + "query" => EmbedType.Query, + "segment" => EmbedType.Segment, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.EmbeddingsBody.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.EmbeddingsBody.g.verified.cs new file mode 100644 index 0000000000..11abf36aae --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.EmbeddingsBody.g.verified.cs @@ -0,0 +1,32 @@ +//HintName: G.Models.EmbeddingsBody.g.cs + +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// This class is to be used as a common class to all Studio API requests payloads + /// + public sealed partial class EmbeddingsBody + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("texts", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList Texts { get; set; } = default!; + + /// + /// Default Value: segment + /// + [global::Newtonsoft.Json.JsonProperty("type")] + public global::System.AllOf? Type { get; set; } = global::G.EmbedType.Segment; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.FileDeleteResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.FileDeleteResponse.g.verified.cs new file mode 100644 index 0000000000..bf45c6efaf --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.FileDeleteResponse.g.verified.cs @@ -0,0 +1,32 @@ +//HintName: G.Models.FileDeleteResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class FileDeleteResponse + { + /// + /// A unique ID for the request (not the message). Repeated identical requests
+ /// get different IDs. However, for a streaming response, the ID will be the same
+ /// for all responses in the stream. + ///
+ [global::Newtonsoft.Json.JsonProperty("id", Required = global::Newtonsoft.Json.Required.Always)] + public string Id { get; set; } = default!; + + /// + /// The RAG library ID of the deleted file. + /// + [global::Newtonsoft.Json.JsonProperty("fileId", Required = global::Newtonsoft.Json.Required.Always)] + public string FileId { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.FileResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.FileResponse.g.verified.cs new file mode 100644 index 0000000000..29a81daea0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.FileResponse.g.verified.cs @@ -0,0 +1,101 @@ +//HintName: G.Models.FileResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class FileResponse + { + /// + /// The unique identifier of the file, generated by AI21. + /// + [global::Newtonsoft.Json.JsonProperty("fileId", Required = global::Newtonsoft.Json.Required.Always)] + public string FileId { get; set; } = default!; + + /// + /// The name of the file. This is the local file name from when the file was
+ /// uploaded. It cannot be modified. + ///
+ [global::Newtonsoft.Json.JsonProperty("name", Required = global::Newtonsoft.Json.Required.Always)] + public string Name { get; set; } = default!; + + /// + /// An arbitrary file-path-like string to indicate the content of a file. This has
+ /// nothing to do with the location of the file in storage or on disk, and is only
+ /// another label that you can assign to the file in path-like format to help you
+ /// organize the contents of the file or filter queries against your files. Example
+ /// paths might be `pets/fish` or `pets/dogs`. Then, when searching your library,
+ /// you can filter files by the full path or path prefix. So to search only files
+ /// in the "dog folder", filter by the path `/pets/dogs`. To search all files in
+ /// the "pet folder", filter your search by the path `pets/` when searching by path.
+ /// There isn't a restriction on whether a path must start or end with a / mark, but
+ /// be consistent in your usage, and all matches are prefix matching, not substring
+ /// matching. So filtering by `dog/` matches `dog/` and `dog/setter` but not `pets/dog/`. + ///
+ [global::Newtonsoft.Json.JsonProperty("path")] + public string? Path { get; set; } + + /// + /// The file type. See the file upload method to learn what file types are supported. + /// + [global::Newtonsoft.Json.JsonProperty("fileType", Required = global::Newtonsoft.Json.Required.Always)] + public string FileType { get; set; } = default!; + + /// + /// The size of the file, in bytes. + /// + [global::Newtonsoft.Json.JsonProperty("sizeBytes", Required = global::Newtonsoft.Json.Required.Always)] + public int SizeBytes { get; set; } = default!; + + /// + /// Any string labels you have associated with the file. You can apply arbitrary
+ /// string labels to your files and limit queries to files with one or more labels.
+ /// Similar to paths, but labels do not prefix match. Labels are case-sensitive.
+ /// There can be a maximum of 20 unique labels per account. + ///
+ [global::Newtonsoft.Json.JsonProperty("labels")] + public global::System.Collections.Generic.IList? Labels { get; set; } + + /// + /// The public URL of the file, if any. This URL is not validated by
+ /// AI21 or used in any way. It is strictly a piece of metadata that you can
+ /// optionally attach to a file. + ///
+ [global::Newtonsoft.Json.JsonProperty("publicUrl")] + public string? PublicUrl { get; set; } + + /// + /// An internal identifier of the user who uploaded the file. + /// + [global::Newtonsoft.Json.JsonProperty("createdBy", Required = global::Newtonsoft.Json.Required.Always)] + public string CreatedBy { get; set; } = default!; + + /// + /// The date when the file was uploaded. + /// + [global::Newtonsoft.Json.JsonProperty("creationDate", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.DateTime CreationDate { get; set; } = default!; + + /// + /// When the file data or metadata was last changed. + /// + [global::Newtonsoft.Json.JsonProperty("lastUpdated", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.DateTime LastUpdated { get; set; } = default!; + + /// + /// File status. One of the following values: "DB_RECORD_CREATED",
+ /// "UPLOADED", "UPLOAD_FAILED", "PROCESSED", "PROCESSING_FAILED" + ///
+ [global::Newtonsoft.Json.JsonProperty("status", Required = global::Newtonsoft.Json.Required.Always)] + public string Status { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.FileStatus.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.FileStatus.g.verified.cs new file mode 100644 index 0000000000..4050982392 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.FileStatus.g.verified.cs @@ -0,0 +1,76 @@ +//HintName: G.Models.FileStatus.g.cs + +#nullable enable + +namespace G +{ + /// + /// An enumeration. + /// + [global::System.Runtime.Serialization.DataContract] + public enum FileStatus + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="DB_RECORD_CREATED")] + DBRECORDCREATED, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="UPLOADED")] + UPLOADED, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="UPLOAD_FAILED")] + UPLOADFAILED, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="PROCESSED")] + PROCESSED, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="PROCESSING_FAILED")] + PROCESSINGFAILED, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class FileStatusExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this FileStatus value) + { + return value switch + { + FileStatus.DBRECORDCREATED => "DB_RECORD_CREATED", + FileStatus.UPLOADED => "UPLOADED", + FileStatus.UPLOADFAILED => "UPLOAD_FAILED", + FileStatus.PROCESSED => "PROCESSED", + FileStatus.PROCESSINGFAILED => "PROCESSING_FAILED", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static FileStatus? ToEnum(string value) + { + return value switch + { + "DB_RECORD_CREATED" => FileStatus.DBRECORDCREATED, + "UPLOADED" => FileStatus.UPLOADED, + "UPLOAD_FAILED" => FileStatus.UPLOADFAILED, + "PROCESSED" => FileStatus.PROCESSED, + "PROCESSING_FAILED" => FileStatus.PROCESSINGFAILED, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.FileUploadResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.FileUploadResponse.g.verified.cs new file mode 100644 index 0000000000..6ed7fe5f72 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.FileUploadResponse.g.verified.cs @@ -0,0 +1,34 @@ +//HintName: G.Models.FileUploadResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class FileUploadResponse + { + /// + /// A unique ID for the request (not the message). Repeated identical requests
+ /// get different IDs. However, for a streaming response, the ID will be the same
+ /// for all responses in the stream. + ///
+ [global::Newtonsoft.Json.JsonProperty("id", Required = global::Newtonsoft.Json.Required.Always)] + public string Id { get; set; } = default!; + + /// + /// A unique identifier for the uploaded file. Use this later to request, modify metadata,
+ /// or delete the file. You don't need to store the value though, as it is returned
+ /// along with all file information in any file GET request. Example: da13301a-14e4-4487-aa2f-cc6048e73cdc + ///
+ [global::Newtonsoft.Json.JsonProperty("fileId", Required = global::Newtonsoft.Json.Required.Always)] + public string FileId { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.FilesUpdateRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.FilesUpdateRequest.g.verified.cs new file mode 100644 index 0000000000..0f88587434 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.FilesUpdateRequest.g.verified.cs @@ -0,0 +1,33 @@ +//HintName: G.Models.FilesUpdateRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class FilesUpdateRequest + { + /// + /// The public URL of the file, if any. This URL is not validated by
+ /// AI21 or used in any way. It is strictly a piece of metadata that you can
+ /// optionally attach to a file. + ///
+ [global::Newtonsoft.Json.JsonProperty("publicUrl")] + public string? PublicUrl { get; set; } + + /// + /// Any labels to associate with this file. Separate multiple labels with commas. If
+ /// provided, will overwrite all existing labels. + ///
+ [global::Newtonsoft.Json.JsonProperty("labels")] + public global::System.Collections.Generic.IList? Labels { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.FinishReason.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.FinishReason.g.verified.cs new file mode 100644 index 0000000000..550ec279ec --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.FinishReason.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.FinishReason.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class FinishReason + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("reason", Required = global::Newtonsoft.Json.Required.Always)] + public string Reason { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("length")] + public int Length { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("sequence")] + public string? Sequence { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.FunctionToolDefinition.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.FunctionToolDefinition.g.verified.cs new file mode 100644 index 0000000000..54b3349fc9 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.FunctionToolDefinition.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.FunctionToolDefinition.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class FunctionToolDefinition + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("name", Required = global::Newtonsoft.Json.Required.Always)] + public string Name { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("description")] + public string? Description { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("parameters")] + public global::G.ToolParameters? Parameters { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.HTTPValidationError.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.HTTPValidationError.g.verified.cs new file mode 100644 index 0000000000..4bf99f826b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.HTTPValidationError.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.HTTPValidationError.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class HTTPValidationError + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("detail")] + public global::System.Collections.Generic.IList? Detail { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.Highlight.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.Highlight.g.verified.cs new file mode 100644 index 0000000000..06dc4b3fc2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.Highlight.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.Highlight.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Highlight + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("text", Required = global::Newtonsoft.Json.Required.Always)] + public string Text { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("startIndex", Required = global::Newtonsoft.Json.Required.Always)] + public int StartIndex { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("endIndex", Required = global::Newtonsoft.Json.Required.Always)] + public int EndIndex { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.LanguageStudioApiServerDataTypesChatChatRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.LanguageStudioApiServerDataTypesChatChatRequest.g.verified.cs new file mode 100644 index 0000000000..2551aa2ed0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.LanguageStudioApiServerDataTypesChatChatRequest.g.verified.cs @@ -0,0 +1,97 @@ +//HintName: G.Models.LanguageStudioApiServerDataTypesChatChatRequest.g.cs + +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class LanguageStudioApiServerDataTypesChatChatRequest + { + /// + /// An enumeration. + /// + [global::Newtonsoft.Json.JsonProperty("model", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.ModelName Model { get; set; } = default!; + + /// + /// messages + /// + [global::Newtonsoft.Json.JsonProperty("messages", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList> Messages { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("tools")] + public global::System.Collections.Generic.IList? Tools { get; set; } + + /// + /// Default Value: 1 + /// + [global::Newtonsoft.Json.JsonProperty("n")] + public int N { get; set; } = 1; + + /// + /// Default Value: 4096 + /// + [global::Newtonsoft.Json.JsonProperty("max_tokens")] + public int MaxTokens { get; set; } = 4096; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("temperature")] + public double Temperature { get; set; } + + /// + /// Default Value: 1 + /// + [global::Newtonsoft.Json.JsonProperty("top_p")] + public double TopP { get; set; } = 1; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("stop")] + public global::System.AnyOf>? Stop { get; set; } + + /// + /// Whether or not to stream the result one token at a time using
+ /// [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events).
+ /// This can be useful when waiting for long results where a long wait time for an
+ /// answer can be problematic, such as a chatbot. If set to `True`, then `n` must
+ /// be 1. A streaming response is different than the non-streaming response.
+ /// Default Value: false + ///
+ [global::Newtonsoft.Json.JsonProperty("stream")] + public bool Stream { get; set; } = false; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("mock_response")] + public global::G.MockResponseConfig? MockResponse { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("documents")] + public global::System.Collections.Generic.IList? Documents { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("response_format")] + public global::System.AllOf? ResponseFormat { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.LanguageStudioApiServerDataTypesJ2ChatChatRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.LanguageStudioApiServerDataTypesJ2ChatChatRequest.g.verified.cs new file mode 100644 index 0000000000..1bae7fc091 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.LanguageStudioApiServerDataTypesJ2ChatChatRequest.g.verified.cs @@ -0,0 +1,92 @@ +//HintName: G.Models.LanguageStudioApiServerDataTypesJ2ChatChatRequest.g.cs + +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// This class is to be used as a common class to all Studio API requests payloads + /// + public sealed partial class LanguageStudioApiServerDataTypesJ2ChatChatRequest + { + /// + /// messages + /// + [global::Newtonsoft.Json.JsonProperty("messages", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList Messages { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("system", Required = global::Newtonsoft.Json.Required.Always)] + public string System { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("frequencyPenalty")] + public global::System.AllOf? FrequencyPenalty { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("presencePenalty")] + public global::System.AllOf? PresencePenalty { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("countPenalty")] + public global::System.AllOf? CountPenalty { get; set; } + + /// + /// Default Value: 1 + /// + [global::Newtonsoft.Json.JsonProperty("numResults")] + public int NumResults { get; set; } = 1; + + /// + /// Default Value: 0.7 + /// + [global::Newtonsoft.Json.JsonProperty("temperature")] + public double Temperature { get; set; } = 0.7; + + /// + /// Default Value: 300 + /// + [global::Newtonsoft.Json.JsonProperty("maxTokens")] + public int MaxTokens { get; set; } = 300; + + /// + /// Default Value: 0 + /// + [global::Newtonsoft.Json.JsonProperty("minTokens")] + public int MinTokens { get; set; } = 0; + + /// + /// Default Value: 1 + /// + [global::Newtonsoft.Json.JsonProperty("topP")] + public double TopP { get; set; } = 1; + + /// + /// Default Value: 0 + /// + [global::Newtonsoft.Json.JsonProperty("topKReturn")] + public int TopKReturn { get; set; } = 0; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("stopSequences")] + public global::System.Collections.Generic.IList? StopSequences { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.LibraryAnswerRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.LibraryAnswerRequest.g.verified.cs new file mode 100644 index 0000000000..1bab5ade00 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.LibraryAnswerRequest.g.verified.cs @@ -0,0 +1,80 @@ +//HintName: G.Models.LibraryAnswerRequest.g.cs + +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// This class is to be used as a common class to all Studio API requests payloads + /// + public sealed partial class LibraryAnswerRequest + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("question", Required = global::Newtonsoft.Json.Required.Always)] + public string Question { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("maxSegments")] + public int MaxSegments { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("path")] + public string? Path { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("labels")] + public global::System.Collections.Generic.IList? Labels { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("fileIds")] + public global::System.Collections.Generic.IList? FileIds { get; set; } + + /// + /// An enumeration. + /// + [global::Newtonsoft.Json.JsonProperty("answerLength")] + public global::G.AnswerLength? AnswerLength { get; set; } + + /// + /// An enumeration. + /// + [global::Newtonsoft.Json.JsonProperty("mode")] + public global::G.Mode? Mode { get; set; } + + /// + /// Default Value: default + /// + [global::Newtonsoft.Json.JsonProperty("retrievalStrategy")] + public global::System.AllOf? RetrievalStrategy { get; set; } = global::G.RetrievalStrategy3.Default; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("retrievalSimilarityThreshold")] + public double RetrievalSimilarityThreshold { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("hybridSearchAlpha")] + public double HybridSearchAlpha { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.LibraryAnswerResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.LibraryAnswerResponse.g.verified.cs new file mode 100644 index 0000000000..09a1546694 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.LibraryAnswerResponse.g.verified.cs @@ -0,0 +1,44 @@ +//HintName: G.Models.LibraryAnswerResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class LibraryAnswerResponse + { + /// + /// A unique ID for the request (not the message). Repeated identical requests
+ /// get different IDs. However, for a streaming response, the ID will be the same
+ /// for all responses in the stream. + ///
+ [global::Newtonsoft.Json.JsonProperty("id", Required = global::Newtonsoft.Json.Required.Always)] + public string Id { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("answerInContext", Required = global::Newtonsoft.Json.Required.Always)] + public bool AnswerInContext { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("answer")] + public string? Answer { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("sources")] + public global::System.Collections.Generic.IList? Sources { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.LibrarySearchRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.LibrarySearchRequest.g.verified.cs new file mode 100644 index 0000000000..e781bf30fa --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.LibrarySearchRequest.g.verified.cs @@ -0,0 +1,74 @@ +//HintName: G.Models.LibrarySearchRequest.g.cs + +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// This class is to be used as a common class to all Studio API requests payloads + /// + public sealed partial class LibrarySearchRequest + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("query", Required = global::Newtonsoft.Json.Required.Always)] + public string Query { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("maxSegments")] + public int MaxSegments { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("path")] + public string? Path { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("labels")] + public global::System.Collections.Generic.IList? Labels { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("fileIds")] + public global::System.Collections.Generic.IList? FileIds { get; set; } + + /// + /// Default Value: default + /// + [global::Newtonsoft.Json.JsonProperty("retrievalStrategy")] + public global::System.AllOf? RetrievalStrategy { get; set; } = global::G.RetrievalStrategy3.Default; + + /// + /// Default Value: 1 + /// + [global::Newtonsoft.Json.JsonProperty("maxNeighbors")] + public int MaxNeighbors { get; set; } = 1; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("retrievalSimilarityThreshold")] + public double RetrievalSimilarityThreshold { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("hybridSearchAlpha")] + public double HybridSearchAlpha { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.LibrarySearchResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.LibrarySearchResponse.g.verified.cs new file mode 100644 index 0000000000..c71bacfb02 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.LibrarySearchResponse.g.verified.cs @@ -0,0 +1,32 @@ +//HintName: G.Models.LibrarySearchResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class LibrarySearchResponse + { + /// + /// A unique ID for the request (not the message). Repeated identical requests
+ /// get different IDs. However, for a streaming response, the ID will be the same
+ /// for all responses in the stream. + ///
+ [global::Newtonsoft.Json.JsonProperty("id", Required = global::Newtonsoft.Json.Required.Always)] + public string Id { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("results", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList Results { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.LibrarySearchResult.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.LibrarySearchResult.g.verified.cs new file mode 100644 index 0000000000..6e62c00e67 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.LibrarySearchResult.g.verified.cs @@ -0,0 +1,60 @@ +//HintName: G.Models.LibrarySearchResult.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class LibrarySearchResult + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("text", Required = global::Newtonsoft.Json.Required.Always)] + public string Text { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("fileId", Required = global::Newtonsoft.Json.Required.Always)] + public string FileId { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("fileName", Required = global::Newtonsoft.Json.Required.Always)] + public string FileName { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("score", Required = global::Newtonsoft.Json.Required.Always)] + public double Score { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("order")] + public int Order { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("publicUrl")] + public string? PublicUrl { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("labels")] + public global::System.Collections.Generic.IList? Labels { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.Logprobs.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.Logprobs.g.verified.cs new file mode 100644 index 0000000000..0d7b7d1337 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.Logprobs.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.Logprobs.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Logprobs + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("content", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList Content { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.LogprobsData.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.LogprobsData.g.verified.cs new file mode 100644 index 0000000000..652bde8f26 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.LogprobsData.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.LogprobsData.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class LogprobsData + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("token", Required = global::Newtonsoft.Json.Required.Always)] + public string Token { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("logprob", Required = global::Newtonsoft.Json.Required.Always)] + public double Logprob { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("top_logprobs")] + public global::System.Collections.Generic.IList? TopLogprobs { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.Message.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.Message.g.verified.cs new file mode 100644 index 0000000000..aa642bbf21 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.Message.g.verified.cs @@ -0,0 +1,39 @@ +//HintName: G.Models.Message.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Message + { + /// + /// The role of an individual message.
+ /// - `user`: Input provided by the user. Any instructions given here that conflict
+ /// with instructions given in the `system` prompt take precedence over the `system`
+ /// prompt instructions.
+ /// - `assistant`: Response generated by the model.
+ /// - `system`: Initial instructions provided to the system to provide general guidance
+ /// on the tone and voice of the generated message. An initial system message is
+ /// optional but recommended to provide guidance on the tone of the chat. For
+ /// example, "You are a helpful chatbot with a background in earth sciences and a
+ /// charming French accent." + ///
+ [global::Newtonsoft.Json.JsonProperty("role", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.MessageRole Role { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("content", Required = global::Newtonsoft.Json.Required.Always)] + public string Content { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.MessageRole.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.MessageRole.g.verified.cs new file mode 100644 index 0000000000..1ffa61aa19 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.MessageRole.g.verified.cs @@ -0,0 +1,64 @@ +//HintName: G.Models.MessageRole.g.cs + +#nullable enable + +namespace G +{ + /// + /// The role of an individual message.
+ /// - `user`: Input provided by the user. Any instructions given here that conflict
+ /// with instructions given in the `system` prompt take precedence over the `system`
+ /// prompt instructions.
+ /// - `assistant`: Response generated by the model.
+ /// - `system`: Initial instructions provided to the system to provide general guidance
+ /// on the tone and voice of the generated message. An initial system message is
+ /// optional but recommended to provide guidance on the tone of the chat. For
+ /// example, "You are a helpful chatbot with a background in earth sciences and a
+ /// charming French accent." + ///
+ [global::System.Runtime.Serialization.DataContract] + public enum MessageRole + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="assistant")] + Assistant, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="user")] + User, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class MessageRoleExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this MessageRole value) + { + return value switch + { + MessageRole.Assistant => "assistant", + MessageRole.User => "user", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static MessageRole? ToEnum(string value) + { + return value switch + { + "assistant" => MessageRole.Assistant, + "user" => MessageRole.User, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.MockResponseConfig.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.MockResponseConfig.g.verified.cs new file mode 100644 index 0000000000..efbb83e2b0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.MockResponseConfig.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.MockResponseConfig.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class MockResponseConfig + { + /// + /// Default Value: 1 + /// + [global::Newtonsoft.Json.JsonProperty("response_delay_seconds")] + public double ResponseDelaySeconds { get; set; } = 1; + + /// + /// Default Value: 0.1 + /// + [global::Newtonsoft.Json.JsonProperty("stream_response_delay_between_deltas_seconds")] + public double StreamResponseDelayBetweenDeltasSeconds { get; set; } = 0.1; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.Mode.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.Mode.g.verified.cs new file mode 100644 index 0000000000..bcb6eddd05 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.Mode.g.verified.cs @@ -0,0 +1,55 @@ +//HintName: G.Models.Mode.g.cs + +#nullable enable + +namespace G +{ + /// + /// An enumeration. + /// + [global::System.Runtime.Serialization.DataContract] + public enum Mode + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="flexible")] + Flexible, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="strict")] + Strict, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ModeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this Mode value) + { + return value switch + { + Mode.Flexible => "flexible", + Mode.Strict => "strict", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static Mode? ToEnum(string value) + { + return value switch + { + "flexible" => Mode.Flexible, + "strict" => Mode.Strict, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ModelName.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ModelName.g.verified.cs new file mode 100644 index 0000000000..6857e68797 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ModelName.g.verified.cs @@ -0,0 +1,90 @@ +//HintName: G.Models.ModelName.g.cs + +#nullable enable + +namespace G +{ + /// + /// An enumeration. + /// + [global::System.Runtime.Serialization.DataContract] + public enum ModelName + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="jamba-instruct")] + JambaInstruct, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="jamba-instruct-preview")] + JambaInstructPreview, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="jamba-next")] + JambaNext, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="jamba-large-next")] + JambaLargeNext, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="jamba-large-next-2")] + JambaLargeNext2, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="jamba-1.5-mini")] + Jamba15Mini, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="jamba-1.5-large")] + Jamba15Large, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ModelNameExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ModelName value) + { + return value switch + { + ModelName.JambaInstruct => "jamba-instruct", + ModelName.JambaInstructPreview => "jamba-instruct-preview", + ModelName.JambaNext => "jamba-next", + ModelName.JambaLargeNext => "jamba-large-next", + ModelName.JambaLargeNext2 => "jamba-large-next-2", + ModelName.Jamba15Mini => "jamba-1.5-mini", + ModelName.Jamba15Large => "jamba-1.5-large", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ModelName? ToEnum(string value) + { + return value switch + { + "jamba-instruct" => ModelName.JambaInstruct, + "jamba-instruct-preview" => ModelName.JambaInstructPreview, + "jamba-next" => ModelName.JambaNext, + "jamba-large-next" => ModelName.JambaLargeNext, + "jamba-large-next-2" => ModelName.JambaLargeNext2, + "jamba-1.5-mini" => ModelName.Jamba15Mini, + "jamba-1.5-large" => ModelName.Jamba15Large, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ParaphraseBody.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ParaphraseBody.g.verified.cs new file mode 100644 index 0000000000..6b6d94964f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ParaphraseBody.g.verified.cs @@ -0,0 +1,44 @@ +//HintName: G.Models.ParaphraseBody.g.cs + +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// This class is to be used as a common class to all Studio API requests payloads + /// + public sealed partial class ParaphraseBody + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("text", Required = global::Newtonsoft.Json.Required.Always)] + public string Text { get; set; } = default!; + + /// + /// Default Value: general + /// + [global::Newtonsoft.Json.JsonProperty("style")] + public global::System.AllOf? Style { get; set; } = global::G.StyleType.General; + + /// + /// Default Value: 0 + /// + [global::Newtonsoft.Json.JsonProperty("startIndex")] + public int StartIndex { get; set; } = 0; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("endIndex")] + public int EndIndex { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.Penalty.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.Penalty.g.verified.cs new file mode 100644 index 0000000000..a0eaa62734 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.Penalty.g.verified.cs @@ -0,0 +1,54 @@ +//HintName: G.Models.Penalty.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Penalty + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("scale", Required = global::Newtonsoft.Json.Required.Always)] + public double Scale { get; set; } = default!; + + /// + /// Default Value: true + /// + [global::Newtonsoft.Json.JsonProperty("applyToWhitespaces")] + public bool ApplyToWhitespaces { get; set; } = true; + + /// + /// Default Value: true + /// + [global::Newtonsoft.Json.JsonProperty("applyToPunctuations")] + public bool ApplyToPunctuations { get; set; } = true; + + /// + /// Default Value: true + /// + [global::Newtonsoft.Json.JsonProperty("applyToNumbers")] + public bool ApplyToNumbers { get; set; } = true; + + /// + /// Default Value: true + /// + [global::Newtonsoft.Json.JsonProperty("applyToStopwords")] + public bool ApplyToStopwords { get; set; } = true; + + /// + /// Default Value: true + /// + [global::Newtonsoft.Json.JsonProperty("applyToEmojis")] + public bool ApplyToEmojis { get; set; } = true; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ResponseFormat.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ResponseFormat.g.verified.cs new file mode 100644 index 0000000000..5aaf19dc40 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ResponseFormat.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ResponseFormat.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ResponseFormat + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("type", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.ResponseFormatType Type { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ResponseFormatType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ResponseFormatType.g.verified.cs new file mode 100644 index 0000000000..9c6f5495c1 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ResponseFormatType.g.verified.cs @@ -0,0 +1,55 @@ +//HintName: G.Models.ResponseFormatType.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + [global::System.Runtime.Serialization.DataContract] + public enum ResponseFormatType + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="text")] + Text, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="json_object")] + JsonObject, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ResponseFormatTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ResponseFormatType value) + { + return value switch + { + ResponseFormatType.Text => "text", + ResponseFormatType.JsonObject => "json_object", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ResponseFormatType? ToEnum(string value) + { + return value switch + { + "text" => ResponseFormatType.Text, + "json_object" => ResponseFormatType.JsonObject, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.RetrievalStrategy3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.RetrievalStrategy3.g.verified.cs new file mode 100644 index 0000000000..5395fc26d2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.RetrievalStrategy3.g.verified.cs @@ -0,0 +1,62 @@ +//HintName: G.Models.RetrievalStrategy3.g.cs + +#nullable enable + +namespace G +{ + /// + /// An enumeration. + /// + [global::System.Runtime.Serialization.DataContract] + public enum RetrievalStrategy3 + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="default")] + Default, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="add_neighbors")] + AddNeighbors, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="full_doc")] + FullDoc, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RetrievalStrategy3Extensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RetrievalStrategy3 value) + { + return value switch + { + RetrievalStrategy3.Default => "default", + RetrievalStrategy3.AddNeighbors => "add_neighbors", + RetrievalStrategy3.FullDoc => "full_doc", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RetrievalStrategy3? ToEnum(string value) + { + return value switch + { + "default" => RetrievalStrategy3.Default, + "add_neighbors" => RetrievalStrategy3.AddNeighbors, + "full_doc" => RetrievalStrategy3.FullDoc, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.RoleType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.RoleType.g.verified.cs new file mode 100644 index 0000000000..314f0084ff --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.RoleType.g.verified.cs @@ -0,0 +1,55 @@ +//HintName: G.Models.RoleType.g.cs + +#nullable enable + +namespace G +{ + /// + /// An enumeration. + /// + [global::System.Runtime.Serialization.DataContract] + public enum RoleType + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="user")] + User, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="assistant")] + Assistant, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RoleTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RoleType value) + { + return value switch + { + RoleType.User => "user", + RoleType.Assistant => "assistant", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RoleType? ToEnum(string value) + { + return value switch + { + "user" => RoleType.User, + "assistant" => RoleType.Assistant, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.Segment.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.Segment.g.verified.cs new file mode 100644 index 0000000000..7d7b43d534 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.Segment.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.Segment.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Segment + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("segmentText", Required = global::Newtonsoft.Json.Required.Always)] + public string SegmentText { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("segmentType", Required = global::Newtonsoft.Json.Required.Always)] + public string SegmentType { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.SegmentSummary.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.SegmentSummary.g.verified.cs new file mode 100644 index 0000000000..9cba5f54d0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.SegmentSummary.g.verified.cs @@ -0,0 +1,54 @@ +//HintName: G.Models.SegmentSummary.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SegmentSummary + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("summary")] + public string? Summary { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("segmentText", Required = global::Newtonsoft.Json.Required.Always)] + public string SegmentText { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("segmentHtml")] + public string? SegmentHtml { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("segmentType", Required = global::Newtonsoft.Json.Required.Always)] + public string SegmentType { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("hasSummary", Required = global::Newtonsoft.Json.Required.Always)] + public bool HasSummary { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("highlights", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList Highlights { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.SegmentationBody.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.SegmentationBody.g.verified.cs new file mode 100644 index 0000000000..59ea9bee4c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.SegmentationBody.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.SegmentationBody.g.cs + +#nullable enable + +namespace G +{ + /// + /// This class is to be used as a common class to all Studio API requests payloads + /// + public sealed partial class SegmentationBody + { + /// + /// An enumeration. + /// + [global::Newtonsoft.Json.JsonProperty("sourceType", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.DocumentType SourceType { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("source", Required = global::Newtonsoft.Json.Required.Always)] + public string Source { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.SegmentationResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.SegmentationResponse.g.verified.cs new file mode 100644 index 0000000000..d8cc8ae53a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.SegmentationResponse.g.verified.cs @@ -0,0 +1,32 @@ +//HintName: G.Models.SegmentationResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SegmentationResponse + { + /// + /// A unique ID for the request (not the message). Repeated identical requests
+ /// get different IDs. However, for a streaming response, the ID will be the same
+ /// for all responses in the stream. + ///
+ [global::Newtonsoft.Json.JsonProperty("id", Required = global::Newtonsoft.Json.Required.Always)] + public string Id { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("segments", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList Segments { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.SegmentedSummaryBody.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.SegmentedSummaryBody.g.verified.cs new file mode 100644 index 0000000000..d2c2c8ef91 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.SegmentedSummaryBody.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.SegmentedSummaryBody.g.cs + +#nullable enable + +namespace G +{ + /// + /// This class is to be used as a common class to all Studio API requests payloads + /// + public sealed partial class SegmentedSummaryBody + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("source", Required = global::Newtonsoft.Json.Required.Always)] + public string Source { get; set; } = default!; + + /// + /// An enumeration. + /// + [global::Newtonsoft.Json.JsonProperty("sourceType", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.DocumentType SourceType { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("focus")] + public string? Focus { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.SourceDocument.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.SourceDocument.g.verified.cs new file mode 100644 index 0000000000..6899e35787 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.SourceDocument.g.verified.cs @@ -0,0 +1,48 @@ +//HintName: G.Models.SourceDocument.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SourceDocument + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("fileId", Required = global::Newtonsoft.Json.Required.Always)] + public string FileId { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("name", Required = global::Newtonsoft.Json.Required.Always)] + public string Name { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("highlights", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList Highlights { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("publicUrl")] + public string? PublicUrl { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("labels")] + public global::System.Collections.Generic.IList? Labels { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.StyleType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.StyleType.g.verified.cs new file mode 100644 index 0000000000..1d31c66106 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.StyleType.g.verified.cs @@ -0,0 +1,76 @@ +//HintName: G.Models.StyleType.g.cs + +#nullable enable + +namespace G +{ + /// + /// An enumeration. + /// + [global::System.Runtime.Serialization.DataContract] + public enum StyleType + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="long")] + Long, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="short")] + Short, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="formal")] + Formal, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="casual")] + Casual, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="general")] + General, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class StyleTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this StyleType value) + { + return value switch + { + StyleType.Long => "long", + StyleType.Short => "short", + StyleType.Formal => "formal", + StyleType.Casual => "casual", + StyleType.General => "general", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static StyleType? ToEnum(string value) + { + return value switch + { + "long" => StyleType.Long, + "short" => StyleType.Short, + "formal" => StyleType.Formal, + "casual" => StyleType.Casual, + "general" => StyleType.General, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.SummarizationResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.SummarizationResponse.g.verified.cs new file mode 100644 index 0000000000..95cf29cb54 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.SummarizationResponse.g.verified.cs @@ -0,0 +1,32 @@ +//HintName: G.Models.SummarizationResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SummarizationResponse + { + /// + /// A unique ID for the request (not the message). Repeated identical requests
+ /// get different IDs. However, for a streaming response, the ID will be the same
+ /// for all responses in the stream. + ///
+ [global::Newtonsoft.Json.JsonProperty("id", Required = global::Newtonsoft.Json.Required.Always)] + public string Id { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("summary", Required = global::Newtonsoft.Json.Required.Always)] + public string Summary { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.SummarizeBody.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.SummarizeBody.g.verified.cs new file mode 100644 index 0000000000..b4c8c4e359 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.SummarizeBody.g.verified.cs @@ -0,0 +1,42 @@ +//HintName: G.Models.SummarizeBody.g.cs + +#nullable enable + +namespace G +{ + /// + /// This class is to be used as a common class to all Studio API requests payloads + /// + public sealed partial class SummarizeBody + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("source", Required = global::Newtonsoft.Json.Required.Always)] + public string Source { get; set; } = default!; + + /// + /// An enumeration. + /// + [global::Newtonsoft.Json.JsonProperty("sourceType", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.DocumentType SourceType { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("focus")] + public string? Focus { get; set; } + + /// + /// An enumeration. + /// + [global::Newtonsoft.Json.JsonProperty("summaryMethod")] + public global::G.SummaryMethod? SummaryMethod { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.SummarizeBySegmentResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.SummarizeBySegmentResponse.g.verified.cs new file mode 100644 index 0000000000..61c9b9c3ef --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.SummarizeBySegmentResponse.g.verified.cs @@ -0,0 +1,32 @@ +//HintName: G.Models.SummarizeBySegmentResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SummarizeBySegmentResponse + { + /// + /// A unique ID for the request (not the message). Repeated identical requests
+ /// get different IDs. However, for a streaming response, the ID will be the same
+ /// for all responses in the stream. + ///
+ [global::Newtonsoft.Json.JsonProperty("id", Required = global::Newtonsoft.Json.Required.Always)] + public string Id { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("segments", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList Segments { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.SummaryMethod.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.SummaryMethod.g.verified.cs new file mode 100644 index 0000000000..e13d47e9fd --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.SummaryMethod.g.verified.cs @@ -0,0 +1,62 @@ +//HintName: G.Models.SummaryMethod.g.cs + +#nullable enable + +namespace G +{ + /// + /// An enumeration. + /// + [global::System.Runtime.Serialization.DataContract] + public enum SummaryMethod + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="segments")] + Segments, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="guided")] + Guided, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="fullDocument")] + FullDocument, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class SummaryMethodExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this SummaryMethod value) + { + return value switch + { + SummaryMethod.Segments => "segments", + SummaryMethod.Guided => "guided", + SummaryMethod.FullDocument => "fullDocument", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static SummaryMethod? ToEnum(string value) + { + return value switch + { + "segments" => SummaryMethod.Segments, + "guided" => SummaryMethod.Guided, + "fullDocument" => SummaryMethod.FullDocument, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.SystemMessage.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.SystemMessage.g.verified.cs new file mode 100644 index 0000000000..12f2e26216 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.SystemMessage.g.verified.cs @@ -0,0 +1,40 @@ +//HintName: G.Models.SystemMessage.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SystemMessage + { + /// + /// The role of an individual message.
+ /// - `user`: Input provided by the user. Any instructions given here that conflict
+ /// with instructions given in the `system` prompt take precedence over the `system`
+ /// prompt instructions.
+ /// - `assistant`: Response generated by the model.
+ /// - `system`: Initial instructions provided to the system to provide general guidance
+ /// on the tone and voice of the generated message. An initial system message is
+ /// optional but recommended to provide guidance on the tone of the chat. For
+ /// example, "You are a helpful chatbot with a background in earth sciences and a
+ /// charming French accent."
+ /// Default Value: system + ///
+ [global::Newtonsoft.Json.JsonProperty("role")] + public global::G.SystemMessageRole? Role { get; set; } = global::G.SystemMessageRole.System; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("content", Required = global::Newtonsoft.Json.Required.Always)] + public string Content { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.SystemMessageRole.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.SystemMessageRole.g.verified.cs new file mode 100644 index 0000000000..c82fdf933d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.SystemMessageRole.g.verified.cs @@ -0,0 +1,58 @@ +//HintName: G.Models.SystemMessageRole.g.cs + +#nullable enable + +namespace G +{ + /// + /// The role of an individual message.
+ /// - `user`: Input provided by the user. Any instructions given here that conflict
+ /// with instructions given in the `system` prompt take precedence over the `system`
+ /// prompt instructions.
+ /// - `assistant`: Response generated by the model.
+ /// - `system`: Initial instructions provided to the system to provide general guidance
+ /// on the tone and voice of the generated message. An initial system message is
+ /// optional but recommended to provide guidance on the tone of the chat. For
+ /// example, "You are a helpful chatbot with a background in earth sciences and a
+ /// charming French accent."
+ /// Default Value: system + ///
+ [global::System.Runtime.Serialization.DataContract] + public enum SystemMessageRole + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="system")] + System, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class SystemMessageRoleExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this SystemMessageRole value) + { + return value switch + { + SystemMessageRole.System => "system", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static SystemMessageRole? ToEnum(string value) + { + return value switch + { + "system" => SystemMessageRole.System, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.TokenizeBody.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.TokenizeBody.g.verified.cs new file mode 100644 index 0000000000..6fd2b6eba4 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.TokenizeBody.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.TokenizeBody.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class TokenizeBody + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("text", Required = global::Newtonsoft.Json.Required.Always)] + public string Text { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ToolCall.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ToolCall.g.verified.cs new file mode 100644 index 0000000000..3a58167a94 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ToolCall.g.verified.cs @@ -0,0 +1,38 @@ +//HintName: G.Models.ToolCall.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ToolCall + { + /// + /// A unique ID for the request (not the message). Repeated identical requests
+ /// get different IDs. However, for a streaming response, the ID will be the same
+ /// for all responses in the stream. + ///
+ [global::Newtonsoft.Json.JsonProperty("id", Required = global::Newtonsoft.Json.Required.Always)] + public string Id { get; set; } = default!; + + /// + /// Default Value: function + /// + [global::Newtonsoft.Json.JsonProperty("type")] + public global::G.ToolCallType? Type { get; set; } = global::G.ToolCallType.Function; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("function", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.ToolFunction Function { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ToolCallType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ToolCallType.g.verified.cs new file mode 100644 index 0000000000..ae404991c3 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ToolCallType.g.verified.cs @@ -0,0 +1,48 @@ +//HintName: G.Models.ToolCallType.g.cs + +#nullable enable + +namespace G +{ + /// + /// Default Value: function + /// + [global::System.Runtime.Serialization.DataContract] + public enum ToolCallType + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="function")] + Function, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ToolCallTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ToolCallType value) + { + return value switch + { + ToolCallType.Function => "function", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ToolCallType? ToEnum(string value) + { + return value switch + { + "function" => ToolCallType.Function, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ToolDefinition.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ToolDefinition.g.verified.cs new file mode 100644 index 0000000000..63a3bce28d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ToolDefinition.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.ToolDefinition.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ToolDefinition + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("type")] + public global::G.ToolDefinitionType Type { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("function", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.FunctionToolDefinition Function { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ToolDefinitionType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ToolDefinitionType.g.verified.cs new file mode 100644 index 0000000000..653b82d74d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ToolDefinitionType.g.verified.cs @@ -0,0 +1,48 @@ +//HintName: G.Models.ToolDefinitionType.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + [global::System.Runtime.Serialization.DataContract] + public enum ToolDefinitionType + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="function")] + Function, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ToolDefinitionTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ToolDefinitionType value) + { + return value switch + { + ToolDefinitionType.Function => "function", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ToolDefinitionType? ToEnum(string value) + { + return value switch + { + "function" => ToolDefinitionType.Function, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ToolFunction.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ToolFunction.g.verified.cs new file mode 100644 index 0000000000..073b95fb19 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ToolFunction.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.ToolFunction.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ToolFunction + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("name", Required = global::Newtonsoft.Json.Required.Always)] + public string Name { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("arguments", Required = global::Newtonsoft.Json.Required.Always)] + public string Arguments { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ToolMessage.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ToolMessage.g.verified.cs new file mode 100644 index 0000000000..7a6fbc3243 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ToolMessage.g.verified.cs @@ -0,0 +1,46 @@ +//HintName: G.Models.ToolMessage.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ToolMessage + { + /// + /// The role of an individual message.
+ /// - `user`: Input provided by the user. Any instructions given here that conflict
+ /// with instructions given in the `system` prompt take precedence over the `system`
+ /// prompt instructions.
+ /// - `assistant`: Response generated by the model.
+ /// - `system`: Initial instructions provided to the system to provide general guidance
+ /// on the tone and voice of the generated message. An initial system message is
+ /// optional but recommended to provide guidance on the tone of the chat. For
+ /// example, "You are a helpful chatbot with a background in earth sciences and a
+ /// charming French accent."
+ /// Default Value: tool + ///
+ [global::Newtonsoft.Json.JsonProperty("role")] + public global::G.ToolMessageRole? Role { get; set; } = global::G.ToolMessageRole.Tool; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("content", Required = global::Newtonsoft.Json.Required.Always)] + public string Content { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("tool_call_id", Required = global::Newtonsoft.Json.Required.Always)] + public string ToolCallId { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ToolMessageRole.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ToolMessageRole.g.verified.cs new file mode 100644 index 0000000000..15c25cd349 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ToolMessageRole.g.verified.cs @@ -0,0 +1,58 @@ +//HintName: G.Models.ToolMessageRole.g.cs + +#nullable enable + +namespace G +{ + /// + /// The role of an individual message.
+ /// - `user`: Input provided by the user. Any instructions given here that conflict
+ /// with instructions given in the `system` prompt take precedence over the `system`
+ /// prompt instructions.
+ /// - `assistant`: Response generated by the model.
+ /// - `system`: Initial instructions provided to the system to provide general guidance
+ /// on the tone and voice of the generated message. An initial system message is
+ /// optional but recommended to provide guidance on the tone of the chat. For
+ /// example, "You are a helpful chatbot with a background in earth sciences and a
+ /// charming French accent."
+ /// Default Value: tool + ///
+ [global::System.Runtime.Serialization.DataContract] + public enum ToolMessageRole + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="tool")] + Tool, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ToolMessageRoleExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ToolMessageRole value) + { + return value switch + { + ToolMessageRole.Tool => "tool", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ToolMessageRole? ToEnum(string value) + { + return value switch + { + "tool" => ToolMessageRole.Tool, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ToolParameters.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ToolParameters.g.verified.cs new file mode 100644 index 0000000000..edb9b59b7b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ToolParameters.g.verified.cs @@ -0,0 +1,37 @@ +//HintName: G.Models.ToolParameters.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ToolParameters + { + /// + /// Type of the parameter schema, only `object` is supported
+ /// Default Value: object + ///
+ [global::Newtonsoft.Json.JsonProperty("type")] + public global::G.ToolParametersType? Type { get; set; } = global::G.ToolParametersType.Object; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("properties", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.ToolParametersProperties Properties { get; set; } = default!; + + /// + /// List of required properties + /// + [global::Newtonsoft.Json.JsonProperty("required")] + public global::System.Collections.Generic.IList? Required { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ToolParametersProperties.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ToolParametersProperties.g.verified.cs new file mode 100644 index 0000000000..6d3ce0e191 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ToolParametersProperties.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.ToolParametersProperties.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ToolParametersProperties + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ToolParametersType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ToolParametersType.g.verified.cs new file mode 100644 index 0000000000..e2d71107e9 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ToolParametersType.g.verified.cs @@ -0,0 +1,49 @@ +//HintName: G.Models.ToolParametersType.g.cs + +#nullable enable + +namespace G +{ + /// + /// Type of the parameter schema, only `object` is supported
+ /// Default Value: object + ///
+ [global::System.Runtime.Serialization.DataContract] + public enum ToolParametersType + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="object")] + Object, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ToolParametersTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ToolParametersType value) + { + return value switch + { + ToolParametersType.Object => "object", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ToolParametersType? ToEnum(string value) + { + return value switch + { + "object" => ToolParametersType.Object, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.TopLogprobsData.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.TopLogprobsData.g.verified.cs new file mode 100644 index 0000000000..4c95f3400f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.TopLogprobsData.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.TopLogprobsData.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class TopLogprobsData + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("token", Required = global::Newtonsoft.Json.Required.Always)] + public string Token { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("logprob", Required = global::Newtonsoft.Json.Required.Always)] + public double Logprob { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.UsageInfo.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.UsageInfo.g.verified.cs new file mode 100644 index 0000000000..9c693ba593 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.UsageInfo.g.verified.cs @@ -0,0 +1,40 @@ +//HintName: G.Models.UsageInfo.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UsageInfo + { + /// + /// Number of tokens in the prompt for this request. Note that the prompt token
+ /// includes the entire message history, plus extra tokens needed by the system
+ /// when combining the list of prompt messages into a single message, as
+ /// required by the model. The number of extra tokens is typically proportional
+ /// to the number of messages in the thread, and should be relatively small. + ///
+ [global::Newtonsoft.Json.JsonProperty("prompt_tokens", Required = global::Newtonsoft.Json.Required.Always)] + public int PromptTokens { get; set; } = default!; + + /// + /// Number of tokens in the response message. + /// + [global::Newtonsoft.Json.JsonProperty("completion_tokens", Required = global::Newtonsoft.Json.Required.Always)] + public int CompletionTokens { get; set; } = default!; + + /// + /// `prompt_tokens` + `completion_tokens`. + /// + [global::Newtonsoft.Json.JsonProperty("total_tokens", Required = global::Newtonsoft.Json.Required.Always)] + public int TotalTokens { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.UserMessage.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.UserMessage.g.verified.cs new file mode 100644 index 0000000000..ae6b177424 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.UserMessage.g.verified.cs @@ -0,0 +1,40 @@ +//HintName: G.Models.UserMessage.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UserMessage + { + /// + /// The role of an individual message.
+ /// - `user`: Input provided by the user. Any instructions given here that conflict
+ /// with instructions given in the `system` prompt take precedence over the `system`
+ /// prompt instructions.
+ /// - `assistant`: Response generated by the model.
+ /// - `system`: Initial instructions provided to the system to provide general guidance
+ /// on the tone and voice of the generated message. An initial system message is
+ /// optional but recommended to provide guidance on the tone of the chat. For
+ /// example, "You are a helpful chatbot with a background in earth sciences and a
+ /// charming French accent."
+ /// Default Value: user + ///
+ [global::Newtonsoft.Json.JsonProperty("role")] + public global::G.UserMessageRole? Role { get; set; } = global::G.UserMessageRole.User; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("content", Required = global::Newtonsoft.Json.Required.Always)] + public string Content { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.UserMessageRole.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.UserMessageRole.g.verified.cs new file mode 100644 index 0000000000..5ecffe463b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.UserMessageRole.g.verified.cs @@ -0,0 +1,58 @@ +//HintName: G.Models.UserMessageRole.g.cs + +#nullable enable + +namespace G +{ + /// + /// The role of an individual message.
+ /// - `user`: Input provided by the user. Any instructions given here that conflict
+ /// with instructions given in the `system` prompt take precedence over the `system`
+ /// prompt instructions.
+ /// - `assistant`: Response generated by the model.
+ /// - `system`: Initial instructions provided to the system to provide general guidance
+ /// on the tone and voice of the generated message. An initial system message is
+ /// optional but recommended to provide guidance on the tone of the chat. For
+ /// example, "You are a helpful chatbot with a background in earth sciences and a
+ /// charming French accent."
+ /// Default Value: user + ///
+ [global::System.Runtime.Serialization.DataContract] + public enum UserMessageRole + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="user")] + User, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UserMessageRoleExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UserMessageRole value) + { + return value switch + { + UserMessageRole.User => "user", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UserMessageRole? ToEnum(string value) + { + return value switch + { + "user" => UserMessageRole.User, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1AnswerResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1AnswerResponse.g.verified.cs new file mode 100644 index 0000000000..b1088891e9 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1AnswerResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1AnswerResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1AnswerResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1CreateCustomModelResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1CreateCustomModelResponse.g.verified.cs new file mode 100644 index 0000000000..9a8f2ca8c8 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1CreateCustomModelResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1CreateCustomModelResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1CreateCustomModelResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1DeleteDatasetResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1DeleteDatasetResponse.g.verified.cs new file mode 100644 index 0000000000..c7653eb491 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1DeleteDatasetResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1DeleteDatasetResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1DeleteDatasetResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1EmbedResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1EmbedResponse.g.verified.cs new file mode 100644 index 0000000000..65511e5faa --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1EmbedResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1EmbedResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1EmbedResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1GetCustomModelResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1GetCustomModelResponse.g.verified.cs new file mode 100644 index 0000000000..81e51db8f5 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1GetCustomModelResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1GetCustomModelResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1GetCustomModelResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1GetCustomModelsResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1GetCustomModelsResponse.g.verified.cs new file mode 100644 index 0000000000..602101c6b0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1GetCustomModelsResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1GetCustomModelsResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1GetCustomModelsResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1GetDatasetDownloadUrlResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1GetDatasetDownloadUrlResponse.g.verified.cs new file mode 100644 index 0000000000..572c5d2910 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1GetDatasetDownloadUrlResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1GetDatasetDownloadUrlResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1GetDatasetDownloadUrlResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1GetDatasetResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1GetDatasetResponse.g.verified.cs new file mode 100644 index 0000000000..d9c3960a9d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1GetDatasetResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1GetDatasetResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1GetDatasetResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1GetDatasetsResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1GetDatasetsResponse.g.verified.cs new file mode 100644 index 0000000000..70a0e095a9 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1GetDatasetsResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1GetDatasetsResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1GetDatasetsResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2GrandeCompleteResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2GrandeCompleteResponse.g.verified.cs new file mode 100644 index 0000000000..ecab6de0c2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2GrandeCompleteResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1J2GrandeCompleteResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1J2GrandeCompleteResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2GrandeCustomModelCompleteResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2GrandeCustomModelCompleteResponse.g.verified.cs new file mode 100644 index 0000000000..fbbab31adf --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2GrandeCustomModelCompleteResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1J2GrandeCustomModelCompleteResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1J2GrandeCustomModelCompleteResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2GrandeInstructCompleteResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2GrandeInstructCompleteResponse.g.verified.cs new file mode 100644 index 0000000000..103233c0da --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2GrandeInstructCompleteResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1J2GrandeInstructCompleteResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1J2GrandeInstructCompleteResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2JumboCompleteResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2JumboCompleteResponse.g.verified.cs new file mode 100644 index 0000000000..a3d630b743 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2JumboCompleteResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1J2JumboCompleteResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1J2JumboCompleteResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2JumboCompleteResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2JumboCompleteResponse2.g.verified.cs new file mode 100644 index 0000000000..0a2753a7f7 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2JumboCompleteResponse2.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1J2JumboCompleteResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1J2JumboCompleteResponse2 + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2JumboInstructCompleteResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2JumboInstructCompleteResponse.g.verified.cs new file mode 100644 index 0000000000..121c7c071a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2JumboInstructCompleteResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1J2JumboInstructCompleteResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1J2JumboInstructCompleteResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2LargeCompleteResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2LargeCompleteResponse.g.verified.cs new file mode 100644 index 0000000000..294e34bb1a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2LargeCompleteResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1J2LargeCompleteResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1J2LargeCompleteResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2LargeCustomModelCompleteResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2LargeCustomModelCompleteResponse.g.verified.cs new file mode 100644 index 0000000000..b5988f9fb1 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2LargeCustomModelCompleteResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1J2LargeCustomModelCompleteResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1J2LargeCustomModelCompleteResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2LargeInstructCompleteResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2LargeInstructCompleteResponse.g.verified.cs new file mode 100644 index 0000000000..011c26b594 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2LargeInstructCompleteResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1J2LargeInstructCompleteResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1J2LargeInstructCompleteResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2LightCompleteResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2LightCompleteResponse.g.verified.cs new file mode 100644 index 0000000000..2fa80af7fa --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2LightCompleteResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1J2LightCompleteResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1J2LightCompleteResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2LightCustomModelCompleteResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2LightCustomModelCompleteResponse.g.verified.cs new file mode 100644 index 0000000000..0cb4f984cc --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2LightCustomModelCompleteResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1J2LightCustomModelCompleteResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1J2LightCustomModelCompleteResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2MidCompleteResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2MidCompleteResponse.g.verified.cs new file mode 100644 index 0000000000..38946b4421 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2MidCompleteResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1J2MidCompleteResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1J2MidCompleteResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2MidCustomModelCompleteResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2MidCustomModelCompleteResponse.g.verified.cs new file mode 100644 index 0000000000..6068770ae3 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2MidCustomModelCompleteResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1J2MidCustomModelCompleteResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1J2MidCustomModelCompleteResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2UltraCompleteResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2UltraCompleteResponse.g.verified.cs new file mode 100644 index 0000000000..86834e9d27 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2UltraCompleteResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1J2UltraCompleteResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1J2UltraCompleteResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2UltraCompleteResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2UltraCompleteResponse2.g.verified.cs new file mode 100644 index 0000000000..3fcb02c4a5 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1J2UltraCompleteResponse2.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1J2UltraCompleteResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1J2UltraCompleteResponse2 + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1LibraryManagementResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1LibraryManagementResponse.g.verified.cs new file mode 100644 index 0000000000..07e76418aa --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1LibraryManagementResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1LibraryManagementResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1LibraryManagementResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1ParaphrazeResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1ParaphrazeResponse.g.verified.cs new file mode 100644 index 0000000000..e06621845b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1ParaphrazeResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1ParaphrazeResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1ParaphrazeResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1TokenizeResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1TokenizeResponse.g.verified.cs new file mode 100644 index 0000000000..10d393ca48 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1TokenizeResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1TokenizeResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1TokenizeResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1UpdateCustomModelResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1UpdateCustomModelResponse.g.verified.cs new file mode 100644 index 0000000000..14de048d04 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1UpdateCustomModelResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1UpdateCustomModelResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1UpdateCustomModelResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1UploadDatasetResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1UploadDatasetResponse.g.verified.cs new file mode 100644 index 0000000000..ea71f81838 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.V1UploadDatasetResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1UploadDatasetResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1UploadDatasetResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ValidationError.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ValidationError.g.verified.cs new file mode 100644 index 0000000000..d4fd75c6a3 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.ValidationError.g.verified.cs @@ -0,0 +1,38 @@ +//HintName: G.Models.ValidationError.g.cs + +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ValidationError + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("loc", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList> Loc { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("msg", Required = global::Newtonsoft.Json.Required.Always)] + public string Msg { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("type", Required = global::Newtonsoft.Json.Required.Always)] + public string Type { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.ParaphraseClient.V1Paraphraze.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.ParaphraseClient.V1Paraphraze.g.verified.cs new file mode 100644 index 0000000000..02d62b410f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.ParaphraseClient.V1Paraphraze.g.verified.cs @@ -0,0 +1,131 @@ +//HintName: G.ParaphraseClient.V1Paraphraze.g.cs + +#nullable enable + +namespace G +{ + public partial class ParaphraseClient + { + partial void PrepareV1ParaphrazeArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.ParaphraseBody request); + partial void PrepareV1ParaphrazeRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.ParaphraseBody request); + partial void ProcessV1ParaphrazeResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1ParaphrazeResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Paraphrase + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1ParaphrazeAsync( + global::G.ParaphraseBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1ParaphrazeArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/studio/v1/paraphrase", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1ParaphrazeRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1ParaphrazeResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1ParaphrazeResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Paraphrase + /// + /// + /// + /// Default Value: general + /// + /// + /// Default Value: 0 + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1ParaphrazeAsync( + string text, + global::System.AllOf? style = default, + int startIndex = 0, + int endIndex = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.ParaphraseBody + { + Text = text, + Style = style, + StartIndex = startIndex, + EndIndex = endIndex, + }; + + return await V1ParaphrazeAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.ParaphraseClient.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.ParaphraseClient.g.verified.cs new file mode 100644 index 0000000000..a8151fa527 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.ParaphraseClient.g.verified.cs @@ -0,0 +1,60 @@ +//HintName: G.ParaphraseClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class ParaphraseClient : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.ai21.com/"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::Newtonsoft.Json.JsonSerializerSettings _jsonSerializerOptions; + + + /// + /// Creates a new instance of the ParaphraseClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public ParaphraseClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::Newtonsoft.Json.JsonSerializerSettings? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::Newtonsoft.Json.JsonSerializerSettings(); + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Polyfills.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Polyfills.g.verified.cs new file mode 100644 index 0000000000..241c8bfd80 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Polyfills.g.verified.cs @@ -0,0 +1,54 @@ +//HintName: G.Polyfills.g.cs + +#if !NET6_0_OR_GREATER +#nullable enable + +namespace G +{ + /// + /// + /// + public static partial class OpenApiGeneratorPolyfills + { + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsStringAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsStringAsync(); + } + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsStreamAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsStreamAsync(); + } + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsByteArrayAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsByteArrayAsync(); + } + } +} +#endif \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.RAGEngineClient.V1LibraryAnswer.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.RAGEngineClient.V1LibraryAnswer.g.verified.cs new file mode 100644 index 0000000000..168b5712aa --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.RAGEngineClient.V1LibraryAnswer.g.verified.cs @@ -0,0 +1,151 @@ +//HintName: G.RAGEngineClient.V1LibraryAnswer.g.cs + +#nullable enable + +namespace G +{ + public partial class RAGEngineClient + { + partial void PrepareV1LibraryAnswerArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.LibraryAnswerRequest request); + partial void PrepareV1LibraryAnswerRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.LibraryAnswerRequest request); + partial void ProcessV1LibraryAnswerResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1LibraryAnswerResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Answer + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1LibraryAnswerAsync( + global::G.LibraryAnswerRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1LibraryAnswerArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/studio/v1/library/answer", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1LibraryAnswerRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1LibraryAnswerResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1LibraryAnswerResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Answer + /// + /// + /// + /// + /// + /// + /// + /// An enumeration. + /// + /// + /// An enumeration. + /// + /// + /// Default Value: default + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1LibraryAnswerAsync( + string question, + int maxSegments = default, + string? path = default, + global::System.Collections.Generic.IList? labels = default, + global::System.Collections.Generic.IList? fileIds = default, + global::G.AnswerLength? answerLength = default, + global::G.Mode? mode = default, + global::System.AllOf? retrievalStrategy = default, + double retrievalSimilarityThreshold = default, + double hybridSearchAlpha = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.LibraryAnswerRequest + { + Question = question, + MaxSegments = maxSegments, + Path = path, + Labels = labels, + FileIds = fileIds, + AnswerLength = answerLength, + Mode = mode, + RetrievalStrategy = retrievalStrategy, + RetrievalSimilarityThreshold = retrievalSimilarityThreshold, + HybridSearchAlpha = hybridSearchAlpha, + }; + + return await V1LibraryAnswerAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.RAGEngineClient.V1LibraryManagement4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.RAGEngineClient.V1LibraryManagement4.g.verified.cs new file mode 100644 index 0000000000..8efb37c0b2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.RAGEngineClient.V1LibraryManagement4.g.verified.cs @@ -0,0 +1,90 @@ +//HintName: G.RAGEngineClient.V1LibraryManagement4.g.cs + +#nullable enable + +namespace G +{ + public partial class RAGEngineClient + { + partial void PrepareV1LibraryManagement4Arguments( + global::System.Net.Http.HttpClient httpClient, + ref string fileId); + partial void PrepareV1LibraryManagement4Request( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string fileId); + partial void ProcessV1LibraryManagement4Response( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1LibraryManagement4ResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Generate Documents Signed Url + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1LibraryManagement4Async( + string fileId, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV1LibraryManagement4Arguments( + httpClient: _httpClient, + fileId: ref fileId); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/library/files/{fileId}/download", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1LibraryManagement4Request( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + fileId: fileId); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1LibraryManagement4Response( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1LibraryManagement4ResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.RAGEngineClient.V1LibrarySearch.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.RAGEngineClient.V1LibrarySearch.g.verified.cs new file mode 100644 index 0000000000..19e103010b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.RAGEngineClient.V1LibrarySearch.g.verified.cs @@ -0,0 +1,146 @@ +//HintName: G.RAGEngineClient.V1LibrarySearch.g.cs + +#nullable enable + +namespace G +{ + public partial class RAGEngineClient + { + partial void PrepareV1LibrarySearchArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.LibrarySearchRequest request); + partial void PrepareV1LibrarySearchRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.LibrarySearchRequest request); + partial void ProcessV1LibrarySearchResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1LibrarySearchResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Search + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1LibrarySearchAsync( + global::G.LibrarySearchRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1LibrarySearchArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/studio/v1/library/search", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1LibrarySearchRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1LibrarySearchResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1LibrarySearchResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Search + /// + /// + /// + /// + /// + /// + /// + /// Default Value: default + /// + /// + /// Default Value: 1 + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1LibrarySearchAsync( + string query, + int maxSegments = default, + string? path = default, + global::System.Collections.Generic.IList? labels = default, + global::System.Collections.Generic.IList? fileIds = default, + global::System.AllOf? retrievalStrategy = default, + int maxNeighbors = 1, + double retrievalSimilarityThreshold = default, + double hybridSearchAlpha = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.LibrarySearchRequest + { + Query = query, + MaxSegments = maxSegments, + Path = path, + Labels = labels, + FileIds = fileIds, + RetrievalStrategy = retrievalStrategy, + MaxNeighbors = maxNeighbors, + RetrievalSimilarityThreshold = retrievalSimilarityThreshold, + HybridSearchAlpha = hybridSearchAlpha, + }; + + return await V1LibrarySearchAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.RAGEngineClient.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.RAGEngineClient.g.verified.cs new file mode 100644 index 0000000000..dd9d864515 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.RAGEngineClient.g.verified.cs @@ -0,0 +1,60 @@ +//HintName: G.RAGEngineClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class RAGEngineClient : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.ai21.com/"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::Newtonsoft.Json.JsonSerializerSettings _jsonSerializerOptions; + + + /// + /// Creates a new instance of the RAGEngineClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public RAGEngineClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::Newtonsoft.Json.JsonSerializerSettings? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::Newtonsoft.Json.JsonSerializerSettings(); + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.SegmentationClient.V1Segmentation.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.SegmentationClient.V1Segmentation.g.verified.cs new file mode 100644 index 0000000000..867f983880 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.SegmentationClient.V1Segmentation.g.verified.cs @@ -0,0 +1,123 @@ +//HintName: G.SegmentationClient.V1Segmentation.g.cs + +#nullable enable + +namespace G +{ + public partial class SegmentationClient + { + partial void PrepareV1SegmentationArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.SegmentationBody request); + partial void PrepareV1SegmentationRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.SegmentationBody request); + partial void ProcessV1SegmentationResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1SegmentationResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Segmentation + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1SegmentationAsync( + global::G.SegmentationBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1SegmentationArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/studio/v1/segmentation", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1SegmentationRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1SegmentationResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1SegmentationResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Segmentation + /// + /// + /// An enumeration. + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1SegmentationAsync( + global::G.DocumentType sourceType, + string source, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.SegmentationBody + { + SourceType = sourceType, + Source = source, + }; + + return await V1SegmentationAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.SegmentationClient.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.SegmentationClient.g.verified.cs new file mode 100644 index 0000000000..a0d31303c5 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.SegmentationClient.g.verified.cs @@ -0,0 +1,60 @@ +//HintName: G.SegmentationClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class SegmentationClient : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.ai21.com/"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::Newtonsoft.Json.JsonSerializerSettings _jsonSerializerOptions; + + + /// + /// Creates a new instance of the SegmentationClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public SegmentationClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::Newtonsoft.Json.JsonSerializerSettings? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::Newtonsoft.Json.JsonSerializerSettings(); + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.SummarizeClient.V1Summarize.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.SummarizeClient.V1Summarize.g.verified.cs new file mode 100644 index 0000000000..c627b17e44 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.SummarizeClient.V1Summarize.g.verified.cs @@ -0,0 +1,131 @@ +//HintName: G.SummarizeClient.V1Summarize.g.cs + +#nullable enable + +namespace G +{ + public partial class SummarizeClient + { + partial void PrepareV1SummarizeArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.SummarizeBody request); + partial void PrepareV1SummarizeRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.SummarizeBody request); + partial void ProcessV1SummarizeResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1SummarizeResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Summarize + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1SummarizeAsync( + global::G.SummarizeBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1SummarizeArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/studio/v1/summarize", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1SummarizeRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1SummarizeResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1SummarizeResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Summarize + /// + /// + /// + /// An enumeration. + /// + /// + /// + /// An enumeration. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1SummarizeAsync( + string source, + global::G.DocumentType sourceType, + string? focus = default, + global::G.SummaryMethod? summaryMethod = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.SummarizeBody + { + Source = source, + SourceType = sourceType, + Focus = focus, + SummaryMethod = summaryMethod, + }; + + return await V1SummarizeAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.SummarizeClient.V1SummarizeBySegment.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.SummarizeClient.V1SummarizeBySegment.g.verified.cs new file mode 100644 index 0000000000..9703cda72b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.SummarizeClient.V1SummarizeBySegment.g.verified.cs @@ -0,0 +1,126 @@ +//HintName: G.SummarizeClient.V1SummarizeBySegment.g.cs + +#nullable enable + +namespace G +{ + public partial class SummarizeClient + { + partial void PrepareV1SummarizeBySegmentArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.SegmentedSummaryBody request); + partial void PrepareV1SummarizeBySegmentRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.SegmentedSummaryBody request); + partial void ProcessV1SummarizeBySegmentResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1SummarizeBySegmentResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Segmented Summarize + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1SummarizeBySegmentAsync( + global::G.SegmentedSummaryBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1SummarizeBySegmentArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/studio/v1/summarize-by-segment", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1SummarizeBySegmentRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1SummarizeBySegmentResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1SummarizeBySegmentResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Segmented Summarize + /// + /// + /// + /// An enumeration. + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1SummarizeBySegmentAsync( + string source, + global::G.DocumentType sourceType, + string? focus = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.SegmentedSummaryBody + { + Source = source, + SourceType = sourceType, + Focus = focus, + }; + + return await V1SummarizeBySegmentAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.SummarizeClient.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.SummarizeClient.g.verified.cs new file mode 100644 index 0000000000..182f3a74a5 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.SummarizeClient.g.verified.cs @@ -0,0 +1,60 @@ +//HintName: G.SummarizeClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class SummarizeClient : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.ai21.com/"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::Newtonsoft.Json.JsonSerializerSettings _jsonSerializerOptions; + + + /// + /// Creates a new instance of the SummarizeClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public SummarizeClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::Newtonsoft.Json.JsonSerializerSettings? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::Newtonsoft.Json.JsonSerializerSettings(); + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.TokenizeClient.V1Tokenize.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.TokenizeClient.V1Tokenize.g.verified.cs new file mode 100644 index 0000000000..2506f419e7 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.TokenizeClient.V1Tokenize.g.verified.cs @@ -0,0 +1,118 @@ +//HintName: G.TokenizeClient.V1Tokenize.g.cs + +#nullable enable + +namespace G +{ + public partial class TokenizeClient + { + partial void PrepareV1TokenizeArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.TokenizeBody request); + partial void PrepareV1TokenizeRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.TokenizeBody request); + partial void ProcessV1TokenizeResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1TokenizeResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Tokenize + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1TokenizeAsync( + global::G.TokenizeBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1TokenizeArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/studio/v1/tokenize", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1TokenizeRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1TokenizeResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1TokenizeResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Tokenize + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1TokenizeAsync( + string text, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.TokenizeBody + { + Text = text, + }; + + return await V1TokenizeAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.TokenizeClient.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.TokenizeClient.g.verified.cs new file mode 100644 index 0000000000..1104ae35e1 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.TokenizeClient.g.verified.cs @@ -0,0 +1,60 @@ +//HintName: G.TokenizeClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class TokenizeClient : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.ai21.com/"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::Newtonsoft.Json.JsonSerializerSettings _jsonSerializerOptions; + + + /// + /// Creates a new instance of the TokenizeClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public TokenizeClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::Newtonsoft.Json.JsonSerializerSettings? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::Newtonsoft.Json.JsonSerializerSettings(); + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#OneOf.4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#OneOf.4.g.verified.cs new file mode 100644 index 0000000000..9ea95f4cbc --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#OneOf.4.g.verified.cs @@ -0,0 +1,248 @@ +//HintName: OneOf.4.g.cs +using System.Linq; + +#nullable enable + +namespace System +{ + /// + /// + /// + public readonly partial struct OneOf : global::System.IEquatable> + { + /// + /// + /// +#if NET6_0_OR_GREATER + public T1? Value1 { get; init; } +#else + public T1? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator OneOf(T1 value) => new OneOf(value); + + /// + /// + /// + public static implicit operator T1?(OneOf @this) => @this.Value1; + + /// + /// + /// + public OneOf(T1? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public T2? Value2 { get; init; } +#else + public T2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator OneOf(T2 value) => new OneOf(value); + + /// + /// + /// + public static implicit operator T2?(OneOf @this) => @this.Value2; + + /// + /// + /// + public OneOf(T2? value) + { + Value2 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public T3? Value3 { get; init; } +#else + public T3? Value3 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value3))] +#endif + public bool IsValue3 => Value3 != null; + + /// + /// + /// + public static implicit operator OneOf(T3 value) => new OneOf(value); + + /// + /// + /// + public static implicit operator T3?(OneOf @this) => @this.Value3; + + /// + /// + /// + public OneOf(T3? value) + { + Value3 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public T4? Value4 { get; init; } +#else + public T4? Value4 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value4))] +#endif + public bool IsValue4 => Value4 != null; + + /// + /// + /// + public static implicit operator OneOf(T4 value) => new OneOf(value); + + /// + /// + /// + public static implicit operator T4?(OneOf @this) => @this.Value4; + + /// + /// + /// + public OneOf(T4? value) + { + Value4 = value; + } + + /// + /// + /// + public OneOf( + T1? value1, + T2? value2, + T3? value3, + T4? value4 + ) + { + Value1 = value1; + Value2 = value2; + Value3 = value3; + Value4 = value4; + } + + /// + /// + /// + public object? Object => + Value4 as object ?? + Value3 as object ?? + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 || !IsValue1 && IsValue2 && !IsValue3 && !IsValue4 || !IsValue1 && !IsValue2 && IsValue3 && !IsValue4 || !IsValue1 && !IsValue2 && !IsValue3 && IsValue4; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(T1), + Value2, + typeof(T2), + Value3, + typeof(T3), + Value4, + typeof(T4), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(OneOf other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value3, other.Value3) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value4, other.Value4) + ; + } + + /// + /// + /// + public static bool operator ==(OneOf obj1, OneOf obj2) + { + return global::System.Collections.Generic.EqualityComparer>.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(OneOf obj1, OneOf obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is OneOf o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/Tests.Ai21_Diagnostics.verified.txt b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/Tests.Ai21_Diagnostics.verified.txt new file mode 100644 index 0000000000..ad47dbb93f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/Tests.Ai21_Diagnostics.verified.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#AllOf.1.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#AllOf.1.g.verified.cs new file mode 100644 index 0000000000..2e5f47dd3f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#AllOf.1.g.verified.cs @@ -0,0 +1,115 @@ +//HintName: AllOf.1.g.cs +using System.Linq; + +#nullable enable + +namespace System +{ + /// + /// + /// + public readonly partial struct AllOf : global::System.IEquatable> + { + /// + /// + /// +#if NET6_0_OR_GREATER + public T1? Value1 { get; init; } +#else + public T1? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator AllOf(T1 value) => new AllOf(value); + + /// + /// + /// + public static implicit operator T1?(AllOf @this) => @this.Value1; + + /// + /// + /// + public AllOf(T1? value) + { + Value1 = value; + } + + /// + /// + /// + public object? Object => + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(T1), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(AllOf other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) + ; + } + + /// + /// + /// + public static bool operator ==(AllOf obj1, AllOf obj2) + { + return global::System.Collections.Generic.EqualityComparer>.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(AllOf obj1, AllOf obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is AllOf o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#AnyOf.2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#AnyOf.2.g.verified.cs new file mode 100644 index 0000000000..8333f3c3e9 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#AnyOf.2.g.verified.cs @@ -0,0 +1,166 @@ +//HintName: AnyOf.2.g.cs +using System.Linq; + +#nullable enable + +namespace System +{ + /// + /// + /// + public readonly partial struct AnyOf : global::System.IEquatable> + { + /// + /// + /// +#if NET6_0_OR_GREATER + public T1? Value1 { get; init; } +#else + public T1? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator AnyOf(T1 value) => new AnyOf(value); + + /// + /// + /// + public static implicit operator T1?(AnyOf @this) => @this.Value1; + + /// + /// + /// + public AnyOf(T1? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public T2? Value2 { get; init; } +#else + public T2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator AnyOf(T2 value) => new AnyOf(value); + + /// + /// + /// + public static implicit operator T2?(AnyOf @this) => @this.Value2; + + /// + /// + /// + public AnyOf(T2? value) + { + Value2 = value; + } + + /// + /// + /// + public AnyOf( + T1? value1, + T2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 || IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(T1), + Value2, + typeof(T2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(AnyOf other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(AnyOf obj1, AnyOf obj2) + { + return global::System.Collections.Generic.EqualityComparer>.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(AnyOf obj1, AnyOf obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is AnyOf o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Api.Authorizations.Bearer.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Api.Authorizations.Bearer.g.verified.cs new file mode 100644 index 0000000000..9e50a716ae --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Api.Authorizations.Bearer.g.verified.cs @@ -0,0 +1,23 @@ +//HintName: G.Api.Authorizations.Bearer.g.cs + +#nullable enable + +namespace G +{ + public sealed partial class Api + { + /// + /// Authorize using bearer authentication. + /// + /// + public void AuthorizeUsingBearer( + string apiKey) + { + apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + + _httpClient.DefaultRequestHeaders.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: "Bearer", + parameter: apiKey); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Api.Constructors.Bearer.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Api.Constructors.Bearer.g.verified.cs new file mode 100644 index 0000000000..1905775566 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Api.Constructors.Bearer.g.verified.cs @@ -0,0 +1,18 @@ +//HintName: G.Api.Constructors.Bearer.g.cs + +#nullable enable + +namespace G +{ + public sealed partial class Api + { + /// + public Api( + string apiKey, + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null) : this(httpClient, baseUri) + { + AuthorizeUsingBearer(apiKey); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Api.ConvertDocumentFileStudioV1ChatFilesConvertPost.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Api.ConvertDocumentFileStudioV1ChatFilesConvertPost.g.verified.cs new file mode 100644 index 0000000000..0e3871f1d8 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Api.ConvertDocumentFileStudioV1ChatFilesConvertPost.g.verified.cs @@ -0,0 +1,118 @@ +//HintName: G.Api.ConvertDocumentFileStudioV1ChatFilesConvertPost.g.cs +using System.Linq; + +#nullable enable + +namespace G +{ + public partial class Api + { + partial void PrepareConvertDocumentFileStudioV1ChatFilesConvertPostArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.BodyConvertDocumentFileStudioV1ChatFilesConvertPost request); + partial void PrepareConvertDocumentFileStudioV1ChatFilesConvertPostRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.BodyConvertDocumentFileStudioV1ChatFilesConvertPost request); + partial void ProcessConvertDocumentFileStudioV1ChatFilesConvertPostResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessConvertDocumentFileStudioV1ChatFilesConvertPostResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Convert Document File + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ConvertDocumentFileStudioV1ChatFilesConvertPostAsync( + global::G.BodyConvertDocumentFileStudioV1ChatFilesConvertPost request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareConvertDocumentFileStudioV1ChatFilesConvertPostArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/studio/v1/chat/files/convert", global::System.UriKind.RelativeOrAbsolute)); + using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"[{string.Join(",", request.Files.Select(x => x))}]"), + name: "files"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareConvertDocumentFileStudioV1ChatFilesConvertPostRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessConvertDocumentFileStudioV1ChatFilesConvertPostResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessConvertDocumentFileStudioV1ChatFilesConvertPostResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Convert Document File + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ConvertDocumentFileStudioV1ChatFilesConvertPostAsync( + global::System.Collections.Generic.IList files, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.BodyConvertDocumentFileStudioV1ChatFilesConvertPost + { + Files = files, + }; + + return await ConvertDocumentFileStudioV1ChatFilesConvertPostAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Api.V1Answer.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Api.V1Answer.g.verified.cs new file mode 100644 index 0000000000..4d94fc6c23 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Api.V1Answer.g.verified.cs @@ -0,0 +1,131 @@ +//HintName: G.Api.V1Answer.g.cs + +#nullable enable + +namespace G +{ + public partial class Api + { + partial void PrepareV1AnswerArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.AnswerBody request); + partial void PrepareV1AnswerRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.AnswerBody request); + partial void ProcessV1AnswerResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1AnswerResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Answer + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1AnswerAsync( + global::G.AnswerBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1AnswerArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/studio/v1/answer", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1AnswerRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1AnswerResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1AnswerResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Answer + /// + /// + /// + /// + /// An enumeration. + /// + /// + /// An enumeration. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1AnswerAsync( + string context, + string question, + global::G.AnswerLength? answerLength = default, + global::G.Mode? mode = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.AnswerBody + { + Context = context, + Question = question, + AnswerLength = answerLength, + Mode = mode, + }; + + return await V1AnswerAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Api.V1ConversationalRag.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Api.V1ConversationalRag.g.verified.cs new file mode 100644 index 0000000000..d522b750d6 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Api.V1ConversationalRag.g.verified.cs @@ -0,0 +1,152 @@ +//HintName: G.Api.V1ConversationalRag.g.cs + +#nullable enable + +namespace G +{ + public partial class Api + { + partial void PrepareV1ConversationalRagArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.ConversationalRagFlowPublicFields request); + partial void PrepareV1ConversationalRagRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.ConversationalRagFlowPublicFields request); + partial void ProcessV1ConversationalRagResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1ConversationalRagResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Conversational Rag + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1ConversationalRagAsync( + global::G.ConversationalRagFlowPublicFields request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1ConversationalRagArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/studio/v1/conversational-rag", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1ConversationalRagRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1ConversationalRagResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1ConversationalRagResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Conversational Rag + /// + /// + /// messages + /// + /// + /// + /// + /// + /// Default Value: 15 + /// + /// + /// Default Value: default + /// + /// + /// Default Value: 0.8 + /// + /// + /// + /// Default Value: 0.98 + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1ConversationalRagAsync( + global::System.Collections.Generic.IList messages, + string? path = default, + global::System.Collections.Generic.IList? labels = default, + global::System.Collections.Generic.IList? fileIds = default, + int maxSegments = 15, + global::G.ConversationalRagFlowPublicFieldsRetrievalStrategy? retrievalStrategy = global::G.ConversationalRagFlowPublicFieldsRetrievalStrategy.Default, + double retrievalSimilarityThreshold = 0.8, + int maxNeighbors = default, + double hybridSearchAlpha = 0.98, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.ConversationalRagFlowPublicFields + { + Messages = messages, + Path = path, + Labels = labels, + FileIds = fileIds, + MaxSegments = maxSegments, + RetrievalStrategy = retrievalStrategy, + RetrievalSimilarityThreshold = retrievalSimilarityThreshold, + MaxNeighbors = maxNeighbors, + HybridSearchAlpha = hybridSearchAlpha, + }; + + return await V1ConversationalRagAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Api.V1Embed.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Api.V1Embed.g.verified.cs new file mode 100644 index 0000000000..990d56583d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Api.V1Embed.g.verified.cs @@ -0,0 +1,123 @@ +//HintName: G.Api.V1Embed.g.cs + +#nullable enable + +namespace G +{ + public partial class Api + { + partial void PrepareV1EmbedArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.EmbeddingsBody request); + partial void PrepareV1EmbedRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.EmbeddingsBody request); + partial void ProcessV1EmbedResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1EmbedResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Embed + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1EmbedAsync( + global::G.EmbeddingsBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1EmbedArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/studio/v1/embed", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1EmbedRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1EmbedResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1EmbedResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Embed + /// + /// + /// + /// Default Value: segment + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1EmbedAsync( + global::System.Collections.Generic.IList texts, + global::System.AllOf? type = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.EmbeddingsBody + { + Texts = texts, + Type = type, + }; + + return await V1EmbedAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Api.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Api.g.verified.cs new file mode 100644 index 0000000000..bd0b632573 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Api.g.verified.cs @@ -0,0 +1,177 @@ +//HintName: G.Api.g.cs + +#nullable enable + +namespace G +{ + /// + /// Access our powerful language models using an API that makes you smile
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class Api : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.ai21.com/"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::System.Text.Json.JsonSerializerOptions _jsonSerializerOptions; + + + /// + /// + /// + public JambaCompleteClient JambaComplete => new JambaCompleteClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// + /// + public CompletionClient Completion => new CompletionClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// + /// + public CustomModelsClient CustomModels => new CustomModelsClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// + /// + public DatasetsClient Datasets => new DatasetsClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// + /// + public ParaphraseClient Paraphrase => new ParaphraseClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// + /// + public SummarizeClient Summarize => new SummarizeClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// + /// + public SegmentationClient Segmentation => new SegmentationClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// + /// + public GrammaticalErrorCorrectionsClient GrammaticalErrorCorrections => new GrammaticalErrorCorrectionsClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// + /// + public LibraryManagementClient LibraryManagement => new LibraryManagementClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// + /// + public RAGEngineClient RAGEngine => new RAGEngineClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// + /// + public ChatClient Chat => new ChatClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// + /// + public TokenizeClient Tokenize => new TokenizeClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// Creates a new instance of the Api. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public Api( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::System.Text.Json.JsonSerializerOptions + { + PropertyNameCaseInsensitive = true, + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = + { + new global::OpenApiGenerator.JsonConverters.AnswerLengthJsonConverter(), + new global::OpenApiGenerator.JsonConverters.AnswerLengthNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ModeJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ModeNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.AssistantMessageRoleJsonConverter(), + new global::OpenApiGenerator.JsonConverters.AssistantMessageRoleNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ToolCallTypeJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ToolCallTypeNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ChatStreamingFirstDeltaRoleJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ChatStreamingFirstDeltaRoleNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.RoleTypeJsonConverter(), + new global::OpenApiGenerator.JsonConverters.RoleTypeNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.MessageRoleJsonConverter(), + new global::OpenApiGenerator.JsonConverters.MessageRoleNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ConversationalRagFlowPublicFieldsRetrievalStrategyJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ConversationalRagFlowPublicFieldsRetrievalStrategyNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.CorrectionTypeJsonConverter(), + new global::OpenApiGenerator.JsonConverters.CorrectionTypeNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.CustomModelTypeJsonConverter(), + new global::OpenApiGenerator.JsonConverters.CustomModelTypeNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.DocumentTypeJsonConverter(), + new global::OpenApiGenerator.JsonConverters.DocumentTypeNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.EmbedTypeJsonConverter(), + new global::OpenApiGenerator.JsonConverters.EmbedTypeNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.FileStatusJsonConverter(), + new global::OpenApiGenerator.JsonConverters.FileStatusNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ToolParametersTypeJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ToolParametersTypeNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.RetrievalStrategy3JsonConverter(), + new global::OpenApiGenerator.JsonConverters.RetrievalStrategy3NullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ModelNameJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ModelNameNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.StyleTypeJsonConverter(), + new global::OpenApiGenerator.JsonConverters.StyleTypeNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ResponseFormatTypeJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ResponseFormatTypeNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.SummaryMethodJsonConverter(), + new global::OpenApiGenerator.JsonConverters.SummaryMethodNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.SystemMessageRoleJsonConverter(), + new global::OpenApiGenerator.JsonConverters.SystemMessageRoleNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ToolDefinitionTypeJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ToolDefinitionTypeNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ToolMessageRoleJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ToolMessageRoleNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.UserMessageRoleJsonConverter(), + new global::OpenApiGenerator.JsonConverters.UserMessageRoleNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.AnyOfJsonConverterFactory2(), + new global::OpenApiGenerator.JsonConverters.AllOfJsonConverterFactory1(), + new global::OpenApiGenerator.JsonConverters.OneOfJsonConverterFactory4(), + } + }; + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.ChatClient.V1J2UltraChat.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.ChatClient.V1J2UltraChat.g.verified.cs new file mode 100644 index 0000000000..6bb603487d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.ChatClient.V1J2UltraChat.g.verified.cs @@ -0,0 +1,178 @@ +//HintName: G.ChatClient.V1J2UltraChat.g.cs + +#nullable enable + +namespace G +{ + public partial class ChatClient + { + partial void PrepareV1J2UltraChatArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? model, + global::G.LanguageStudioApiServerDataTypesJ2ChatChatRequest request); + partial void PrepareV1J2UltraChatRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? model, + global::G.LanguageStudioApiServerDataTypesJ2ChatChatRequest request); + partial void ProcessV1J2UltraChatResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1J2UltraChatResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// j2-ultra chat + /// + /// + /// Default Value: j2-ultra + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2UltraChatAsync( + string? model, + global::G.LanguageStudioApiServerDataTypesJ2ChatChatRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1J2UltraChatArguments( + httpClient: _httpClient, + model: ref model, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/j2-ultra/chat?model={model}", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1J2UltraChatRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + model: model, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1J2UltraChatResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1J2UltraChatResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// j2-ultra chat + /// + /// + /// Default Value: j2-ultra + /// + /// + /// messages + /// + /// + /// + /// + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 0.7 + /// + /// + /// Default Value: 300 + /// + /// + /// Default Value: 0 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 0 + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2UltraChatAsync( + global::System.Collections.Generic.IList messages, + string system, + string? model = "j2-ultra", + global::System.AllOf? frequencyPenalty = default, + global::System.AllOf? presencePenalty = default, + global::System.AllOf? countPenalty = default, + int numResults = 1, + double temperature = 0.7, + int maxTokens = 300, + int minTokens = 0, + double topP = 1, + int topKReturn = 0, + global::System.Collections.Generic.IList? stopSequences = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.LanguageStudioApiServerDataTypesJ2ChatChatRequest + { + Messages = messages, + System = system, + FrequencyPenalty = frequencyPenalty, + PresencePenalty = presencePenalty, + CountPenalty = countPenalty, + NumResults = numResults, + Temperature = temperature, + MaxTokens = maxTokens, + MinTokens = minTokens, + TopP = topP, + TopKReturn = topKReturn, + StopSequences = stopSequences, + }; + + return await V1J2UltraChatAsync( + model: model, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.ChatClient.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.ChatClient.g.verified.cs new file mode 100644 index 0000000000..a918012ea9 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.ChatClient.g.verified.cs @@ -0,0 +1,60 @@ +//HintName: G.ChatClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class ChatClient : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.ai21.com/"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::System.Text.Json.JsonSerializerOptions _jsonSerializerOptions; + + + /// + /// Creates a new instance of the ChatClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public ChatClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::System.Text.Json.JsonSerializerOptions(); + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2GrandeComplete.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2GrandeComplete.g.verified.cs new file mode 100644 index 0000000000..b146b5dfd4 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2GrandeComplete.g.verified.cs @@ -0,0 +1,184 @@ +//HintName: G.CompletionClient.V1J2GrandeComplete.g.cs + +#nullable enable + +namespace G +{ + public partial class CompletionClient + { + partial void PrepareV1J2GrandeCompleteArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? model, + global::G.CompletionBody request); + partial void PrepareV1J2GrandeCompleteRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? model, + global::G.CompletionBody request); + partial void ProcessV1J2GrandeCompleteResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1J2GrandeCompleteResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// j2-grande complete + /// + /// + /// Default Value: j2-grande + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2GrandeCompleteAsync( + string? model, + global::G.CompletionBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1J2GrandeCompleteArguments( + httpClient: _httpClient, + model: ref model, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/j2-grande/complete?model={model}", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1J2GrandeCompleteRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + model: model, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1J2GrandeCompleteResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1J2GrandeCompleteResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// j2-grande complete + /// + /// + /// Default Value: j2-grande + /// + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 16 + /// + /// + /// Default Value: 0 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 0 + /// + /// + /// + /// Default Value: 0 + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2GrandeCompleteAsync( + string prompt, + string? model = "j2-grande", + int numResults = 1, + int maxTokens = 16, + int minTokens = 0, + double temperature = 1, + double topP = 1, + double minP = 0, + global::System.Collections.Generic.IList? stopSequences = default, + int topKReturn = 0, + global::G.CompletionBodyLogitBias? logitBias = default, + global::System.AllOf? frequencyPenalty = default, + global::System.AllOf? presencePenalty = default, + global::System.AllOf? countPenalty = default, + int epoch = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.CompletionBody + { + Prompt = prompt, + NumResults = numResults, + MaxTokens = maxTokens, + MinTokens = minTokens, + Temperature = temperature, + TopP = topP, + MinP = minP, + StopSequences = stopSequences, + TopKReturn = topKReturn, + LogitBias = logitBias, + FrequencyPenalty = frequencyPenalty, + PresencePenalty = presencePenalty, + CountPenalty = countPenalty, + Epoch = epoch, + }; + + return await V1J2GrandeCompleteAsync( + model: model, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2GrandeCustomModelComplete.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2GrandeCustomModelComplete.g.verified.cs new file mode 100644 index 0000000000..4c674db9e5 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2GrandeCustomModelComplete.g.verified.cs @@ -0,0 +1,193 @@ +//HintName: G.CompletionClient.V1J2GrandeCustomModelComplete.g.cs + +#nullable enable + +namespace G +{ + public partial class CompletionClient + { + partial void PrepareV1J2GrandeCustomModelCompleteArguments( + global::System.Net.Http.HttpClient httpClient, + ref string customModelName, + ref string? customModelType, + global::G.CompletionBody request); + partial void PrepareV1J2GrandeCustomModelCompleteRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string customModelName, + string? customModelType, + global::G.CompletionBody request); + partial void ProcessV1J2GrandeCustomModelCompleteResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1J2GrandeCustomModelCompleteResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Custom j2-grande complete + /// + /// + /// + /// Default Value: j2-grande + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2GrandeCustomModelCompleteAsync( + string customModelName, + string? customModelType, + global::G.CompletionBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1J2GrandeCustomModelCompleteArguments( + httpClient: _httpClient, + customModelName: ref customModelName, + customModelType: ref customModelType, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/j2-grande/{customModelName}/complete?custom_model_type={customModelType}", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1J2GrandeCustomModelCompleteRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + customModelName: customModelName, + customModelType: customModelType, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1J2GrandeCustomModelCompleteResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1J2GrandeCustomModelCompleteResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Custom j2-grande complete + /// + /// + /// + /// Default Value: j2-grande + /// + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 16 + /// + /// + /// Default Value: 0 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 0 + /// + /// + /// + /// Default Value: 0 + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2GrandeCustomModelCompleteAsync( + string customModelName, + string prompt, + string? customModelType = "j2-grande", + int numResults = 1, + int maxTokens = 16, + int minTokens = 0, + double temperature = 1, + double topP = 1, + double minP = 0, + global::System.Collections.Generic.IList? stopSequences = default, + int topKReturn = 0, + global::G.CompletionBodyLogitBias? logitBias = default, + global::System.AllOf? frequencyPenalty = default, + global::System.AllOf? presencePenalty = default, + global::System.AllOf? countPenalty = default, + int epoch = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.CompletionBody + { + Prompt = prompt, + NumResults = numResults, + MaxTokens = maxTokens, + MinTokens = minTokens, + Temperature = temperature, + TopP = topP, + MinP = minP, + StopSequences = stopSequences, + TopKReturn = topKReturn, + LogitBias = logitBias, + FrequencyPenalty = frequencyPenalty, + PresencePenalty = presencePenalty, + CountPenalty = countPenalty, + Epoch = epoch, + }; + + return await V1J2GrandeCustomModelCompleteAsync( + customModelName: customModelName, + customModelType: customModelType, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2GrandeInstructComplete.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2GrandeInstructComplete.g.verified.cs new file mode 100644 index 0000000000..4c6343640d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2GrandeInstructComplete.g.verified.cs @@ -0,0 +1,184 @@ +//HintName: G.CompletionClient.V1J2GrandeInstructComplete.g.cs + +#nullable enable + +namespace G +{ + public partial class CompletionClient + { + partial void PrepareV1J2GrandeInstructCompleteArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? model, + global::G.CompletionBody request); + partial void PrepareV1J2GrandeInstructCompleteRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? model, + global::G.CompletionBody request); + partial void ProcessV1J2GrandeInstructCompleteResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1J2GrandeInstructCompleteResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// j2-grande-instruct complete + /// + /// + /// Default Value: j2-grande-instruct + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2GrandeInstructCompleteAsync( + string? model, + global::G.CompletionBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1J2GrandeInstructCompleteArguments( + httpClient: _httpClient, + model: ref model, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/j2-grande-instruct/complete?model={model}", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1J2GrandeInstructCompleteRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + model: model, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1J2GrandeInstructCompleteResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1J2GrandeInstructCompleteResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// j2-grande-instruct complete + /// + /// + /// Default Value: j2-grande-instruct + /// + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 16 + /// + /// + /// Default Value: 0 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 0 + /// + /// + /// + /// Default Value: 0 + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2GrandeInstructCompleteAsync( + string prompt, + string? model = "j2-grande-instruct", + int numResults = 1, + int maxTokens = 16, + int minTokens = 0, + double temperature = 1, + double topP = 1, + double minP = 0, + global::System.Collections.Generic.IList? stopSequences = default, + int topKReturn = 0, + global::G.CompletionBodyLogitBias? logitBias = default, + global::System.AllOf? frequencyPenalty = default, + global::System.AllOf? presencePenalty = default, + global::System.AllOf? countPenalty = default, + int epoch = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.CompletionBody + { + Prompt = prompt, + NumResults = numResults, + MaxTokens = maxTokens, + MinTokens = minTokens, + Temperature = temperature, + TopP = topP, + MinP = minP, + StopSequences = stopSequences, + TopKReturn = topKReturn, + LogitBias = logitBias, + FrequencyPenalty = frequencyPenalty, + PresencePenalty = presencePenalty, + CountPenalty = countPenalty, + Epoch = epoch, + }; + + return await V1J2GrandeInstructCompleteAsync( + model: model, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2JumboComplete.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2JumboComplete.g.verified.cs new file mode 100644 index 0000000000..a9267a5bca --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2JumboComplete.g.verified.cs @@ -0,0 +1,184 @@ +//HintName: G.CompletionClient.V1J2JumboComplete.g.cs + +#nullable enable + +namespace G +{ + public partial class CompletionClient + { + partial void PrepareV1J2JumboCompleteArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? model, + global::G.CompletionBody request); + partial void PrepareV1J2JumboCompleteRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? model, + global::G.CompletionBody request); + partial void ProcessV1J2JumboCompleteResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1J2JumboCompleteResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// j2-jumbo complete + /// + /// + /// Default Value: j2-jumbo + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2JumboCompleteAsync( + string? model, + global::G.CompletionBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1J2JumboCompleteArguments( + httpClient: _httpClient, + model: ref model, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/j2-jumbo/complete?model={model}", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1J2JumboCompleteRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + model: model, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1J2JumboCompleteResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1J2JumboCompleteResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// j2-jumbo complete + /// + /// + /// Default Value: j2-jumbo + /// + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 16 + /// + /// + /// Default Value: 0 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 0 + /// + /// + /// + /// Default Value: 0 + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2JumboCompleteAsync( + string prompt, + string? model = "j2-jumbo", + int numResults = 1, + int maxTokens = 16, + int minTokens = 0, + double temperature = 1, + double topP = 1, + double minP = 0, + global::System.Collections.Generic.IList? stopSequences = default, + int topKReturn = 0, + global::G.CompletionBodyLogitBias? logitBias = default, + global::System.AllOf? frequencyPenalty = default, + global::System.AllOf? presencePenalty = default, + global::System.AllOf? countPenalty = default, + int epoch = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.CompletionBody + { + Prompt = prompt, + NumResults = numResults, + MaxTokens = maxTokens, + MinTokens = minTokens, + Temperature = temperature, + TopP = topP, + MinP = minP, + StopSequences = stopSequences, + TopKReturn = topKReturn, + LogitBias = logitBias, + FrequencyPenalty = frequencyPenalty, + PresencePenalty = presencePenalty, + CountPenalty = countPenalty, + Epoch = epoch, + }; + + return await V1J2JumboCompleteAsync( + model: model, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2JumboComplete2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2JumboComplete2.g.verified.cs new file mode 100644 index 0000000000..def8d33aca --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2JumboComplete2.g.verified.cs @@ -0,0 +1,193 @@ +//HintName: G.CompletionClient.V1J2JumboComplete2.g.cs + +#nullable enable + +namespace G +{ + public partial class CompletionClient + { + partial void PrepareV1J2JumboComplete2Arguments( + global::System.Net.Http.HttpClient httpClient, + ref string customModelName, + ref string? customModelType, + global::G.CompletionBody request); + partial void PrepareV1J2JumboComplete2Request( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string customModelName, + string? customModelType, + global::G.CompletionBody request); + partial void ProcessV1J2JumboComplete2Response( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1J2JumboComplete2ResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Custom j2-jumbo complete + /// + /// + /// + /// Default Value: j2-jumbo + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2JumboComplete2Async( + string customModelName, + string? customModelType, + global::G.CompletionBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1J2JumboComplete2Arguments( + httpClient: _httpClient, + customModelName: ref customModelName, + customModelType: ref customModelType, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/j2-jumbo/{customModelName}/complete?custom_model_type={customModelType}", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1J2JumboComplete2Request( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + customModelName: customModelName, + customModelType: customModelType, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1J2JumboComplete2Response( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1J2JumboComplete2ResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Custom j2-jumbo complete + /// + /// + /// + /// Default Value: j2-jumbo + /// + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 16 + /// + /// + /// Default Value: 0 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 0 + /// + /// + /// + /// Default Value: 0 + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2JumboComplete2Async( + string customModelName, + string prompt, + string? customModelType = "j2-jumbo", + int numResults = 1, + int maxTokens = 16, + int minTokens = 0, + double temperature = 1, + double topP = 1, + double minP = 0, + global::System.Collections.Generic.IList? stopSequences = default, + int topKReturn = 0, + global::G.CompletionBodyLogitBias? logitBias = default, + global::System.AllOf? frequencyPenalty = default, + global::System.AllOf? presencePenalty = default, + global::System.AllOf? countPenalty = default, + int epoch = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.CompletionBody + { + Prompt = prompt, + NumResults = numResults, + MaxTokens = maxTokens, + MinTokens = minTokens, + Temperature = temperature, + TopP = topP, + MinP = minP, + StopSequences = stopSequences, + TopKReturn = topKReturn, + LogitBias = logitBias, + FrequencyPenalty = frequencyPenalty, + PresencePenalty = presencePenalty, + CountPenalty = countPenalty, + Epoch = epoch, + }; + + return await V1J2JumboComplete2Async( + customModelName: customModelName, + customModelType: customModelType, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2JumboInstructComplete.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2JumboInstructComplete.g.verified.cs new file mode 100644 index 0000000000..65dccc923b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2JumboInstructComplete.g.verified.cs @@ -0,0 +1,184 @@ +//HintName: G.CompletionClient.V1J2JumboInstructComplete.g.cs + +#nullable enable + +namespace G +{ + public partial class CompletionClient + { + partial void PrepareV1J2JumboInstructCompleteArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? model, + global::G.CompletionBody request); + partial void PrepareV1J2JumboInstructCompleteRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? model, + global::G.CompletionBody request); + partial void ProcessV1J2JumboInstructCompleteResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1J2JumboInstructCompleteResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// j2-jumbo-instruct complete + /// + /// + /// Default Value: j2-jumbo-instruct + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2JumboInstructCompleteAsync( + string? model, + global::G.CompletionBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1J2JumboInstructCompleteArguments( + httpClient: _httpClient, + model: ref model, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/j2-jumbo-instruct/complete?model={model}", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1J2JumboInstructCompleteRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + model: model, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1J2JumboInstructCompleteResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1J2JumboInstructCompleteResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// j2-jumbo-instruct complete + /// + /// + /// Default Value: j2-jumbo-instruct + /// + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 16 + /// + /// + /// Default Value: 0 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 0 + /// + /// + /// + /// Default Value: 0 + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2JumboInstructCompleteAsync( + string prompt, + string? model = "j2-jumbo-instruct", + int numResults = 1, + int maxTokens = 16, + int minTokens = 0, + double temperature = 1, + double topP = 1, + double minP = 0, + global::System.Collections.Generic.IList? stopSequences = default, + int topKReturn = 0, + global::G.CompletionBodyLogitBias? logitBias = default, + global::System.AllOf? frequencyPenalty = default, + global::System.AllOf? presencePenalty = default, + global::System.AllOf? countPenalty = default, + int epoch = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.CompletionBody + { + Prompt = prompt, + NumResults = numResults, + MaxTokens = maxTokens, + MinTokens = minTokens, + Temperature = temperature, + TopP = topP, + MinP = minP, + StopSequences = stopSequences, + TopKReturn = topKReturn, + LogitBias = logitBias, + FrequencyPenalty = frequencyPenalty, + PresencePenalty = presencePenalty, + CountPenalty = countPenalty, + Epoch = epoch, + }; + + return await V1J2JumboInstructCompleteAsync( + model: model, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2LargeComplete.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2LargeComplete.g.verified.cs new file mode 100644 index 0000000000..ab61481afc --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2LargeComplete.g.verified.cs @@ -0,0 +1,184 @@ +//HintName: G.CompletionClient.V1J2LargeComplete.g.cs + +#nullable enable + +namespace G +{ + public partial class CompletionClient + { + partial void PrepareV1J2LargeCompleteArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? model, + global::G.CompletionBody request); + partial void PrepareV1J2LargeCompleteRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? model, + global::G.CompletionBody request); + partial void ProcessV1J2LargeCompleteResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1J2LargeCompleteResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// j2-large complete + /// + /// + /// Default Value: j2-large + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2LargeCompleteAsync( + string? model, + global::G.CompletionBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1J2LargeCompleteArguments( + httpClient: _httpClient, + model: ref model, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/j2-large/complete?model={model}", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1J2LargeCompleteRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + model: model, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1J2LargeCompleteResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1J2LargeCompleteResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// j2-large complete + /// + /// + /// Default Value: j2-large + /// + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 16 + /// + /// + /// Default Value: 0 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 0 + /// + /// + /// + /// Default Value: 0 + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2LargeCompleteAsync( + string prompt, + string? model = "j2-large", + int numResults = 1, + int maxTokens = 16, + int minTokens = 0, + double temperature = 1, + double topP = 1, + double minP = 0, + global::System.Collections.Generic.IList? stopSequences = default, + int topKReturn = 0, + global::G.CompletionBodyLogitBias? logitBias = default, + global::System.AllOf? frequencyPenalty = default, + global::System.AllOf? presencePenalty = default, + global::System.AllOf? countPenalty = default, + int epoch = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.CompletionBody + { + Prompt = prompt, + NumResults = numResults, + MaxTokens = maxTokens, + MinTokens = minTokens, + Temperature = temperature, + TopP = topP, + MinP = minP, + StopSequences = stopSequences, + TopKReturn = topKReturn, + LogitBias = logitBias, + FrequencyPenalty = frequencyPenalty, + PresencePenalty = presencePenalty, + CountPenalty = countPenalty, + Epoch = epoch, + }; + + return await V1J2LargeCompleteAsync( + model: model, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2LargeCustomModelComplete.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2LargeCustomModelComplete.g.verified.cs new file mode 100644 index 0000000000..9f2ed31bcc --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2LargeCustomModelComplete.g.verified.cs @@ -0,0 +1,193 @@ +//HintName: G.CompletionClient.V1J2LargeCustomModelComplete.g.cs + +#nullable enable + +namespace G +{ + public partial class CompletionClient + { + partial void PrepareV1J2LargeCustomModelCompleteArguments( + global::System.Net.Http.HttpClient httpClient, + ref string customModelName, + ref string? customModelType, + global::G.CompletionBody request); + partial void PrepareV1J2LargeCustomModelCompleteRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string customModelName, + string? customModelType, + global::G.CompletionBody request); + partial void ProcessV1J2LargeCustomModelCompleteResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1J2LargeCustomModelCompleteResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Custom j2-large complete + /// + /// + /// + /// Default Value: j2-large + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2LargeCustomModelCompleteAsync( + string customModelName, + string? customModelType, + global::G.CompletionBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1J2LargeCustomModelCompleteArguments( + httpClient: _httpClient, + customModelName: ref customModelName, + customModelType: ref customModelType, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/j2-large/{customModelName}/complete?custom_model_type={customModelType}", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1J2LargeCustomModelCompleteRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + customModelName: customModelName, + customModelType: customModelType, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1J2LargeCustomModelCompleteResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1J2LargeCustomModelCompleteResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Custom j2-large complete + /// + /// + /// + /// Default Value: j2-large + /// + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 16 + /// + /// + /// Default Value: 0 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 0 + /// + /// + /// + /// Default Value: 0 + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2LargeCustomModelCompleteAsync( + string customModelName, + string prompt, + string? customModelType = "j2-large", + int numResults = 1, + int maxTokens = 16, + int minTokens = 0, + double temperature = 1, + double topP = 1, + double minP = 0, + global::System.Collections.Generic.IList? stopSequences = default, + int topKReturn = 0, + global::G.CompletionBodyLogitBias? logitBias = default, + global::System.AllOf? frequencyPenalty = default, + global::System.AllOf? presencePenalty = default, + global::System.AllOf? countPenalty = default, + int epoch = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.CompletionBody + { + Prompt = prompt, + NumResults = numResults, + MaxTokens = maxTokens, + MinTokens = minTokens, + Temperature = temperature, + TopP = topP, + MinP = minP, + StopSequences = stopSequences, + TopKReturn = topKReturn, + LogitBias = logitBias, + FrequencyPenalty = frequencyPenalty, + PresencePenalty = presencePenalty, + CountPenalty = countPenalty, + Epoch = epoch, + }; + + return await V1J2LargeCustomModelCompleteAsync( + customModelName: customModelName, + customModelType: customModelType, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2LargeInstructComplete.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2LargeInstructComplete.g.verified.cs new file mode 100644 index 0000000000..0d52cf178c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2LargeInstructComplete.g.verified.cs @@ -0,0 +1,184 @@ +//HintName: G.CompletionClient.V1J2LargeInstructComplete.g.cs + +#nullable enable + +namespace G +{ + public partial class CompletionClient + { + partial void PrepareV1J2LargeInstructCompleteArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? model, + global::G.CompletionBody request); + partial void PrepareV1J2LargeInstructCompleteRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? model, + global::G.CompletionBody request); + partial void ProcessV1J2LargeInstructCompleteResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1J2LargeInstructCompleteResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// j2-large-instruct complete + /// + /// + /// Default Value: j2-large-instruct + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2LargeInstructCompleteAsync( + string? model, + global::G.CompletionBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1J2LargeInstructCompleteArguments( + httpClient: _httpClient, + model: ref model, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/j2-large-instruct/complete?model={model}", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1J2LargeInstructCompleteRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + model: model, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1J2LargeInstructCompleteResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1J2LargeInstructCompleteResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// j2-large-instruct complete + /// + /// + /// Default Value: j2-large-instruct + /// + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 16 + /// + /// + /// Default Value: 0 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 0 + /// + /// + /// + /// Default Value: 0 + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2LargeInstructCompleteAsync( + string prompt, + string? model = "j2-large-instruct", + int numResults = 1, + int maxTokens = 16, + int minTokens = 0, + double temperature = 1, + double topP = 1, + double minP = 0, + global::System.Collections.Generic.IList? stopSequences = default, + int topKReturn = 0, + global::G.CompletionBodyLogitBias? logitBias = default, + global::System.AllOf? frequencyPenalty = default, + global::System.AllOf? presencePenalty = default, + global::System.AllOf? countPenalty = default, + int epoch = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.CompletionBody + { + Prompt = prompt, + NumResults = numResults, + MaxTokens = maxTokens, + MinTokens = minTokens, + Temperature = temperature, + TopP = topP, + MinP = minP, + StopSequences = stopSequences, + TopKReturn = topKReturn, + LogitBias = logitBias, + FrequencyPenalty = frequencyPenalty, + PresencePenalty = presencePenalty, + CountPenalty = countPenalty, + Epoch = epoch, + }; + + return await V1J2LargeInstructCompleteAsync( + model: model, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2LightComplete.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2LightComplete.g.verified.cs new file mode 100644 index 0000000000..83a30da166 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2LightComplete.g.verified.cs @@ -0,0 +1,184 @@ +//HintName: G.CompletionClient.V1J2LightComplete.g.cs + +#nullable enable + +namespace G +{ + public partial class CompletionClient + { + partial void PrepareV1J2LightCompleteArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? model, + global::G.CompletionBody request); + partial void PrepareV1J2LightCompleteRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? model, + global::G.CompletionBody request); + partial void ProcessV1J2LightCompleteResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1J2LightCompleteResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// j2-light complete + /// + /// + /// Default Value: j2-light + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2LightCompleteAsync( + string? model, + global::G.CompletionBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1J2LightCompleteArguments( + httpClient: _httpClient, + model: ref model, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/j2-light/complete?model={model}", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1J2LightCompleteRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + model: model, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1J2LightCompleteResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1J2LightCompleteResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// j2-light complete + /// + /// + /// Default Value: j2-light + /// + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 16 + /// + /// + /// Default Value: 0 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 0 + /// + /// + /// + /// Default Value: 0 + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2LightCompleteAsync( + string prompt, + string? model = "j2-light", + int numResults = 1, + int maxTokens = 16, + int minTokens = 0, + double temperature = 1, + double topP = 1, + double minP = 0, + global::System.Collections.Generic.IList? stopSequences = default, + int topKReturn = 0, + global::G.CompletionBodyLogitBias? logitBias = default, + global::System.AllOf? frequencyPenalty = default, + global::System.AllOf? presencePenalty = default, + global::System.AllOf? countPenalty = default, + int epoch = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.CompletionBody + { + Prompt = prompt, + NumResults = numResults, + MaxTokens = maxTokens, + MinTokens = minTokens, + Temperature = temperature, + TopP = topP, + MinP = minP, + StopSequences = stopSequences, + TopKReturn = topKReturn, + LogitBias = logitBias, + FrequencyPenalty = frequencyPenalty, + PresencePenalty = presencePenalty, + CountPenalty = countPenalty, + Epoch = epoch, + }; + + return await V1J2LightCompleteAsync( + model: model, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2LightCustomModelComplete.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2LightCustomModelComplete.g.verified.cs new file mode 100644 index 0000000000..6f28c96b1d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2LightCustomModelComplete.g.verified.cs @@ -0,0 +1,193 @@ +//HintName: G.CompletionClient.V1J2LightCustomModelComplete.g.cs + +#nullable enable + +namespace G +{ + public partial class CompletionClient + { + partial void PrepareV1J2LightCustomModelCompleteArguments( + global::System.Net.Http.HttpClient httpClient, + ref string customModelName, + ref string? customModelType, + global::G.CompletionBody request); + partial void PrepareV1J2LightCustomModelCompleteRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string customModelName, + string? customModelType, + global::G.CompletionBody request); + partial void ProcessV1J2LightCustomModelCompleteResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1J2LightCustomModelCompleteResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Custom j2-light complete + /// + /// + /// + /// Default Value: j2-light + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2LightCustomModelCompleteAsync( + string customModelName, + string? customModelType, + global::G.CompletionBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1J2LightCustomModelCompleteArguments( + httpClient: _httpClient, + customModelName: ref customModelName, + customModelType: ref customModelType, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/j2-light/{customModelName}/complete?custom_model_type={customModelType}", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1J2LightCustomModelCompleteRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + customModelName: customModelName, + customModelType: customModelType, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1J2LightCustomModelCompleteResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1J2LightCustomModelCompleteResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Custom j2-light complete + /// + /// + /// + /// Default Value: j2-light + /// + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 16 + /// + /// + /// Default Value: 0 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 0 + /// + /// + /// + /// Default Value: 0 + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2LightCustomModelCompleteAsync( + string customModelName, + string prompt, + string? customModelType = "j2-light", + int numResults = 1, + int maxTokens = 16, + int minTokens = 0, + double temperature = 1, + double topP = 1, + double minP = 0, + global::System.Collections.Generic.IList? stopSequences = default, + int topKReturn = 0, + global::G.CompletionBodyLogitBias? logitBias = default, + global::System.AllOf? frequencyPenalty = default, + global::System.AllOf? presencePenalty = default, + global::System.AllOf? countPenalty = default, + int epoch = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.CompletionBody + { + Prompt = prompt, + NumResults = numResults, + MaxTokens = maxTokens, + MinTokens = minTokens, + Temperature = temperature, + TopP = topP, + MinP = minP, + StopSequences = stopSequences, + TopKReturn = topKReturn, + LogitBias = logitBias, + FrequencyPenalty = frequencyPenalty, + PresencePenalty = presencePenalty, + CountPenalty = countPenalty, + Epoch = epoch, + }; + + return await V1J2LightCustomModelCompleteAsync( + customModelName: customModelName, + customModelType: customModelType, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2MidComplete.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2MidComplete.g.verified.cs new file mode 100644 index 0000000000..cf43532d28 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2MidComplete.g.verified.cs @@ -0,0 +1,184 @@ +//HintName: G.CompletionClient.V1J2MidComplete.g.cs + +#nullable enable + +namespace G +{ + public partial class CompletionClient + { + partial void PrepareV1J2MidCompleteArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? model, + global::G.CompletionBody request); + partial void PrepareV1J2MidCompleteRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? model, + global::G.CompletionBody request); + partial void ProcessV1J2MidCompleteResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1J2MidCompleteResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// j2-mid complete + /// + /// + /// Default Value: j2-mid + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2MidCompleteAsync( + string? model, + global::G.CompletionBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1J2MidCompleteArguments( + httpClient: _httpClient, + model: ref model, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/j2-mid/complete?model={model}", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1J2MidCompleteRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + model: model, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1J2MidCompleteResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1J2MidCompleteResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// j2-mid complete + /// + /// + /// Default Value: j2-mid + /// + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 16 + /// + /// + /// Default Value: 0 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 0 + /// + /// + /// + /// Default Value: 0 + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2MidCompleteAsync( + string prompt, + string? model = "j2-mid", + int numResults = 1, + int maxTokens = 16, + int minTokens = 0, + double temperature = 1, + double topP = 1, + double minP = 0, + global::System.Collections.Generic.IList? stopSequences = default, + int topKReturn = 0, + global::G.CompletionBodyLogitBias? logitBias = default, + global::System.AllOf? frequencyPenalty = default, + global::System.AllOf? presencePenalty = default, + global::System.AllOf? countPenalty = default, + int epoch = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.CompletionBody + { + Prompt = prompt, + NumResults = numResults, + MaxTokens = maxTokens, + MinTokens = minTokens, + Temperature = temperature, + TopP = topP, + MinP = minP, + StopSequences = stopSequences, + TopKReturn = topKReturn, + LogitBias = logitBias, + FrequencyPenalty = frequencyPenalty, + PresencePenalty = presencePenalty, + CountPenalty = countPenalty, + Epoch = epoch, + }; + + return await V1J2MidCompleteAsync( + model: model, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2MidCustomModelComplete.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2MidCustomModelComplete.g.verified.cs new file mode 100644 index 0000000000..7682bbc383 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2MidCustomModelComplete.g.verified.cs @@ -0,0 +1,193 @@ +//HintName: G.CompletionClient.V1J2MidCustomModelComplete.g.cs + +#nullable enable + +namespace G +{ + public partial class CompletionClient + { + partial void PrepareV1J2MidCustomModelCompleteArguments( + global::System.Net.Http.HttpClient httpClient, + ref string customModelName, + ref string? customModelType, + global::G.CompletionBody request); + partial void PrepareV1J2MidCustomModelCompleteRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string customModelName, + string? customModelType, + global::G.CompletionBody request); + partial void ProcessV1J2MidCustomModelCompleteResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1J2MidCustomModelCompleteResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Custom j2-mid complete + /// + /// + /// + /// Default Value: j2-mid + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2MidCustomModelCompleteAsync( + string customModelName, + string? customModelType, + global::G.CompletionBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1J2MidCustomModelCompleteArguments( + httpClient: _httpClient, + customModelName: ref customModelName, + customModelType: ref customModelType, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/j2-mid/{customModelName}/complete?custom_model_type={customModelType}", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1J2MidCustomModelCompleteRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + customModelName: customModelName, + customModelType: customModelType, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1J2MidCustomModelCompleteResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1J2MidCustomModelCompleteResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Custom j2-mid complete + /// + /// + /// + /// Default Value: j2-mid + /// + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 16 + /// + /// + /// Default Value: 0 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 0 + /// + /// + /// + /// Default Value: 0 + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2MidCustomModelCompleteAsync( + string customModelName, + string prompt, + string? customModelType = "j2-mid", + int numResults = 1, + int maxTokens = 16, + int minTokens = 0, + double temperature = 1, + double topP = 1, + double minP = 0, + global::System.Collections.Generic.IList? stopSequences = default, + int topKReturn = 0, + global::G.CompletionBodyLogitBias? logitBias = default, + global::System.AllOf? frequencyPenalty = default, + global::System.AllOf? presencePenalty = default, + global::System.AllOf? countPenalty = default, + int epoch = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.CompletionBody + { + Prompt = prompt, + NumResults = numResults, + MaxTokens = maxTokens, + MinTokens = minTokens, + Temperature = temperature, + TopP = topP, + MinP = minP, + StopSequences = stopSequences, + TopKReturn = topKReturn, + LogitBias = logitBias, + FrequencyPenalty = frequencyPenalty, + PresencePenalty = presencePenalty, + CountPenalty = countPenalty, + Epoch = epoch, + }; + + return await V1J2MidCustomModelCompleteAsync( + customModelName: customModelName, + customModelType: customModelType, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2UltraComplete.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2UltraComplete.g.verified.cs new file mode 100644 index 0000000000..b86525c42a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2UltraComplete.g.verified.cs @@ -0,0 +1,184 @@ +//HintName: G.CompletionClient.V1J2UltraComplete.g.cs + +#nullable enable + +namespace G +{ + public partial class CompletionClient + { + partial void PrepareV1J2UltraCompleteArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? model, + global::G.CompletionBody request); + partial void PrepareV1J2UltraCompleteRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? model, + global::G.CompletionBody request); + partial void ProcessV1J2UltraCompleteResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1J2UltraCompleteResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// j2-ultra complete + /// + /// + /// Default Value: j2-ultra + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2UltraCompleteAsync( + string? model, + global::G.CompletionBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1J2UltraCompleteArguments( + httpClient: _httpClient, + model: ref model, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/j2-ultra/complete?model={model}", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1J2UltraCompleteRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + model: model, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1J2UltraCompleteResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1J2UltraCompleteResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// j2-ultra complete + /// + /// + /// Default Value: j2-ultra + /// + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 16 + /// + /// + /// Default Value: 0 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 0 + /// + /// + /// + /// Default Value: 0 + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2UltraCompleteAsync( + string prompt, + string? model = "j2-ultra", + int numResults = 1, + int maxTokens = 16, + int minTokens = 0, + double temperature = 1, + double topP = 1, + double minP = 0, + global::System.Collections.Generic.IList? stopSequences = default, + int topKReturn = 0, + global::G.CompletionBodyLogitBias? logitBias = default, + global::System.AllOf? frequencyPenalty = default, + global::System.AllOf? presencePenalty = default, + global::System.AllOf? countPenalty = default, + int epoch = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.CompletionBody + { + Prompt = prompt, + NumResults = numResults, + MaxTokens = maxTokens, + MinTokens = minTokens, + Temperature = temperature, + TopP = topP, + MinP = minP, + StopSequences = stopSequences, + TopKReturn = topKReturn, + LogitBias = logitBias, + FrequencyPenalty = frequencyPenalty, + PresencePenalty = presencePenalty, + CountPenalty = countPenalty, + Epoch = epoch, + }; + + return await V1J2UltraCompleteAsync( + model: model, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2UltraComplete2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2UltraComplete2.g.verified.cs new file mode 100644 index 0000000000..70162f1711 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.V1J2UltraComplete2.g.verified.cs @@ -0,0 +1,193 @@ +//HintName: G.CompletionClient.V1J2UltraComplete2.g.cs + +#nullable enable + +namespace G +{ + public partial class CompletionClient + { + partial void PrepareV1J2UltraComplete2Arguments( + global::System.Net.Http.HttpClient httpClient, + ref string customModelName, + ref string? customModelType, + global::G.CompletionBody request); + partial void PrepareV1J2UltraComplete2Request( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string customModelName, + string? customModelType, + global::G.CompletionBody request); + partial void ProcessV1J2UltraComplete2Response( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1J2UltraComplete2ResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Custom j2-ultra complete + /// + /// + /// + /// Default Value: j2-ultra + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2UltraComplete2Async( + string customModelName, + string? customModelType, + global::G.CompletionBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1J2UltraComplete2Arguments( + httpClient: _httpClient, + customModelName: ref customModelName, + customModelType: ref customModelType, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/j2-ultra/{customModelName}/complete?custom_model_type={customModelType}", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1J2UltraComplete2Request( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + customModelName: customModelName, + customModelType: customModelType, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1J2UltraComplete2Response( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1J2UltraComplete2ResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Custom j2-ultra complete + /// + /// + /// + /// Default Value: j2-ultra + /// + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 16 + /// + /// + /// Default Value: 0 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 0 + /// + /// + /// + /// Default Value: 0 + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1J2UltraComplete2Async( + string customModelName, + string prompt, + string? customModelType = "j2-ultra", + int numResults = 1, + int maxTokens = 16, + int minTokens = 0, + double temperature = 1, + double topP = 1, + double minP = 0, + global::System.Collections.Generic.IList? stopSequences = default, + int topKReturn = 0, + global::G.CompletionBodyLogitBias? logitBias = default, + global::System.AllOf? frequencyPenalty = default, + global::System.AllOf? presencePenalty = default, + global::System.AllOf? countPenalty = default, + int epoch = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.CompletionBody + { + Prompt = prompt, + NumResults = numResults, + MaxTokens = maxTokens, + MinTokens = minTokens, + Temperature = temperature, + TopP = topP, + MinP = minP, + StopSequences = stopSequences, + TopKReturn = topKReturn, + LogitBias = logitBias, + FrequencyPenalty = frequencyPenalty, + PresencePenalty = presencePenalty, + CountPenalty = countPenalty, + Epoch = epoch, + }; + + return await V1J2UltraComplete2Async( + customModelName: customModelName, + customModelType: customModelType, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.g.verified.cs new file mode 100644 index 0000000000..308e4f03ea --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CompletionClient.g.verified.cs @@ -0,0 +1,60 @@ +//HintName: G.CompletionClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class CompletionClient : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.ai21.com/"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::System.Text.Json.JsonSerializerOptions _jsonSerializerOptions; + + + /// + /// Creates a new instance of the CompletionClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public CompletionClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::System.Text.Json.JsonSerializerOptions(); + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CustomModelsClient.V1CreateCustomModel.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CustomModelsClient.V1CreateCustomModel.g.verified.cs new file mode 100644 index 0000000000..4b278afd1c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CustomModelsClient.V1CreateCustomModel.g.verified.cs @@ -0,0 +1,132 @@ +//HintName: G.CustomModelsClient.V1CreateCustomModel.g.cs + +#nullable enable + +namespace G +{ + public partial class CustomModelsClient + { + partial void PrepareV1CreateCustomModelArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.CustomModelInput request); + partial void PrepareV1CreateCustomModelRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.CustomModelInput request); + partial void ProcessV1CreateCustomModelResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1CreateCustomModelResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Create Custom Model + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1CreateCustomModelAsync( + global::G.CustomModelInput request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1CreateCustomModelArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/studio/v1/custom-model", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1CreateCustomModelRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1CreateCustomModelResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1CreateCustomModelResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Create Custom Model + /// + /// + /// An enumeration. + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1CreateCustomModelAsync( + global::G.CustomModelType modelType, + string datasetId, + string modelName, + double learningRate = default, + int numEpochs = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.CustomModelInput + { + ModelType = modelType, + LearningRate = learningRate, + NumEpochs = numEpochs, + DatasetId = datasetId, + ModelName = modelName, + }; + + return await V1CreateCustomModelAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CustomModelsClient.V1GetCustomModel.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CustomModelsClient.V1GetCustomModel.g.verified.cs new file mode 100644 index 0000000000..53443516d8 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CustomModelsClient.V1GetCustomModel.g.verified.cs @@ -0,0 +1,90 @@ +//HintName: G.CustomModelsClient.V1GetCustomModel.g.cs + +#nullable enable + +namespace G +{ + public partial class CustomModelsClient + { + partial void PrepareV1GetCustomModelArguments( + global::System.Net.Http.HttpClient httpClient, + ref string customModelPid); + partial void PrepareV1GetCustomModelRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string customModelPid); + partial void ProcessV1GetCustomModelResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1GetCustomModelResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get Custom Model + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1GetCustomModelAsync( + string customModelPid, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV1GetCustomModelArguments( + httpClient: _httpClient, + customModelPid: ref customModelPid); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/custom-model/{customModelPid}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1GetCustomModelRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + customModelPid: customModelPid); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1GetCustomModelResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1GetCustomModelResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CustomModelsClient.V1GetCustomModels.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CustomModelsClient.V1GetCustomModels.g.verified.cs new file mode 100644 index 0000000000..80bb80c5ff --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CustomModelsClient.V1GetCustomModels.g.verified.cs @@ -0,0 +1,92 @@ +//HintName: G.CustomModelsClient.V1GetCustomModels.g.cs + +#nullable enable + +namespace G +{ + public partial class CustomModelsClient + { + partial void PrepareV1GetCustomModelsArguments( + global::System.Net.Http.HttpClient httpClient, + ref bool includeMetadata); + partial void PrepareV1GetCustomModelsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + bool includeMetadata); + partial void ProcessV1GetCustomModelsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1GetCustomModelsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get Custom Models List + /// + /// + /// Default Value: false + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1GetCustomModelsAsync( + bool includeMetadata, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV1GetCustomModelsArguments( + httpClient: _httpClient, + includeMetadata: ref includeMetadata); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/custom-model?includeMetadata={includeMetadata}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1GetCustomModelsRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + includeMetadata: includeMetadata); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1GetCustomModelsResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1GetCustomModelsResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CustomModelsClient.V1UpdateCustomModel.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CustomModelsClient.V1UpdateCustomModel.g.verified.cs new file mode 100644 index 0000000000..3823606a70 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CustomModelsClient.V1UpdateCustomModel.g.verified.cs @@ -0,0 +1,127 @@ +//HintName: G.CustomModelsClient.V1UpdateCustomModel.g.cs + +#nullable enable + +namespace G +{ + public partial class CustomModelsClient + { + partial void PrepareV1UpdateCustomModelArguments( + global::System.Net.Http.HttpClient httpClient, + ref string customModelPid, + global::G.CustomModelUpdateBody request); + partial void PrepareV1UpdateCustomModelRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string customModelPid, + global::G.CustomModelUpdateBody request); + partial void ProcessV1UpdateCustomModelResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1UpdateCustomModelResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Update Model + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1UpdateCustomModelAsync( + string customModelPid, + global::G.CustomModelUpdateBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1UpdateCustomModelArguments( + httpClient: _httpClient, + customModelPid: ref customModelPid, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Put, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/custom-model/{customModelPid}", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1UpdateCustomModelRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + customModelPid: customModelPid, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1UpdateCustomModelResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1UpdateCustomModelResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Update Model + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1UpdateCustomModelAsync( + string customModelPid, + int defaultEpoch = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.CustomModelUpdateBody + { + DefaultEpoch = defaultEpoch, + }; + + return await V1UpdateCustomModelAsync( + customModelPid: customModelPid, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CustomModelsClient.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CustomModelsClient.g.verified.cs new file mode 100644 index 0000000000..a0707c60c3 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.CustomModelsClient.g.verified.cs @@ -0,0 +1,60 @@ +//HintName: G.CustomModelsClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class CustomModelsClient : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.ai21.com/"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::System.Text.Json.JsonSerializerOptions _jsonSerializerOptions; + + + /// + /// Creates a new instance of the CustomModelsClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public CustomModelsClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::System.Text.Json.JsonSerializerOptions(); + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.DatasetsClient.V1DeleteDataset.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.DatasetsClient.V1DeleteDataset.g.verified.cs new file mode 100644 index 0000000000..b10467496c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.DatasetsClient.V1DeleteDataset.g.verified.cs @@ -0,0 +1,90 @@ +//HintName: G.DatasetsClient.V1DeleteDataset.g.cs + +#nullable enable + +namespace G +{ + public partial class DatasetsClient + { + partial void PrepareV1DeleteDatasetArguments( + global::System.Net.Http.HttpClient httpClient, + ref string datasetPid); + partial void PrepareV1DeleteDatasetRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string datasetPid); + partial void ProcessV1DeleteDatasetResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1DeleteDatasetResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Delete Dataset + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1DeleteDatasetAsync( + string datasetPid, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV1DeleteDatasetArguments( + httpClient: _httpClient, + datasetPid: ref datasetPid); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Delete, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/dataset/{datasetPid}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1DeleteDatasetRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + datasetPid: datasetPid); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1DeleteDatasetResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1DeleteDatasetResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.DatasetsClient.V1GetDataset.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.DatasetsClient.V1GetDataset.g.verified.cs new file mode 100644 index 0000000000..53afecbf24 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.DatasetsClient.V1GetDataset.g.verified.cs @@ -0,0 +1,90 @@ +//HintName: G.DatasetsClient.V1GetDataset.g.cs + +#nullable enable + +namespace G +{ + public partial class DatasetsClient + { + partial void PrepareV1GetDatasetArguments( + global::System.Net.Http.HttpClient httpClient, + ref string datasetPid); + partial void PrepareV1GetDatasetRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string datasetPid); + partial void ProcessV1GetDatasetResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1GetDatasetResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Dataset Get + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1GetDatasetAsync( + string datasetPid, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV1GetDatasetArguments( + httpClient: _httpClient, + datasetPid: ref datasetPid); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/dataset/{datasetPid}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1GetDatasetRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + datasetPid: datasetPid); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1GetDatasetResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1GetDatasetResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.DatasetsClient.V1GetDatasetDownloadUrl.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.DatasetsClient.V1GetDatasetDownloadUrl.g.verified.cs new file mode 100644 index 0000000000..8b1900f786 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.DatasetsClient.V1GetDatasetDownloadUrl.g.verified.cs @@ -0,0 +1,96 @@ +//HintName: G.DatasetsClient.V1GetDatasetDownloadUrl.g.cs + +#nullable enable + +namespace G +{ + public partial class DatasetsClient + { + partial void PrepareV1GetDatasetDownloadUrlArguments( + global::System.Net.Http.HttpClient httpClient, + ref string datasetPid, + ref string datasetName); + partial void PrepareV1GetDatasetDownloadUrlRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string datasetPid, + string datasetName); + partial void ProcessV1GetDatasetDownloadUrlResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1GetDatasetDownloadUrlResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Dataset Download Url + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1GetDatasetDownloadUrlAsync( + string datasetPid, + string datasetName, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV1GetDatasetDownloadUrlArguments( + httpClient: _httpClient, + datasetPid: ref datasetPid, + datasetName: ref datasetName); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/dataset/url/{datasetPid}?dataset_name={datasetName}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1GetDatasetDownloadUrlRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + datasetPid: datasetPid, + datasetName: datasetName); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1GetDatasetDownloadUrlResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1GetDatasetDownloadUrlResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.DatasetsClient.V1GetDatasets.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.DatasetsClient.V1GetDatasets.g.verified.cs new file mode 100644 index 0000000000..05de278642 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.DatasetsClient.V1GetDatasets.g.verified.cs @@ -0,0 +1,84 @@ +//HintName: G.DatasetsClient.V1GetDatasets.g.cs + +#nullable enable + +namespace G +{ + public partial class DatasetsClient + { + partial void PrepareV1GetDatasetsArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareV1GetDatasetsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessV1GetDatasetsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1GetDatasetsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Dataset List + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1GetDatasetsAsync( + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV1GetDatasetsArguments( + httpClient: _httpClient); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/studio/v1/dataset", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1GetDatasetsRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1GetDatasetsResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1GetDatasetsResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.DatasetsClient.V1UploadDataset.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.DatasetsClient.V1UploadDataset.g.verified.cs new file mode 100644 index 0000000000..614b7c6cb2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.DatasetsClient.V1UploadDataset.g.verified.cs @@ -0,0 +1,171 @@ +//HintName: G.DatasetsClient.V1UploadDataset.g.cs + +#nullable enable + +namespace G +{ + public partial class DatasetsClient + { + partial void PrepareV1UploadDatasetArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.BodyV1UploadDataset request); + partial void PrepareV1UploadDatasetRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.BodyV1UploadDataset request); + partial void ProcessV1UploadDatasetResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1UploadDatasetResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Add Dataset + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1UploadDatasetAsync( + global::G.BodyV1UploadDataset request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1UploadDatasetArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/studio/v1/dataset", global::System.UriKind.RelativeOrAbsolute)); + using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + __httpRequestContent.Add( + content: new global::System.Net.Http.ByteArrayContent(request.DatasetFile ?? global::System.Array.Empty()) + { + Headers = + { + ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("multipart/form-data"), + }, + }, + name: "dataset_file", + fileName: request.DatasetFilename ?? string.Empty); + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.DatasetName}"), + name: "dataset_name"); + if (request.SelectedColumns != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.SelectedColumns}"), + name: "selected_columns"); + } + if (request.ApproveWhitespaceCorrection != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.ApproveWhitespaceCorrection}"), + name: "approve_whitespace_correction"); + } + if (request.DeleteLongRows != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.DeleteLongRows}"), + name: "delete_long_rows"); + } + if (request.SplitRatio != 0.1) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.SplitRatio}"), + name: "split_ratio"); + } + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1UploadDatasetRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1UploadDatasetResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1UploadDatasetResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Add Dataset + /// + /// + /// + /// + /// + /// + /// + /// + /// Default Value: 0.1 + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1UploadDatasetAsync( + byte[] datasetFile, + string datasetFilename, + string datasetName, + string? selectedColumns = default, + bool approveWhitespaceCorrection = default, + bool deleteLongRows = default, + double splitRatio = 0.1, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.BodyV1UploadDataset + { + DatasetFile = datasetFile, + DatasetFilename = datasetFilename, + DatasetName = datasetName, + SelectedColumns = selectedColumns, + ApproveWhitespaceCorrection = approveWhitespaceCorrection, + DeleteLongRows = deleteLongRows, + SplitRatio = splitRatio, + }; + + return await V1UploadDatasetAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.DatasetsClient.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.DatasetsClient.g.verified.cs new file mode 100644 index 0000000000..d075385f0e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.DatasetsClient.g.verified.cs @@ -0,0 +1,60 @@ +//HintName: G.DatasetsClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class DatasetsClient : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.ai21.com/"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::System.Text.Json.JsonSerializerOptions _jsonSerializerOptions; + + + /// + /// Creates a new instance of the DatasetsClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public DatasetsClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::System.Text.Json.JsonSerializerOptions(); + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.GrammaticalErrorCorrectionsClient.V1Corrections.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.GrammaticalErrorCorrectionsClient.V1Corrections.g.verified.cs new file mode 100644 index 0000000000..71f2e10dfc --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.GrammaticalErrorCorrectionsClient.V1Corrections.g.verified.cs @@ -0,0 +1,118 @@ +//HintName: G.GrammaticalErrorCorrectionsClient.V1Corrections.g.cs + +#nullable enable + +namespace G +{ + public partial class GrammaticalErrorCorrectionsClient + { + partial void PrepareV1CorrectionsArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.CorrectionsBody request); + partial void PrepareV1CorrectionsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.CorrectionsBody request); + partial void ProcessV1CorrectionsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1CorrectionsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Grammatical Error Corrections + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1CorrectionsAsync( + global::G.CorrectionsBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1CorrectionsArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/studio/v1/gec", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1CorrectionsRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1CorrectionsResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1CorrectionsResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Grammatical Error Corrections + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1CorrectionsAsync( + string text, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.CorrectionsBody + { + Text = text, + }; + + return await V1CorrectionsAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.GrammaticalErrorCorrectionsClient.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.GrammaticalErrorCorrectionsClient.g.verified.cs new file mode 100644 index 0000000000..fd1739ebf6 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.GrammaticalErrorCorrectionsClient.g.verified.cs @@ -0,0 +1,60 @@ +//HintName: G.GrammaticalErrorCorrectionsClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class GrammaticalErrorCorrectionsClient : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.ai21.com/"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::System.Text.Json.JsonSerializerOptions _jsonSerializerOptions; + + + /// + /// Creates a new instance of the GrammaticalErrorCorrectionsClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public GrammaticalErrorCorrectionsClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::System.Text.Json.JsonSerializerOptions(); + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.JambaCompleteClient.V1ChatComplete.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.JambaCompleteClient.V1ChatComplete.g.verified.cs new file mode 100644 index 0000000000..227c0045c2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.JambaCompleteClient.V1ChatComplete.g.verified.cs @@ -0,0 +1,187 @@ +//HintName: G.JambaCompleteClient.V1ChatComplete.g.cs + +#nullable enable + +namespace G +{ + public partial class JambaCompleteClient + { + partial void PrepareV1ChatCompleteArguments( + global::System.Net.Http.HttpClient httpClient, + ref string authorization, + global::G.LanguageStudioApiServerDataTypesChatChatRequest request); + partial void PrepareV1ChatCompleteRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string authorization, + global::G.LanguageStudioApiServerDataTypesChatChatRequest request); + partial void ProcessV1ChatCompleteResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1ChatCompleteResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Chat Complete
+ /// This is the endpoint for the [Jamba Instruct model](https://docs.ai21.com/docs/jamba-models).
+ /// This is a foundation model that supports both single-turn (question answering,
+ /// text completion) and multi-turn (chat style) interactions.
+ /// You can optionally stream results if you want to get the response as each
+ /// token is generated, rather than waiting for the entire response. + ///
+ /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> V1ChatCompleteAsync( + string authorization, + global::G.LanguageStudioApiServerDataTypesChatChatRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1ChatCompleteArguments( + httpClient: _httpClient, + authorization: ref authorization, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/studio/v1/chat/completions", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1ChatCompleteRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + authorization: authorization, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1ChatCompleteResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1ChatCompleteResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize>?>(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Chat Complete
+ /// This is the endpoint for the [Jamba Instruct model](https://docs.ai21.com/docs/jamba-models).
+ /// This is a foundation model that supports both single-turn (question answering,
+ /// text completion) and multi-turn (chat style) interactions.
+ /// You can optionally stream results if you want to get the response as each
+ /// token is generated, rather than waiting for the entire response. + ///
+ /// + /// + /// An enumeration. + /// + /// + /// messages + /// + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 4096 + /// + /// + /// + /// Default Value: 1 + /// + /// + /// + /// Whether or not to stream the result one token at a time using
+ /// [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events).
+ /// This can be useful when waiting for long results where a long wait time for an
+ /// answer can be problematic, such as a chatbot. If set to `True`, then `n` must
+ /// be 1. A streaming response is different than the non-streaming response.
+ /// Default Value: false + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> V1ChatCompleteAsync( + string authorization, + global::G.ModelName model, + global::System.Collections.Generic.IList> messages, + global::System.Collections.Generic.IList? tools = default, + int n = 1, + int maxTokens = 4096, + double temperature = default, + double topP = 1, + global::System.AnyOf>? stop = default, + bool stream = false, + global::G.MockResponseConfig? mockResponse = default, + global::System.Collections.Generic.IList? documents = default, + global::System.AllOf? responseFormat = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.LanguageStudioApiServerDataTypesChatChatRequest + { + Model = model, + Messages = messages, + Tools = tools, + N = n, + MaxTokens = maxTokens, + Temperature = temperature, + TopP = topP, + Stop = stop, + Stream = stream, + MockResponse = mockResponse, + Documents = documents, + ResponseFormat = responseFormat, + }; + + return await V1ChatCompleteAsync( + authorization: authorization, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.JambaCompleteClient.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.JambaCompleteClient.g.verified.cs new file mode 100644 index 0000000000..ba3843356d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.JambaCompleteClient.g.verified.cs @@ -0,0 +1,60 @@ +//HintName: G.JambaCompleteClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class JambaCompleteClient : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.ai21.com/"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::System.Text.Json.JsonSerializerOptions _jsonSerializerOptions; + + + /// + /// Creates a new instance of the JambaCompleteClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public JambaCompleteClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::System.Text.Json.JsonSerializerOptions(); + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.LibraryManagementClient.V1LibraryDelete.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.LibraryManagementClient.V1LibraryDelete.g.verified.cs new file mode 100644 index 0000000000..1cfa6e4b71 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.LibraryManagementClient.V1LibraryDelete.g.verified.cs @@ -0,0 +1,93 @@ +//HintName: G.LibraryManagementClient.V1LibraryDelete.g.cs + +#nullable enable + +namespace G +{ + public partial class LibraryManagementClient + { + partial void PrepareV1LibraryDeleteArguments( + global::System.Net.Http.HttpClient httpClient, + ref string fileId); + partial void PrepareV1LibraryDeleteRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string fileId); + partial void ProcessV1LibraryDeleteResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1LibraryDeleteResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Delete File
+ /// Delete the specified file from the library.
+ /// **Restrictions**:
+ /// Files in `PROCESSING` status cannot be deleted. Attempts to delete such files will result in a <span style="color:red">422</span> error. + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1LibraryDeleteAsync( + string fileId, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV1LibraryDeleteArguments( + httpClient: _httpClient, + fileId: ref fileId); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Delete, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/library/files/{fileId}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1LibraryDeleteRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + fileId: fileId); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1LibraryDeleteResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1LibraryDeleteResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.LibraryManagementClient.V1LibraryManagement.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.LibraryManagementClient.V1LibraryManagement.g.verified.cs new file mode 100644 index 0000000000..6bad7962a7 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.LibraryManagementClient.V1LibraryManagement.g.verified.cs @@ -0,0 +1,127 @@ +//HintName: G.LibraryManagementClient.V1LibraryManagement.g.cs +using System.Linq; + +#nullable enable + +namespace G +{ + public partial class LibraryManagementClient + { + partial void PrepareV1LibraryManagementArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? name, + ref string? path, + ref global::G.FileStatus? status, + global::System.Collections.Generic.IList? label, + ref int limit, + ref int offset); + partial void PrepareV1LibraryManagementRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? name, + string? path, + global::G.FileStatus? status, + global::System.Collections.Generic.IList? label, + int limit, + int offset); + partial void ProcessV1LibraryManagementResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1LibraryManagementResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get Organization Files
+ /// Get metadata about a specific file by file ID. The file ID is generated by
+ /// AI21 when you upload the file. + ///
+ /// + /// + /// + /// An enumeration. + /// + /// + /// + /// Default Value: 1000 + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> V1LibraryManagementAsync( + string? name, + string? path, + global::G.FileStatus? status, + global::System.Collections.Generic.IList? label, + int limit, + int offset, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV1LibraryManagementArguments( + httpClient: _httpClient, + name: ref name, + path: ref path, + status: ref status, + label: label, + limit: ref limit, + offset: ref offset); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/library/files?name={name}&path={path}&status={status}&{string.Join("&", label?.Select(static x => $"label={x}") ?? global::System.Array.Empty())}&limit={limit}&offset={offset}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1LibraryManagementRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + name: name, + path: path, + status: status, + label: label, + limit: limit, + offset: offset); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1LibraryManagementResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1LibraryManagementResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize?>(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.LibraryManagementClient.V1LibraryManagement2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.LibraryManagementClient.V1LibraryManagement2.g.verified.cs new file mode 100644 index 0000000000..fb1adb4a9b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.LibraryManagementClient.V1LibraryManagement2.g.verified.cs @@ -0,0 +1,98 @@ +//HintName: G.LibraryManagementClient.V1LibraryManagement2.g.cs + +#nullable enable + +namespace G +{ + public partial class LibraryManagementClient + { + partial void PrepareV1LibraryManagement2Arguments( + global::System.Net.Http.HttpClient httpClient, + ref string fileId); + partial void PrepareV1LibraryManagement2Request( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string fileId); + partial void ProcessV1LibraryManagement2Response( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1LibraryManagement2ResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get File By Id
+ /// Retrieve a list of documents in the user's library. Optionally specify a
+ /// filter to find only files with matching labels or paths. This method
+ /// returns only metadata about files; to download a file, call
+ /// `GET .../files/{file_id}/download`
+ /// When specifying qualifiers with your request, only files that match
+ /// _all_ qualifiers will be returns. So, for example, if you specify
+ /// `label='financial'` and `status='UPLOADED'`, only files with the label
+ /// "financial" AND status UPLOADED will be returned. + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1LibraryManagement2Async( + string fileId, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV1LibraryManagement2Arguments( + httpClient: _httpClient, + fileId: ref fileId); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/library/files/{fileId}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1LibraryManagement2Request( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + fileId: fileId); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1LibraryManagement2Response( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1LibraryManagement2ResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.LibraryManagementClient.V1LibraryManagement3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.LibraryManagementClient.V1LibraryManagement3.g.verified.cs new file mode 100644 index 0000000000..fa244f0aee --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.LibraryManagementClient.V1LibraryManagement3.g.verified.cs @@ -0,0 +1,153 @@ +//HintName: G.LibraryManagementClient.V1LibraryManagement3.g.cs + +#nullable enable + +namespace G +{ + public partial class LibraryManagementClient + { + partial void PrepareV1LibraryManagement3Arguments( + global::System.Net.Http.HttpClient httpClient, + ref string fileId, + global::G.FilesUpdateRequest request); + partial void PrepareV1LibraryManagement3Request( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string fileId, + global::G.FilesUpdateRequest request); + partial void ProcessV1LibraryManagement3Response( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1LibraryManagement3ResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Update File
+ /// Update the specified parameters of a specific document in the user's library.
+ /// This operation currently supports updating the publicUrl and labels parameters.
+ /// > **This operation overwrites the specified items with the new data you provide.**
+ /// > If you wish to add new labels to the labels list without removing the existing ones,
+ /// > you must submit a labels list that includes both the current and new labels.**
+ /// >
+ /// > For instance, if the current labels are "Label A" and "Label B", and you wish to
+ /// > add "New Label C" and "New Label D" to the list, you must specify `"labels": ["Label A", "Label B", "New Label C", "New Label D"]`. + ///
+ /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1LibraryManagement3Async( + string fileId, + global::G.FilesUpdateRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1LibraryManagement3Arguments( + httpClient: _httpClient, + fileId: ref fileId, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Put, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/library/files/{fileId}", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1LibraryManagement3Request( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + fileId: fileId, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1LibraryManagement3Response( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1LibraryManagement3ResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Update File
+ /// Update the specified parameters of a specific document in the user's library.
+ /// This operation currently supports updating the publicUrl and labels parameters.
+ /// > **This operation overwrites the specified items with the new data you provide.**
+ /// > If you wish to add new labels to the labels list without removing the existing ones,
+ /// > you must submit a labels list that includes both the current and new labels.**
+ /// >
+ /// > For instance, if the current labels are "Label A" and "Label B", and you wish to
+ /// > add "New Label C" and "New Label D" to the list, you must specify `"labels": ["Label A", "Label B", "New Label C", "New Label D"]`. + ///
+ /// + /// + /// The public URL of the file, if any. This URL is not validated by
+ /// AI21 or used in any way. It is strictly a piece of metadata that you can
+ /// optionally attach to a file. + /// + /// + /// Any labels to associate with this file. Separate multiple labels with commas. If
+ /// provided, will overwrite all existing labels. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1LibraryManagement3Async( + string fileId, + string? publicUrl = default, + global::System.Collections.Generic.IList? labels = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.FilesUpdateRequest + { + PublicUrl = publicUrl, + Labels = labels, + }; + + return await V1LibraryManagement3Async( + fileId: fileId, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.LibraryManagementClient.V1LibraryUpload.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.LibraryManagementClient.V1LibraryUpload.g.verified.cs new file mode 100644 index 0000000000..1e3bd45ee6 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.LibraryManagementClient.V1LibraryUpload.g.verified.cs @@ -0,0 +1,176 @@ +//HintName: G.LibraryManagementClient.V1LibraryUpload.g.cs +using System.Linq; + +#nullable enable + +namespace G +{ + public partial class LibraryManagementClient + { + partial void PrepareV1LibraryUploadArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.BodyV1LibraryUpload request); + partial void PrepareV1LibraryUploadRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.BodyV1LibraryUpload request); + partial void ProcessV1LibraryUploadResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1LibraryUploadResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Upload Organization File
+ /// Upload files to use for [RAG Engine document searches](https://docs.ai21.com/docs/rag-engine-overview).
+ /// You can assign metadata to your files to limit searches to specific files by file metadata.
+ /// There is no bulk upload method; files must be loaded one at a time.
+ /// - **Max number of files:** No limit. The playground limits bulk uploads to 50 files per request.
+ /// - **Max library size:** 1 GB total size. No limit to individual file size.
+ /// - **Supported file types:** PDF, DocX, HTML, TXT + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1LibraryUploadAsync( + global::G.BodyV1LibraryUpload request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1LibraryUploadArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/studio/v1/library/files", global::System.UriKind.RelativeOrAbsolute)); + using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + __httpRequestContent.Add( + content: new global::System.Net.Http.ByteArrayContent(request.File ?? global::System.Array.Empty()) + { + Headers = + { + ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("multipart/form-data"), + }, + }, + name: "file", + fileName: request.Filename ?? string.Empty); + if (request.Path != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Path}"), + name: "path"); + } + if (request.Labels != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"[{string.Join(",", request.Labels.Select(x => x))}]"), + name: "labels"); + } + if (request.PublicUrl != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.PublicUrl}"), + name: "publicUrl"); + } + if (request.CustomConfigs != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.CustomConfigs}"), + name: "custom_configs"); + } + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1LibraryUploadRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1LibraryUploadResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1LibraryUploadResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Upload Organization File
+ /// Upload files to use for [RAG Engine document searches](https://docs.ai21.com/docs/rag-engine-overview).
+ /// You can assign metadata to your files to limit searches to specific files by file metadata.
+ /// There is no bulk upload method; files must be loaded one at a time.
+ /// - **Max number of files:** No limit. The playground limits bulk uploads to 50 files per request.
+ /// - **Max library size:** 1 GB total size. No limit to individual file size.
+ /// - **Supported file types:** PDF, DocX, HTML, TXT + ///
+ /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1LibraryUploadAsync( + byte[] file, + string filename, + string? path = default, + global::System.Collections.Generic.IList? labels = default, + string? publicUrl = default, + string? customConfigs = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.BodyV1LibraryUpload + { + File = file, + Filename = filename, + Path = path, + Labels = labels, + PublicUrl = publicUrl, + CustomConfigs = customConfigs, + }; + + return await V1LibraryUploadAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.LibraryManagementClient.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.LibraryManagementClient.g.verified.cs new file mode 100644 index 0000000000..93af10f94a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.LibraryManagementClient.g.verified.cs @@ -0,0 +1,60 @@ +//HintName: G.LibraryManagementClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class LibraryManagementClient : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.ai21.com/"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::System.Text.Json.JsonSerializerOptions _jsonSerializerOptions; + + + /// + /// Creates a new instance of the LibraryManagementClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public LibraryManagementClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::System.Text.Json.JsonSerializerOptions(); + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.AnswerBody.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.AnswerBody.g.verified.cs new file mode 100644 index 0000000000..8c6e1ff356 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.AnswerBody.g.verified.cs @@ -0,0 +1,46 @@ +//HintName: G.Models.AnswerBody.g.cs + +#nullable enable + +namespace G +{ + /// + /// This class is to be used as a common class to all Studio API requests payloads + /// + public sealed partial class AnswerBody + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("context")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Context { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("question")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Question { get; set; } + + /// + /// An enumeration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("answerLength")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AnswerLengthJsonConverter))] + public global::G.AnswerLength? AnswerLength { get; set; } + + /// + /// An enumeration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("mode")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.ModeJsonConverter))] + public global::G.Mode? Mode { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.AnswerLength.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.AnswerLength.g.verified.cs new file mode 100644 index 0000000000..6c5bf134d6 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.AnswerLength.g.verified.cs @@ -0,0 +1,58 @@ +//HintName: G.Models.AnswerLength.g.cs + +#nullable enable + +namespace G +{ + /// + /// An enumeration. + /// + public enum AnswerLength + { + /// + /// + /// + Short, + /// + /// + /// + Medium, + /// + /// + /// + Long, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class AnswerLengthExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this AnswerLength value) + { + return value switch + { + AnswerLength.Short => "short", + AnswerLength.Medium => "medium", + AnswerLength.Long => "long", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static AnswerLength? ToEnum(string value) + { + return value switch + { + "short" => AnswerLength.Short, + "medium" => AnswerLength.Medium, + "long" => AnswerLength.Long, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.AssistantMessage.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.AssistantMessage.g.verified.cs new file mode 100644 index 0000000000..674ab480cd --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.AssistantMessage.g.verified.cs @@ -0,0 +1,47 @@ +//HintName: G.Models.AssistantMessage.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class AssistantMessage + { + /// + /// The role of an individual message.
+ /// - `user`: Input provided by the user. Any instructions given here that conflict
+ /// with instructions given in the `system` prompt take precedence over the `system`
+ /// prompt instructions.
+ /// - `assistant`: Response generated by the model.
+ /// - `system`: Initial instructions provided to the system to provide general guidance
+ /// on the tone and voice of the generated message. An initial system message is
+ /// optional but recommended to provide guidance on the tone of the chat. For
+ /// example, "You are a helpful chatbot with a background in earth sciences and a
+ /// charming French accent."
+ /// Default Value: assistant + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("role")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AssistantMessageRoleJsonConverter))] + public global::G.AssistantMessageRole? Role { get; set; } = global::G.AssistantMessageRole.Assistant; + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("content")] + public string? Content { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tool_calls")] + public global::System.Collections.Generic.IList? ToolCalls { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.AssistantMessageRole.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.AssistantMessageRole.g.verified.cs new file mode 100644 index 0000000000..14c902fd07 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.AssistantMessageRole.g.verified.cs @@ -0,0 +1,56 @@ +//HintName: G.Models.AssistantMessageRole.g.cs + +#nullable enable + +namespace G +{ + /// + /// The role of an individual message.
+ /// - `user`: Input provided by the user. Any instructions given here that conflict
+ /// with instructions given in the `system` prompt take precedence over the `system`
+ /// prompt instructions.
+ /// - `assistant`: Response generated by the model.
+ /// - `system`: Initial instructions provided to the system to provide general guidance
+ /// on the tone and voice of the generated message. An initial system message is
+ /// optional but recommended to provide guidance on the tone of the chat. For
+ /// example, "You are a helpful chatbot with a background in earth sciences and a
+ /// charming French accent."
+ /// Default Value: assistant + ///
+ public enum AssistantMessageRole + { + /// + /// + /// + Assistant, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class AssistantMessageRoleExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this AssistantMessageRole value) + { + return value switch + { + AssistantMessageRole.Assistant => "assistant", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static AssistantMessageRole? ToEnum(string value) + { + return value switch + { + "assistant" => AssistantMessageRole.Assistant, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.BodyConvertDocumentFileStudioV1ChatFilesConvertPost.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.BodyConvertDocumentFileStudioV1ChatFilesConvertPost.g.verified.cs new file mode 100644 index 0000000000..608187f376 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.BodyConvertDocumentFileStudioV1ChatFilesConvertPost.g.verified.cs @@ -0,0 +1,25 @@ +//HintName: G.Models.BodyConvertDocumentFileStudioV1ChatFilesConvertPost.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class BodyConvertDocumentFileStudioV1ChatFilesConvertPost + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("files")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Files { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.BodyV1LibraryUpload.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.BodyV1LibraryUpload.g.verified.cs new file mode 100644 index 0000000000..f80744693b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.BodyV1LibraryUpload.g.verified.cs @@ -0,0 +1,56 @@ +//HintName: G.Models.BodyV1LibraryUpload.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class BodyV1LibraryUpload + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("file")] + [global::System.Text.Json.Serialization.JsonRequired] + public required byte[] File { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("filename")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Filename { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("path")] + public string? Path { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("labels")] + public global::System.Collections.Generic.IList? Labels { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("publicUrl")] + public string? PublicUrl { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("custom_configs")] + public string? CustomConfigs { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.BodyV1UploadDataset.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.BodyV1UploadDataset.g.verified.cs new file mode 100644 index 0000000000..e34ad7e3cd --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.BodyV1UploadDataset.g.verified.cs @@ -0,0 +1,63 @@ +//HintName: G.Models.BodyV1UploadDataset.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class BodyV1UploadDataset + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("dataset_file")] + [global::System.Text.Json.Serialization.JsonRequired] + public required byte[] DatasetFile { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("dataset_filename")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string DatasetFilename { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("dataset_name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string DatasetName { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("selected_columns")] + public string? SelectedColumns { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("approve_whitespace_correction")] + public bool ApproveWhitespaceCorrection { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("delete_long_rows")] + public bool DeleteLongRows { get; set; } + + /// + /// Default Value: 0.1 + /// + [global::System.Text.Json.Serialization.JsonPropertyName("split_ratio")] + public double SplitRatio { get; set; } = 0.1; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatCompletion.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatCompletion.g.verified.cs new file mode 100644 index 0000000000..598e3fc1aa --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatCompletion.g.verified.cs @@ -0,0 +1,47 @@ +//HintName: G.Models.ChatCompletion.g.cs + +#nullable enable + +namespace G +{ + /// + /// Used for non-streaming responses. Streaming responses return `ChatCompletionVllmStreamingMessage`. + /// + public sealed partial class ChatCompletion + { + /// + /// A unique ID for the request (not the message). Repeated identical requests
+ /// get different IDs. However, for a streaming response, the ID will be the same
+ /// for all responses in the stream. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// One or more responses, depending on the `n` parameter from the request. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("choices")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Choices { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("usage")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.UsageInfo Usage { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("meta")] + public global::G.ChatCompletionMeta? Meta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatCompletionMeta.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatCompletionMeta.g.verified.cs new file mode 100644 index 0000000000..fb7a811a40 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatCompletionMeta.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.ChatCompletionMeta.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatCompletionMeta + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatCompletionResponseChoice.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatCompletionResponseChoice.g.verified.cs new file mode 100644 index 0000000000..74f491798e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatCompletionResponseChoice.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: G.Models.ChatCompletionResponseChoice.g.cs + +#nullable enable + +namespace G +{ + /// + /// A single possible response generated by the system. For non-streaming replies, There
+ /// can be multiple responses, depending on what `n` value you specified in the request. + ///
+ public sealed partial class ChatCompletionResponseChoice + { + /// + /// Zero-based index of the message in the list of messages. Note that this might not
+ /// correspond with the position in the response list. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("index")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Index { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("message")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.AssistantMessage Message { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("logprobs")] + public global::G.Logprobs? Logprobs { get; set; } + + /// + /// Why the message ended. Possible reasons:
+ /// - `stop`: The response ended naturally as a complete answer (due to
+ /// [end-of-sequence token](https://huggingface.co/docs/transformers/v4.32.1/en/llm_tutorial#generate-text))
+ /// or because the model generated a stop sequence provided in the request.
+ /// - `length`: The response ended by reaching `max_tokens`. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("finish_reason")] + public string? FinishReason { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatCompletionResponseDeltaChoice.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatCompletionResponseDeltaChoice.g.verified.cs new file mode 100644 index 0000000000..9c875cbf8f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatCompletionResponseDeltaChoice.g.verified.cs @@ -0,0 +1,53 @@ +//HintName: G.Models.ChatCompletionResponseDeltaChoice.g.cs + +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatCompletionResponseDeltaChoice + { + /// + /// Always zero in streamed responses. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("index")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Index { get; set; } + + /// + /// - **The first message** in the stream will be an object set to `{"role":"assistant"}`.
+ /// - **Subsequent messages** will have an object `{"content": __token__}` with the generated token. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("delta")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AnyOfJsonConverterFactory2))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.AnyOf Delta { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("logprobs")] + public global::G.Logprobs? Logprobs { get; set; } + + /// + /// One of the following string values:
+ /// - `null`: All messages but the last will return null for `finish_reason`.
+ /// - `stop`: The response ended naturally as a complete answer (due to
+ /// [end-of-sequence token](https://huggingface.co/docs/transformers/v4.32.1/en/llm_tutorial#generate-text))
+ /// or because the model generated a stop sequence provided in the request.
+ /// - `length`: The response ended by reaching `max_tokens`. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("finish_reason")] + public string? FinishReason { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatCompletionVllmStreamingMessage.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatCompletionVllmStreamingMessage.g.verified.cs new file mode 100644 index 0000000000..989d7e5711 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatCompletionVllmStreamingMessage.g.verified.cs @@ -0,0 +1,46 @@ +//HintName: G.Models.ChatCompletionVllmStreamingMessage.g.cs + +#nullable enable + +namespace G +{ + /// + /// Returned for streaming messages. Non-streaming responses return `ChatCompletion`. + /// + public sealed partial class ChatCompletionVllmStreamingMessage + { + /// + /// A unique ID for the request (not the message). Repeated identical requests
+ /// get different IDs. However, for a streaming response, the ID will be the same
+ /// for all responses in the stream. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// The message + /// + [global::System.Text.Json.Serialization.JsonPropertyName("choices")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Choices { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("usage")] + public global::G.UsageInfo? Usage { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("meta")] + public global::G.ChatCompletionVllmStreamingMessageMeta? Meta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatCompletionVllmStreamingMessageMeta.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatCompletionVllmStreamingMessageMeta.g.verified.cs new file mode 100644 index 0000000000..d896919233 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatCompletionVllmStreamingMessageMeta.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.ChatCompletionVllmStreamingMessageMeta.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatCompletionVllmStreamingMessageMeta + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatMessage.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatMessage.g.verified.cs new file mode 100644 index 0000000000..e63eeeb6e5 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatMessage.g.verified.cs @@ -0,0 +1,33 @@ +//HintName: G.Models.ChatMessage.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatMessage + { + /// + /// An enumeration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("role")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.RoleTypeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.RoleType Role { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Text { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatOutput.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatOutput.g.verified.cs new file mode 100644 index 0000000000..b0b2b08001 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatOutput.g.verified.cs @@ -0,0 +1,40 @@ +//HintName: G.Models.ChatOutput.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatOutput + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Text { get; set; } + + /// + /// An enumeration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("role")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.RoleTypeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.RoleType Role { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("finishReason")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.FinishReason FinishReason { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatResponse.g.verified.cs new file mode 100644 index 0000000000..896e3ba3d1 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatResponse.g.verified.cs @@ -0,0 +1,34 @@ +//HintName: G.Models.ChatResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatResponse + { + /// + /// A unique ID for the request (not the message). Repeated identical requests
+ /// get different IDs. However, for a streaming response, the ID will be the same
+ /// for all responses in the stream. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("outputs")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Outputs { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatStreamingContentDelta.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatStreamingContentDelta.g.verified.cs new file mode 100644 index 0000000000..386a5ba1ef --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatStreamingContentDelta.g.verified.cs @@ -0,0 +1,25 @@ +//HintName: G.Models.ChatStreamingContentDelta.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatStreamingContentDelta + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("content")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Content { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatStreamingFirstDelta.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatStreamingFirstDelta.g.verified.cs new file mode 100644 index 0000000000..0c37222d14 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatStreamingFirstDelta.g.verified.cs @@ -0,0 +1,35 @@ +//HintName: G.Models.ChatStreamingFirstDelta.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatStreamingFirstDelta + { + /// + /// The role of an individual message.
+ /// - `user`: Input provided by the user. Any instructions given here that conflict
+ /// with instructions given in the `system` prompt take precedence over the `system`
+ /// prompt instructions.
+ /// - `assistant`: Response generated by the model.
+ /// - `system`: Initial instructions provided to the system to provide general guidance
+ /// on the tone and voice of the generated message. An initial system message is
+ /// optional but recommended to provide guidance on the tone of the chat. For
+ /// example, "You are a helpful chatbot with a background in earth sciences and a
+ /// charming French accent." + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("role")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.ChatStreamingFirstDeltaRoleJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.ChatStreamingFirstDeltaRole Role { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatStreamingFirstDeltaRole.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatStreamingFirstDeltaRole.g.verified.cs new file mode 100644 index 0000000000..e6807f5011 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ChatStreamingFirstDeltaRole.g.verified.cs @@ -0,0 +1,73 @@ +//HintName: G.Models.ChatStreamingFirstDeltaRole.g.cs + +#nullable enable + +namespace G +{ + /// + /// The role of an individual message.
+ /// - `user`: Input provided by the user. Any instructions given here that conflict
+ /// with instructions given in the `system` prompt take precedence over the `system`
+ /// prompt instructions.
+ /// - `assistant`: Response generated by the model.
+ /// - `system`: Initial instructions provided to the system to provide general guidance
+ /// on the tone and voice of the generated message. An initial system message is
+ /// optional but recommended to provide guidance on the tone of the chat. For
+ /// example, "You are a helpful chatbot with a background in earth sciences and a
+ /// charming French accent." + ///
+ public enum ChatStreamingFirstDeltaRole + { + /// + /// + /// + System, + /// + /// + /// + User, + /// + /// + /// + Assistant, + /// + /// + /// + Tool, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ChatStreamingFirstDeltaRoleExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ChatStreamingFirstDeltaRole value) + { + return value switch + { + ChatStreamingFirstDeltaRole.System => "system", + ChatStreamingFirstDeltaRole.User => "user", + ChatStreamingFirstDeltaRole.Assistant => "assistant", + ChatStreamingFirstDeltaRole.Tool => "tool", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ChatStreamingFirstDeltaRole? ToEnum(string value) + { + return value switch + { + "system" => ChatStreamingFirstDeltaRole.System, + "user" => ChatStreamingFirstDeltaRole.User, + "assistant" => ChatStreamingFirstDeltaRole.Assistant, + "tool" => ChatStreamingFirstDeltaRole.Tool, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.CompletionBody.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.CompletionBody.g.verified.cs new file mode 100644 index 0000000000..e389a44257 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.CompletionBody.g.verified.cs @@ -0,0 +1,108 @@ +//HintName: G.Models.CompletionBody.g.cs + +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CompletionBody + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("prompt")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Prompt { get; set; } + + /// + /// Default Value: 1 + /// + [global::System.Text.Json.Serialization.JsonPropertyName("numResults")] + public int NumResults { get; set; } = 1; + + /// + /// Default Value: 16 + /// + [global::System.Text.Json.Serialization.JsonPropertyName("maxTokens")] + public int MaxTokens { get; set; } = 16; + + /// + /// Default Value: 0 + /// + [global::System.Text.Json.Serialization.JsonPropertyName("minTokens")] + public int MinTokens { get; set; } = 0; + + /// + /// Default Value: 1 + /// + [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] + public double Temperature { get; set; } = 1; + + /// + /// Default Value: 1 + /// + [global::System.Text.Json.Serialization.JsonPropertyName("topP")] + public double TopP { get; set; } = 1; + + /// + /// Default Value: 0 + /// + [global::System.Text.Json.Serialization.JsonPropertyName("minP")] + public double MinP { get; set; } = 0; + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("stopSequences")] + public global::System.Collections.Generic.IList? StopSequences { get; set; } + + /// + /// Default Value: 0 + /// + [global::System.Text.Json.Serialization.JsonPropertyName("topKReturn")] + public int TopKReturn { get; set; } = 0; + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("logitBias")] + public global::G.CompletionBodyLogitBias? LogitBias { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("frequencyPenalty")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AllOfJsonConverterFactory1))] + public global::System.AllOf? FrequencyPenalty { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("presencePenalty")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AllOfJsonConverterFactory1))] + public global::System.AllOf? PresencePenalty { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("countPenalty")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AllOfJsonConverterFactory1))] + public global::System.AllOf? CountPenalty { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("epoch")] + public int Epoch { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.CompletionBodyLogitBias.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.CompletionBodyLogitBias.g.verified.cs new file mode 100644 index 0000000000..e3b6b241c5 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.CompletionBodyLogitBias.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.CompletionBodyLogitBias.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CompletionBodyLogitBias + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ConversationalRagFlowPublicFields.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ConversationalRagFlowPublicFields.g.verified.cs new file mode 100644 index 0000000000..f813d23dbd --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ConversationalRagFlowPublicFields.g.verified.cs @@ -0,0 +1,74 @@ +//HintName: G.Models.ConversationalRagFlowPublicFields.g.cs + +#nullable enable + +namespace G +{ + /// + /// This class is to be used as a common class to all Studio API requests payloads + /// + public sealed partial class ConversationalRagFlowPublicFields + { + /// + /// messages + /// + [global::System.Text.Json.Serialization.JsonPropertyName("messages")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Messages { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("path")] + public string? Path { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("labels")] + public global::System.Collections.Generic.IList? Labels { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("file_ids")] + public global::System.Collections.Generic.IList? FileIds { get; set; } + + /// + /// Default Value: 15 + /// + [global::System.Text.Json.Serialization.JsonPropertyName("max_segments")] + public int MaxSegments { get; set; } = 15; + + /// + /// Default Value: default + /// + [global::System.Text.Json.Serialization.JsonPropertyName("retrieval_strategy")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.ConversationalRagFlowPublicFieldsRetrievalStrategyJsonConverter))] + public global::G.ConversationalRagFlowPublicFieldsRetrievalStrategy? RetrievalStrategy { get; set; } = global::G.ConversationalRagFlowPublicFieldsRetrievalStrategy.Default; + + /// + /// Default Value: 0.8 + /// + [global::System.Text.Json.Serialization.JsonPropertyName("retrieval_similarity_threshold")] + public double RetrievalSimilarityThreshold { get; set; } = 0.8; + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("max_neighbors")] + public int MaxNeighbors { get; set; } + + /// + /// Default Value: 0.98 + /// + [global::System.Text.Json.Serialization.JsonPropertyName("hybrid_search_alpha")] + public double HybridSearchAlpha { get; set; } = 0.98; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ConversationalRagFlowPublicFieldsRetrievalStrategy.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ConversationalRagFlowPublicFieldsRetrievalStrategy.g.verified.cs new file mode 100644 index 0000000000..a58b7a0490 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ConversationalRagFlowPublicFieldsRetrievalStrategy.g.verified.cs @@ -0,0 +1,64 @@ +//HintName: G.Models.ConversationalRagFlowPublicFieldsRetrievalStrategy.g.cs + +#nullable enable + +namespace G +{ + /// + /// Default Value: default + /// + public enum ConversationalRagFlowPublicFieldsRetrievalStrategy + { + /// + /// + /// + Default, + /// + /// + /// + Segments, + /// + /// + /// + AddNeighbors, + /// + /// + /// + FullDoc, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ConversationalRagFlowPublicFieldsRetrievalStrategyExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ConversationalRagFlowPublicFieldsRetrievalStrategy value) + { + return value switch + { + ConversationalRagFlowPublicFieldsRetrievalStrategy.Default => "default", + ConversationalRagFlowPublicFieldsRetrievalStrategy.Segments => "segments", + ConversationalRagFlowPublicFieldsRetrievalStrategy.AddNeighbors => "add_neighbors", + ConversationalRagFlowPublicFieldsRetrievalStrategy.FullDoc => "full_doc", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ConversationalRagFlowPublicFieldsRetrievalStrategy? ToEnum(string value) + { + return value switch + { + "default" => ConversationalRagFlowPublicFieldsRetrievalStrategy.Default, + "segments" => ConversationalRagFlowPublicFieldsRetrievalStrategy.Segments, + "add_neighbors" => ConversationalRagFlowPublicFieldsRetrievalStrategy.AddNeighbors, + "full_doc" => ConversationalRagFlowPublicFieldsRetrievalStrategy.FullDoc, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ConversationalRagResult.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ConversationalRagResult.g.verified.cs new file mode 100644 index 0000000000..50ec5dd4e8 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ConversationalRagResult.g.verified.cs @@ -0,0 +1,61 @@ +//HintName: G.Models.ConversationalRagResult.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ConversationalRagResult + { + /// + /// A unique ID for the request (not the message). Repeated identical requests
+ /// get different IDs. However, for a streaming response, the ID will be the same
+ /// for all responses in the stream. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("choices")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Choices { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("search_queries")] + public global::System.Collections.Generic.IList? SearchQueries { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("context_retrieved")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool ContextRetrieved { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("answer_in_context")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool AnswerInContext { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("sources")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Sources { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ConversationalRagSource.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ConversationalRagSource.g.verified.cs new file mode 100644 index 0000000000..9cdd8bf661 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ConversationalRagSource.g.verified.cs @@ -0,0 +1,64 @@ +//HintName: G.Models.ConversationalRagSource.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ConversationalRagSource + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Text { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("file_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string FileId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("file_name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string FileName { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("score")] + [global::System.Text.Json.Serialization.JsonRequired] + public required double Score { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("order")] + public int Order { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("public_url")] + public string? PublicUrl { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("labels")] + public global::System.Collections.Generic.IList? Labels { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ConvertDocumentFileStudioV1ChatFilesConvertPostResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ConvertDocumentFileStudioV1ChatFilesConvertPostResponse.g.verified.cs new file mode 100644 index 0000000000..008b9ecde2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ConvertDocumentFileStudioV1ChatFilesConvertPostResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.ConvertDocumentFileStudioV1ChatFilesConvertPostResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ConvertDocumentFileStudioV1ChatFilesConvertPostResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.Correction.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.Correction.g.verified.cs new file mode 100644 index 0000000000..3a82b4e88c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.Correction.g.verified.cs @@ -0,0 +1,54 @@ +//HintName: G.Models.Correction.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Correction + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("suggestion")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Suggestion { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("startIndex")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int StartIndex { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("endIndex")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int EndIndex { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("originalText")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string OriginalText { get; set; } + + /// + /// An enumeration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("correctionType")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.CorrectionTypeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.CorrectionType CorrectionType { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.CorrectionType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.CorrectionType.g.verified.cs new file mode 100644 index 0000000000..c9f41d6903 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.CorrectionType.g.verified.cs @@ -0,0 +1,76 @@ +//HintName: G.Models.CorrectionType.g.cs + +#nullable enable + +namespace G +{ + /// + /// An enumeration. + /// + public enum CorrectionType + { + /// + /// + /// + Grammar, + /// + /// + /// + MissingWord, + /// + /// + /// + Punctuation, + /// + /// + /// + Spelling, + /// + /// + /// + WordRepetition, + /// + /// + /// + WrongWord, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CorrectionTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CorrectionType value) + { + return value switch + { + CorrectionType.Grammar => "Grammar", + CorrectionType.MissingWord => "Missing Word", + CorrectionType.Punctuation => "Punctuation", + CorrectionType.Spelling => "Spelling", + CorrectionType.WordRepetition => "Word Repetition", + CorrectionType.WrongWord => "Wrong Word", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CorrectionType? ToEnum(string value) + { + return value switch + { + "Grammar" => CorrectionType.Grammar, + "Missing Word" => CorrectionType.MissingWord, + "Punctuation" => CorrectionType.Punctuation, + "Spelling" => CorrectionType.Spelling, + "Word Repetition" => CorrectionType.WordRepetition, + "Wrong Word" => CorrectionType.WrongWord, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.CorrectionsBody.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.CorrectionsBody.g.verified.cs new file mode 100644 index 0000000000..bac3104d1e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.CorrectionsBody.g.verified.cs @@ -0,0 +1,25 @@ +//HintName: G.Models.CorrectionsBody.g.cs + +#nullable enable + +namespace G +{ + /// + /// This class is to be used as a common class to all Studio API requests payloads + /// + public sealed partial class CorrectionsBody + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Text { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.CorrectionsResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.CorrectionsResponse.g.verified.cs new file mode 100644 index 0000000000..9bba352747 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.CorrectionsResponse.g.verified.cs @@ -0,0 +1,34 @@ +//HintName: G.Models.CorrectionsResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CorrectionsResponse + { + /// + /// A unique ID for the request (not the message). Repeated identical requests
+ /// get different IDs. However, for a streaming response, the ID will be the same
+ /// for all responses in the stream. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("corrections")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Corrections { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.CustomModelInput.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.CustomModelInput.g.verified.cs new file mode 100644 index 0000000000..4724f591e0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.CustomModelInput.g.verified.cs @@ -0,0 +1,52 @@ +//HintName: G.Models.CustomModelInput.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CustomModelInput + { + /// + /// An enumeration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("model_type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.CustomModelTypeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.CustomModelType ModelType { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("learning_rate")] + public double LearningRate { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("num_epochs")] + public int NumEpochs { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("dataset_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string DatasetId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("model_name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ModelName { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.CustomModelType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.CustomModelType.g.verified.cs new file mode 100644 index 0000000000..009c13f80a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.CustomModelType.g.verified.cs @@ -0,0 +1,76 @@ +//HintName: G.Models.CustomModelType.g.cs + +#nullable enable + +namespace G +{ + /// + /// An enumeration. + /// + public enum CustomModelType + { + /// + /// + /// + J2Large, + /// + /// + /// + J2Grande, + /// + /// + /// + J2Jumbo, + /// + /// + /// + J2Light, + /// + /// + /// + J2Mid, + /// + /// + /// + J2Ultra, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CustomModelTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CustomModelType value) + { + return value switch + { + CustomModelType.J2Large => "j2-large", + CustomModelType.J2Grande => "j2-grande", + CustomModelType.J2Jumbo => "j2-jumbo", + CustomModelType.J2Light => "j2-light", + CustomModelType.J2Mid => "j2-mid", + CustomModelType.J2Ultra => "j2-ultra", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CustomModelType? ToEnum(string value) + { + return value switch + { + "j2-large" => CustomModelType.J2Large, + "j2-grande" => CustomModelType.J2Grande, + "j2-jumbo" => CustomModelType.J2Jumbo, + "j2-light" => CustomModelType.J2Light, + "j2-mid" => CustomModelType.J2Mid, + "j2-ultra" => CustomModelType.J2Ultra, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.CustomModelUpdateBody.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.CustomModelUpdateBody.g.verified.cs new file mode 100644 index 0000000000..ea01f980a3 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.CustomModelUpdateBody.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CustomModelUpdateBody.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CustomModelUpdateBody + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("defaultEpoch")] + public int DefaultEpoch { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.DocumentSchema.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.DocumentSchema.g.verified.cs new file mode 100644 index 0000000000..f90b129586 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.DocumentSchema.g.verified.cs @@ -0,0 +1,39 @@ +//HintName: G.Models.DocumentSchema.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DocumentSchema + { + /// + /// A unique ID for the request (not the message). Repeated identical requests
+ /// get different IDs. However, for a streaming response, the ID will be the same
+ /// for all responses in the stream. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public string? Id { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("content")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Content { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] + public global::G.DocumentSchemaMetadata? Metadata { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.DocumentSchemaMetadata.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.DocumentSchemaMetadata.g.verified.cs new file mode 100644 index 0000000000..d0888f3055 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.DocumentSchemaMetadata.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.DocumentSchemaMetadata.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DocumentSchemaMetadata + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.DocumentType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.DocumentType.g.verified.cs new file mode 100644 index 0000000000..d7568bede8 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.DocumentType.g.verified.cs @@ -0,0 +1,52 @@ +//HintName: G.Models.DocumentType.g.cs + +#nullable enable + +namespace G +{ + /// + /// An enumeration. + /// + public enum DocumentType + { + /// + /// + /// + URL, + /// + /// + /// + TEXT, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class DocumentTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this DocumentType value) + { + return value switch + { + DocumentType.URL => "URL", + DocumentType.TEXT => "TEXT", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static DocumentType? ToEnum(string value) + { + return value switch + { + "URL" => DocumentType.URL, + "TEXT" => DocumentType.TEXT, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.EmbedType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.EmbedType.g.verified.cs new file mode 100644 index 0000000000..e830e67b78 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.EmbedType.g.verified.cs @@ -0,0 +1,52 @@ +//HintName: G.Models.EmbedType.g.cs + +#nullable enable + +namespace G +{ + /// + /// An enumeration. + /// + public enum EmbedType + { + /// + /// + /// + Query, + /// + /// + /// + Segment, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class EmbedTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this EmbedType value) + { + return value switch + { + EmbedType.Query => "query", + EmbedType.Segment => "segment", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static EmbedType? ToEnum(string value) + { + return value switch + { + "query" => EmbedType.Query, + "segment" => EmbedType.Segment, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.EmbeddingsBody.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.EmbeddingsBody.g.verified.cs new file mode 100644 index 0000000000..466b6e4e1e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.EmbeddingsBody.g.verified.cs @@ -0,0 +1,34 @@ +//HintName: G.Models.EmbeddingsBody.g.cs + +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// This class is to be used as a common class to all Studio API requests payloads + /// + public sealed partial class EmbeddingsBody + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("texts")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Texts { get; set; } + + /// + /// Default Value: segment + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AllOfJsonConverterFactory1))] + public global::System.AllOf? Type { get; set; } = global::G.EmbedType.Segment; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.FileDeleteResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.FileDeleteResponse.g.verified.cs new file mode 100644 index 0000000000..3497ab358b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.FileDeleteResponse.g.verified.cs @@ -0,0 +1,34 @@ +//HintName: G.Models.FileDeleteResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class FileDeleteResponse + { + /// + /// A unique ID for the request (not the message). Repeated identical requests
+ /// get different IDs. However, for a streaming response, the ID will be the same
+ /// for all responses in the stream. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// The RAG library ID of the deleted file. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("fileId")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string FileId { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.FileResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.FileResponse.g.verified.cs new file mode 100644 index 0000000000..a516aa61cc --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.FileResponse.g.verified.cs @@ -0,0 +1,109 @@ +//HintName: G.Models.FileResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class FileResponse + { + /// + /// The unique identifier of the file, generated by AI21. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("fileId")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string FileId { get; set; } + + /// + /// The name of the file. This is the local file name from when the file was
+ /// uploaded. It cannot be modified. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// An arbitrary file-path-like string to indicate the content of a file. This has
+ /// nothing to do with the location of the file in storage or on disk, and is only
+ /// another label that you can assign to the file in path-like format to help you
+ /// organize the contents of the file or filter queries against your files. Example
+ /// paths might be `pets/fish` or `pets/dogs`. Then, when searching your library,
+ /// you can filter files by the full path or path prefix. So to search only files
+ /// in the "dog folder", filter by the path `/pets/dogs`. To search all files in
+ /// the "pet folder", filter your search by the path `pets/` when searching by path.
+ /// There isn't a restriction on whether a path must start or end with a / mark, but
+ /// be consistent in your usage, and all matches are prefix matching, not substring
+ /// matching. So filtering by `dog/` matches `dog/` and `dog/setter` but not `pets/dog/`. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("path")] + public string? Path { get; set; } + + /// + /// The file type. See the file upload method to learn what file types are supported. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("fileType")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string FileType { get; set; } + + /// + /// The size of the file, in bytes. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("sizeBytes")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int SizeBytes { get; set; } + + /// + /// Any string labels you have associated with the file. You can apply arbitrary
+ /// string labels to your files and limit queries to files with one or more labels.
+ /// Similar to paths, but labels do not prefix match. Labels are case-sensitive.
+ /// There can be a maximum of 20 unique labels per account. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("labels")] + public global::System.Collections.Generic.IList? Labels { get; set; } + + /// + /// The public URL of the file, if any. This URL is not validated by
+ /// AI21 or used in any way. It is strictly a piece of metadata that you can
+ /// optionally attach to a file. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("publicUrl")] + public string? PublicUrl { get; set; } + + /// + /// An internal identifier of the user who uploaded the file. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("createdBy")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string CreatedBy { get; set; } + + /// + /// The date when the file was uploaded. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("creationDate")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime CreationDate { get; set; } + + /// + /// When the file data or metadata was last changed. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("lastUpdated")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime LastUpdated { get; set; } + + /// + /// File status. One of the following values: "DB_RECORD_CREATED",
+ /// "UPLOADED", "UPLOAD_FAILED", "PROCESSED", "PROCESSING_FAILED" + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Status { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.FileStatus.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.FileStatus.g.verified.cs new file mode 100644 index 0000000000..9b42fd145a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.FileStatus.g.verified.cs @@ -0,0 +1,70 @@ +//HintName: G.Models.FileStatus.g.cs + +#nullable enable + +namespace G +{ + /// + /// An enumeration. + /// + public enum FileStatus + { + /// + /// + /// + DBRECORDCREATED, + /// + /// + /// + UPLOADED, + /// + /// + /// + UPLOADFAILED, + /// + /// + /// + PROCESSED, + /// + /// + /// + PROCESSINGFAILED, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class FileStatusExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this FileStatus value) + { + return value switch + { + FileStatus.DBRECORDCREATED => "DB_RECORD_CREATED", + FileStatus.UPLOADED => "UPLOADED", + FileStatus.UPLOADFAILED => "UPLOAD_FAILED", + FileStatus.PROCESSED => "PROCESSED", + FileStatus.PROCESSINGFAILED => "PROCESSING_FAILED", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static FileStatus? ToEnum(string value) + { + return value switch + { + "DB_RECORD_CREATED" => FileStatus.DBRECORDCREATED, + "UPLOADED" => FileStatus.UPLOADED, + "UPLOAD_FAILED" => FileStatus.UPLOADFAILED, + "PROCESSED" => FileStatus.PROCESSED, + "PROCESSING_FAILED" => FileStatus.PROCESSINGFAILED, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.FileUploadResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.FileUploadResponse.g.verified.cs new file mode 100644 index 0000000000..1fe98b08c2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.FileUploadResponse.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.FileUploadResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class FileUploadResponse + { + /// + /// A unique ID for the request (not the message). Repeated identical requests
+ /// get different IDs. However, for a streaming response, the ID will be the same
+ /// for all responses in the stream. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// A unique identifier for the uploaded file. Use this later to request, modify metadata,
+ /// or delete the file. You don't need to store the value though, as it is returned
+ /// along with all file information in any file GET request. Example: da13301a-14e4-4487-aa2f-cc6048e73cdc + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("fileId")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string FileId { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.FilesUpdateRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.FilesUpdateRequest.g.verified.cs new file mode 100644 index 0000000000..4a34f6d274 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.FilesUpdateRequest.g.verified.cs @@ -0,0 +1,33 @@ +//HintName: G.Models.FilesUpdateRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class FilesUpdateRequest + { + /// + /// The public URL of the file, if any. This URL is not validated by
+ /// AI21 or used in any way. It is strictly a piece of metadata that you can
+ /// optionally attach to a file. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("publicUrl")] + public string? PublicUrl { get; set; } + + /// + /// Any labels to associate with this file. Separate multiple labels with commas. If
+ /// provided, will overwrite all existing labels. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("labels")] + public global::System.Collections.Generic.IList? Labels { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.FinishReason.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.FinishReason.g.verified.cs new file mode 100644 index 0000000000..353204ce44 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.FinishReason.g.verified.cs @@ -0,0 +1,37 @@ +//HintName: G.Models.FinishReason.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class FinishReason + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("reason")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Reason { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("length")] + public int Length { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("sequence")] + public string? Sequence { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.FunctionToolDefinition.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.FunctionToolDefinition.g.verified.cs new file mode 100644 index 0000000000..8435eaaa05 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.FunctionToolDefinition.g.verified.cs @@ -0,0 +1,37 @@ +//HintName: G.Models.FunctionToolDefinition.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class FunctionToolDefinition + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + public string? Description { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("parameters")] + public global::G.ToolParameters? Parameters { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.HTTPValidationError.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.HTTPValidationError.g.verified.cs new file mode 100644 index 0000000000..a7a0d770e8 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.HTTPValidationError.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.HTTPValidationError.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class HTTPValidationError + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("detail")] + public global::System.Collections.Generic.IList? Detail { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.Highlight.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.Highlight.g.verified.cs new file mode 100644 index 0000000000..9d7ea27457 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.Highlight.g.verified.cs @@ -0,0 +1,39 @@ +//HintName: G.Models.Highlight.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Highlight + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Text { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("startIndex")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int StartIndex { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("endIndex")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int EndIndex { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.LanguageStudioApiServerDataTypesChatChatRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.LanguageStudioApiServerDataTypesChatChatRequest.g.verified.cs new file mode 100644 index 0000000000..05dd99abcb --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.LanguageStudioApiServerDataTypesChatChatRequest.g.verified.cs @@ -0,0 +1,102 @@ +//HintName: G.Models.LanguageStudioApiServerDataTypesChatChatRequest.g.cs + +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class LanguageStudioApiServerDataTypesChatChatRequest + { + /// + /// An enumeration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.ModelNameJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.ModelName Model { get; set; } + + /// + /// messages + /// + [global::System.Text.Json.Serialization.JsonPropertyName("messages")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList> Messages { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tools")] + public global::System.Collections.Generic.IList? Tools { get; set; } + + /// + /// Default Value: 1 + /// + [global::System.Text.Json.Serialization.JsonPropertyName("n")] + public int N { get; set; } = 1; + + /// + /// Default Value: 4096 + /// + [global::System.Text.Json.Serialization.JsonPropertyName("max_tokens")] + public int MaxTokens { get; set; } = 4096; + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] + public double Temperature { get; set; } + + /// + /// Default Value: 1 + /// + [global::System.Text.Json.Serialization.JsonPropertyName("top_p")] + public double TopP { get; set; } = 1; + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("stop")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AnyOfJsonConverterFactory2))] + public global::System.AnyOf>? Stop { get; set; } + + /// + /// Whether or not to stream the result one token at a time using
+ /// [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events).
+ /// This can be useful when waiting for long results where a long wait time for an
+ /// answer can be problematic, such as a chatbot. If set to `True`, then `n` must
+ /// be 1. A streaming response is different than the non-streaming response.
+ /// Default Value: false + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("stream")] + public bool Stream { get; set; } = false; + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("mock_response")] + public global::G.MockResponseConfig? MockResponse { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("documents")] + public global::System.Collections.Generic.IList? Documents { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("response_format")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AllOfJsonConverterFactory1))] + public global::System.AllOf? ResponseFormat { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.LanguageStudioApiServerDataTypesJ2ChatChatRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.LanguageStudioApiServerDataTypesJ2ChatChatRequest.g.verified.cs new file mode 100644 index 0000000000..4a464dee8f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.LanguageStudioApiServerDataTypesJ2ChatChatRequest.g.verified.cs @@ -0,0 +1,97 @@ +//HintName: G.Models.LanguageStudioApiServerDataTypesJ2ChatChatRequest.g.cs + +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// This class is to be used as a common class to all Studio API requests payloads + /// + public sealed partial class LanguageStudioApiServerDataTypesJ2ChatChatRequest + { + /// + /// messages + /// + [global::System.Text.Json.Serialization.JsonPropertyName("messages")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Messages { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("system")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string System { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("frequencyPenalty")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AllOfJsonConverterFactory1))] + public global::System.AllOf? FrequencyPenalty { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("presencePenalty")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AllOfJsonConverterFactory1))] + public global::System.AllOf? PresencePenalty { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("countPenalty")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AllOfJsonConverterFactory1))] + public global::System.AllOf? CountPenalty { get; set; } + + /// + /// Default Value: 1 + /// + [global::System.Text.Json.Serialization.JsonPropertyName("numResults")] + public int NumResults { get; set; } = 1; + + /// + /// Default Value: 0.7 + /// + [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] + public double Temperature { get; set; } = 0.7; + + /// + /// Default Value: 300 + /// + [global::System.Text.Json.Serialization.JsonPropertyName("maxTokens")] + public int MaxTokens { get; set; } = 300; + + /// + /// Default Value: 0 + /// + [global::System.Text.Json.Serialization.JsonPropertyName("minTokens")] + public int MinTokens { get; set; } = 0; + + /// + /// Default Value: 1 + /// + [global::System.Text.Json.Serialization.JsonPropertyName("topP")] + public double TopP { get; set; } = 1; + + /// + /// Default Value: 0 + /// + [global::System.Text.Json.Serialization.JsonPropertyName("topKReturn")] + public int TopKReturn { get; set; } = 0; + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("stopSequences")] + public global::System.Collections.Generic.IList? StopSequences { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.LibraryAnswerRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.LibraryAnswerRequest.g.verified.cs new file mode 100644 index 0000000000..d4237f4498 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.LibraryAnswerRequest.g.verified.cs @@ -0,0 +1,84 @@ +//HintName: G.Models.LibraryAnswerRequest.g.cs + +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// This class is to be used as a common class to all Studio API requests payloads + /// + public sealed partial class LibraryAnswerRequest + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("question")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Question { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("maxSegments")] + public int MaxSegments { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("path")] + public string? Path { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("labels")] + public global::System.Collections.Generic.IList? Labels { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("fileIds")] + public global::System.Collections.Generic.IList? FileIds { get; set; } + + /// + /// An enumeration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("answerLength")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AnswerLengthJsonConverter))] + public global::G.AnswerLength? AnswerLength { get; set; } + + /// + /// An enumeration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("mode")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.ModeJsonConverter))] + public global::G.Mode? Mode { get; set; } + + /// + /// Default Value: default + /// + [global::System.Text.Json.Serialization.JsonPropertyName("retrievalStrategy")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AllOfJsonConverterFactory1))] + public global::System.AllOf? RetrievalStrategy { get; set; } = global::G.RetrievalStrategy3.Default; + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("retrievalSimilarityThreshold")] + public double RetrievalSimilarityThreshold { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("hybridSearchAlpha")] + public double HybridSearchAlpha { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.LibraryAnswerResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.LibraryAnswerResponse.g.verified.cs new file mode 100644 index 0000000000..d0c714f2eb --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.LibraryAnswerResponse.g.verified.cs @@ -0,0 +1,46 @@ +//HintName: G.Models.LibraryAnswerResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class LibraryAnswerResponse + { + /// + /// A unique ID for the request (not the message). Repeated identical requests
+ /// get different IDs. However, for a streaming response, the ID will be the same
+ /// for all responses in the stream. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("answerInContext")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool AnswerInContext { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("answer")] + public string? Answer { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("sources")] + public global::System.Collections.Generic.IList? Sources { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.LibrarySearchRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.LibrarySearchRequest.g.verified.cs new file mode 100644 index 0000000000..7f8e284a1f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.LibrarySearchRequest.g.verified.cs @@ -0,0 +1,76 @@ +//HintName: G.Models.LibrarySearchRequest.g.cs + +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// This class is to be used as a common class to all Studio API requests payloads + /// + public sealed partial class LibrarySearchRequest + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("query")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Query { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("maxSegments")] + public int MaxSegments { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("path")] + public string? Path { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("labels")] + public global::System.Collections.Generic.IList? Labels { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("fileIds")] + public global::System.Collections.Generic.IList? FileIds { get; set; } + + /// + /// Default Value: default + /// + [global::System.Text.Json.Serialization.JsonPropertyName("retrievalStrategy")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AllOfJsonConverterFactory1))] + public global::System.AllOf? RetrievalStrategy { get; set; } = global::G.RetrievalStrategy3.Default; + + /// + /// Default Value: 1 + /// + [global::System.Text.Json.Serialization.JsonPropertyName("maxNeighbors")] + public int MaxNeighbors { get; set; } = 1; + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("retrievalSimilarityThreshold")] + public double RetrievalSimilarityThreshold { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("hybridSearchAlpha")] + public double HybridSearchAlpha { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.LibrarySearchResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.LibrarySearchResponse.g.verified.cs new file mode 100644 index 0000000000..d58d2c0559 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.LibrarySearchResponse.g.verified.cs @@ -0,0 +1,34 @@ +//HintName: G.Models.LibrarySearchResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class LibrarySearchResponse + { + /// + /// A unique ID for the request (not the message). Repeated identical requests
+ /// get different IDs. However, for a streaming response, the ID will be the same
+ /// for all responses in the stream. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("results")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Results { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.LibrarySearchResult.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.LibrarySearchResult.g.verified.cs new file mode 100644 index 0000000000..fc8083138a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.LibrarySearchResult.g.verified.cs @@ -0,0 +1,64 @@ +//HintName: G.Models.LibrarySearchResult.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class LibrarySearchResult + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Text { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("fileId")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string FileId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("fileName")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string FileName { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("score")] + [global::System.Text.Json.Serialization.JsonRequired] + public required double Score { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("order")] + public int Order { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("publicUrl")] + public string? PublicUrl { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("labels")] + public global::System.Collections.Generic.IList? Labels { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.Logprobs.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.Logprobs.g.verified.cs new file mode 100644 index 0000000000..db14287cca --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.Logprobs.g.verified.cs @@ -0,0 +1,25 @@ +//HintName: G.Models.Logprobs.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Logprobs + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("content")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Content { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.LogprobsData.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.LogprobsData.g.verified.cs new file mode 100644 index 0000000000..1c02c4c330 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.LogprobsData.g.verified.cs @@ -0,0 +1,38 @@ +//HintName: G.Models.LogprobsData.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class LogprobsData + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("token")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Token { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("logprob")] + [global::System.Text.Json.Serialization.JsonRequired] + public required double Logprob { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("top_logprobs")] + public global::System.Collections.Generic.IList? TopLogprobs { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.Message.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.Message.g.verified.cs new file mode 100644 index 0000000000..21eec60b72 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.Message.g.verified.cs @@ -0,0 +1,42 @@ +//HintName: G.Models.Message.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Message + { + /// + /// The role of an individual message.
+ /// - `user`: Input provided by the user. Any instructions given here that conflict
+ /// with instructions given in the `system` prompt take precedence over the `system`
+ /// prompt instructions.
+ /// - `assistant`: Response generated by the model.
+ /// - `system`: Initial instructions provided to the system to provide general guidance
+ /// on the tone and voice of the generated message. An initial system message is
+ /// optional but recommended to provide guidance on the tone of the chat. For
+ /// example, "You are a helpful chatbot with a background in earth sciences and a
+ /// charming French accent." + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("role")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.MessageRoleJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.MessageRole Role { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("content")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Content { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.MessageRole.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.MessageRole.g.verified.cs new file mode 100644 index 0000000000..aa04c3214e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.MessageRole.g.verified.cs @@ -0,0 +1,61 @@ +//HintName: G.Models.MessageRole.g.cs + +#nullable enable + +namespace G +{ + /// + /// The role of an individual message.
+ /// - `user`: Input provided by the user. Any instructions given here that conflict
+ /// with instructions given in the `system` prompt take precedence over the `system`
+ /// prompt instructions.
+ /// - `assistant`: Response generated by the model.
+ /// - `system`: Initial instructions provided to the system to provide general guidance
+ /// on the tone and voice of the generated message. An initial system message is
+ /// optional but recommended to provide guidance on the tone of the chat. For
+ /// example, "You are a helpful chatbot with a background in earth sciences and a
+ /// charming French accent." + ///
+ public enum MessageRole + { + /// + /// + /// + Assistant, + /// + /// + /// + User, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class MessageRoleExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this MessageRole value) + { + return value switch + { + MessageRole.Assistant => "assistant", + MessageRole.User => "user", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static MessageRole? ToEnum(string value) + { + return value switch + { + "assistant" => MessageRole.Assistant, + "user" => MessageRole.User, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.MockResponseConfig.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.MockResponseConfig.g.verified.cs new file mode 100644 index 0000000000..7e0e1b1f1c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.MockResponseConfig.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.MockResponseConfig.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class MockResponseConfig + { + /// + /// Default Value: 1 + /// + [global::System.Text.Json.Serialization.JsonPropertyName("response_delay_seconds")] + public double ResponseDelaySeconds { get; set; } = 1; + + /// + /// Default Value: 0.1 + /// + [global::System.Text.Json.Serialization.JsonPropertyName("stream_response_delay_between_deltas_seconds")] + public double StreamResponseDelayBetweenDeltasSeconds { get; set; } = 0.1; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.Mode.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.Mode.g.verified.cs new file mode 100644 index 0000000000..26d51247c8 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.Mode.g.verified.cs @@ -0,0 +1,52 @@ +//HintName: G.Models.Mode.g.cs + +#nullable enable + +namespace G +{ + /// + /// An enumeration. + /// + public enum Mode + { + /// + /// + /// + Flexible, + /// + /// + /// + Strict, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ModeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this Mode value) + { + return value switch + { + Mode.Flexible => "flexible", + Mode.Strict => "strict", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static Mode? ToEnum(string value) + { + return value switch + { + "flexible" => Mode.Flexible, + "strict" => Mode.Strict, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ModelName.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ModelName.g.verified.cs new file mode 100644 index 0000000000..33b17429df --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ModelName.g.verified.cs @@ -0,0 +1,82 @@ +//HintName: G.Models.ModelName.g.cs + +#nullable enable + +namespace G +{ + /// + /// An enumeration. + /// + public enum ModelName + { + /// + /// + /// + JambaInstruct, + /// + /// + /// + JambaInstructPreview, + /// + /// + /// + JambaNext, + /// + /// + /// + JambaLargeNext, + /// + /// + /// + JambaLargeNext2, + /// + /// + /// + Jamba15Mini, + /// + /// + /// + Jamba15Large, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ModelNameExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ModelName value) + { + return value switch + { + ModelName.JambaInstruct => "jamba-instruct", + ModelName.JambaInstructPreview => "jamba-instruct-preview", + ModelName.JambaNext => "jamba-next", + ModelName.JambaLargeNext => "jamba-large-next", + ModelName.JambaLargeNext2 => "jamba-large-next-2", + ModelName.Jamba15Mini => "jamba-1.5-mini", + ModelName.Jamba15Large => "jamba-1.5-large", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ModelName? ToEnum(string value) + { + return value switch + { + "jamba-instruct" => ModelName.JambaInstruct, + "jamba-instruct-preview" => ModelName.JambaInstructPreview, + "jamba-next" => ModelName.JambaNext, + "jamba-large-next" => ModelName.JambaLargeNext, + "jamba-large-next-2" => ModelName.JambaLargeNext2, + "jamba-1.5-mini" => ModelName.Jamba15Mini, + "jamba-1.5-large" => ModelName.Jamba15Large, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ParaphraseBody.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ParaphraseBody.g.verified.cs new file mode 100644 index 0000000000..54f66b4ce5 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ParaphraseBody.g.verified.cs @@ -0,0 +1,46 @@ +//HintName: G.Models.ParaphraseBody.g.cs + +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// This class is to be used as a common class to all Studio API requests payloads + /// + public sealed partial class ParaphraseBody + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Text { get; set; } + + /// + /// Default Value: general + /// + [global::System.Text.Json.Serialization.JsonPropertyName("style")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AllOfJsonConverterFactory1))] + public global::System.AllOf? Style { get; set; } = global::G.StyleType.General; + + /// + /// Default Value: 0 + /// + [global::System.Text.Json.Serialization.JsonPropertyName("startIndex")] + public int StartIndex { get; set; } = 0; + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("endIndex")] + public int EndIndex { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.Penalty.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.Penalty.g.verified.cs new file mode 100644 index 0000000000..f9e93c3e9d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.Penalty.g.verified.cs @@ -0,0 +1,55 @@ +//HintName: G.Models.Penalty.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Penalty + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("scale")] + [global::System.Text.Json.Serialization.JsonRequired] + public required double Scale { get; set; } + + /// + /// Default Value: true + /// + [global::System.Text.Json.Serialization.JsonPropertyName("applyToWhitespaces")] + public bool ApplyToWhitespaces { get; set; } = true; + + /// + /// Default Value: true + /// + [global::System.Text.Json.Serialization.JsonPropertyName("applyToPunctuations")] + public bool ApplyToPunctuations { get; set; } = true; + + /// + /// Default Value: true + /// + [global::System.Text.Json.Serialization.JsonPropertyName("applyToNumbers")] + public bool ApplyToNumbers { get; set; } = true; + + /// + /// Default Value: true + /// + [global::System.Text.Json.Serialization.JsonPropertyName("applyToStopwords")] + public bool ApplyToStopwords { get; set; } = true; + + /// + /// Default Value: true + /// + [global::System.Text.Json.Serialization.JsonPropertyName("applyToEmojis")] + public bool ApplyToEmojis { get; set; } = true; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ResponseFormat.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ResponseFormat.g.verified.cs new file mode 100644 index 0000000000..3df41c70b7 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ResponseFormat.g.verified.cs @@ -0,0 +1,26 @@ +//HintName: G.Models.ResponseFormat.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ResponseFormat + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.ResponseFormatTypeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.ResponseFormatType Type { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ResponseFormatType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ResponseFormatType.g.verified.cs new file mode 100644 index 0000000000..00938aed3d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ResponseFormatType.g.verified.cs @@ -0,0 +1,52 @@ +//HintName: G.Models.ResponseFormatType.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public enum ResponseFormatType + { + /// + /// + /// + Text, + /// + /// + /// + JsonObject, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ResponseFormatTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ResponseFormatType value) + { + return value switch + { + ResponseFormatType.Text => "text", + ResponseFormatType.JsonObject => "json_object", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ResponseFormatType? ToEnum(string value) + { + return value switch + { + "text" => ResponseFormatType.Text, + "json_object" => ResponseFormatType.JsonObject, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.RetrievalStrategy3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.RetrievalStrategy3.g.verified.cs new file mode 100644 index 0000000000..22a0451a03 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.RetrievalStrategy3.g.verified.cs @@ -0,0 +1,58 @@ +//HintName: G.Models.RetrievalStrategy3.g.cs + +#nullable enable + +namespace G +{ + /// + /// An enumeration. + /// + public enum RetrievalStrategy3 + { + /// + /// + /// + Default, + /// + /// + /// + AddNeighbors, + /// + /// + /// + FullDoc, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RetrievalStrategy3Extensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RetrievalStrategy3 value) + { + return value switch + { + RetrievalStrategy3.Default => "default", + RetrievalStrategy3.AddNeighbors => "add_neighbors", + RetrievalStrategy3.FullDoc => "full_doc", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RetrievalStrategy3? ToEnum(string value) + { + return value switch + { + "default" => RetrievalStrategy3.Default, + "add_neighbors" => RetrievalStrategy3.AddNeighbors, + "full_doc" => RetrievalStrategy3.FullDoc, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.RoleType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.RoleType.g.verified.cs new file mode 100644 index 0000000000..17779bff27 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.RoleType.g.verified.cs @@ -0,0 +1,52 @@ +//HintName: G.Models.RoleType.g.cs + +#nullable enable + +namespace G +{ + /// + /// An enumeration. + /// + public enum RoleType + { + /// + /// + /// + User, + /// + /// + /// + Assistant, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RoleTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RoleType value) + { + return value switch + { + RoleType.User => "user", + RoleType.Assistant => "assistant", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RoleType? ToEnum(string value) + { + return value switch + { + "user" => RoleType.User, + "assistant" => RoleType.Assistant, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.Segment.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.Segment.g.verified.cs new file mode 100644 index 0000000000..1a3aedc46c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.Segment.g.verified.cs @@ -0,0 +1,32 @@ +//HintName: G.Models.Segment.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Segment + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("segmentText")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string SegmentText { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("segmentType")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string SegmentType { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.SegmentSummary.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.SegmentSummary.g.verified.cs new file mode 100644 index 0000000000..30c63d4882 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.SegmentSummary.g.verified.cs @@ -0,0 +1,58 @@ +//HintName: G.Models.SegmentSummary.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SegmentSummary + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("summary")] + public string? Summary { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("segmentText")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string SegmentText { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("segmentHtml")] + public string? SegmentHtml { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("segmentType")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string SegmentType { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("hasSummary")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool HasSummary { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("highlights")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Highlights { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.SegmentationBody.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.SegmentationBody.g.verified.cs new file mode 100644 index 0000000000..cecdc18bf4 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.SegmentationBody.g.verified.cs @@ -0,0 +1,33 @@ +//HintName: G.Models.SegmentationBody.g.cs + +#nullable enable + +namespace G +{ + /// + /// This class is to be used as a common class to all Studio API requests payloads + /// + public sealed partial class SegmentationBody + { + /// + /// An enumeration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("sourceType")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.DocumentTypeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.DocumentType SourceType { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("source")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Source { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.SegmentationResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.SegmentationResponse.g.verified.cs new file mode 100644 index 0000000000..8515931a1e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.SegmentationResponse.g.verified.cs @@ -0,0 +1,34 @@ +//HintName: G.Models.SegmentationResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SegmentationResponse + { + /// + /// A unique ID for the request (not the message). Repeated identical requests
+ /// get different IDs. However, for a streaming response, the ID will be the same
+ /// for all responses in the stream. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("segments")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Segments { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.SegmentedSummaryBody.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.SegmentedSummaryBody.g.verified.cs new file mode 100644 index 0000000000..a244d9e34e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.SegmentedSummaryBody.g.verified.cs @@ -0,0 +1,39 @@ +//HintName: G.Models.SegmentedSummaryBody.g.cs + +#nullable enable + +namespace G +{ + /// + /// This class is to be used as a common class to all Studio API requests payloads + /// + public sealed partial class SegmentedSummaryBody + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("source")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Source { get; set; } + + /// + /// An enumeration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("sourceType")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.DocumentTypeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.DocumentType SourceType { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("focus")] + public string? Focus { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.SourceDocument.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.SourceDocument.g.verified.cs new file mode 100644 index 0000000000..681449537e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.SourceDocument.g.verified.cs @@ -0,0 +1,51 @@ +//HintName: G.Models.SourceDocument.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SourceDocument + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("fileId")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string FileId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("highlights")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Highlights { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("publicUrl")] + public string? PublicUrl { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("labels")] + public global::System.Collections.Generic.IList? Labels { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.StyleType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.StyleType.g.verified.cs new file mode 100644 index 0000000000..98a221af0d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.StyleType.g.verified.cs @@ -0,0 +1,70 @@ +//HintName: G.Models.StyleType.g.cs + +#nullable enable + +namespace G +{ + /// + /// An enumeration. + /// + public enum StyleType + { + /// + /// + /// + Long, + /// + /// + /// + Short, + /// + /// + /// + Formal, + /// + /// + /// + Casual, + /// + /// + /// + General, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class StyleTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this StyleType value) + { + return value switch + { + StyleType.Long => "long", + StyleType.Short => "short", + StyleType.Formal => "formal", + StyleType.Casual => "casual", + StyleType.General => "general", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static StyleType? ToEnum(string value) + { + return value switch + { + "long" => StyleType.Long, + "short" => StyleType.Short, + "formal" => StyleType.Formal, + "casual" => StyleType.Casual, + "general" => StyleType.General, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.SummarizationResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.SummarizationResponse.g.verified.cs new file mode 100644 index 0000000000..d7183a6bd3 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.SummarizationResponse.g.verified.cs @@ -0,0 +1,34 @@ +//HintName: G.Models.SummarizationResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SummarizationResponse + { + /// + /// A unique ID for the request (not the message). Repeated identical requests
+ /// get different IDs. However, for a streaming response, the ID will be the same
+ /// for all responses in the stream. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("summary")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Summary { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.SummarizeBody.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.SummarizeBody.g.verified.cs new file mode 100644 index 0000000000..e86fe8fd1d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.SummarizeBody.g.verified.cs @@ -0,0 +1,46 @@ +//HintName: G.Models.SummarizeBody.g.cs + +#nullable enable + +namespace G +{ + /// + /// This class is to be used as a common class to all Studio API requests payloads + /// + public sealed partial class SummarizeBody + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("source")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Source { get; set; } + + /// + /// An enumeration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("sourceType")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.DocumentTypeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.DocumentType SourceType { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("focus")] + public string? Focus { get; set; } + + /// + /// An enumeration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("summaryMethod")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.SummaryMethodJsonConverter))] + public global::G.SummaryMethod? SummaryMethod { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.SummarizeBySegmentResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.SummarizeBySegmentResponse.g.verified.cs new file mode 100644 index 0000000000..5ba16440fa --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.SummarizeBySegmentResponse.g.verified.cs @@ -0,0 +1,34 @@ +//HintName: G.Models.SummarizeBySegmentResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SummarizeBySegmentResponse + { + /// + /// A unique ID for the request (not the message). Repeated identical requests
+ /// get different IDs. However, for a streaming response, the ID will be the same
+ /// for all responses in the stream. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("segments")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Segments { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.SummaryMethod.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.SummaryMethod.g.verified.cs new file mode 100644 index 0000000000..58b9916d7e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.SummaryMethod.g.verified.cs @@ -0,0 +1,58 @@ +//HintName: G.Models.SummaryMethod.g.cs + +#nullable enable + +namespace G +{ + /// + /// An enumeration. + /// + public enum SummaryMethod + { + /// + /// + /// + Segments, + /// + /// + /// + Guided, + /// + /// + /// + FullDocument, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class SummaryMethodExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this SummaryMethod value) + { + return value switch + { + SummaryMethod.Segments => "segments", + SummaryMethod.Guided => "guided", + SummaryMethod.FullDocument => "fullDocument", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static SummaryMethod? ToEnum(string value) + { + return value switch + { + "segments" => SummaryMethod.Segments, + "guided" => SummaryMethod.Guided, + "fullDocument" => SummaryMethod.FullDocument, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.SystemMessage.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.SystemMessage.g.verified.cs new file mode 100644 index 0000000000..7e0269378e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.SystemMessage.g.verified.cs @@ -0,0 +1,42 @@ +//HintName: G.Models.SystemMessage.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SystemMessage + { + /// + /// The role of an individual message.
+ /// - `user`: Input provided by the user. Any instructions given here that conflict
+ /// with instructions given in the `system` prompt take precedence over the `system`
+ /// prompt instructions.
+ /// - `assistant`: Response generated by the model.
+ /// - `system`: Initial instructions provided to the system to provide general guidance
+ /// on the tone and voice of the generated message. An initial system message is
+ /// optional but recommended to provide guidance on the tone of the chat. For
+ /// example, "You are a helpful chatbot with a background in earth sciences and a
+ /// charming French accent."
+ /// Default Value: system + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("role")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.SystemMessageRoleJsonConverter))] + public global::G.SystemMessageRole? Role { get; set; } = global::G.SystemMessageRole.System; + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("content")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Content { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.SystemMessageRole.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.SystemMessageRole.g.verified.cs new file mode 100644 index 0000000000..1be01fa577 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.SystemMessageRole.g.verified.cs @@ -0,0 +1,56 @@ +//HintName: G.Models.SystemMessageRole.g.cs + +#nullable enable + +namespace G +{ + /// + /// The role of an individual message.
+ /// - `user`: Input provided by the user. Any instructions given here that conflict
+ /// with instructions given in the `system` prompt take precedence over the `system`
+ /// prompt instructions.
+ /// - `assistant`: Response generated by the model.
+ /// - `system`: Initial instructions provided to the system to provide general guidance
+ /// on the tone and voice of the generated message. An initial system message is
+ /// optional but recommended to provide guidance on the tone of the chat. For
+ /// example, "You are a helpful chatbot with a background in earth sciences and a
+ /// charming French accent."
+ /// Default Value: system + ///
+ public enum SystemMessageRole + { + /// + /// + /// + System, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class SystemMessageRoleExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this SystemMessageRole value) + { + return value switch + { + SystemMessageRole.System => "system", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static SystemMessageRole? ToEnum(string value) + { + return value switch + { + "system" => SystemMessageRole.System, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.TokenizeBody.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.TokenizeBody.g.verified.cs new file mode 100644 index 0000000000..6ed8d43d33 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.TokenizeBody.g.verified.cs @@ -0,0 +1,25 @@ +//HintName: G.Models.TokenizeBody.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class TokenizeBody + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Text { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ToolCall.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ToolCall.g.verified.cs new file mode 100644 index 0000000000..dd8782ba91 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ToolCall.g.verified.cs @@ -0,0 +1,41 @@ +//HintName: G.Models.ToolCall.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ToolCall + { + /// + /// A unique ID for the request (not the message). Repeated identical requests
+ /// get different IDs. However, for a streaming response, the ID will be the same
+ /// for all responses in the stream. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// Default Value: function + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.ToolCallTypeJsonConverter))] + public global::G.ToolCallType? Type { get; set; } = global::G.ToolCallType.Function; + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("function")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.ToolFunction Function { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ToolCallType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ToolCallType.g.verified.cs new file mode 100644 index 0000000000..87499b3213 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ToolCallType.g.verified.cs @@ -0,0 +1,46 @@ +//HintName: G.Models.ToolCallType.g.cs + +#nullable enable + +namespace G +{ + /// + /// Default Value: function + /// + public enum ToolCallType + { + /// + /// + /// + Function, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ToolCallTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ToolCallType value) + { + return value switch + { + ToolCallType.Function => "function", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ToolCallType? ToEnum(string value) + { + return value switch + { + "function" => ToolCallType.Function, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ToolDefinition.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ToolDefinition.g.verified.cs new file mode 100644 index 0000000000..a4170a4761 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ToolDefinition.g.verified.cs @@ -0,0 +1,32 @@ +//HintName: G.Models.ToolDefinition.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ToolDefinition + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.ToolDefinitionTypeJsonConverter))] + public global::G.ToolDefinitionType Type { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("function")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.FunctionToolDefinition Function { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ToolDefinitionType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ToolDefinitionType.g.verified.cs new file mode 100644 index 0000000000..08ada003b3 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ToolDefinitionType.g.verified.cs @@ -0,0 +1,46 @@ +//HintName: G.Models.ToolDefinitionType.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public enum ToolDefinitionType + { + /// + /// + /// + Function, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ToolDefinitionTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ToolDefinitionType value) + { + return value switch + { + ToolDefinitionType.Function => "function", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ToolDefinitionType? ToEnum(string value) + { + return value switch + { + "function" => ToolDefinitionType.Function, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ToolFunction.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ToolFunction.g.verified.cs new file mode 100644 index 0000000000..65836fcbc2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ToolFunction.g.verified.cs @@ -0,0 +1,32 @@ +//HintName: G.Models.ToolFunction.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ToolFunction + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Arguments { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ToolMessage.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ToolMessage.g.verified.cs new file mode 100644 index 0000000000..46ec2084d0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ToolMessage.g.verified.cs @@ -0,0 +1,49 @@ +//HintName: G.Models.ToolMessage.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ToolMessage + { + /// + /// The role of an individual message.
+ /// - `user`: Input provided by the user. Any instructions given here that conflict
+ /// with instructions given in the `system` prompt take precedence over the `system`
+ /// prompt instructions.
+ /// - `assistant`: Response generated by the model.
+ /// - `system`: Initial instructions provided to the system to provide general guidance
+ /// on the tone and voice of the generated message. An initial system message is
+ /// optional but recommended to provide guidance on the tone of the chat. For
+ /// example, "You are a helpful chatbot with a background in earth sciences and a
+ /// charming French accent."
+ /// Default Value: tool + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("role")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.ToolMessageRoleJsonConverter))] + public global::G.ToolMessageRole? Role { get; set; } = global::G.ToolMessageRole.Tool; + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("content")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Content { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tool_call_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ToolCallId { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ToolMessageRole.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ToolMessageRole.g.verified.cs new file mode 100644 index 0000000000..0266eb3891 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ToolMessageRole.g.verified.cs @@ -0,0 +1,56 @@ +//HintName: G.Models.ToolMessageRole.g.cs + +#nullable enable + +namespace G +{ + /// + /// The role of an individual message.
+ /// - `user`: Input provided by the user. Any instructions given here that conflict
+ /// with instructions given in the `system` prompt take precedence over the `system`
+ /// prompt instructions.
+ /// - `assistant`: Response generated by the model.
+ /// - `system`: Initial instructions provided to the system to provide general guidance
+ /// on the tone and voice of the generated message. An initial system message is
+ /// optional but recommended to provide guidance on the tone of the chat. For
+ /// example, "You are a helpful chatbot with a background in earth sciences and a
+ /// charming French accent."
+ /// Default Value: tool + ///
+ public enum ToolMessageRole + { + /// + /// + /// + Tool, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ToolMessageRoleExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ToolMessageRole value) + { + return value switch + { + ToolMessageRole.Tool => "tool", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ToolMessageRole? ToEnum(string value) + { + return value switch + { + "tool" => ToolMessageRole.Tool, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ToolParameters.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ToolParameters.g.verified.cs new file mode 100644 index 0000000000..2ee1cd4fcf --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ToolParameters.g.verified.cs @@ -0,0 +1,39 @@ +//HintName: G.Models.ToolParameters.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ToolParameters + { + /// + /// Type of the parameter schema, only `object` is supported
+ /// Default Value: object + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.ToolParametersTypeJsonConverter))] + public global::G.ToolParametersType? Type { get; set; } = global::G.ToolParametersType.Object; + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("properties")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.ToolParametersProperties Properties { get; set; } + + /// + /// List of required properties + /// + [global::System.Text.Json.Serialization.JsonPropertyName("required")] + public global::System.Collections.Generic.IList? Required { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ToolParametersProperties.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ToolParametersProperties.g.verified.cs new file mode 100644 index 0000000000..284326a396 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ToolParametersProperties.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.ToolParametersProperties.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ToolParametersProperties + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ToolParametersType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ToolParametersType.g.verified.cs new file mode 100644 index 0000000000..bf1429d681 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ToolParametersType.g.verified.cs @@ -0,0 +1,47 @@ +//HintName: G.Models.ToolParametersType.g.cs + +#nullable enable + +namespace G +{ + /// + /// Type of the parameter schema, only `object` is supported
+ /// Default Value: object + ///
+ public enum ToolParametersType + { + /// + /// + /// + Object, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ToolParametersTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ToolParametersType value) + { + return value switch + { + ToolParametersType.Object => "object", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ToolParametersType? ToEnum(string value) + { + return value switch + { + "object" => ToolParametersType.Object, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.TopLogprobsData.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.TopLogprobsData.g.verified.cs new file mode 100644 index 0000000000..3337b1bb84 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.TopLogprobsData.g.verified.cs @@ -0,0 +1,32 @@ +//HintName: G.Models.TopLogprobsData.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class TopLogprobsData + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("token")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Token { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("logprob")] + [global::System.Text.Json.Serialization.JsonRequired] + public required double Logprob { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.UsageInfo.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.UsageInfo.g.verified.cs new file mode 100644 index 0000000000..df87d8dbd2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.UsageInfo.g.verified.cs @@ -0,0 +1,43 @@ +//HintName: G.Models.UsageInfo.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UsageInfo + { + /// + /// Number of tokens in the prompt for this request. Note that the prompt token
+ /// includes the entire message history, plus extra tokens needed by the system
+ /// when combining the list of prompt messages into a single message, as
+ /// required by the model. The number of extra tokens is typically proportional
+ /// to the number of messages in the thread, and should be relatively small. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("prompt_tokens")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int PromptTokens { get; set; } + + /// + /// Number of tokens in the response message. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("completion_tokens")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int CompletionTokens { get; set; } + + /// + /// `prompt_tokens` + `completion_tokens`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("total_tokens")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int TotalTokens { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.UserMessage.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.UserMessage.g.verified.cs new file mode 100644 index 0000000000..40e63749f7 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.UserMessage.g.verified.cs @@ -0,0 +1,42 @@ +//HintName: G.Models.UserMessage.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UserMessage + { + /// + /// The role of an individual message.
+ /// - `user`: Input provided by the user. Any instructions given here that conflict
+ /// with instructions given in the `system` prompt take precedence over the `system`
+ /// prompt instructions.
+ /// - `assistant`: Response generated by the model.
+ /// - `system`: Initial instructions provided to the system to provide general guidance
+ /// on the tone and voice of the generated message. An initial system message is
+ /// optional but recommended to provide guidance on the tone of the chat. For
+ /// example, "You are a helpful chatbot with a background in earth sciences and a
+ /// charming French accent."
+ /// Default Value: user + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("role")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.UserMessageRoleJsonConverter))] + public global::G.UserMessageRole? Role { get; set; } = global::G.UserMessageRole.User; + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("content")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Content { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.UserMessageRole.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.UserMessageRole.g.verified.cs new file mode 100644 index 0000000000..2e796c5338 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.UserMessageRole.g.verified.cs @@ -0,0 +1,56 @@ +//HintName: G.Models.UserMessageRole.g.cs + +#nullable enable + +namespace G +{ + /// + /// The role of an individual message.
+ /// - `user`: Input provided by the user. Any instructions given here that conflict
+ /// with instructions given in the `system` prompt take precedence over the `system`
+ /// prompt instructions.
+ /// - `assistant`: Response generated by the model.
+ /// - `system`: Initial instructions provided to the system to provide general guidance
+ /// on the tone and voice of the generated message. An initial system message is
+ /// optional but recommended to provide guidance on the tone of the chat. For
+ /// example, "You are a helpful chatbot with a background in earth sciences and a
+ /// charming French accent."
+ /// Default Value: user + ///
+ public enum UserMessageRole + { + /// + /// + /// + User, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UserMessageRoleExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UserMessageRole value) + { + return value switch + { + UserMessageRole.User => "user", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UserMessageRole? ToEnum(string value) + { + return value switch + { + "user" => UserMessageRole.User, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1AnswerResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1AnswerResponse.g.verified.cs new file mode 100644 index 0000000000..515689dda1 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1AnswerResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1AnswerResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1AnswerResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1CreateCustomModelResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1CreateCustomModelResponse.g.verified.cs new file mode 100644 index 0000000000..fca42f88bb --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1CreateCustomModelResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1CreateCustomModelResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1CreateCustomModelResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1DeleteDatasetResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1DeleteDatasetResponse.g.verified.cs new file mode 100644 index 0000000000..8f1d184168 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1DeleteDatasetResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1DeleteDatasetResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1DeleteDatasetResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1EmbedResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1EmbedResponse.g.verified.cs new file mode 100644 index 0000000000..dd7cad536d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1EmbedResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1EmbedResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1EmbedResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1GetCustomModelResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1GetCustomModelResponse.g.verified.cs new file mode 100644 index 0000000000..d81dc0899f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1GetCustomModelResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1GetCustomModelResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1GetCustomModelResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1GetCustomModelsResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1GetCustomModelsResponse.g.verified.cs new file mode 100644 index 0000000000..66cb67a694 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1GetCustomModelsResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1GetCustomModelsResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1GetCustomModelsResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1GetDatasetDownloadUrlResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1GetDatasetDownloadUrlResponse.g.verified.cs new file mode 100644 index 0000000000..fa0110ebc7 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1GetDatasetDownloadUrlResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1GetDatasetDownloadUrlResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1GetDatasetDownloadUrlResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1GetDatasetResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1GetDatasetResponse.g.verified.cs new file mode 100644 index 0000000000..e7a6000e95 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1GetDatasetResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1GetDatasetResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1GetDatasetResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1GetDatasetsResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1GetDatasetsResponse.g.verified.cs new file mode 100644 index 0000000000..c1aada9c6c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1GetDatasetsResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1GetDatasetsResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1GetDatasetsResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2GrandeCompleteResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2GrandeCompleteResponse.g.verified.cs new file mode 100644 index 0000000000..046d3124b0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2GrandeCompleteResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1J2GrandeCompleteResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1J2GrandeCompleteResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2GrandeCustomModelCompleteResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2GrandeCustomModelCompleteResponse.g.verified.cs new file mode 100644 index 0000000000..a2a708c92e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2GrandeCustomModelCompleteResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1J2GrandeCustomModelCompleteResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1J2GrandeCustomModelCompleteResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2GrandeInstructCompleteResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2GrandeInstructCompleteResponse.g.verified.cs new file mode 100644 index 0000000000..f9bb8f4186 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2GrandeInstructCompleteResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1J2GrandeInstructCompleteResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1J2GrandeInstructCompleteResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2JumboCompleteResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2JumboCompleteResponse.g.verified.cs new file mode 100644 index 0000000000..8b5ec50f48 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2JumboCompleteResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1J2JumboCompleteResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1J2JumboCompleteResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2JumboCompleteResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2JumboCompleteResponse2.g.verified.cs new file mode 100644 index 0000000000..c53c767265 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2JumboCompleteResponse2.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1J2JumboCompleteResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1J2JumboCompleteResponse2 + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2JumboInstructCompleteResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2JumboInstructCompleteResponse.g.verified.cs new file mode 100644 index 0000000000..f48128d13e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2JumboInstructCompleteResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1J2JumboInstructCompleteResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1J2JumboInstructCompleteResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2LargeCompleteResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2LargeCompleteResponse.g.verified.cs new file mode 100644 index 0000000000..3599ecdd06 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2LargeCompleteResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1J2LargeCompleteResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1J2LargeCompleteResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2LargeCustomModelCompleteResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2LargeCustomModelCompleteResponse.g.verified.cs new file mode 100644 index 0000000000..616256da0b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2LargeCustomModelCompleteResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1J2LargeCustomModelCompleteResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1J2LargeCustomModelCompleteResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2LargeInstructCompleteResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2LargeInstructCompleteResponse.g.verified.cs new file mode 100644 index 0000000000..4cd06fa837 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2LargeInstructCompleteResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1J2LargeInstructCompleteResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1J2LargeInstructCompleteResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2LightCompleteResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2LightCompleteResponse.g.verified.cs new file mode 100644 index 0000000000..421f6ae190 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2LightCompleteResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1J2LightCompleteResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1J2LightCompleteResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2LightCustomModelCompleteResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2LightCustomModelCompleteResponse.g.verified.cs new file mode 100644 index 0000000000..389901d435 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2LightCustomModelCompleteResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1J2LightCustomModelCompleteResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1J2LightCustomModelCompleteResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2MidCompleteResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2MidCompleteResponse.g.verified.cs new file mode 100644 index 0000000000..bc3d62cea0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2MidCompleteResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1J2MidCompleteResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1J2MidCompleteResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2MidCustomModelCompleteResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2MidCustomModelCompleteResponse.g.verified.cs new file mode 100644 index 0000000000..47beef8b8b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2MidCustomModelCompleteResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1J2MidCustomModelCompleteResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1J2MidCustomModelCompleteResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2UltraCompleteResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2UltraCompleteResponse.g.verified.cs new file mode 100644 index 0000000000..98037c386f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2UltraCompleteResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1J2UltraCompleteResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1J2UltraCompleteResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2UltraCompleteResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2UltraCompleteResponse2.g.verified.cs new file mode 100644 index 0000000000..38451d45fc --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1J2UltraCompleteResponse2.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1J2UltraCompleteResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1J2UltraCompleteResponse2 + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1LibraryManagementResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1LibraryManagementResponse.g.verified.cs new file mode 100644 index 0000000000..7ba73264fd --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1LibraryManagementResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1LibraryManagementResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1LibraryManagementResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1ParaphrazeResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1ParaphrazeResponse.g.verified.cs new file mode 100644 index 0000000000..c7f26667c2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1ParaphrazeResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1ParaphrazeResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1ParaphrazeResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1TokenizeResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1TokenizeResponse.g.verified.cs new file mode 100644 index 0000000000..97cbfd78a8 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1TokenizeResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1TokenizeResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1TokenizeResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1UpdateCustomModelResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1UpdateCustomModelResponse.g.verified.cs new file mode 100644 index 0000000000..f4b62b135b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1UpdateCustomModelResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1UpdateCustomModelResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1UpdateCustomModelResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1UploadDatasetResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1UploadDatasetResponse.g.verified.cs new file mode 100644 index 0000000000..d547f8bd90 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.V1UploadDatasetResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.V1UploadDatasetResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class V1UploadDatasetResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ValidationError.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ValidationError.g.verified.cs new file mode 100644 index 0000000000..35263b0c14 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.ValidationError.g.verified.cs @@ -0,0 +1,41 @@ +//HintName: G.Models.ValidationError.g.cs + +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ValidationError + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("loc")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList> Loc { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("msg")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Msg { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Type { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.ParaphraseClient.V1Paraphraze.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.ParaphraseClient.V1Paraphraze.g.verified.cs new file mode 100644 index 0000000000..5e0a54a47f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.ParaphraseClient.V1Paraphraze.g.verified.cs @@ -0,0 +1,131 @@ +//HintName: G.ParaphraseClient.V1Paraphraze.g.cs + +#nullable enable + +namespace G +{ + public partial class ParaphraseClient + { + partial void PrepareV1ParaphrazeArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.ParaphraseBody request); + partial void PrepareV1ParaphrazeRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.ParaphraseBody request); + partial void ProcessV1ParaphrazeResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1ParaphrazeResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Paraphrase + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1ParaphrazeAsync( + global::G.ParaphraseBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1ParaphrazeArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/studio/v1/paraphrase", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1ParaphrazeRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1ParaphrazeResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1ParaphrazeResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Paraphrase + /// + /// + /// + /// Default Value: general + /// + /// + /// Default Value: 0 + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1ParaphrazeAsync( + string text, + global::System.AllOf? style = default, + int startIndex = 0, + int endIndex = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.ParaphraseBody + { + Text = text, + Style = style, + StartIndex = startIndex, + EndIndex = endIndex, + }; + + return await V1ParaphrazeAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.ParaphraseClient.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.ParaphraseClient.g.verified.cs new file mode 100644 index 0000000000..461697d462 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.ParaphraseClient.g.verified.cs @@ -0,0 +1,60 @@ +//HintName: G.ParaphraseClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class ParaphraseClient : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.ai21.com/"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::System.Text.Json.JsonSerializerOptions _jsonSerializerOptions; + + + /// + /// Creates a new instance of the ParaphraseClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public ParaphraseClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::System.Text.Json.JsonSerializerOptions(); + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Polyfills.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Polyfills.g.verified.cs new file mode 100644 index 0000000000..241c8bfd80 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Polyfills.g.verified.cs @@ -0,0 +1,54 @@ +//HintName: G.Polyfills.g.cs + +#if !NET6_0_OR_GREATER +#nullable enable + +namespace G +{ + /// + /// + /// + public static partial class OpenApiGeneratorPolyfills + { + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsStringAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsStringAsync(); + } + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsStreamAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsStreamAsync(); + } + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsByteArrayAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsByteArrayAsync(); + } + } +} +#endif \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.RAGEngineClient.V1LibraryAnswer.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.RAGEngineClient.V1LibraryAnswer.g.verified.cs new file mode 100644 index 0000000000..9354c3663d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.RAGEngineClient.V1LibraryAnswer.g.verified.cs @@ -0,0 +1,151 @@ +//HintName: G.RAGEngineClient.V1LibraryAnswer.g.cs + +#nullable enable + +namespace G +{ + public partial class RAGEngineClient + { + partial void PrepareV1LibraryAnswerArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.LibraryAnswerRequest request); + partial void PrepareV1LibraryAnswerRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.LibraryAnswerRequest request); + partial void ProcessV1LibraryAnswerResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1LibraryAnswerResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Answer + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1LibraryAnswerAsync( + global::G.LibraryAnswerRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1LibraryAnswerArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/studio/v1/library/answer", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1LibraryAnswerRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1LibraryAnswerResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1LibraryAnswerResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Answer + /// + /// + /// + /// + /// + /// + /// + /// An enumeration. + /// + /// + /// An enumeration. + /// + /// + /// Default Value: default + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1LibraryAnswerAsync( + string question, + int maxSegments = default, + string? path = default, + global::System.Collections.Generic.IList? labels = default, + global::System.Collections.Generic.IList? fileIds = default, + global::G.AnswerLength? answerLength = default, + global::G.Mode? mode = default, + global::System.AllOf? retrievalStrategy = default, + double retrievalSimilarityThreshold = default, + double hybridSearchAlpha = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.LibraryAnswerRequest + { + Question = question, + MaxSegments = maxSegments, + Path = path, + Labels = labels, + FileIds = fileIds, + AnswerLength = answerLength, + Mode = mode, + RetrievalStrategy = retrievalStrategy, + RetrievalSimilarityThreshold = retrievalSimilarityThreshold, + HybridSearchAlpha = hybridSearchAlpha, + }; + + return await V1LibraryAnswerAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.RAGEngineClient.V1LibraryManagement4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.RAGEngineClient.V1LibraryManagement4.g.verified.cs new file mode 100644 index 0000000000..12c131deea --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.RAGEngineClient.V1LibraryManagement4.g.verified.cs @@ -0,0 +1,90 @@ +//HintName: G.RAGEngineClient.V1LibraryManagement4.g.cs + +#nullable enable + +namespace G +{ + public partial class RAGEngineClient + { + partial void PrepareV1LibraryManagement4Arguments( + global::System.Net.Http.HttpClient httpClient, + ref string fileId); + partial void PrepareV1LibraryManagement4Request( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string fileId); + partial void ProcessV1LibraryManagement4Response( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1LibraryManagement4ResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Generate Documents Signed Url + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1LibraryManagement4Async( + string fileId, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareV1LibraryManagement4Arguments( + httpClient: _httpClient, + fileId: ref fileId); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/studio/v1/library/files/{fileId}/download", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1LibraryManagement4Request( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + fileId: fileId); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1LibraryManagement4Response( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1LibraryManagement4ResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.RAGEngineClient.V1LibrarySearch.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.RAGEngineClient.V1LibrarySearch.g.verified.cs new file mode 100644 index 0000000000..d52e23364f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.RAGEngineClient.V1LibrarySearch.g.verified.cs @@ -0,0 +1,146 @@ +//HintName: G.RAGEngineClient.V1LibrarySearch.g.cs + +#nullable enable + +namespace G +{ + public partial class RAGEngineClient + { + partial void PrepareV1LibrarySearchArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.LibrarySearchRequest request); + partial void PrepareV1LibrarySearchRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.LibrarySearchRequest request); + partial void ProcessV1LibrarySearchResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1LibrarySearchResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Search + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1LibrarySearchAsync( + global::G.LibrarySearchRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1LibrarySearchArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/studio/v1/library/search", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1LibrarySearchRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1LibrarySearchResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1LibrarySearchResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Search + /// + /// + /// + /// + /// + /// + /// + /// Default Value: default + /// + /// + /// Default Value: 1 + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1LibrarySearchAsync( + string query, + int maxSegments = default, + string? path = default, + global::System.Collections.Generic.IList? labels = default, + global::System.Collections.Generic.IList? fileIds = default, + global::System.AllOf? retrievalStrategy = default, + int maxNeighbors = 1, + double retrievalSimilarityThreshold = default, + double hybridSearchAlpha = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.LibrarySearchRequest + { + Query = query, + MaxSegments = maxSegments, + Path = path, + Labels = labels, + FileIds = fileIds, + RetrievalStrategy = retrievalStrategy, + MaxNeighbors = maxNeighbors, + RetrievalSimilarityThreshold = retrievalSimilarityThreshold, + HybridSearchAlpha = hybridSearchAlpha, + }; + + return await V1LibrarySearchAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.RAGEngineClient.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.RAGEngineClient.g.verified.cs new file mode 100644 index 0000000000..88aa9c2496 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.RAGEngineClient.g.verified.cs @@ -0,0 +1,60 @@ +//HintName: G.RAGEngineClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class RAGEngineClient : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.ai21.com/"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::System.Text.Json.JsonSerializerOptions _jsonSerializerOptions; + + + /// + /// Creates a new instance of the RAGEngineClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public RAGEngineClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::System.Text.Json.JsonSerializerOptions(); + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.SegmentationClient.V1Segmentation.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.SegmentationClient.V1Segmentation.g.verified.cs new file mode 100644 index 0000000000..1a929ed6e4 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.SegmentationClient.V1Segmentation.g.verified.cs @@ -0,0 +1,123 @@ +//HintName: G.SegmentationClient.V1Segmentation.g.cs + +#nullable enable + +namespace G +{ + public partial class SegmentationClient + { + partial void PrepareV1SegmentationArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.SegmentationBody request); + partial void PrepareV1SegmentationRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.SegmentationBody request); + partial void ProcessV1SegmentationResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1SegmentationResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Segmentation + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1SegmentationAsync( + global::G.SegmentationBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1SegmentationArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/studio/v1/segmentation", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1SegmentationRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1SegmentationResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1SegmentationResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Segmentation + /// + /// + /// An enumeration. + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1SegmentationAsync( + global::G.DocumentType sourceType, + string source, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.SegmentationBody + { + SourceType = sourceType, + Source = source, + }; + + return await V1SegmentationAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.SegmentationClient.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.SegmentationClient.g.verified.cs new file mode 100644 index 0000000000..e713852571 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.SegmentationClient.g.verified.cs @@ -0,0 +1,60 @@ +//HintName: G.SegmentationClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class SegmentationClient : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.ai21.com/"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::System.Text.Json.JsonSerializerOptions _jsonSerializerOptions; + + + /// + /// Creates a new instance of the SegmentationClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public SegmentationClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::System.Text.Json.JsonSerializerOptions(); + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.SummarizeClient.V1Summarize.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.SummarizeClient.V1Summarize.g.verified.cs new file mode 100644 index 0000000000..79f5245df4 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.SummarizeClient.V1Summarize.g.verified.cs @@ -0,0 +1,131 @@ +//HintName: G.SummarizeClient.V1Summarize.g.cs + +#nullable enable + +namespace G +{ + public partial class SummarizeClient + { + partial void PrepareV1SummarizeArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.SummarizeBody request); + partial void PrepareV1SummarizeRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.SummarizeBody request); + partial void ProcessV1SummarizeResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1SummarizeResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Summarize + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1SummarizeAsync( + global::G.SummarizeBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1SummarizeArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/studio/v1/summarize", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1SummarizeRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1SummarizeResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1SummarizeResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Summarize + /// + /// + /// + /// An enumeration. + /// + /// + /// + /// An enumeration. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1SummarizeAsync( + string source, + global::G.DocumentType sourceType, + string? focus = default, + global::G.SummaryMethod? summaryMethod = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.SummarizeBody + { + Source = source, + SourceType = sourceType, + Focus = focus, + SummaryMethod = summaryMethod, + }; + + return await V1SummarizeAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.SummarizeClient.V1SummarizeBySegment.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.SummarizeClient.V1SummarizeBySegment.g.verified.cs new file mode 100644 index 0000000000..e929995dcb --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.SummarizeClient.V1SummarizeBySegment.g.verified.cs @@ -0,0 +1,126 @@ +//HintName: G.SummarizeClient.V1SummarizeBySegment.g.cs + +#nullable enable + +namespace G +{ + public partial class SummarizeClient + { + partial void PrepareV1SummarizeBySegmentArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.SegmentedSummaryBody request); + partial void PrepareV1SummarizeBySegmentRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.SegmentedSummaryBody request); + partial void ProcessV1SummarizeBySegmentResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1SummarizeBySegmentResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Segmented Summarize + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1SummarizeBySegmentAsync( + global::G.SegmentedSummaryBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1SummarizeBySegmentArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/studio/v1/summarize-by-segment", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1SummarizeBySegmentRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1SummarizeBySegmentResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1SummarizeBySegmentResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Segmented Summarize + /// + /// + /// + /// An enumeration. + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1SummarizeBySegmentAsync( + string source, + global::G.DocumentType sourceType, + string? focus = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.SegmentedSummaryBody + { + Source = source, + SourceType = sourceType, + Focus = focus, + }; + + return await V1SummarizeBySegmentAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.SummarizeClient.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.SummarizeClient.g.verified.cs new file mode 100644 index 0000000000..2f1274d504 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.SummarizeClient.g.verified.cs @@ -0,0 +1,60 @@ +//HintName: G.SummarizeClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class SummarizeClient : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.ai21.com/"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::System.Text.Json.JsonSerializerOptions _jsonSerializerOptions; + + + /// + /// Creates a new instance of the SummarizeClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public SummarizeClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::System.Text.Json.JsonSerializerOptions(); + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.TokenizeClient.V1Tokenize.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.TokenizeClient.V1Tokenize.g.verified.cs new file mode 100644 index 0000000000..f54a213e07 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.TokenizeClient.V1Tokenize.g.verified.cs @@ -0,0 +1,118 @@ +//HintName: G.TokenizeClient.V1Tokenize.g.cs + +#nullable enable + +namespace G +{ + public partial class TokenizeClient + { + partial void PrepareV1TokenizeArguments( + global::System.Net.Http.HttpClient httpClient, + global::G.TokenizeBody request); + partial void PrepareV1TokenizeRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.TokenizeBody request); + partial void ProcessV1TokenizeResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1TokenizeResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Tokenize + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1TokenizeAsync( + global::G.TokenizeBody request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareV1TokenizeArguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/studio/v1/tokenize", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareV1TokenizeRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessV1TokenizeResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessV1TokenizeResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Tokenize + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1TokenizeAsync( + string text, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.TokenizeBody + { + Text = text, + }; + + return await V1TokenizeAsync( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.TokenizeClient.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.TokenizeClient.g.verified.cs new file mode 100644 index 0000000000..b28cfeaf6a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.TokenizeClient.g.verified.cs @@ -0,0 +1,60 @@ +//HintName: G.TokenizeClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class TokenizeClient : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api.ai21.com/"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::System.Text.Json.JsonSerializerOptions _jsonSerializerOptions; + + + /// + /// Creates a new instance of the TokenizeClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public TokenizeClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::System.Text.Json.JsonSerializerOptions(); + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.AllOf1.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.AllOf1.g.verified.cs new file mode 100644 index 0000000000..4f6e7a3c87 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.AllOf1.g.verified.cs @@ -0,0 +1,54 @@ +//HintName: JsonConverters.AllOf1.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public class AllOfJsonConverter : global::System.Text.Json.Serialization.JsonConverter> + { + /// + public override global::System.AllOf Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + var + readerCopy = reader; + T1? value1 = default; + try + { + value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::System.AllOf( + value1 + ); + + if (value1 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::System.AllOf value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + if (value.IsValue1) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeof(T1), options); + } + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.AllOfFactory1.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.AllOfFactory1.g.verified.cs new file mode 100644 index 0000000000..7a87110e35 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.AllOfFactory1.g.verified.cs @@ -0,0 +1,26 @@ +//HintName: JsonConverters.AllOfFactory1.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class AllOfJsonConverterFactory1 : global::System.Text.Json.Serialization.JsonConverterFactory + { + /// + public override bool CanConvert(global::System.Type? typeToConvert) + { + return typeToConvert is { IsGenericType: true } && typeToConvert.GetGenericTypeDefinition() == typeof(global::System.AllOf<>); + } + + /// + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + typeToConvert = typeToConvert ?? throw new global::System.ArgumentNullException(nameof(typeToConvert)); + + return (global::System.Text.Json.Serialization.JsonConverter)global::System.Activator.CreateInstance( + typeof(AllOfJsonConverter<>).MakeGenericType(typeToConvert.GenericTypeArguments))!; + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.AnswerLength.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.AnswerLength.g.verified.cs new file mode 100644 index 0000000000..607f920d04 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.AnswerLength.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.AnswerLength.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class AnswerLengthJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.AnswerLength Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.AnswerLengthExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.AnswerLength)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.AnswerLength value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.AnswerLengthExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.AnswerLengthNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.AnswerLengthNullable.g.verified.cs new file mode 100644 index 0000000000..c5fe2ee49b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.AnswerLengthNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.AnswerLengthNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class AnswerLengthNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.AnswerLength? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.AnswerLengthExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.AnswerLength)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.AnswerLength? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.AnswerLengthExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.AnyOf2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.AnyOf2.g.verified.cs new file mode 100644 index 0000000000..2bb1d9a806 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.AnyOf2.g.verified.cs @@ -0,0 +1,73 @@ +//HintName: JsonConverters.AnyOf2.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public class AnyOfJsonConverter : global::System.Text.Json.Serialization.JsonConverter> + { + /// + public override global::System.AnyOf Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + var + readerCopy = reader; + T1? value1 = default; + try + { + value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + T2? value2 = default; + try + { + value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::System.AnyOf( + value1, + value2 + ); + + if (value1 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (value2 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::System.AnyOf value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + if (value.IsValue1) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeof(T1), options); + } + else if (value.IsValue2) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeof(T2), options); + } + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.AnyOfFactory2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.AnyOfFactory2.g.verified.cs new file mode 100644 index 0000000000..e6208cd916 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.AnyOfFactory2.g.verified.cs @@ -0,0 +1,26 @@ +//HintName: JsonConverters.AnyOfFactory2.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class AnyOfJsonConverterFactory2 : global::System.Text.Json.Serialization.JsonConverterFactory + { + /// + public override bool CanConvert(global::System.Type? typeToConvert) + { + return typeToConvert is { IsGenericType: true } && typeToConvert.GetGenericTypeDefinition() == typeof(global::System.AnyOf<,>); + } + + /// + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + typeToConvert = typeToConvert ?? throw new global::System.ArgumentNullException(nameof(typeToConvert)); + + return (global::System.Text.Json.Serialization.JsonConverter)global::System.Activator.CreateInstance( + typeof(AnyOfJsonConverter<,>).MakeGenericType(typeToConvert.GenericTypeArguments))!; + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.AssistantMessageRole.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.AssistantMessageRole.g.verified.cs new file mode 100644 index 0000000000..49977e65b2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.AssistantMessageRole.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.AssistantMessageRole.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class AssistantMessageRoleJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.AssistantMessageRole Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.AssistantMessageRoleExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.AssistantMessageRole)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.AssistantMessageRole value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.AssistantMessageRoleExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.AssistantMessageRoleNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.AssistantMessageRoleNullable.g.verified.cs new file mode 100644 index 0000000000..c273b8d01c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.AssistantMessageRoleNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.AssistantMessageRoleNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class AssistantMessageRoleNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.AssistantMessageRole? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.AssistantMessageRoleExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.AssistantMessageRole)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.AssistantMessageRole? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.AssistantMessageRoleExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ChatStreamingFirstDeltaRole.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ChatStreamingFirstDeltaRole.g.verified.cs new file mode 100644 index 0000000000..be12b77c4d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ChatStreamingFirstDeltaRole.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.ChatStreamingFirstDeltaRole.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ChatStreamingFirstDeltaRoleJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ChatStreamingFirstDeltaRole Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ChatStreamingFirstDeltaRoleExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ChatStreamingFirstDeltaRole)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ChatStreamingFirstDeltaRole value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.ChatStreamingFirstDeltaRoleExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ChatStreamingFirstDeltaRoleNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ChatStreamingFirstDeltaRoleNullable.g.verified.cs new file mode 100644 index 0000000000..60df612704 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ChatStreamingFirstDeltaRoleNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.ChatStreamingFirstDeltaRoleNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ChatStreamingFirstDeltaRoleNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ChatStreamingFirstDeltaRole? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ChatStreamingFirstDeltaRoleExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ChatStreamingFirstDeltaRole)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ChatStreamingFirstDeltaRole? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.ChatStreamingFirstDeltaRoleExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ConversationalRagFlowPublicFieldsRetrievalStrategy.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ConversationalRagFlowPublicFieldsRetrievalStrategy.g.verified.cs new file mode 100644 index 0000000000..15dc82727b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ConversationalRagFlowPublicFieldsRetrievalStrategy.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.ConversationalRagFlowPublicFieldsRetrievalStrategy.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ConversationalRagFlowPublicFieldsRetrievalStrategyJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ConversationalRagFlowPublicFieldsRetrievalStrategy Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ConversationalRagFlowPublicFieldsRetrievalStrategyExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ConversationalRagFlowPublicFieldsRetrievalStrategy)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ConversationalRagFlowPublicFieldsRetrievalStrategy value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.ConversationalRagFlowPublicFieldsRetrievalStrategyExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ConversationalRagFlowPublicFieldsRetrievalStrategyNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ConversationalRagFlowPublicFieldsRetrievalStrategyNullable.g.verified.cs new file mode 100644 index 0000000000..012c9e6865 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ConversationalRagFlowPublicFieldsRetrievalStrategyNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.ConversationalRagFlowPublicFieldsRetrievalStrategyNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ConversationalRagFlowPublicFieldsRetrievalStrategyNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ConversationalRagFlowPublicFieldsRetrievalStrategy? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ConversationalRagFlowPublicFieldsRetrievalStrategyExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ConversationalRagFlowPublicFieldsRetrievalStrategy)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ConversationalRagFlowPublicFieldsRetrievalStrategy? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.ConversationalRagFlowPublicFieldsRetrievalStrategyExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.CorrectionType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.CorrectionType.g.verified.cs new file mode 100644 index 0000000000..2f7675f2ae --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.CorrectionType.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.CorrectionType.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class CorrectionTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.CorrectionType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.CorrectionTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.CorrectionType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.CorrectionType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.CorrectionTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.CorrectionTypeNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.CorrectionTypeNullable.g.verified.cs new file mode 100644 index 0000000000..8610562d43 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.CorrectionTypeNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.CorrectionTypeNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class CorrectionTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.CorrectionType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.CorrectionTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.CorrectionType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.CorrectionType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.CorrectionTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.CustomModelType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.CustomModelType.g.verified.cs new file mode 100644 index 0000000000..c2c31ac01c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.CustomModelType.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.CustomModelType.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class CustomModelTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.CustomModelType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.CustomModelTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.CustomModelType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.CustomModelType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.CustomModelTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.CustomModelTypeNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.CustomModelTypeNullable.g.verified.cs new file mode 100644 index 0000000000..0aa97f6718 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.CustomModelTypeNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.CustomModelTypeNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class CustomModelTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.CustomModelType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.CustomModelTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.CustomModelType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.CustomModelType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.CustomModelTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.DocumentType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.DocumentType.g.verified.cs new file mode 100644 index 0000000000..188c170b5d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.DocumentType.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.DocumentType.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class DocumentTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.DocumentType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.DocumentTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.DocumentType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.DocumentType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.DocumentTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.DocumentTypeNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.DocumentTypeNullable.g.verified.cs new file mode 100644 index 0000000000..8f5dfa69b7 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.DocumentTypeNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.DocumentTypeNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class DocumentTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.DocumentType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.DocumentTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.DocumentType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.DocumentType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.DocumentTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.EmbedType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.EmbedType.g.verified.cs new file mode 100644 index 0000000000..3b3c84fdd0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.EmbedType.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.EmbedType.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class EmbedTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.EmbedType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.EmbedTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.EmbedType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.EmbedType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.EmbedTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.EmbedTypeNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.EmbedTypeNullable.g.verified.cs new file mode 100644 index 0000000000..d3d074a251 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.EmbedTypeNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.EmbedTypeNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class EmbedTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.EmbedType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.EmbedTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.EmbedType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.EmbedType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.EmbedTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.FileStatus.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.FileStatus.g.verified.cs new file mode 100644 index 0000000000..747b0879ed --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.FileStatus.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.FileStatus.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class FileStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.FileStatus Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.FileStatusExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.FileStatus)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.FileStatus value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.FileStatusExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.FileStatusNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.FileStatusNullable.g.verified.cs new file mode 100644 index 0000000000..f3a41bcc4f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.FileStatusNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.FileStatusNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class FileStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.FileStatus? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.FileStatusExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.FileStatus)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.FileStatus? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.FileStatusExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.MessageRole.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.MessageRole.g.verified.cs new file mode 100644 index 0000000000..75eeab6b05 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.MessageRole.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.MessageRole.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class MessageRoleJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.MessageRole Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.MessageRoleExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.MessageRole)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.MessageRole value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.MessageRoleExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.MessageRoleNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.MessageRoleNullable.g.verified.cs new file mode 100644 index 0000000000..fcbc62b113 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.MessageRoleNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.MessageRoleNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class MessageRoleNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.MessageRole? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.MessageRoleExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.MessageRole)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.MessageRole? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.MessageRoleExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.Mode.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.Mode.g.verified.cs new file mode 100644 index 0000000000..11733de3c5 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.Mode.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.Mode.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ModeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.Mode Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ModeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.Mode)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.Mode value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.ModeExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ModeNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ModeNullable.g.verified.cs new file mode 100644 index 0000000000..bf31a53893 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ModeNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.ModeNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ModeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.Mode? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ModeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.Mode)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.Mode? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.ModeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ModelName.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ModelName.g.verified.cs new file mode 100644 index 0000000000..b181f55b12 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ModelName.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.ModelName.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ModelNameJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ModelName Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ModelNameExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ModelName)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ModelName value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.ModelNameExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ModelNameNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ModelNameNullable.g.verified.cs new file mode 100644 index 0000000000..a2f99d9ef8 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ModelNameNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.ModelNameNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ModelNameNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ModelName? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ModelNameExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ModelName)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ModelName? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.ModelNameExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.OneOf4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.OneOf4.g.verified.cs new file mode 100644 index 0000000000..a37f554bdd --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.OneOf4.g.verified.cs @@ -0,0 +1,111 @@ +//HintName: JsonConverters.OneOf4.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public class OneOfJsonConverter : global::System.Text.Json.Serialization.JsonConverter> + { + /// + public override global::System.OneOf Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + var + readerCopy = reader; + T1? value1 = default; + try + { + value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + T2? value2 = default; + try + { + value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + T3? value3 = default; + try + { + value3 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + T4? value4 = default; + try + { + value4 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::System.OneOf( + value1, + value2, + value3, + value4 + ); + + if (value1 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (value2 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (value3 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (value4 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::System.OneOf value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + if (value.IsValue1) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeof(T1), options); + } + else if (value.IsValue2) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeof(T2), options); + } + else if (value.IsValue3) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value3, typeof(T3), options); + } + else if (value.IsValue4) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value4, typeof(T4), options); + } + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.OneOfFactory4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.OneOfFactory4.g.verified.cs new file mode 100644 index 0000000000..87b4c7ada9 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.OneOfFactory4.g.verified.cs @@ -0,0 +1,26 @@ +//HintName: JsonConverters.OneOfFactory4.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class OneOfJsonConverterFactory4 : global::System.Text.Json.Serialization.JsonConverterFactory + { + /// + public override bool CanConvert(global::System.Type? typeToConvert) + { + return typeToConvert is { IsGenericType: true } && typeToConvert.GetGenericTypeDefinition() == typeof(global::System.OneOf<,,,>); + } + + /// + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + typeToConvert = typeToConvert ?? throw new global::System.ArgumentNullException(nameof(typeToConvert)); + + return (global::System.Text.Json.Serialization.JsonConverter)global::System.Activator.CreateInstance( + typeof(OneOfJsonConverter<,,,>).MakeGenericType(typeToConvert.GenericTypeArguments))!; + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ResponseFormatType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ResponseFormatType.g.verified.cs new file mode 100644 index 0000000000..d5511d8ba1 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ResponseFormatType.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.ResponseFormatType.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ResponseFormatTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ResponseFormatType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ResponseFormatTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ResponseFormatType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ResponseFormatType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.ResponseFormatTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ResponseFormatTypeNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ResponseFormatTypeNullable.g.verified.cs new file mode 100644 index 0000000000..80649cbe91 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ResponseFormatTypeNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.ResponseFormatTypeNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ResponseFormatTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ResponseFormatType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ResponseFormatTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ResponseFormatType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ResponseFormatType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.ResponseFormatTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.RetrievalStrategy3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.RetrievalStrategy3.g.verified.cs new file mode 100644 index 0000000000..4d3fc5d6bc --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.RetrievalStrategy3.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.RetrievalStrategy3.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class RetrievalStrategy3JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.RetrievalStrategy3 Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.RetrievalStrategy3Extensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.RetrievalStrategy3)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.RetrievalStrategy3 value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.RetrievalStrategy3Extensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.RetrievalStrategy3Nullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.RetrievalStrategy3Nullable.g.verified.cs new file mode 100644 index 0000000000..683882abbf --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.RetrievalStrategy3Nullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.RetrievalStrategy3Nullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class RetrievalStrategy3NullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.RetrievalStrategy3? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.RetrievalStrategy3Extensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.RetrievalStrategy3)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.RetrievalStrategy3? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.RetrievalStrategy3Extensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.RoleType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.RoleType.g.verified.cs new file mode 100644 index 0000000000..17e4deecb9 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.RoleType.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.RoleType.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class RoleTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.RoleType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.RoleTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.RoleType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.RoleType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.RoleTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.RoleTypeNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.RoleTypeNullable.g.verified.cs new file mode 100644 index 0000000000..247dca2488 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.RoleTypeNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.RoleTypeNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class RoleTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.RoleType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.RoleTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.RoleType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.RoleType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.RoleTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.StyleType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.StyleType.g.verified.cs new file mode 100644 index 0000000000..23721458dd --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.StyleType.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.StyleType.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class StyleTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.StyleType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.StyleTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.StyleType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.StyleType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.StyleTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.StyleTypeNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.StyleTypeNullable.g.verified.cs new file mode 100644 index 0000000000..75a9a3d5da --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.StyleTypeNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.StyleTypeNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class StyleTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.StyleType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.StyleTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.StyleType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.StyleType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.StyleTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.SummaryMethod.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.SummaryMethod.g.verified.cs new file mode 100644 index 0000000000..a1a52a5ca9 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.SummaryMethod.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.SummaryMethod.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class SummaryMethodJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.SummaryMethod Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.SummaryMethodExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.SummaryMethod)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.SummaryMethod value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.SummaryMethodExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.SummaryMethodNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.SummaryMethodNullable.g.verified.cs new file mode 100644 index 0000000000..c8228d386a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.SummaryMethodNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.SummaryMethodNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class SummaryMethodNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.SummaryMethod? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.SummaryMethodExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.SummaryMethod)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.SummaryMethod? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.SummaryMethodExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.SystemMessageRole.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.SystemMessageRole.g.verified.cs new file mode 100644 index 0000000000..57f5f60a1c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.SystemMessageRole.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.SystemMessageRole.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class SystemMessageRoleJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.SystemMessageRole Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.SystemMessageRoleExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.SystemMessageRole)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.SystemMessageRole value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.SystemMessageRoleExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.SystemMessageRoleNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.SystemMessageRoleNullable.g.verified.cs new file mode 100644 index 0000000000..5ab2a68abf --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.SystemMessageRoleNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.SystemMessageRoleNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class SystemMessageRoleNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.SystemMessageRole? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.SystemMessageRoleExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.SystemMessageRole)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.SystemMessageRole? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.SystemMessageRoleExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ToolCallType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ToolCallType.g.verified.cs new file mode 100644 index 0000000000..822ebd91f6 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ToolCallType.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.ToolCallType.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ToolCallTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ToolCallType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ToolCallTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ToolCallType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ToolCallType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.ToolCallTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ToolCallTypeNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ToolCallTypeNullable.g.verified.cs new file mode 100644 index 0000000000..6bee1146fa --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ToolCallTypeNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.ToolCallTypeNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ToolCallTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ToolCallType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ToolCallTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ToolCallType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ToolCallType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.ToolCallTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ToolDefinitionType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ToolDefinitionType.g.verified.cs new file mode 100644 index 0000000000..2e878cd8a4 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ToolDefinitionType.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.ToolDefinitionType.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ToolDefinitionTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ToolDefinitionType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ToolDefinitionTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ToolDefinitionType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ToolDefinitionType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.ToolDefinitionTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ToolDefinitionTypeNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ToolDefinitionTypeNullable.g.verified.cs new file mode 100644 index 0000000000..935f84a90a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ToolDefinitionTypeNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.ToolDefinitionTypeNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ToolDefinitionTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ToolDefinitionType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ToolDefinitionTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ToolDefinitionType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ToolDefinitionType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.ToolDefinitionTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ToolMessageRole.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ToolMessageRole.g.verified.cs new file mode 100644 index 0000000000..eaf3b584f0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ToolMessageRole.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.ToolMessageRole.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ToolMessageRoleJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ToolMessageRole Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ToolMessageRoleExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ToolMessageRole)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ToolMessageRole value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.ToolMessageRoleExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ToolMessageRoleNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ToolMessageRoleNullable.g.verified.cs new file mode 100644 index 0000000000..cda9ecef30 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ToolMessageRoleNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.ToolMessageRoleNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ToolMessageRoleNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ToolMessageRole? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ToolMessageRoleExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ToolMessageRole)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ToolMessageRole? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.ToolMessageRoleExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ToolParametersType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ToolParametersType.g.verified.cs new file mode 100644 index 0000000000..6688bbf254 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ToolParametersType.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.ToolParametersType.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ToolParametersTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ToolParametersType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ToolParametersTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ToolParametersType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ToolParametersType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.ToolParametersTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ToolParametersTypeNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ToolParametersTypeNullable.g.verified.cs new file mode 100644 index 0000000000..0578708492 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.ToolParametersTypeNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.ToolParametersTypeNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ToolParametersTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ToolParametersType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ToolParametersTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ToolParametersType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ToolParametersType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.ToolParametersTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.UserMessageRole.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.UserMessageRole.g.verified.cs new file mode 100644 index 0000000000..667dcdf975 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.UserMessageRole.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.UserMessageRole.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class UserMessageRoleJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.UserMessageRole Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.UserMessageRoleExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.UserMessageRole)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.UserMessageRole value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.UserMessageRoleExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.UserMessageRoleNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.UserMessageRoleNullable.g.verified.cs new file mode 100644 index 0000000000..abec314583 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.UserMessageRoleNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.UserMessageRoleNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class UserMessageRoleNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.UserMessageRole? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.UserMessageRoleExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.UserMessageRole)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.UserMessageRole? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.UserMessageRoleExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#OneOf.4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#OneOf.4.g.verified.cs new file mode 100644 index 0000000000..9ea95f4cbc --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#OneOf.4.g.verified.cs @@ -0,0 +1,248 @@ +//HintName: OneOf.4.g.cs +using System.Linq; + +#nullable enable + +namespace System +{ + /// + /// + /// + public readonly partial struct OneOf : global::System.IEquatable> + { + /// + /// + /// +#if NET6_0_OR_GREATER + public T1? Value1 { get; init; } +#else + public T1? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator OneOf(T1 value) => new OneOf(value); + + /// + /// + /// + public static implicit operator T1?(OneOf @this) => @this.Value1; + + /// + /// + /// + public OneOf(T1? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public T2? Value2 { get; init; } +#else + public T2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator OneOf(T2 value) => new OneOf(value); + + /// + /// + /// + public static implicit operator T2?(OneOf @this) => @this.Value2; + + /// + /// + /// + public OneOf(T2? value) + { + Value2 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public T3? Value3 { get; init; } +#else + public T3? Value3 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value3))] +#endif + public bool IsValue3 => Value3 != null; + + /// + /// + /// + public static implicit operator OneOf(T3 value) => new OneOf(value); + + /// + /// + /// + public static implicit operator T3?(OneOf @this) => @this.Value3; + + /// + /// + /// + public OneOf(T3? value) + { + Value3 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public T4? Value4 { get; init; } +#else + public T4? Value4 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value4))] +#endif + public bool IsValue4 => Value4 != null; + + /// + /// + /// + public static implicit operator OneOf(T4 value) => new OneOf(value); + + /// + /// + /// + public static implicit operator T4?(OneOf @this) => @this.Value4; + + /// + /// + /// + public OneOf(T4? value) + { + Value4 = value; + } + + /// + /// + /// + public OneOf( + T1? value1, + T2? value2, + T3? value3, + T4? value4 + ) + { + Value1 = value1; + Value2 = value2; + Value3 = value3; + Value4 = value4; + } + + /// + /// + /// + public object? Object => + Value4 as object ?? + Value3 as object ?? + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 || !IsValue1 && IsValue2 && !IsValue3 && !IsValue4 || !IsValue1 && !IsValue2 && IsValue3 && !IsValue4 || !IsValue1 && !IsValue2 && !IsValue3 && IsValue4; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(T1), + Value2, + typeof(T2), + Value3, + typeof(T3), + Value4, + typeof(T4), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(OneOf other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value3, other.Value3) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value4, other.Value4) + ; + } + + /// + /// + /// + public static bool operator ==(OneOf obj1, OneOf obj2) + { + return global::System.Collections.Generic.EqualityComparer>.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(OneOf obj1, OneOf obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is OneOf o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/Tests.Cohere_Diagnostics.verified.txt b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/Tests.Cohere_Diagnostics.verified.txt new file mode 100644 index 0000000000..ad47dbb93f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/Tests.Cohere_Diagnostics.verified.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.Authorizations.Bearer.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.Authorizations.Bearer.g.verified.cs new file mode 100644 index 0000000000..9e50a716ae --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.Authorizations.Bearer.g.verified.cs @@ -0,0 +1,23 @@ +//HintName: G.Api.Authorizations.Bearer.g.cs + +#nullable enable + +namespace G +{ + public sealed partial class Api + { + /// + /// Authorize using bearer authentication. + /// + /// + public void AuthorizeUsingBearer( + string apiKey) + { + apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + + _httpClient.DefaultRequestHeaders.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: "Bearer", + parameter: apiKey); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.Chat.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.Chat.g.verified.cs new file mode 100644 index 0000000000..b899ec6be8 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.Chat.g.verified.cs @@ -0,0 +1,332 @@ +//HintName: G.Api.Chat.g.cs + +#nullable enable + +namespace G +{ + public partial class Api + { + partial void PrepareChatArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? xClientName, + global::G.ChatRequest request); + partial void PrepareChatRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? xClientName, + global::G.ChatRequest request); + partial void ProcessChatResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessChatResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Chat
+ /// Generates a text response to a user message.
+ /// To learn how to use the Chat API with Streaming and RAG follow our [Text Generation guides](https://docs.cohere.com/docs/chat-api). + ///
+ /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ChatAsync( + string? xClientName, + global::G.ChatRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareChatArguments( + httpClient: _httpClient, + xClientName: ref xClientName, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/chat", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareChatRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + xClientName: xClientName, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessChatResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessChatResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject?>(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Chat
+ /// Generates a text response to a user message.
+ /// To learn how to use the Chat API with Streaming and RAG follow our [Text Generation guides](https://docs.cohere.com/docs/chat-api). + ///
+ /// + /// + /// Text input for the model to respond to.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + /// + /// + /// Defaults to `command-r-plus`.
+ /// The name of a compatible [Cohere model](https://docs.cohere.com/docs/models) or the ID of a [fine-tuned](https://docs.cohere.com/docs/chat-fine-tuning) model.
+ /// Compatible Deployments: Cohere Platform, Private Deployments + /// + /// + /// Defaults to `false`.
+ /// When `true`, the response will be a JSON stream of events. The final event will contain the complete response, and will have an `event_type` of `"stream-end"`.
+ /// Streaming is beneficial for user interfaces that render the contents of the response piece by piece, as it gets generated.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + /// + /// + /// When specified, the default Cohere preamble will be replaced with the provided one. Preambles are a part of the prompt used to adjust the model's overall behavior and conversation style, and use the `SYSTEM` role.
+ /// The `SYSTEM` role is also used for the contents of the optional `chat_history=` parameter. When used with the `chat_history=` parameter it adds content throughout a conversation. Conversely, when used with the `preamble=` parameter it adds content at the start of the conversation only.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + /// + /// + /// A list of previous messages between the user and the model, giving the model conversational context for responding to the user's `message`.
+ /// Each item represents a single message in the chat history, excluding the current user turn. It has two properties: `role` and `message`. The `role` identifies the sender (`CHATBOT`, `SYSTEM`, or `USER`), while the `message` contains the text content.
+ /// The chat_history parameter should not be used for `SYSTEM` messages in most cases. Instead, to add a `SYSTEM` role message at the beginning of a conversation, the `preamble` parameter should be used.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + /// + /// + /// An alternative to `chat_history`.
+ /// Providing a `conversation_id` creates or resumes a persisted conversation with the specified ID. The ID can be any non empty string.
+ /// Compatible Deployments: Cohere Platform + /// + /// + /// Defaults to `AUTO` when `connectors` are specified and `OFF` in all other cases.
+ /// Dictates how the prompt will be constructed.
+ /// With `prompt_truncation` set to "AUTO", some elements from `chat_history` and `documents` will be dropped in an attempt to construct a prompt that fits within the model's context length limit. During this process the order of the documents and chat history will be changed and ranked by relevance.
+ /// With `prompt_truncation` set to "AUTO_PRESERVE_ORDER", some elements from `chat_history` and `documents` will be dropped in an attempt to construct a prompt that fits within the model's context length limit. During this process the order of the documents and chat history will be preserved as they are inputted into the API.
+ /// With `prompt_truncation` set to "OFF", no elements will be dropped. If the sum of the inputs exceeds the model's context length limit, a `TooManyTokens` error will be returned.
+ /// Compatible Deployments: Cohere Platform Only AUTO_PRESERVE_ORDER: Azure, AWS Sagemaker/Bedrock, Private Deployments + /// + /// + /// Accepts `{"id": "web-search"}`, and/or the `"id"` for a custom [connector](https://docs.cohere.com/docs/connectors), if you've [created](https://docs.cohere.com/docs/creating-and-deploying-a-connector) one.
+ /// When specified, the model's reply will be enriched with information found by querying each of the connectors (RAG).
+ /// Compatible Deployments: Cohere Platform + /// + /// + /// Defaults to `false`.
+ /// When `true`, the response will only contain a list of generated search queries, but no search will take place, and no reply from the model to the user's `message` will be generated.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + /// + /// + /// A list of relevant documents that the model can cite to generate a more accurate reply. Each document is a string-string dictionary.
+ /// Example:
+ /// ```
+ /// [
+ /// { "title": "Tall penguins", "text": "Emperor penguins are the tallest." },
+ /// { "title": "Penguin habitats", "text": "Emperor penguins only live in Antarctica." },
+ /// ]
+ /// ```
+ /// Keys and values from each document will be serialized to a string and passed to the model. The resulting generation will include citations that reference some of these documents.
+ /// Some suggested keys are "text", "author", and "date". For better generation quality, it is recommended to keep the total word count of the strings in the dictionary to under 300 words.
+ /// An `id` field (string) can be optionally supplied to identify the document in the citations. This field will not be passed to the model.
+ /// An `_excludes` field (array of strings) can be optionally supplied to omit some key-value pairs from being shown to the model. The omitted fields will still show up in the citation object. The "_excludes" field will not be passed to the model.
+ /// See ['Document Mode'](https://docs.cohere.com/docs/retrieval-augmented-generation-rag#document-mode) in the guide for more information.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + /// + /// + /// Defaults to `"accurate"`.
+ /// Dictates the approach taken to generating citations as part of the RAG flow by allowing the user to specify whether they want `"accurate"` results, `"fast"` results or no results.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + /// + /// + /// Defaults to `0.3`.
+ /// A non-negative float that tunes the degree of randomness in generation. Lower temperatures mean less random generations, and higher temperatures mean more random generations.
+ /// Randomness can be further maximized by increasing the value of the `p` parameter.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + /// + /// + /// The maximum number of tokens the model will generate as part of the response. Note: Setting a low value may result in incomplete generations.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + /// + /// + /// The maximum number of input tokens to send to the model. If not specified, `max_input_tokens` is the model's context length limit minus a small buffer.
+ /// Input will be truncated according to the `prompt_truncation` parameter.
+ /// Compatible Deployments: Cohere Platform + /// + /// + /// Ensures only the top `k` most likely tokens are considered for generation at each step.
+ /// Defaults to `0`, min value of `0`, max value of `500`.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments
+ /// Default Value: 0 + /// + /// + /// Ensures that only the most likely tokens, with total probability mass of `p`, are considered for generation at each step. If both `k` and `p` are enabled, `p` acts after `k`.
+ /// Defaults to `0.75`. min value of `0.01`, max value of `0.99`.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments
+ /// Default Value: 0.75 + /// + /// + /// If specified, the backend will make a best effort to sample tokens
+ /// deterministically, such that repeated requests with the same
+ /// seed and parameters should return the same result. However,
+ /// determinism cannot be totally guaranteed.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + /// + /// + /// A list of up to 5 strings that the model will use to stop generation. If the model generates a string that matches any of the strings in the list, it will stop generating tokens and return the generated text up to that point not including the stop sequence.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + /// + /// + /// Defaults to `0.0`, min value of `0.0`, max value of `1.0`.
+ /// Used to reduce repetitiveness of generated tokens. The higher the value, the stronger a penalty is applied to previously present tokens, proportional to how many times they have already appeared in the prompt or prior generation.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + /// + /// + /// Defaults to `0.0`, min value of `0.0`, max value of `1.0`.
+ /// Used to reduce repetitiveness of generated tokens. Similar to `frequency_penalty`, except that this penalty is applied equally to all tokens that have already appeared, regardless of their exact frequencies.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + /// + /// + /// A list of available tools (functions) that the model may suggest invoking before producing a text response.
+ /// When `tools` is passed (without `tool_results`), the `text` field in the response will be `""` and the `tool_calls` field in the response will be populated with a list of tool calls that need to be made. If no calls need to be made, the `tool_calls` array will be empty.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + /// + /// + /// A list of results from invoking tools recommended by the model in the previous chat turn. Results are used to produce a text response and will be referenced in citations. When using `tool_results`, `tools` must be passed as well.
+ /// Each tool_result contains information about how it was invoked, as well as a list of outputs in the form of dictionaries.
+ /// **Note**: `outputs` must be a list of objects. If your tool returns a single object (eg `{"status": 200}`), make sure to wrap it in a list.
+ /// ```
+ /// tool_results = [
+ /// {
+ /// "call": {
+ /// "name": <tool name>,
+ /// "parameters": {
+ /// <param name>: <param value>
+ /// }
+ /// },
+ /// "outputs": [{
+ /// <key>: <value>
+ /// }]
+ /// },
+ /// ...
+ /// ]
+ /// ```
+ /// **Note**: Chat calls with `tool_results` should not be included in the Chat history to avoid duplication of the message text.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + /// + /// + /// Forces the chat to be single step. Defaults to `false`. + /// + /// + /// Configuration for forcing the model output to adhere to the specified format. Supported on [Command R](https://docs.cohere.com/docs/command-r), [Command R+](https://docs.cohere.com/docs/command-r-plus) and newer models.
+ /// The model can be forced into outputting JSON objects (with up to 5 levels of nesting) by setting `{ "type": "json_object" }`.
+ /// A [JSON Schema](https://json-schema.org/) can optionally be provided, to ensure a specific structure.
+ /// **Note**: When using `{ "type": "json_object" }` your `message` should always explicitly instruct the model to generate a JSON (eg: _"Generate a JSON ..."_) . Otherwise the model may end up getting stuck generating an infinite stream of characters and eventually run out of context length.
+ /// **Limitation**: The parameter is not supported in RAG mode (when any of `connectors`, `documents`, `tools`, `tool_results` are provided). + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ChatAsync( + string message, + string? xClientName = default, + string? model = default, + bool stream = default, + string? preamble = default, + global::System.Collections.Generic.IList? chatHistory = default, + string? conversationId = default, + global::G.ChatRequestPromptTruncation? promptTruncation = default, + global::System.Collections.Generic.IList? connectors = default, + bool searchQueriesOnly = default, + global::System.Collections.Generic.IList? documents = default, + global::G.ChatRequestCitationQuality? citationQuality = default, + float temperature = default, + int maxTokens = default, + int maxInputTokens = default, + int k = 0, + double p = 0.75, + int seed = default, + global::System.Collections.Generic.IList? stopSequences = default, + double frequencyPenalty = default, + double presencePenalty = default, + global::System.Collections.Generic.IList? tools = default, + global::System.Collections.Generic.IList? toolResults = default, + bool forceSingleStep = default, + global::G.ResponseFormat? responseFormat = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.ChatRequest + { + Message = message, + Model = model, + Stream = stream, + Preamble = preamble, + ChatHistory = chatHistory, + ConversationId = conversationId, + PromptTruncation = promptTruncation, + Connectors = connectors, + SearchQueriesOnly = searchQueriesOnly, + Documents = documents, + CitationQuality = citationQuality, + Temperature = temperature, + MaxTokens = maxTokens, + MaxInputTokens = maxInputTokens, + K = k, + P = p, + Seed = seed, + StopSequences = stopSequences, + FrequencyPenalty = frequencyPenalty, + PresencePenalty = presencePenalty, + Tools = tools, + ToolResults = toolResults, + ForceSingleStep = forceSingleStep, + ResponseFormat = responseFormat, + }; + + return await ChatAsync( + xClientName: xClientName, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.Chatv2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.Chatv2.g.verified.cs new file mode 100644 index 0000000000..33872590fe --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.Chatv2.g.verified.cs @@ -0,0 +1,200 @@ +//HintName: G.Api.Chatv2.g.cs + +#nullable enable + +namespace G +{ + public partial class Api + { + partial void PrepareChatv2Arguments( + global::System.Net.Http.HttpClient httpClient, + global::G.Chatv2Request request); + partial void PrepareChatv2Request( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.Chatv2Request request); + partial void ProcessChatv2Response( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessChatv2ResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Chat with the model
+ /// Generates a message from the model in response to a provided conversation. To learn how to use the Chat API with Streaming and RAG follow our Text Generation guides. + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> Chatv2Async( + global::G.Chatv2Request request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareChatv2Arguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v2/chat", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareChatv2Request( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessChatv2Response( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessChatv2ResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject?>(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Chat with the model
+ /// Generates a message from the model in response to a provided conversation. To learn how to use the Chat API with Streaming and RAG follow our Text Generation guides. + ///
+ /// + /// The name of a compatible [Cohere model](https://docs.cohere.com/docs/models) (such as command-r or command-r-plus) or the ID of a [fine-tuned](https://docs.cohere.com/docs/chat-fine-tuning) model. + /// + /// + /// A list of chat messages in chronological order, representing a conversation between the user and the model.
+ /// Messages can be from `User`, `Assistant`, `Tool` and `System` roles. Learn more about messages and roles in [the Chat API guide](https://docs.cohere.com/docs/chat-api). + /// + /// + /// A list of available tools (functions) that the model may suggest invoking before producing a text response.
+ /// When `tools` is passed (without `tool_results`), the `text` content in the response will be empty and the `tool_calls` field in the response will be populated with a list of tool calls that need to be made. If no calls need to be made, the `tool_calls` array will be empty. + /// + /// + /// Defaults to `"accurate"`.
+ /// Dictates the approach taken to generating citations as part of the RAG flow by allowing the user to specify whether they want `"accurate"` results, `"fast"` results or no results. + /// + /// + /// Configuration for forcing the model output to adhere to the specified format. Supported on [Command R](https://docs.cohere.com/docs/command-r), [Command R+](https://docs.cohere.com/docs/command-r-plus) and newer models.
+ /// The model can be forced into outputting JSON objects (with up to 5 levels of nesting) by setting `{ "type": "json_object" }`.
+ /// A [JSON Schema](https://json-schema.org/) can optionally be provided, to ensure a specific structure.
+ /// **Note**: When using `{ "type": "json_object" }` your `message` should always explicitly instruct the model to generate a JSON (eg: _"Generate a JSON ..."_) . Otherwise the model may end up getting stuck generating an infinite stream of characters and eventually run out of context length.
+ /// **Limitation**: The parameter is not supported in RAG mode (when any of `connectors`, `documents`, `tools`, `tool_results` are provided). + /// + /// + /// The maximum number of tokens the model will generate as part of the response. Note: Setting a low value may result in incomplete generations. + /// + /// + /// A list of up to 5 strings that the model will use to stop generation. If the model generates a string that matches any of the strings in the list, it will stop generating tokens and return the generated text up to that point not including the stop sequence. + /// + /// + /// Defaults to `0.3`.
+ /// A non-negative float that tunes the degree of randomness in generation. Lower temperatures mean less random generations, and higher temperatures mean more random generations.
+ /// Randomness can be further maximized by increasing the value of the `p` parameter. + /// + /// + /// If specified, the backend will make a best effort to sample tokens
+ /// deterministically, such that repeated requests with the same
+ /// seed and parameters should return the same result. However,
+ /// determinism cannot be totally guaranteed. + /// + /// + /// Defaults to `0.0`, min value of `0.0`, max value of `1.0`.
+ /// Used to reduce repetitiveness of generated tokens. The higher the value, the stronger a penalty is applied to previously present tokens, proportional to how many times they have already appeared in the prompt or prior generation. + /// + /// + /// Defaults to `0.0`, min value of `0.0`, max value of `1.0`.
+ /// Used to reduce repetitiveness of generated tokens. Similar to `frequency_penalty`, except that this penalty is applied equally to all tokens that have already appeared, regardless of their exact frequencies. + /// + /// + /// Ensures only the top `k` most likely tokens are considered for generation at each step.
+ /// Defaults to `0`, min value of `0`, max value of `500`.
+ /// Default Value: 0F + /// + /// + /// Ensures that only the most likely tokens, with total probability mass of `p`, are considered for generation at each step. If both `k` and `p` are enabled, `p` acts after `k`.
+ /// Defaults to `0.75`. min value of `0.01`, max value of `0.99`.
+ /// Default Value: 0.75F + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> Chatv2Async( + string model, + global::System.Collections.Generic.IList messages, + global::System.Collections.Generic.IList? tools = default, + global::G.Chatv2RequestCitationMode? citationMode = default, + global::G.ResponseFormat2? responseFormat = default, + int maxTokens = default, + global::System.Collections.Generic.IList? stopSequences = default, + float temperature = default, + int seed = default, + float frequencyPenalty = default, + float presencePenalty = default, + float k = 0F, + float p = 0.75F, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.Chatv2Request + { + Model = model, + Messages = messages, + Tools = tools, + CitationMode = citationMode, + ResponseFormat = responseFormat, + MaxTokens = maxTokens, + StopSequences = stopSequences, + Temperature = temperature, + Seed = seed, + FrequencyPenalty = frequencyPenalty, + PresencePenalty = presencePenalty, + K = k, + P = p, + }; + + return await Chatv2Async( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.CheckAPIKey.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.CheckAPIKey.g.verified.cs new file mode 100644 index 0000000000..aa641a4026 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.CheckAPIKey.g.verified.cs @@ -0,0 +1,91 @@ +//HintName: G.Api.CheckAPIKey.g.cs + +#nullable enable + +namespace G +{ + public partial class Api + { + partial void PrepareCheckAPIKeyArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? xClientName); + partial void PrepareCheckAPIKeyRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? xClientName); + partial void ProcessCheckAPIKeyResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCheckAPIKeyResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Check API key
+ /// Checks that the api key in the Authorization header is valid and active + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CheckAPIKeyAsync( + string? xClientName, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareCheckAPIKeyArguments( + httpClient: _httpClient, + xClientName: ref xClientName); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/check-api-key", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareCheckAPIKeyRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + xClientName: xClientName); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessCheckAPIKeyResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessCheckAPIKeyResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.Classify.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.Classify.g.verified.cs new file mode 100644 index 0000000000..a8b7097e94 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.Classify.g.verified.cs @@ -0,0 +1,160 @@ +//HintName: G.Api.Classify.g.cs + +#nullable enable + +namespace G +{ + public partial class Api + { + partial void PrepareClassifyArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? xClientName, + global::G.ClassifyRequest request); + partial void PrepareClassifyRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? xClientName, + global::G.ClassifyRequest request); + partial void ProcessClassifyResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessClassifyResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Classify
+ /// This endpoint makes a prediction about which label fits the specified text inputs best. To make a prediction, Classify uses the provided `examples` of text + label pairs as a reference.
+ /// Note: [Fine-tuned models](https://docs.cohere.com/docs/classify-fine-tuning) trained on classification examples don't require the `examples` parameter to be passed in explicitly. + ///
+ /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ClassifyAsync( + string? xClientName, + global::G.ClassifyRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareClassifyArguments( + httpClient: _httpClient, + xClientName: ref xClientName, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/classify", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareClassifyRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + xClientName: xClientName, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessClassifyResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessClassifyResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Classify
+ /// This endpoint makes a prediction about which label fits the specified text inputs best. To make a prediction, Classify uses the provided `examples` of text + label pairs as a reference.
+ /// Note: [Fine-tuned models](https://docs.cohere.com/docs/classify-fine-tuning) trained on classification examples don't require the `examples` parameter to be passed in explicitly. + ///
+ /// + /// + /// A list of up to 96 texts to be classified. Each one must be a non-empty string.
+ /// There is, however, no consistent, universal limit to the length a particular input can be. We perform classification on the first `x` tokens of each input, and `x` varies depending on which underlying model is powering classification. The maximum token length for each model is listed in the "max tokens" column [here](https://docs.cohere.com/docs/models).
+ /// Note: by default the `truncate` parameter is set to `END`, so tokens exceeding the limit will be automatically dropped. This behavior can be disabled by setting `truncate` to `NONE`, which will result in validation errors for longer texts. + /// + /// + /// An array of examples to provide context to the model. Each example is a text string and its associated label/class. Each unique label requires at least 2 examples associated with it; the maximum number of examples is 2500, and each example has a maximum length of 512 tokens. The values should be structured as `{text: "...",label: "..."}`.
+ /// Note: [Fine-tuned Models](https://docs.cohere.com/docs/classify-fine-tuning) trained on classification examples don't require the `examples` parameter to be passed in explicitly. + /// + /// + /// The identifier of the model. Currently available models are `embed-multilingual-v2.0`, `embed-english-light-v2.0`, and `embed-english-v2.0` (default). Smaller "light" models are faster, while larger models will perform better. [Fine-tuned models](https://docs.cohere.com/docs/fine-tuning) can also be supplied with their full ID. + /// + /// + /// The ID of a custom playground preset. You can create presets in the [playground](https://dashboard.cohere.com/playground/classify?model=large). If you use a preset, all other parameters become optional, and any included parameters will override the preset's parameters.
+ /// Example: my-preset-a58sbd + /// + /// + /// One of `NONE|START|END` to specify how the API will handle inputs longer than the maximum token length.
+ /// Passing `START` will discard the start of the input. `END` will discard the end of the input. In both cases, input is discarded until the remaining input is exactly the maximum input token length for the model.
+ /// If `NONE` is selected, when the input exceeds the maximum input token length an error will be returned.
+ /// Default Value: END + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ClassifyAsync( + global::System.Collections.Generic.IList inputs, + string? xClientName = default, + global::System.Collections.Generic.IList? examples = default, + string? model = default, + string? preset = default, + global::G.ClassifyRequestTruncate? truncate = global::G.ClassifyRequestTruncate.END, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.ClassifyRequest + { + Inputs = inputs, + Examples = examples, + Model = model, + Preset = preset, + Truncate = truncate, + }; + + return await ClassifyAsync( + xClientName: xClientName, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.Constructors.Bearer.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.Constructors.Bearer.g.verified.cs new file mode 100644 index 0000000000..1905775566 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.Constructors.Bearer.g.verified.cs @@ -0,0 +1,18 @@ +//HintName: G.Api.Constructors.Bearer.g.cs + +#nullable enable + +namespace G +{ + public sealed partial class Api + { + /// + public Api( + string apiKey, + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null) : this(httpClient, baseUri) + { + AuthorizeUsingBearer(apiKey); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.Detokenize.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.Detokenize.g.verified.cs new file mode 100644 index 0000000000..c52b6e4628 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.Detokenize.g.verified.cs @@ -0,0 +1,136 @@ +//HintName: G.Api.Detokenize.g.cs + +#nullable enable + +namespace G +{ + public partial class Api + { + partial void PrepareDetokenizeArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? xClientName, + global::G.DetokenizeRequest request); + partial void PrepareDetokenizeRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? xClientName, + global::G.DetokenizeRequest request); + partial void ProcessDetokenizeResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessDetokenizeResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Detokenize
+ /// This endpoint takes tokens using byte-pair encoding and returns their text representation. To learn more about tokenization and byte pair encoding, see the tokens page. + ///
+ /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DetokenizeAsync( + string? xClientName, + global::G.DetokenizeRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareDetokenizeArguments( + httpClient: _httpClient, + xClientName: ref xClientName, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/detokenize", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareDetokenizeRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + xClientName: xClientName, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessDetokenizeResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessDetokenizeResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Detokenize
+ /// This endpoint takes tokens using byte-pair encoding and returns their text representation. To learn more about tokenization and byte pair encoding, see the tokens page. + ///
+ /// + /// + /// The list of tokens to be detokenized. + /// + /// + /// An optional parameter to provide the model name. This will ensure that the detokenization is done by the tokenizer used by that model. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DetokenizeAsync( + global::System.Collections.Generic.IList tokens, + string model, + string? xClientName = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.DetokenizeRequest + { + Tokens = tokens, + Model = model, + }; + + return await DetokenizeAsync( + xClientName: xClientName, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.Embed.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.Embed.g.verified.cs new file mode 100644 index 0000000000..897eaca9f4 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.Embed.g.verified.cs @@ -0,0 +1,176 @@ +//HintName: G.Api.Embed.g.cs + +#nullable enable + +namespace G +{ + public partial class Api + { + partial void PrepareEmbedArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? xClientName, + global::G.EmbedRequest request); + partial void PrepareEmbedRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? xClientName, + global::G.EmbedRequest request); + partial void ProcessEmbedResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessEmbedResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Embed
+ /// This endpoint returns text embeddings. An embedding is a list of floating point numbers that captures semantic information about the text that it represents.
+ /// Embeddings can be used to create text classifiers as well as empower semantic search. To learn more about embeddings, see the embedding page.
+ /// If you want to learn more how to use the embedding model, have a look at the [Semantic Search Guide](/docs/semantic-search). + ///
+ /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> EmbedAsync( + string? xClientName, + global::G.EmbedRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareEmbedArguments( + httpClient: _httpClient, + xClientName: ref xClientName, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/embed", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareEmbedRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + xClientName: xClientName, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessEmbedResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessEmbedResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject?>(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Embed
+ /// This endpoint returns text embeddings. An embedding is a list of floating point numbers that captures semantic information about the text that it represents.
+ /// Embeddings can be used to create text classifiers as well as empower semantic search. To learn more about embeddings, see the embedding page.
+ /// If you want to learn more how to use the embedding model, have a look at the [Semantic Search Guide](/docs/semantic-search). + ///
+ /// + /// + /// An array of strings for the model to embed. Maximum number of texts per call is `96`. We recommend reducing the length of each text to be under `512` tokens for optimal quality. + /// + /// + /// Defaults to embed-english-v2.0
+ /// The identifier of the model. Smaller "light" models are faster, while larger models will perform better. [Custom models](/docs/training-custom-models) can also be supplied with their full ID.
+ /// Available models and corresponding embedding dimensions:
+ /// * `embed-english-v3.0` 1024
+ /// * `embed-multilingual-v3.0` 1024
+ /// * `embed-english-light-v3.0` 384
+ /// * `embed-multilingual-light-v3.0` 384
+ /// * `embed-english-v2.0` 4096
+ /// * `embed-english-light-v2.0` 1024
+ /// * `embed-multilingual-v2.0` 768 + /// + /// + /// Specifies the type of input passed to the model. Required for embedding models v3 and higher.
+ /// - `"search_document"`: Used for embeddings stored in a vector database for search use-cases.
+ /// - `"search_query"`: Used for embeddings of search queries run against a vector DB to find relevant documents.
+ /// - `"classification"`: Used for embeddings passed through a text classifier.
+ /// - `"clustering"`: Used for the embeddings run through a clustering algorithm. + /// + /// + /// Specifies the types of embeddings you want to get back. Not required and default is None, which returns the Embed Floats response type. Can be one or more of the following types.
+ /// * `"float"`: Use this when you want to get back the default float embeddings. Valid for all models.
+ /// * `"int8"`: Use this when you want to get back signed int8 embeddings. Valid for only v3 models.
+ /// * `"uint8"`: Use this when you want to get back unsigned int8 embeddings. Valid for only v3 models.
+ /// * `"binary"`: Use this when you want to get back signed binary embeddings. Valid for only v3 models.
+ /// * `"ubinary"`: Use this when you want to get back unsigned binary embeddings. Valid for only v3 models. + /// + /// + /// One of `NONE|START|END` to specify how the API will handle inputs longer than the maximum token length.
+ /// Passing `START` will discard the start of the input. `END` will discard the end of the input. In both cases, input is discarded until the remaining input is exactly the maximum input token length for the model.
+ /// If `NONE` is selected, when the input exceeds the maximum input token length an error will be returned.
+ /// Default Value: END + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> EmbedAsync( + global::System.Collections.Generic.IList texts, + string? xClientName = default, + string? model = default, + global::G.EmbedInputType? inputType = default, + global::System.Collections.Generic.IList? embeddingTypes = default, + global::G.EmbedRequestTruncate? truncate = global::G.EmbedRequestTruncate.END, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.EmbedRequest + { + Texts = texts, + Model = model, + InputType = inputType, + EmbeddingTypes = embeddingTypes, + Truncate = truncate, + }; + + return await EmbedAsync( + xClientName: xClientName, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.Generate.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.Generate.g.verified.cs new file mode 100644 index 0000000000..308a2b20a2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.Generate.g.verified.cs @@ -0,0 +1,245 @@ +//HintName: G.Api.Generate.g.cs + +#nullable enable + +namespace G +{ + public partial class Api + { + partial void PrepareGenerateArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? xClientName, + global::G.GenerateRequest request); + partial void PrepareGenerateRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? xClientName, + global::G.GenerateRequest request); + partial void ProcessGenerateResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGenerateResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Generate
+ /// <Warning>
+ /// This API is marked as "Legacy" and is no longer maintained. Follow the [migration guide](/docs/migrating-from-cogenerate-to-cochat) to start using the Chat API.
+ /// </Warning>
+ /// Generates realistic text conditioned on a given input. + ///
+ /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GenerateAsync( + string? xClientName, + global::G.GenerateRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareGenerateArguments( + httpClient: _httpClient, + xClientName: ref xClientName, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/generate", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareGenerateRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + xClientName: xClientName, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessGenerateResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessGenerateResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Generate
+ /// <Warning>
+ /// This API is marked as "Legacy" and is no longer maintained. Follow the [migration guide](/docs/migrating-from-cogenerate-to-cochat) to start using the Chat API.
+ /// </Warning>
+ /// Generates realistic text conditioned on a given input. + ///
+ /// + /// + /// The input text that serves as the starting point for generating the response.
+ /// Note: The prompt will be pre-processed and modified before reaching the model.
+ /// Example: Please explain to me how LLMs work + /// + /// + /// The identifier of the model to generate with. Currently available models are `command` (default), `command-nightly` (experimental), `command-light`, and `command-light-nightly` (experimental).
+ /// Smaller, "light" models are faster, while larger models will perform better. [Custom models](/docs/training-custom-models) can also be supplied with their full ID. + /// + /// + /// The maximum number of generations that will be returned. Defaults to `1`, min value of `1`, max value of `5`. + /// + /// + /// When `true`, the response will be a JSON stream of events. Streaming is beneficial for user interfaces that render the contents of the response piece by piece, as it gets generated.
+ /// The final event will contain the complete response, and will contain an `is_finished` field set to `true`. The event will also contain a `finish_reason`, which can be one of the following:
+ /// - `COMPLETE` - the model sent back a finished reply
+ /// - `MAX_TOKENS` - the reply was cut off because the model reached the maximum number of tokens for its context length
+ /// - `ERROR` - something went wrong when generating the reply
+ /// - `ERROR_TOXIC` - the model generated a reply that was deemed toxic + /// + /// + /// The maximum number of tokens the model will generate as part of the response. Note: Setting a low value may result in incomplete generations.
+ /// This parameter is off by default, and if it's not specified, the model will continue generating until it emits an EOS completion token. See [BPE Tokens](/bpe-tokens-wiki) for more details.
+ /// Can only be set to `0` if `return_likelihoods` is set to `ALL` to get the likelihood of the prompt. + /// + /// + /// One of `NONE|START|END` to specify how the API will handle inputs longer than the maximum token length.
+ /// Passing `START` will discard the start of the input. `END` will discard the end of the input. In both cases, input is discarded until the remaining input is exactly the maximum input token length for the model.
+ /// If `NONE` is selected, when the input exceeds the maximum input token length an error will be returned.
+ /// Default Value: END + /// + /// + /// A non-negative float that tunes the degree of randomness in generation. Lower temperatures mean less random generations. See [Temperature](/temperature-wiki) for more details.
+ /// Defaults to `0.75`, min value of `0.0`, max value of `5.0`. + /// + /// + /// If specified, the backend will make a best effort to sample tokens
+ /// deterministically, such that repeated requests with the same
+ /// seed and parameters should return the same result. However,
+ /// determinism cannot be totally guaranteed.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + /// + /// + /// Identifier of a custom preset. A preset is a combination of parameters, such as prompt, temperature etc. You can create presets in the [playground](https://dashboard.cohere.com/playground/generate).
+ /// When a preset is specified, the `prompt` parameter becomes optional, and any included parameters will override the preset's parameters.
+ /// Example: my-preset-a58sbd + /// + /// + /// The generated text will be cut at the beginning of the earliest occurrence of an end sequence. The sequence will be excluded from the text. + /// + /// + /// The generated text will be cut at the end of the earliest occurrence of a stop sequence. The sequence will be included the text. + /// + /// + /// Ensures only the top `k` most likely tokens are considered for generation at each step.
+ /// Defaults to `0`, min value of `0`, max value of `500`. + /// + /// + /// Ensures that only the most likely tokens, with total probability mass of `p`, are considered for generation at each step. If both `k` and `p` are enabled, `p` acts after `k`.
+ /// Defaults to `0.75`. min value of `0.01`, max value of `0.99`. + /// + /// + /// Used to reduce repetitiveness of generated tokens. The higher the value, the stronger a penalty is applied to previously present tokens, proportional to how many times they have already appeared in the prompt or prior generation.
+ /// Using `frequency_penalty` in combination with `presence_penalty` is not supported on newer models. + /// + /// + /// Defaults to `0.0`, min value of `0.0`, max value of `1.0`.
+ /// Can be used to reduce repetitiveness of generated tokens. Similar to `frequency_penalty`, except that this penalty is applied equally to all tokens that have already appeared, regardless of their exact frequencies.
+ /// Using `frequency_penalty` in combination with `presence_penalty` is not supported on newer models. + /// + /// + /// One of `GENERATION|ALL|NONE` to specify how and if the token likelihoods are returned with the response. Defaults to `NONE`.
+ /// If `GENERATION` is selected, the token likelihoods will only be provided for generated text.
+ /// If `ALL` is selected, the token likelihoods will be provided both for the prompt and the generated text.
+ /// Default Value: NONE + /// + /// + /// When enabled, the user's prompt will be sent to the model without any pre-processing. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GenerateAsync( + string prompt, + string? xClientName = default, + string? model = default, + int numGenerations = default, + bool stream = default, + int maxTokens = default, + global::G.GenerateRequestTruncate? truncate = global::G.GenerateRequestTruncate.END, + double temperature = default, + int seed = default, + string? preset = default, + global::System.Collections.Generic.IList? endSequences = default, + global::System.Collections.Generic.IList? stopSequences = default, + int k = default, + double p = default, + double frequencyPenalty = default, + double presencePenalty = default, + global::G.GenerateRequestReturnLikelihoods? returnLikelihoods = global::G.GenerateRequestReturnLikelihoods.NONE, + bool rawPrompting = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.GenerateRequest + { + Prompt = prompt, + Model = model, + NumGenerations = numGenerations, + Stream = stream, + MaxTokens = maxTokens, + Truncate = truncate, + Temperature = temperature, + Seed = seed, + Preset = preset, + EndSequences = endSequences, + StopSequences = stopSequences, + K = k, + P = p, + FrequencyPenalty = frequencyPenalty, + PresencePenalty = presencePenalty, + ReturnLikelihoods = returnLikelihoods, + RawPrompting = rawPrompting, + }; + + return await GenerateAsync( + xClientName: xClientName, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.Rerank.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.Rerank.g.verified.cs new file mode 100644 index 0000000000..dfcd7fdf1d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.Rerank.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Api.Rerank.g.cs + +#nullable enable + +namespace G +{ + public partial class Api + { + partial void PrepareRerankArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? xClientName, + global::G.RerankRequest request); + partial void PrepareRerankRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? xClientName, + global::G.RerankRequest request); + partial void ProcessRerankResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessRerankResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Rerank
+ /// This endpoint takes in a query and a list of texts and produces an ordered array with each text assigned a relevance score. + ///
+ /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task RerankAsync( + string? xClientName, + global::G.RerankRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareRerankArguments( + httpClient: _httpClient, + xClientName: ref xClientName, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/rerank", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareRerankRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + xClientName: xClientName, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessRerankResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessRerankResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Rerank
+ /// This endpoint takes in a query and a list of texts and produces an ordered array with each text assigned a relevance score. + ///
+ /// + /// + /// The identifier of the model to use, one of : `rerank-english-v3.0`, `rerank-multilingual-v3.0`, `rerank-english-v2.0`, `rerank-multilingual-v2.0` + /// + /// + /// The search query + /// + /// + /// A list of document objects or strings to rerank.
+ /// If a document is provided the text fields is required and all other fields will be preserved in the response.
+ /// The total max chunks (length of documents * max_chunks_per_doc) must be less than 10000.
+ /// We recommend a maximum of 1,000 documents for optimal endpoint performance. + /// + /// + /// The number of most relevant documents or indices to return, defaults to the length of the documents + /// + /// + /// If a JSON object is provided, you can specify which keys you would like to have considered for reranking. The model will rerank based on order of the fields passed in (i.e. rank_fields=['title','author','text'] will rerank using the values in title, author, text sequentially. If the length of title, author, and text exceeds the context length of the model, the chunking will not re-consider earlier fields). If not provided, the model will use the default text field for ranking. + /// + /// + /// - If false, returns results without the doc text - the api will return a list of {index, relevance score} where index is inferred from the list passed into the request.
+ /// - If true, returns results with the doc text passed in - the api will return an ordered list of {index, text, relevance score} where index + text refers to the list passed into the request.
+ /// Default Value: false + /// + /// + /// The maximum number of chunks to produce internally from a document
+ /// Default Value: 10 + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task RerankAsync( + string query, + global::System.Collections.Generic.IList> documents, + string? xClientName = default, + string? model = default, + int topN = default, + global::System.Collections.Generic.IList? rankFields = default, + bool returnDocuments = false, + int maxChunksPerDoc = 10, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.RerankRequest + { + Model = model, + Query = query, + Documents = documents, + TopN = topN, + RankFields = rankFields, + ReturnDocuments = returnDocuments, + MaxChunksPerDoc = maxChunksPerDoc, + }; + + return await RerankAsync( + xClientName: xClientName, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.Summarize.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.Summarize.g.verified.cs new file mode 100644 index 0000000000..4bf9496206 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.Summarize.g.verified.cs @@ -0,0 +1,171 @@ +//HintName: G.Api.Summarize.g.cs + +#nullable enable + +namespace G +{ + public partial class Api + { + partial void PrepareSummarizeArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? xClientName, + global::G.SummarizeRequest request); + partial void PrepareSummarizeRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? xClientName, + global::G.SummarizeRequest request); + partial void ProcessSummarizeResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessSummarizeResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Summarize
+ /// <Warning>
+ /// This API is marked as "Legacy" and is no longer maintained. Follow the [migration guide](/docs/migrating-from-cogenerate-to-cochat) to start using the Chat API.
+ /// </Warning>
+ /// Generates a summary in English for a given text. + ///
+ /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task SummarizeAsync( + string? xClientName, + global::G.SummarizeRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareSummarizeArguments( + httpClient: _httpClient, + xClientName: ref xClientName, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/summarize", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareSummarizeRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + xClientName: xClientName, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessSummarizeResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessSummarizeResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Summarize
+ /// <Warning>
+ /// This API is marked as "Legacy" and is no longer maintained. Follow the [migration guide](/docs/migrating-from-cogenerate-to-cochat) to start using the Chat API.
+ /// </Warning>
+ /// Generates a summary in English for a given text. + ///
+ /// + /// + /// The text to generate a summary for. Can be up to 100,000 characters long. Currently the only supported language is English. + /// + /// + /// One of `short`, `medium`, `long`, or `auto` defaults to `auto`. Indicates the approximate length of the summary. If `auto` is selected, the best option will be picked based on the input text.
+ /// Default Value: medium + /// + /// + /// One of `paragraph`, `bullets`, or `auto`, defaults to `auto`. Indicates the style in which the summary will be delivered - in a free form paragraph or in bullet points. If `auto` is selected, the best option will be picked based on the input text.
+ /// Default Value: paragraph + /// + /// + /// The identifier of the model to generate the summary with. Currently available models are `command` (default), `command-nightly` (experimental), `command-light`, and `command-light-nightly` (experimental). Smaller, "light" models are faster, while larger models will perform better. + /// + /// + /// One of `low`, `medium`, `high`, or `auto`, defaults to `auto`. Controls how close to the original text the summary is. `high` extractiveness summaries will lean towards reusing sentences verbatim, while `low` extractiveness summaries will tend to paraphrase more. If `auto` is selected, the best option will be picked based on the input text.
+ /// Default Value: low + /// + /// + /// Ranges from 0 to 5. Controls the randomness of the output. Lower values tend to generate more “predictable” output, while higher values tend to generate more “creative” output. The sweet spot is typically between 0 and 1.
+ /// Default Value: 0.3 + /// + /// + /// A free-form instruction for modifying how the summaries get generated. Should complete the sentence "Generate a summary _". Eg. "focusing on the next steps" or "written by Yoda" + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task SummarizeAsync( + string text, + string? xClientName = default, + global::G.SummarizeRequestLength? length = global::G.SummarizeRequestLength.Medium, + global::G.SummarizeRequestFormat? format = global::G.SummarizeRequestFormat.Paragraph, + string? model = default, + global::G.SummarizeRequestExtractiveness? extractiveness = global::G.SummarizeRequestExtractiveness.Low, + double temperature = 0.3, + string? additionalCommand = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.SummarizeRequest + { + Text = text, + Length = length, + Format = format, + Model = model, + Extractiveness = extractiveness, + Temperature = temperature, + AdditionalCommand = additionalCommand, + }; + + return await SummarizeAsync( + xClientName: xClientName, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.Tokenize.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.Tokenize.g.verified.cs new file mode 100644 index 0000000000..73cb59a124 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.Tokenize.g.verified.cs @@ -0,0 +1,136 @@ +//HintName: G.Api.Tokenize.g.cs + +#nullable enable + +namespace G +{ + public partial class Api + { + partial void PrepareTokenizeArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? xClientName, + global::G.TokenizeRequest request); + partial void PrepareTokenizeRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? xClientName, + global::G.TokenizeRequest request); + partial void ProcessTokenizeResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessTokenizeResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Tokenize
+ /// This endpoint splits input text into smaller units called tokens using byte-pair encoding (BPE). To learn more about tokenization and byte pair encoding, see the tokens page. + ///
+ /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task TokenizeAsync( + string? xClientName, + global::G.TokenizeRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareTokenizeArguments( + httpClient: _httpClient, + xClientName: ref xClientName, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/tokenize", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareTokenizeRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + xClientName: xClientName, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessTokenizeResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessTokenizeResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Tokenize
+ /// This endpoint splits input text into smaller units called tokens using byte-pair encoding (BPE). To learn more about tokenization and byte pair encoding, see the tokens page. + ///
+ /// + /// + /// The string to be tokenized, the minimum text length is 1 character, and the maximum text length is 65536 characters. + /// + /// + /// An optional parameter to provide the model name. This will ensure that the tokenization uses the tokenizer used by that model. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task TokenizeAsync( + string text, + string model, + string? xClientName = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.TokenizeRequest + { + Text = text, + Model = model, + }; + + return await TokenizeAsync( + xClientName: xClientName, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.g.verified.cs new file mode 100644 index 0000000000..9408934648 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Api.g.verified.cs @@ -0,0 +1,88 @@ +//HintName: G.Api.g.cs + +#nullable enable + +namespace G +{ + /// + /// The Cohere Platform is centered around models.
+ /// Each model has a different amount of power (i.e. parameters), to be used for different tasks.
+ /// Cohere also supports finetuning of baseline models to improve performance on downstream tasks or to teach the model large quantities of information which cannot be extracted with few-shot learning or prompt engineering.
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class Api : global::System.IDisposable + { + /// + /// production + /// + public const string BaseUrl = "https://api.cohere.com"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::Newtonsoft.Json.JsonSerializerSettings _jsonSerializerOptions; + + + /// + /// Datasets API + /// + public DatasetsClient Datasets => new DatasetsClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// Connectors API + /// + public ConnectorsClient Connectors => new ConnectorsClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// Embed Jobs API + /// + public EmbedJobsClient EmbedJobs => new EmbedJobsClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// Finetuning API (Beta) + /// + public FinetuningClient Finetuning => new FinetuningClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// + /// + public ModelsClient Models => new ModelsClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// Creates a new instance of the Api. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public Api( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::Newtonsoft.Json.JsonSerializerSettings? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::Newtonsoft.Json.JsonSerializerSettings(); + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.ConnectorsClient.CreateConnector.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.ConnectorsClient.CreateConnector.g.verified.cs new file mode 100644 index 0000000000..bfc167ba0d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.ConnectorsClient.CreateConnector.g.verified.cs @@ -0,0 +1,164 @@ +//HintName: G.ConnectorsClient.CreateConnector.g.cs + +#nullable enable + +namespace G +{ + public partial class ConnectorsClient + { + partial void PrepareCreateConnectorArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? xClientName, + global::G.CreateConnectorRequest request); + partial void PrepareCreateConnectorRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? xClientName, + global::G.CreateConnectorRequest request); + partial void ProcessCreateConnectorResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateConnectorResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Create a Connector
+ /// Creates a new connector. The connector is tested during registration and will cancel registration when the test is unsuccessful. See ['Creating and Deploying a Connector'](https://docs.cohere.com/docs/creating-and-deploying-a-connector) for more information. + ///
+ /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateConnectorAsync( + string? xClientName, + global::G.CreateConnectorRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareCreateConnectorArguments( + httpClient: _httpClient, + xClientName: ref xClientName, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/connectors", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareCreateConnectorRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + xClientName: xClientName, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessCreateConnectorResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessCreateConnectorResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Create a Connector
+ /// Creates a new connector. The connector is tested during registration and will cancel registration when the test is unsuccessful. See ['Creating and Deploying a Connector'](https://docs.cohere.com/docs/creating-and-deploying-a-connector) for more information. + ///
+ /// + /// + /// A human-readable name for the connector. + /// + /// + /// A description of the connector. + /// + /// + /// The URL of the connector that will be used to search for documents. + /// + /// + /// A list of fields to exclude from the prompt (fields remain in the document). + /// + /// + /// + /// Whether the connector is active or not.
+ /// Default Value: true + /// + /// + /// Whether a chat request should continue or not if the request to this connector fails.
+ /// Default Value: false + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateConnectorAsync( + string name, + string url, + string? xClientName = default, + string? description = default, + global::System.Collections.Generic.IList? excludes = default, + global::G.CreateConnectorOAuth? oauth = default, + bool active = true, + bool continueOnFailure = false, + global::G.CreateConnectorServiceAuth? serviceAuth = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.CreateConnectorRequest + { + Name = name, + Description = description, + Url = url, + Excludes = excludes, + Oauth = oauth, + Active = active, + ContinueOnFailure = continueOnFailure, + ServiceAuth = serviceAuth, + }; + + return await CreateConnectorAsync( + xClientName: xClientName, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.ConnectorsClient.DeleteConnector.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.ConnectorsClient.DeleteConnector.g.verified.cs new file mode 100644 index 0000000000..96c9c08976 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.ConnectorsClient.DeleteConnector.g.verified.cs @@ -0,0 +1,97 @@ +//HintName: G.ConnectorsClient.DeleteConnector.g.cs + +#nullable enable + +namespace G +{ + public partial class ConnectorsClient + { + partial void PrepareDeleteConnectorArguments( + global::System.Net.Http.HttpClient httpClient, + ref string id, + ref string? xClientName); + partial void PrepareDeleteConnectorRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string id, + string? xClientName); + partial void ProcessDeleteConnectorResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessDeleteConnectorResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Delete a Connector
+ /// Delete a connector by ID. See ['Connectors'](https://docs.cohere.com/docs/connectors) for more information. + ///
+ /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteConnectorAsync( + string id, + string? xClientName, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareDeleteConnectorArguments( + httpClient: _httpClient, + id: ref id, + xClientName: ref xClientName); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Delete, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/connectors/{id}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareDeleteConnectorRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + id: id, + xClientName: xClientName); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessDeleteConnectorResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessDeleteConnectorResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.ConnectorsClient.GetConnector.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.ConnectorsClient.GetConnector.g.verified.cs new file mode 100644 index 0000000000..0932e144e5 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.ConnectorsClient.GetConnector.g.verified.cs @@ -0,0 +1,97 @@ +//HintName: G.ConnectorsClient.GetConnector.g.cs + +#nullable enable + +namespace G +{ + public partial class ConnectorsClient + { + partial void PrepareGetConnectorArguments( + global::System.Net.Http.HttpClient httpClient, + ref string id, + ref string? xClientName); + partial void PrepareGetConnectorRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string id, + string? xClientName); + partial void ProcessGetConnectorResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetConnectorResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get a Connector
+ /// Retrieve a connector by ID. See ['Connectors'](https://docs.cohere.com/docs/connectors) for more information. + ///
+ /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GetConnectorAsync( + string id, + string? xClientName, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareGetConnectorArguments( + httpClient: _httpClient, + id: ref id, + xClientName: ref xClientName); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/connectors/{id}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareGetConnectorRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + id: id, + xClientName: xClientName); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessGetConnectorResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessGetConnectorResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.ConnectorsClient.ListConnectors.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.ConnectorsClient.ListConnectors.g.verified.cs new file mode 100644 index 0000000000..5dd8e1031d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.ConnectorsClient.ListConnectors.g.verified.cs @@ -0,0 +1,107 @@ +//HintName: G.ConnectorsClient.ListConnectors.g.cs + +#nullable enable + +namespace G +{ + public partial class ConnectorsClient + { + partial void PrepareListConnectorsArguments( + global::System.Net.Http.HttpClient httpClient, + ref double limit, + ref double offset, + ref string? xClientName); + partial void PrepareListConnectorsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + double limit, + double offset, + string? xClientName); + partial void ProcessListConnectorsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListConnectorsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// List Connectors
+ /// Returns a list of connectors ordered by descending creation date (newer first). See ['Managing your Connector'](https://docs.cohere.com/docs/managing-your-connector) for more information. + ///
+ /// + /// Default Value: 30 + /// + /// + /// Default Value: 0 + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ListConnectorsAsync( + double limit, + double offset, + string? xClientName, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareListConnectorsArguments( + httpClient: _httpClient, + limit: ref limit, + offset: ref offset, + xClientName: ref xClientName); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/connectors?limit={limit}&offset={offset}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareListConnectorsRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + limit: limit, + offset: offset, + xClientName: xClientName); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessListConnectorsResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessListConnectorsResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.ConnectorsClient.OAuthAuthorizeConnector.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.ConnectorsClient.OAuthAuthorizeConnector.g.verified.cs new file mode 100644 index 0000000000..16d73c51a3 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.ConnectorsClient.OAuthAuthorizeConnector.g.verified.cs @@ -0,0 +1,103 @@ +//HintName: G.ConnectorsClient.OAuthAuthorizeConnector.g.cs + +#nullable enable + +namespace G +{ + public partial class ConnectorsClient + { + partial void PrepareOAuthAuthorizeConnectorArguments( + global::System.Net.Http.HttpClient httpClient, + ref string id, + ref string? afterTokenRedirect, + ref string? xClientName); + partial void PrepareOAuthAuthorizeConnectorRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string id, + string? afterTokenRedirect, + string? xClientName); + partial void ProcessOAuthAuthorizeConnectorResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessOAuthAuthorizeConnectorResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Authorize with oAuth
+ /// Authorize the connector with the given ID for the connector oauth app. See ['Connector Authentication'](https://docs.cohere.com/docs/connector-authentication) for more information. + ///
+ /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task OAuthAuthorizeConnectorAsync( + string id, + string? afterTokenRedirect, + string? xClientName, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareOAuthAuthorizeConnectorArguments( + httpClient: _httpClient, + id: ref id, + afterTokenRedirect: ref afterTokenRedirect, + xClientName: ref xClientName); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/connectors/{id}/oauth/authorize?after_token_redirect={afterTokenRedirect}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareOAuthAuthorizeConnectorRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + id: id, + afterTokenRedirect: afterTokenRedirect, + xClientName: xClientName); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessOAuthAuthorizeConnectorResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessOAuthAuthorizeConnectorResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.ConnectorsClient.UpdateConnector.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.ConnectorsClient.UpdateConnector.g.verified.cs new file mode 100644 index 0000000000..ae7ae1ef01 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.ConnectorsClient.UpdateConnector.g.verified.cs @@ -0,0 +1,166 @@ +//HintName: G.ConnectorsClient.UpdateConnector.g.cs + +#nullable enable + +namespace G +{ + public partial class ConnectorsClient + { + partial void PrepareUpdateConnectorArguments( + global::System.Net.Http.HttpClient httpClient, + ref string id, + ref string? xClientName, + global::G.UpdateConnectorRequest request); + partial void PrepareUpdateConnectorRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string id, + string? xClientName, + global::G.UpdateConnectorRequest request); + partial void ProcessUpdateConnectorResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessUpdateConnectorResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Update a Connector
+ /// Update a connector by ID. Omitted fields will not be updated. See ['Managing your Connector'](https://docs.cohere.com/docs/managing-your-connector) for more information. + ///
+ /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UpdateConnectorAsync( + string id, + string? xClientName, + global::G.UpdateConnectorRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareUpdateConnectorArguments( + httpClient: _httpClient, + id: ref id, + xClientName: ref xClientName, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: new global::System.Net.Http.HttpMethod("PATCH"), + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/connectors/{id}", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareUpdateConnectorRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + id: id, + xClientName: xClientName, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessUpdateConnectorResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessUpdateConnectorResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Update a Connector
+ /// Update a connector by ID. Omitted fields will not be updated. See ['Managing your Connector'](https://docs.cohere.com/docs/managing-your-connector) for more information. + ///
+ /// + /// + /// + /// A human-readable name for the connector. + /// + /// + /// The URL of the connector that will be used to search for documents. + /// + /// + /// A list of fields to exclude from the prompt (fields remain in the document). + /// + /// + /// + /// Default Value: true + /// + /// + /// Default Value: false + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UpdateConnectorAsync( + string id, + string? xClientName = default, + string? name = default, + string? url = default, + global::System.Collections.Generic.IList? excludes = default, + global::G.CreateConnectorOAuth? oauth = default, + bool active = true, + bool continueOnFailure = false, + global::G.CreateConnectorServiceAuth? serviceAuth = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.UpdateConnectorRequest + { + Name = name, + Url = url, + Excludes = excludes, + Oauth = oauth, + Active = active, + ContinueOnFailure = continueOnFailure, + ServiceAuth = serviceAuth, + }; + + return await UpdateConnectorAsync( + id: id, + xClientName: xClientName, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.ConnectorsClient.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.ConnectorsClient.g.verified.cs new file mode 100644 index 0000000000..617d3281ba --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.ConnectorsClient.g.verified.cs @@ -0,0 +1,61 @@ +//HintName: G.ConnectorsClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// Connectors API
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class ConnectorsClient : global::System.IDisposable + { + /// + /// production + /// + public const string BaseUrl = "https://api.cohere.com"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::Newtonsoft.Json.JsonSerializerSettings _jsonSerializerOptions; + + + /// + /// Creates a new instance of the ConnectorsClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public ConnectorsClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::Newtonsoft.Json.JsonSerializerSettings? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::Newtonsoft.Json.JsonSerializerSettings(); + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.DatasetsClient.CreateDataset.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.DatasetsClient.CreateDataset.g.verified.cs new file mode 100644 index 0000000000..0b51be46df --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.DatasetsClient.CreateDataset.g.verified.cs @@ -0,0 +1,302 @@ +//HintName: G.DatasetsClient.CreateDataset.g.cs +using System.Linq; + +#nullable enable + +namespace G +{ + public partial class DatasetsClient + { + partial void PrepareCreateDatasetArguments( + global::System.Net.Http.HttpClient httpClient, + ref string name, + ref global::G.DatasetType type, + ref bool keepOriginalFile, + ref bool skipMalformedInput, + global::System.Collections.Generic.IList? keepFields, + global::System.Collections.Generic.IList? optionalFields, + ref string? textSeparator, + ref string? csvDelimiter, + ref string? xClientName, + global::G.CreateDatasetRequest request); + partial void PrepareCreateDatasetRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string name, + global::G.DatasetType type, + bool keepOriginalFile, + bool skipMalformedInput, + global::System.Collections.Generic.IList? keepFields, + global::System.Collections.Generic.IList? optionalFields, + string? textSeparator, + string? csvDelimiter, + string? xClientName, + global::G.CreateDatasetRequest request); + partial void ProcessCreateDatasetResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateDatasetResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Create a Dataset
+ /// Create a dataset by uploading a file. See ['Dataset Creation'](https://docs.cohere.com/docs/datasets#dataset-creation) for more information. + ///
+ /// + /// + /// The type of the dataset + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateDatasetAsync( + string name, + global::G.DatasetType type, + bool keepOriginalFile, + bool skipMalformedInput, + global::System.Collections.Generic.IList? keepFields, + global::System.Collections.Generic.IList? optionalFields, + string? textSeparator, + string? csvDelimiter, + string? xClientName, + global::G.CreateDatasetRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareCreateDatasetArguments( + httpClient: _httpClient, + name: ref name, + type: ref type, + keepOriginalFile: ref keepOriginalFile, + skipMalformedInput: ref skipMalformedInput, + keepFields: keepFields, + optionalFields: optionalFields, + textSeparator: ref textSeparator, + csvDelimiter: ref csvDelimiter, + xClientName: ref xClientName, + request: request); + + var typeValue = type switch + { + global::G.DatasetType.EmbedInput => "embed-input", + global::G.DatasetType.EmbedResult => "embed-result", + global::G.DatasetType.ClusterResult => "cluster-result", + global::G.DatasetType.ClusterOutliers => "cluster-outliers", + global::G.DatasetType.RerankerFinetuneInput => "reranker-finetune-input", + global::G.DatasetType.SingleLabelClassificationFinetuneInput => "single-label-classification-finetune-input", + global::G.DatasetType.ChatFinetuneInput => "chat-finetune-input", + global::G.DatasetType.MultiLabelClassificationFinetuneInput => "multi-label-classification-finetune-input", + _ => throw new global::System.NotImplementedException("Enum value not implemented."), + }; + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/datasets?name={name}&type={typeValue}&keep_original_file={keepOriginalFile}&skip_malformed_input={skipMalformedInput}&{string.Join("&", keepFields?.Select(static x => $"keepFields={x}") ?? global::System.Array.Empty())}&{string.Join("&", optionalFields?.Select(static x => $"optionalFields={x}") ?? global::System.Array.Empty())}&text_separator={textSeparator}&csv_delimiter={csvDelimiter}", global::System.UriKind.RelativeOrAbsolute)); + using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{name}"), + name: "name"); + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{type.ToValueString()}"), + name: "type"); + if (keepOriginalFile != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{keepOriginalFile}"), + name: "keep_original_file"); + } + if (skipMalformedInput != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{skipMalformedInput}"), + name: "skip_malformed_input"); + } + if (keepFields != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"[{string.Join(",", keepFields.Select(x => x))}]"), + name: "keep_fields"); + } + if (optionalFields != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"[{string.Join(",", optionalFields.Select(x => x))}]"), + name: "optional_fields"); + } + if (textSeparator != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{textSeparator}"), + name: "text_separator"); + } + if (csvDelimiter != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{csvDelimiter}"), + name: "csv_delimiter"); + } + if (xClientName != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{xClientName}"), + name: "X-Client-Name"); + } + __httpRequestContent.Add( + content: new global::System.Net.Http.ByteArrayContent(request.Data ?? global::System.Array.Empty()) + { + Headers = + { + ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("multipart/form-data"), + }, + }, + name: "data", + fileName: request.Dataname ?? string.Empty); + if (request.EvalData != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.ByteArrayContent(request.EvalData ?? global::System.Array.Empty()) + { + Headers = + { + ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("multipart/form-data"), + }, + }, + name: "eval_data", + fileName: request.EvalDataname ?? string.Empty); + } + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareCreateDatasetRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + name: name, + type: type, + keepOriginalFile: keepOriginalFile, + skipMalformedInput: skipMalformedInput, + keepFields: keepFields, + optionalFields: optionalFields, + textSeparator: textSeparator, + csvDelimiter: csvDelimiter, + xClientName: xClientName, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessCreateDatasetResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessCreateDatasetResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Create a Dataset
+ /// Create a dataset by uploading a file. See ['Dataset Creation'](https://docs.cohere.com/docs/datasets#dataset-creation) for more information. + ///
+ /// + /// + /// The type of the dataset + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// The file to upload + /// + /// + /// The file to upload + /// + /// + /// An optional evaluation file to upload + /// + /// + /// An optional evaluation file to upload + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateDatasetAsync( + string name, + global::G.DatasetType type, + byte[] data, + string dataname, + bool keepOriginalFile = default, + bool skipMalformedInput = default, + global::System.Collections.Generic.IList? keepFields = default, + global::System.Collections.Generic.IList? optionalFields = default, + string? textSeparator = default, + string? csvDelimiter = default, + string? xClientName = default, + byte[]? evalData = default, + string? evalDataname = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.CreateDatasetRequest + { + Data = data, + Dataname = dataname, + EvalData = evalData, + EvalDataname = evalDataname, + }; + + return await CreateDatasetAsync( + name: name, + type: type, + keepOriginalFile: keepOriginalFile, + skipMalformedInput: skipMalformedInput, + keepFields: keepFields, + optionalFields: optionalFields, + textSeparator: textSeparator, + csvDelimiter: csvDelimiter, + xClientName: xClientName, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.DatasetsClient.DeleteDataset.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.DatasetsClient.DeleteDataset.g.verified.cs new file mode 100644 index 0000000000..6048da316e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.DatasetsClient.DeleteDataset.g.verified.cs @@ -0,0 +1,97 @@ +//HintName: G.DatasetsClient.DeleteDataset.g.cs + +#nullable enable + +namespace G +{ + public partial class DatasetsClient + { + partial void PrepareDeleteDatasetArguments( + global::System.Net.Http.HttpClient httpClient, + ref string id, + ref string? xClientName); + partial void PrepareDeleteDatasetRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string id, + string? xClientName); + partial void ProcessDeleteDatasetResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessDeleteDatasetResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Delete a Dataset
+ /// Delete a dataset by ID. Datasets are automatically deleted after 30 days, but they can also be deleted manually. + ///
+ /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteDatasetAsync( + string id, + string? xClientName, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareDeleteDatasetArguments( + httpClient: _httpClient, + id: ref id, + xClientName: ref xClientName); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Delete, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/datasets/{id}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareDeleteDatasetRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + id: id, + xClientName: xClientName); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessDeleteDatasetResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessDeleteDatasetResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.DatasetsClient.GetDataset.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.DatasetsClient.GetDataset.g.verified.cs new file mode 100644 index 0000000000..304d9ad189 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.DatasetsClient.GetDataset.g.verified.cs @@ -0,0 +1,97 @@ +//HintName: G.DatasetsClient.GetDataset.g.cs + +#nullable enable + +namespace G +{ + public partial class DatasetsClient + { + partial void PrepareGetDatasetArguments( + global::System.Net.Http.HttpClient httpClient, + ref string id, + ref string? xClientName); + partial void PrepareGetDatasetRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string id, + string? xClientName); + partial void ProcessGetDatasetResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetDatasetResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get a Dataset
+ /// Retrieve a dataset by ID. See ['Datasets'](https://docs.cohere.com/docs/datasets) for more information. + ///
+ /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GetDatasetAsync( + string id, + string? xClientName, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareGetDatasetArguments( + httpClient: _httpClient, + id: ref id, + xClientName: ref xClientName); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/datasets/{id}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareGetDatasetRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + id: id, + xClientName: xClientName); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessGetDatasetResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessGetDatasetResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.DatasetsClient.GetDatasetUsage.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.DatasetsClient.GetDatasetUsage.g.verified.cs new file mode 100644 index 0000000000..02a1b4442c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.DatasetsClient.GetDatasetUsage.g.verified.cs @@ -0,0 +1,91 @@ +//HintName: G.DatasetsClient.GetDatasetUsage.g.cs + +#nullable enable + +namespace G +{ + public partial class DatasetsClient + { + partial void PrepareGetDatasetUsageArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? xClientName); + partial void PrepareGetDatasetUsageRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? xClientName); + partial void ProcessGetDatasetUsageResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetDatasetUsageResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get Dataset Usage
+ /// View the dataset storage usage for your Organization. Each Organization can have up to 10GB of storage across all their users. + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GetDatasetUsageAsync( + string? xClientName, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareGetDatasetUsageArguments( + httpClient: _httpClient, + xClientName: ref xClientName); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/datasets/usage", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareGetDatasetUsageRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + xClientName: xClientName); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessGetDatasetUsageResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessGetDatasetUsageResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.DatasetsClient.ListDatasets.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.DatasetsClient.ListDatasets.g.verified.cs new file mode 100644 index 0000000000..1faa48ee0b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.DatasetsClient.ListDatasets.g.verified.cs @@ -0,0 +1,139 @@ +//HintName: G.DatasetsClient.ListDatasets.g.cs + +#nullable enable + +namespace G +{ + public partial class DatasetsClient + { + partial void PrepareListDatasetsArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? datasetType, + global::System.DateTime before, + global::System.DateTime after, + ref double limit, + ref double offset, + ref global::G.DatasetValidationStatus? validationStatus, + ref string? xClientName); + partial void PrepareListDatasetsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? datasetType, + global::System.DateTime before, + global::System.DateTime after, + double limit, + double offset, + global::G.DatasetValidationStatus? validationStatus, + string? xClientName); + partial void ProcessListDatasetsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListDatasetsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// List Datasets
+ /// List datasets that have been created. + ///
+ /// + /// + /// + /// + /// + /// + /// The validation status of the dataset + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ListDatasetsAsync( + string? datasetType, + global::System.DateTime before, + global::System.DateTime after, + double limit, + double offset, + global::G.DatasetValidationStatus? validationStatus, + string? xClientName, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareListDatasetsArguments( + httpClient: _httpClient, + datasetType: ref datasetType, + before: before, + after: after, + limit: ref limit, + offset: ref offset, + validationStatus: ref validationStatus, + xClientName: ref xClientName); + + var validationStatusValue = validationStatus switch + { + global::G.DatasetValidationStatus.Unknown => "unknown", + global::G.DatasetValidationStatus.Queued => "queued", + global::G.DatasetValidationStatus.Processing => "processing", + global::G.DatasetValidationStatus.Failed => "failed", + global::G.DatasetValidationStatus.Validated => "validated", + global::G.DatasetValidationStatus.Skipped => "skipped", + _ => throw new global::System.NotImplementedException("Enum value not implemented."), + }; + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/datasets?datasetType={datasetType}&before={before:yyyy-MM-ddTHH:mm:ssZ}&after={after:yyyy-MM-ddTHH:mm:ssZ}&limit={limit}&offset={offset}&validationStatus={validationStatusValue}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareListDatasetsRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + datasetType: datasetType, + before: before, + after: after, + limit: limit, + offset: offset, + validationStatus: validationStatus, + xClientName: xClientName); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessListDatasetsResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessListDatasetsResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.DatasetsClient.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.DatasetsClient.g.verified.cs new file mode 100644 index 0000000000..21d808e478 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.DatasetsClient.g.verified.cs @@ -0,0 +1,61 @@ +//HintName: G.DatasetsClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// Datasets API
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class DatasetsClient : global::System.IDisposable + { + /// + /// production + /// + public const string BaseUrl = "https://api.cohere.com"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::Newtonsoft.Json.JsonSerializerSettings _jsonSerializerOptions; + + + /// + /// Creates a new instance of the DatasetsClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public DatasetsClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::Newtonsoft.Json.JsonSerializerSettings? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::Newtonsoft.Json.JsonSerializerSettings(); + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.EmbedJobsClient.CancelEmbedJob.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.EmbedJobsClient.CancelEmbedJob.g.verified.cs new file mode 100644 index 0000000000..4bfd30dac7 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.EmbedJobsClient.CancelEmbedJob.g.verified.cs @@ -0,0 +1,97 @@ +//HintName: G.EmbedJobsClient.CancelEmbedJob.g.cs + +#nullable enable + +namespace G +{ + public partial class EmbedJobsClient + { + partial void PrepareCancelEmbedJobArguments( + global::System.Net.Http.HttpClient httpClient, + ref string id, + ref string? xClientName); + partial void PrepareCancelEmbedJobRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string id, + string? xClientName); + partial void ProcessCancelEmbedJobResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCancelEmbedJobResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Cancel an Embed Job
+ /// This API allows users to cancel an active embed job. Once invoked, the embedding process will be terminated, and users will be charged for the embeddings processed up to the cancellation point. It's important to note that partial results will not be available to users after cancellation. + ///
+ /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CancelEmbedJobAsync( + string id, + string? xClientName, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareCancelEmbedJobArguments( + httpClient: _httpClient, + id: ref id, + xClientName: ref xClientName); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/embed-jobs/{id}/cancel", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareCancelEmbedJobRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + id: id, + xClientName: xClientName); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessCancelEmbedJobResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessCancelEmbedJobResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.EmbedJobsClient.CreateEmbedJob.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.EmbedJobsClient.CreateEmbedJob.g.verified.cs new file mode 100644 index 0000000000..8be68032ab --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.EmbedJobsClient.CreateEmbedJob.g.verified.cs @@ -0,0 +1,172 @@ +//HintName: G.EmbedJobsClient.CreateEmbedJob.g.cs + +#nullable enable + +namespace G +{ + public partial class EmbedJobsClient + { + partial void PrepareCreateEmbedJobArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? xClientName, + global::G.CreateEmbedJobRequest request); + partial void PrepareCreateEmbedJobRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? xClientName, + global::G.CreateEmbedJobRequest request); + partial void ProcessCreateEmbedJobResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateEmbedJobResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Create an Embed Job
+ /// This API launches an async Embed job for a [Dataset](https://docs.cohere.com/docs/datasets) of type `embed-input`. The result of a completed embed job is new Dataset of type `embed-output`, which contains the original text entries and the corresponding embeddings. + ///
+ /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateEmbedJobAsync( + string? xClientName, + global::G.CreateEmbedJobRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareCreateEmbedJobArguments( + httpClient: _httpClient, + xClientName: ref xClientName, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/embed-jobs", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareCreateEmbedJobRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + xClientName: xClientName, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessCreateEmbedJobResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessCreateEmbedJobResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Create an Embed Job
+ /// This API launches an async Embed job for a [Dataset](https://docs.cohere.com/docs/datasets) of type `embed-input`. The result of a completed embed job is new Dataset of type `embed-output`, which contains the original text entries and the corresponding embeddings. + ///
+ /// + /// + /// ID of the embedding model.
+ /// Available models and corresponding embedding dimensions:
+ /// - `embed-english-v3.0` : 1024
+ /// - `embed-multilingual-v3.0` : 1024
+ /// - `embed-english-light-v3.0` : 384
+ /// - `embed-multilingual-light-v3.0` : 384 + /// + /// + /// ID of a [Dataset](https://docs.cohere.com/docs/datasets). The Dataset must be of type `embed-input` and must have a validation status `Validated` + /// + /// + /// Specifies the type of input passed to the model. Required for embedding models v3 and higher.
+ /// - `"search_document"`: Used for embeddings stored in a vector database for search use-cases.
+ /// - `"search_query"`: Used for embeddings of search queries run against a vector DB to find relevant documents.
+ /// - `"classification"`: Used for embeddings passed through a text classifier.
+ /// - `"clustering"`: Used for the embeddings run through a clustering algorithm. + /// + /// + /// The name of the embed job. + /// + /// + /// Specifies the types of embeddings you want to get back. Not required and default is None, which returns the Embed Floats response type. Can be one or more of the following types.
+ /// * `"float"`: Use this when you want to get back the default float embeddings. Valid for all models.
+ /// * `"int8"`: Use this when you want to get back signed int8 embeddings. Valid for only v3 models.
+ /// * `"uint8"`: Use this when you want to get back unsigned int8 embeddings. Valid for only v3 models.
+ /// * `"binary"`: Use this when you want to get back signed binary embeddings. Valid for only v3 models.
+ /// * `"ubinary"`: Use this when you want to get back unsigned binary embeddings. Valid for only v3 models. + /// + /// + /// One of `START|END` to specify how the API will handle inputs longer than the maximum token length.
+ /// Passing `START` will discard the start of the input. `END` will discard the end of the input. In both cases, input is discarded until the remaining input is exactly the maximum input token length for the model.
+ /// Default Value: END + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateEmbedJobAsync( + string model, + string datasetId, + global::G.EmbedInputType inputType, + string? xClientName = default, + string? name = default, + global::System.Collections.Generic.IList? embeddingTypes = default, + global::G.CreateEmbedJobRequestTruncate? truncate = global::G.CreateEmbedJobRequestTruncate.END, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.CreateEmbedJobRequest + { + Model = model, + DatasetId = datasetId, + InputType = inputType, + Name = name, + EmbeddingTypes = embeddingTypes, + Truncate = truncate, + }; + + return await CreateEmbedJobAsync( + xClientName: xClientName, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.EmbedJobsClient.GetEmbedJob.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.EmbedJobsClient.GetEmbedJob.g.verified.cs new file mode 100644 index 0000000000..5e4399c6c7 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.EmbedJobsClient.GetEmbedJob.g.verified.cs @@ -0,0 +1,97 @@ +//HintName: G.EmbedJobsClient.GetEmbedJob.g.cs + +#nullable enable + +namespace G +{ + public partial class EmbedJobsClient + { + partial void PrepareGetEmbedJobArguments( + global::System.Net.Http.HttpClient httpClient, + ref string id, + ref string? xClientName); + partial void PrepareGetEmbedJobRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string id, + string? xClientName); + partial void ProcessGetEmbedJobResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetEmbedJobResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Fetch an Embed Job
+ /// This API retrieves the details about an embed job started by the same user. + ///
+ /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GetEmbedJobAsync( + string id, + string? xClientName, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareGetEmbedJobArguments( + httpClient: _httpClient, + id: ref id, + xClientName: ref xClientName); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/embed-jobs/{id}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareGetEmbedJobRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + id: id, + xClientName: xClientName); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessGetEmbedJobResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessGetEmbedJobResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.EmbedJobsClient.ListEmbedJobs.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.EmbedJobsClient.ListEmbedJobs.g.verified.cs new file mode 100644 index 0000000000..10725fbd4e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.EmbedJobsClient.ListEmbedJobs.g.verified.cs @@ -0,0 +1,91 @@ +//HintName: G.EmbedJobsClient.ListEmbedJobs.g.cs + +#nullable enable + +namespace G +{ + public partial class EmbedJobsClient + { + partial void PrepareListEmbedJobsArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? xClientName); + partial void PrepareListEmbedJobsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? xClientName); + partial void ProcessListEmbedJobsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListEmbedJobsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// List Embed Jobs
+ /// The list embed job endpoint allows users to view all embed jobs history for that specific user. + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ListEmbedJobsAsync( + string? xClientName, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareListEmbedJobsArguments( + httpClient: _httpClient, + xClientName: ref xClientName); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/embed-jobs", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareListEmbedJobsRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + xClientName: xClientName); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessListEmbedJobsResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessListEmbedJobsResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.EmbedJobsClient.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.EmbedJobsClient.g.verified.cs new file mode 100644 index 0000000000..0e302772f4 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.EmbedJobsClient.g.verified.cs @@ -0,0 +1,61 @@ +//HintName: G.EmbedJobsClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// Embed Jobs API
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class EmbedJobsClient : global::System.IDisposable + { + /// + /// production + /// + public const string BaseUrl = "https://api.cohere.com"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::Newtonsoft.Json.JsonSerializerSettings _jsonSerializerOptions; + + + /// + /// Creates a new instance of the EmbedJobsClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public EmbedJobsClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::Newtonsoft.Json.JsonSerializerSettings? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::Newtonsoft.Json.JsonSerializerSettings(); + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.FinetuningClient.CreateFinetunedModel.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.FinetuningClient.CreateFinetunedModel.g.verified.cs new file mode 100644 index 0000000000..8015e5bb8d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.FinetuningClient.CreateFinetunedModel.g.verified.cs @@ -0,0 +1,184 @@ +//HintName: G.FinetuningClient.CreateFinetunedModel.g.cs + +#nullable enable + +namespace G +{ + public partial class FinetuningClient + { + partial void PrepareCreateFinetunedModelArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? xClientName, + global::G.FinetunedModel request); + partial void PrepareCreateFinetunedModelRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? xClientName, + global::G.FinetunedModel request); + partial void ProcessCreateFinetunedModelResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateFinetunedModelResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Trains and deploys a fine-tuned model. + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateFinetunedModelAsync( + string? xClientName, + global::G.FinetunedModel request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareCreateFinetunedModelArguments( + httpClient: _httpClient, + xClientName: ref xClientName, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/finetuning/finetuned-models", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareCreateFinetunedModelRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + xClientName: xClientName, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessCreateFinetunedModelResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessCreateFinetunedModelResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Trains and deploys a fine-tuned model. + /// + /// + /// + /// read-only. FinetunedModel ID. + /// + /// + /// FinetunedModel name (e.g. `foobar`). + /// + /// + /// read-only. User ID of the creator. + /// + /// + /// read-only. Organization ID. + /// + /// + /// The configuration used for fine-tuning. + /// + /// + /// The possible stages of a fine-tuned model life-cycle.
+ /// - STATUS_UNSPECIFIED: Unspecified status.
+ /// - STATUS_FINETUNING: The fine-tuned model is being fine-tuned.
+ /// - STATUS_DEPLOYING_API: The fine-tuned model is being deployed.
+ /// - STATUS_READY: The fine-tuned model is ready to receive requests.
+ /// - STATUS_FAILED: The fine-tuned model failed.
+ /// - STATUS_DELETED: The fine-tuned model was deleted.
+ /// - STATUS_TEMPORARILY_OFFLINE: The fine-tuned model is temporarily unavailable.
+ /// - STATUS_PAUSED: The fine-tuned model is paused (Vanilla only).
+ /// - STATUS_QUEUED: The fine-tuned model is queued for training.
+ /// Default Value: STATUS_UNSPECIFIED + /// + /// + /// read-only. Creation timestamp. + /// + /// + /// read-only. Latest update timestamp. + /// + /// + /// read-only. Timestamp for the completed fine-tuning. + /// + /// + /// read-only. Timestamp for the latest request to this fine-tuned model. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateFinetunedModelAsync( + string name, + global::G.Settings settings, + string? xClientName = default, + string? id = default, + string? creatorId = default, + string? organizationId = default, + global::G.Status? status = global::G.Status.STATUSUNSPECIFIED, + global::System.DateTime createdAt = default, + global::System.DateTime updatedAt = default, + global::System.DateTime completedAt = default, + global::System.DateTime lastUsed = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.FinetunedModel + { + Id = id, + Name = name, + CreatorId = creatorId, + OrganizationId = organizationId, + Settings = settings, + Status = status, + CreatedAt = createdAt, + UpdatedAt = updatedAt, + CompletedAt = completedAt, + LastUsed = lastUsed, + }; + + return await CreateFinetunedModelAsync( + xClientName: xClientName, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.FinetuningClient.DeleteFinetunedModel.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.FinetuningClient.DeleteFinetunedModel.g.verified.cs new file mode 100644 index 0000000000..ec52088813 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.FinetuningClient.DeleteFinetunedModel.g.verified.cs @@ -0,0 +1,96 @@ +//HintName: G.FinetuningClient.DeleteFinetunedModel.g.cs + +#nullable enable + +namespace G +{ + public partial class FinetuningClient + { + partial void PrepareDeleteFinetunedModelArguments( + global::System.Net.Http.HttpClient httpClient, + ref string id, + ref string? xClientName); + partial void PrepareDeleteFinetunedModelRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string id, + string? xClientName); + partial void ProcessDeleteFinetunedModelResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessDeleteFinetunedModelResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Deletes a fine-tuned model. + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteFinetunedModelAsync( + string id, + string? xClientName, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareDeleteFinetunedModelArguments( + httpClient: _httpClient, + id: ref id, + xClientName: ref xClientName); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Delete, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/finetuning/finetuned-models/{id}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareDeleteFinetunedModelRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + id: id, + xClientName: xClientName); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessDeleteFinetunedModelResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessDeleteFinetunedModelResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.FinetuningClient.GetFinetunedModel.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.FinetuningClient.GetFinetunedModel.g.verified.cs new file mode 100644 index 0000000000..f9339d0021 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.FinetuningClient.GetFinetunedModel.g.verified.cs @@ -0,0 +1,96 @@ +//HintName: G.FinetuningClient.GetFinetunedModel.g.cs + +#nullable enable + +namespace G +{ + public partial class FinetuningClient + { + partial void PrepareGetFinetunedModelArguments( + global::System.Net.Http.HttpClient httpClient, + ref string id, + ref string? xClientName); + partial void PrepareGetFinetunedModelRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string id, + string? xClientName); + partial void ProcessGetFinetunedModelResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetFinetunedModelResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Returns a fine-tuned model by ID. + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GetFinetunedModelAsync( + string id, + string? xClientName, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareGetFinetunedModelArguments( + httpClient: _httpClient, + id: ref id, + xClientName: ref xClientName); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/finetuning/finetuned-models/{id}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareGetFinetunedModelRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + id: id, + xClientName: xClientName); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessGetFinetunedModelResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessGetFinetunedModelResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.FinetuningClient.ListEvents.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.FinetuningClient.ListEvents.g.verified.cs new file mode 100644 index 0000000000..d24764cf87 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.FinetuningClient.ListEvents.g.verified.cs @@ -0,0 +1,114 @@ +//HintName: G.FinetuningClient.ListEvents.g.cs + +#nullable enable + +namespace G +{ + public partial class FinetuningClient + { + partial void PrepareListEventsArguments( + global::System.Net.Http.HttpClient httpClient, + ref string finetunedModelId, + ref int pageSize, + ref string? pageToken, + ref string? orderBy, + ref string? xClientName); + partial void PrepareListEventsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string finetunedModelId, + int pageSize, + string? pageToken, + string? orderBy, + string? xClientName); + partial void ProcessListEventsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListEventsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Retrieves the chronology of statuses the fine-tuned model has been through. + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ListEventsAsync( + string finetunedModelId, + int pageSize, + string? pageToken, + string? orderBy, + string? xClientName, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareListEventsArguments( + httpClient: _httpClient, + finetunedModelId: ref finetunedModelId, + pageSize: ref pageSize, + pageToken: ref pageToken, + orderBy: ref orderBy, + xClientName: ref xClientName); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/finetuning/finetuned-models/{finetunedModelId}/events?page_size={pageSize}&page_token={pageToken}&order_by={orderBy}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareListEventsRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + finetunedModelId: finetunedModelId, + pageSize: pageSize, + pageToken: pageToken, + orderBy: orderBy, + xClientName: xClientName); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessListEventsResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessListEventsResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.FinetuningClient.ListFinetunedModels.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.FinetuningClient.ListFinetunedModels.g.verified.cs new file mode 100644 index 0000000000..03275c04d2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.FinetuningClient.ListFinetunedModels.g.verified.cs @@ -0,0 +1,108 @@ +//HintName: G.FinetuningClient.ListFinetunedModels.g.cs + +#nullable enable + +namespace G +{ + public partial class FinetuningClient + { + partial void PrepareListFinetunedModelsArguments( + global::System.Net.Http.HttpClient httpClient, + ref int pageSize, + ref string? pageToken, + ref string? orderBy, + ref string? xClientName); + partial void PrepareListFinetunedModelsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int pageSize, + string? pageToken, + string? orderBy, + string? xClientName); + partial void ProcessListFinetunedModelsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListFinetunedModelsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Lists fine-tuned models. + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ListFinetunedModelsAsync( + int pageSize, + string? pageToken, + string? orderBy, + string? xClientName, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareListFinetunedModelsArguments( + httpClient: _httpClient, + pageSize: ref pageSize, + pageToken: ref pageToken, + orderBy: ref orderBy, + xClientName: ref xClientName); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/finetuning/finetuned-models?page_size={pageSize}&page_token={pageToken}&order_by={orderBy}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareListFinetunedModelsRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + pageSize: pageSize, + pageToken: pageToken, + orderBy: orderBy, + xClientName: xClientName); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessListFinetunedModelsResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessListFinetunedModelsResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.FinetuningClient.ListTrainingStepMetrics.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.FinetuningClient.ListTrainingStepMetrics.g.verified.cs new file mode 100644 index 0000000000..924a978720 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.FinetuningClient.ListTrainingStepMetrics.g.verified.cs @@ -0,0 +1,108 @@ +//HintName: G.FinetuningClient.ListTrainingStepMetrics.g.cs + +#nullable enable + +namespace G +{ + public partial class FinetuningClient + { + partial void PrepareListTrainingStepMetricsArguments( + global::System.Net.Http.HttpClient httpClient, + ref string finetunedModelId, + ref int pageSize, + ref string? pageToken, + ref string? xClientName); + partial void PrepareListTrainingStepMetricsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string finetunedModelId, + int pageSize, + string? pageToken, + string? xClientName); + partial void ProcessListTrainingStepMetricsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListTrainingStepMetricsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Retrieves metrics measured during the training of a fine-tuned model. + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ListTrainingStepMetricsAsync( + string finetunedModelId, + int pageSize, + string? pageToken, + string? xClientName, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareListTrainingStepMetricsArguments( + httpClient: _httpClient, + finetunedModelId: ref finetunedModelId, + pageSize: ref pageSize, + pageToken: ref pageToken, + xClientName: ref xClientName); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/finetuning/finetuned-models/{finetunedModelId}/training-step-metrics?page_size={pageSize}&page_token={pageToken}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareListTrainingStepMetricsRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + finetunedModelId: finetunedModelId, + pageSize: pageSize, + pageToken: pageToken, + xClientName: xClientName); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessListTrainingStepMetricsResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessListTrainingStepMetricsResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.FinetuningClient.UpdateFinetunedModel.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.FinetuningClient.UpdateFinetunedModel.g.verified.cs new file mode 100644 index 0000000000..1190414819 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.FinetuningClient.UpdateFinetunedModel.g.verified.cs @@ -0,0 +1,188 @@ +//HintName: G.FinetuningClient.UpdateFinetunedModel.g.cs + +#nullable enable + +namespace G +{ + public partial class FinetuningClient + { + partial void PrepareUpdateFinetunedModelArguments( + global::System.Net.Http.HttpClient httpClient, + ref string id, + ref string? xClientName, + global::G.UpdateFinetunedModelRequest request); + partial void PrepareUpdateFinetunedModelRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string id, + string? xClientName, + global::G.UpdateFinetunedModelRequest request); + partial void ProcessUpdateFinetunedModelResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessUpdateFinetunedModelResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Updates a fine-tuned model. + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UpdateFinetunedModelAsync( + string id, + string? xClientName, + global::G.UpdateFinetunedModelRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareUpdateFinetunedModelArguments( + httpClient: _httpClient, + id: ref id, + xClientName: ref xClientName, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: new global::System.Net.Http.HttpMethod("PATCH"), + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/finetuning/finetuned-models/{id}", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareUpdateFinetunedModelRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + id: id, + xClientName: xClientName, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessUpdateFinetunedModelResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessUpdateFinetunedModelResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Updates a fine-tuned model. + /// + /// + /// + /// + /// FinetunedModel name (e.g. `foobar`). + /// + /// + /// User ID of the creator. + /// + /// + /// Organization ID. + /// + /// + /// The configuration used for fine-tuning. + /// + /// + /// The possible stages of a fine-tuned model life-cycle.
+ /// - STATUS_UNSPECIFIED: Unspecified status.
+ /// - STATUS_FINETUNING: The fine-tuned model is being fine-tuned.
+ /// - STATUS_DEPLOYING_API: The fine-tuned model is being deployed.
+ /// - STATUS_READY: The fine-tuned model is ready to receive requests.
+ /// - STATUS_FAILED: The fine-tuned model failed.
+ /// - STATUS_DELETED: The fine-tuned model was deleted.
+ /// - STATUS_TEMPORARILY_OFFLINE: The fine-tuned model is temporarily unavailable.
+ /// - STATUS_PAUSED: The fine-tuned model is paused (Vanilla only).
+ /// - STATUS_QUEUED: The fine-tuned model is queued for training.
+ /// Default Value: STATUS_UNSPECIFIED + /// + /// + /// Creation timestamp. + /// + /// + /// Latest update timestamp. + /// + /// + /// Timestamp for the completed fine-tuning. + /// + /// + /// Timestamp for the latest request to this fine-tuned model. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UpdateFinetunedModelAsync( + string id, + string name, + global::G.Settings settings, + string? xClientName = default, + string? creatorId = default, + string? organizationId = default, + global::G.Status? status = global::G.Status.STATUSUNSPECIFIED, + global::System.DateTime createdAt = default, + global::System.DateTime updatedAt = default, + global::System.DateTime completedAt = default, + global::System.DateTime lastUsed = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.UpdateFinetunedModelRequest + { + Name = name, + CreatorId = creatorId, + OrganizationId = organizationId, + Settings = settings, + Status = status, + CreatedAt = createdAt, + UpdatedAt = updatedAt, + CompletedAt = completedAt, + LastUsed = lastUsed, + }; + + return await UpdateFinetunedModelAsync( + id: id, + xClientName: xClientName, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.FinetuningClient.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.FinetuningClient.g.verified.cs new file mode 100644 index 0000000000..4799c3b834 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.FinetuningClient.g.verified.cs @@ -0,0 +1,61 @@ +//HintName: G.FinetuningClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// Finetuning API (Beta)
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class FinetuningClient : global::System.IDisposable + { + /// + /// production + /// + public const string BaseUrl = "https://api.cohere.com"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::Newtonsoft.Json.JsonSerializerSettings _jsonSerializerOptions; + + + /// + /// Creates a new instance of the FinetuningClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public FinetuningClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::Newtonsoft.Json.JsonSerializerSettings? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::Newtonsoft.Json.JsonSerializerSettings(); + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ApiMeta.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ApiMeta.g.verified.cs new file mode 100644 index 0000000000..140be66876 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ApiMeta.g.verified.cs @@ -0,0 +1,42 @@ +//HintName: G.Models.ApiMeta.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ApiMeta + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("api_version")] + public global::G.ApiMetaApiVersion? ApiVersion { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("billed_units")] + public global::G.ApiMetaBilledUnits? BilledUnits { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("tokens")] + public global::G.ApiMetaTokens? Tokens { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("warnings")] + public global::System.Collections.Generic.IList? Warnings { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ApiMetaApiVersion.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ApiMetaApiVersion.g.verified.cs new file mode 100644 index 0000000000..7ddca090c7 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ApiMetaApiVersion.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.ApiMetaApiVersion.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ApiMetaApiVersion + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("version", Required = global::Newtonsoft.Json.Required.Always)] + public string Version { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("is_deprecated")] + public bool IsDeprecated { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("is_experimental")] + public bool IsExperimental { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ApiMetaBilledUnits.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ApiMetaBilledUnits.g.verified.cs new file mode 100644 index 0000000000..632d98c6e8 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ApiMetaBilledUnits.g.verified.cs @@ -0,0 +1,42 @@ +//HintName: G.Models.ApiMetaBilledUnits.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ApiMetaBilledUnits + { + /// + /// The number of billed input tokens. + /// + [global::Newtonsoft.Json.JsonProperty("input_tokens")] + public double InputTokens { get; set; } + + /// + /// The number of billed output tokens. + /// + [global::Newtonsoft.Json.JsonProperty("output_tokens")] + public double OutputTokens { get; set; } + + /// + /// The number of billed search units. + /// + [global::Newtonsoft.Json.JsonProperty("search_units")] + public double SearchUnits { get; set; } + + /// + /// The number of billed classifications units. + /// + [global::Newtonsoft.Json.JsonProperty("classifications")] + public double Classifications { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ApiMetaTokens.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ApiMetaTokens.g.verified.cs new file mode 100644 index 0000000000..eca4319f70 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ApiMetaTokens.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.ApiMetaTokens.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ApiMetaTokens + { + /// + /// The number of tokens used as input to the model. + /// + [global::Newtonsoft.Json.JsonProperty("input_tokens")] + public double InputTokens { get; set; } + + /// + /// The number of tokens produced by the model. + /// + [global::Newtonsoft.Json.JsonProperty("output_tokens")] + public double OutputTokens { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.AssistantMessage.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.AssistantMessage.g.verified.cs new file mode 100644 index 0000000000..e976538693 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.AssistantMessage.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: G.Models.AssistantMessage.g.cs + +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// A message from the assistant role can contain text and tool call information. + /// + public sealed partial class AssistantMessage + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("role")] + public global::G.AssistantMessageRole Role { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("tool_calls")] + public global::System.Collections.Generic.IList? ToolCalls { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("tool_plan")] + public string? ToolPlan { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("content")] + public global::System.OneOf>>? Content { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("citations")] + public global::System.Collections.Generic.IList? Citations { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.AssistantMessageResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.AssistantMessageResponse.g.verified.cs new file mode 100644 index 0000000000..4477e619bf --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.AssistantMessageResponse.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: G.Models.AssistantMessageResponse.g.cs + +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// A message from the assistant role can contain text and tool call information. + /// + public sealed partial class AssistantMessageResponse + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("role")] + public global::G.AssistantMessageResponseRole Role { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("tool_calls")] + public global::System.Collections.Generic.IList? ToolCalls { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("tool_plan")] + public string? ToolPlan { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("content")] + public global::System.Collections.Generic.IList>? Content { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("citations")] + public global::System.Collections.Generic.IList? Citations { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.AssistantMessageResponseRole.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.AssistantMessageResponseRole.g.verified.cs new file mode 100644 index 0000000000..6e55d7c6e7 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.AssistantMessageResponseRole.g.verified.cs @@ -0,0 +1,48 @@ +//HintName: G.Models.AssistantMessageResponseRole.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + [global::System.Runtime.Serialization.DataContract] + public enum AssistantMessageResponseRole + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="assistant")] + Assistant, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class AssistantMessageResponseRoleExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this AssistantMessageResponseRole value) + { + return value switch + { + AssistantMessageResponseRole.Assistant => "assistant", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static AssistantMessageResponseRole? ToEnum(string value) + { + return value switch + { + "assistant" => AssistantMessageResponseRole.Assistant, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.AssistantMessageRole.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.AssistantMessageRole.g.verified.cs new file mode 100644 index 0000000000..9b78747e13 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.AssistantMessageRole.g.verified.cs @@ -0,0 +1,48 @@ +//HintName: G.Models.AssistantMessageRole.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + [global::System.Runtime.Serialization.DataContract] + public enum AssistantMessageRole + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="assistant")] + Assistant, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class AssistantMessageRoleExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this AssistantMessageRole value) + { + return value switch + { + AssistantMessageRole.Assistant => "assistant", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static AssistantMessageRole? ToEnum(string value) + { + return value switch + { + "assistant" => AssistantMessageRole.Assistant, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.AuthTokenType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.AuthTokenType.g.verified.cs new file mode 100644 index 0000000000..cb1eb88c31 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.AuthTokenType.g.verified.cs @@ -0,0 +1,63 @@ +//HintName: G.Models.AuthTokenType.g.cs + +#nullable enable + +namespace G +{ + /// + /// The token_type specifies the way the token is passed in the Authorization header. Valid values are "bearer", "basic", and "noscheme".
+ /// Default Value: noscheme + ///
+ [global::System.Runtime.Serialization.DataContract] + public enum AuthTokenType + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="bearer")] + Bearer, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="basic")] + Basic, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="noscheme")] + Noscheme, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class AuthTokenTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this AuthTokenType value) + { + return value switch + { + AuthTokenType.Bearer => "bearer", + AuthTokenType.Basic => "basic", + AuthTokenType.Noscheme => "noscheme", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static AuthTokenType? ToEnum(string value) + { + return value switch + { + "bearer" => AuthTokenType.Bearer, + "basic" => AuthTokenType.Basic, + "noscheme" => AuthTokenType.Noscheme, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.BaseModel.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.BaseModel.g.verified.cs new file mode 100644 index 0000000000..858185cf0b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.BaseModel.g.verified.cs @@ -0,0 +1,52 @@ +//HintName: G.Models.BaseModel.g.cs + +#nullable enable + +namespace G +{ + /// + /// The base model used for fine-tuning. + /// + public sealed partial class BaseModel + { + /// + /// The name of the base model. + /// + [global::Newtonsoft.Json.JsonProperty("name")] + public string? Name { get; set; } + + /// + /// read-only. The version of the base model. + /// + [global::Newtonsoft.Json.JsonProperty("version")] + public string? Version { get; set; } + + /// + /// The possible types of fine-tuned models.
+ /// - BASE_TYPE_UNSPECIFIED: Unspecified model.
+ /// - BASE_TYPE_GENERATIVE: Generative model.
+ /// - BASE_TYPE_CLASSIFICATION: Classification model.
+ /// - BASE_TYPE_RERANK: Rerank model.
+ /// - BASE_TYPE_CHAT: Chat model.
+ /// Default Value: BASE_TYPE_UNSPECIFIED + ///
+ [global::Newtonsoft.Json.JsonProperty("base_type", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.BaseType BaseType { get; set; } = default!; + + /// + /// The possible strategy used to serve a fine-tuned models.
+ /// - STRATEGY_UNSPECIFIED: Unspecified strategy.
+ /// - STRATEGY_VANILLA: Serve the fine-tuned model on a dedicated GPU.
+ /// - STRATEGY_TFEW: Serve the fine-tuned model on a shared GPU.
+ /// Default Value: STRATEGY_UNSPECIFIED + ///
+ [global::Newtonsoft.Json.JsonProperty("strategy")] + public global::G.Strategy? Strategy { get; set; } = global::G.Strategy.STRATEGYUNSPECIFIED; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.BaseType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.BaseType.g.verified.cs new file mode 100644 index 0000000000..ead2c6408c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.BaseType.g.verified.cs @@ -0,0 +1,82 @@ +//HintName: G.Models.BaseType.g.cs + +#nullable enable + +namespace G +{ + /// + /// The possible types of fine-tuned models.
+ /// - BASE_TYPE_UNSPECIFIED: Unspecified model.
+ /// - BASE_TYPE_GENERATIVE: Generative model.
+ /// - BASE_TYPE_CLASSIFICATION: Classification model.
+ /// - BASE_TYPE_RERANK: Rerank model.
+ /// - BASE_TYPE_CHAT: Chat model.
+ /// Default Value: BASE_TYPE_UNSPECIFIED + ///
+ [global::System.Runtime.Serialization.DataContract] + public enum BaseType + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="BASE_TYPE_UNSPECIFIED")] + BASETYPEUNSPECIFIED, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="BASE_TYPE_GENERATIVE")] + BASETYPEGENERATIVE, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="BASE_TYPE_CLASSIFICATION")] + BASETYPECLASSIFICATION, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="BASE_TYPE_RERANK")] + BASETYPERERANK, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="BASE_TYPE_CHAT")] + BASETYPECHAT, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class BaseTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this BaseType value) + { + return value switch + { + BaseType.BASETYPEUNSPECIFIED => "BASE_TYPE_UNSPECIFIED", + BaseType.BASETYPEGENERATIVE => "BASE_TYPE_GENERATIVE", + BaseType.BASETYPECLASSIFICATION => "BASE_TYPE_CLASSIFICATION", + BaseType.BASETYPERERANK => "BASE_TYPE_RERANK", + BaseType.BASETYPECHAT => "BASE_TYPE_CHAT", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static BaseType? ToEnum(string value) + { + return value switch + { + "BASE_TYPE_UNSPECIFIED" => BaseType.BASETYPEUNSPECIFIED, + "BASE_TYPE_GENERATIVE" => BaseType.BASETYPEGENERATIVE, + "BASE_TYPE_CLASSIFICATION" => BaseType.BASETYPECLASSIFICATION, + "BASE_TYPE_RERANK" => BaseType.BASETYPERERANK, + "BASE_TYPE_CHAT" => BaseType.BASETYPECHAT, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse.g.verified.cs new file mode 100644 index 0000000000..d989a6b152 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CancelEmbedJobResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CancelEmbedJobResponse + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse10.g.verified.cs new file mode 100644 index 0000000000..a97607b018 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CancelEmbedJobResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CancelEmbedJobResponse10 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse11.g.verified.cs new file mode 100644 index 0000000000..e593c4db76 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CancelEmbedJobResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CancelEmbedJobResponse11 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse12.g.verified.cs new file mode 100644 index 0000000000..a10422a067 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CancelEmbedJobResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CancelEmbedJobResponse12 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse2.g.verified.cs new file mode 100644 index 0000000000..49d26737a0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CancelEmbedJobResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CancelEmbedJobResponse2 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse3.g.verified.cs new file mode 100644 index 0000000000..ab13603bee --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CancelEmbedJobResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CancelEmbedJobResponse3 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse4.g.verified.cs new file mode 100644 index 0000000000..5cfeedd9c0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CancelEmbedJobResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CancelEmbedJobResponse4 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse5.g.verified.cs new file mode 100644 index 0000000000..25cea86bc2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CancelEmbedJobResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CancelEmbedJobResponse5 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse6.g.verified.cs new file mode 100644 index 0000000000..1bb0b7fe7a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CancelEmbedJobResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CancelEmbedJobResponse6 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse7.g.verified.cs new file mode 100644 index 0000000000..3dc17798d8 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CancelEmbedJobResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CancelEmbedJobResponse7 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse8.g.verified.cs new file mode 100644 index 0000000000..46624b9c4a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CancelEmbedJobResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CancelEmbedJobResponse8 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse9.g.verified.cs new file mode 100644 index 0000000000..3bbc1f5f5c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CancelEmbedJobResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CancelEmbedJobResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CancelEmbedJobResponse9 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatCitation.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatCitation.g.verified.cs new file mode 100644 index 0000000000..a3e51d3ed1 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatCitation.g.verified.cs @@ -0,0 +1,42 @@ +//HintName: G.Models.ChatCitation.g.cs + +#nullable enable + +namespace G +{ + /// + /// A section of the generated reply which cites external knowledge. + /// + public sealed partial class ChatCitation + { + /// + /// The index of text that the citation starts at, counting from zero. For example, a generation of `Hello, world!` with a citation on `world` would have a start value of `7`. This is because the citation starts at `w`, which is the seventh character. + /// + [global::Newtonsoft.Json.JsonProperty("start", Required = global::Newtonsoft.Json.Required.Always)] + public int Start { get; set; } = default!; + + /// + /// The index of text that the citation ends after, counting from zero. For example, a generation of `Hello, world!` with a citation on `world` would have an end value of `11`. This is because the citation ends after `d`, which is the eleventh character. + /// + [global::Newtonsoft.Json.JsonProperty("end", Required = global::Newtonsoft.Json.Required.Always)] + public int End { get; set; } = default!; + + /// + /// The text of the citation. For example, a generation of `Hello, world!` with a citation of `world` would have a text value of `world`. + /// + [global::Newtonsoft.Json.JsonProperty("text", Required = global::Newtonsoft.Json.Required.Always)] + public string Text { get; set; } = default!; + + /// + /// Identifiers of documents cited by this section of the generated reply. + /// + [global::Newtonsoft.Json.JsonProperty("document_ids", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList DocumentIds { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatCitationGenerationEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatCitationGenerationEvent.g.verified.cs new file mode 100644 index 0000000000..1f07611ffa --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatCitationGenerationEvent.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.ChatCitationGenerationEvent.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// + /// + public readonly partial struct ChatCitationGenerationEvent : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamEvent? Value1 { get; init; } +#else + public global::G.ChatStreamEvent? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator ChatCitationGenerationEvent(global::G.ChatStreamEvent value) => new ChatCitationGenerationEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamEvent?(ChatCitationGenerationEvent @this) => @this.Value1; + + /// + /// + /// + public ChatCitationGenerationEvent(global::G.ChatStreamEvent? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatCitationGenerationEventVariant2? Value2 { get; init; } +#else + public global::G.ChatCitationGenerationEventVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator ChatCitationGenerationEvent(global::G.ChatCitationGenerationEventVariant2 value) => new ChatCitationGenerationEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatCitationGenerationEventVariant2?(ChatCitationGenerationEvent @this) => @this.Value2; + + /// + /// + /// + public ChatCitationGenerationEvent(global::G.ChatCitationGenerationEventVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public ChatCitationGenerationEvent( + global::G.ChatStreamEvent? value1, + global::G.ChatCitationGenerationEventVariant2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.ChatStreamEvent), + Value2, + typeof(global::G.ChatCitationGenerationEventVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ChatCitationGenerationEvent other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(ChatCitationGenerationEvent obj1, ChatCitationGenerationEvent obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ChatCitationGenerationEvent obj1, ChatCitationGenerationEvent obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ChatCitationGenerationEvent o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatCitationGenerationEventVariant2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatCitationGenerationEventVariant2.g.verified.cs new file mode 100644 index 0000000000..9b58705c76 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatCitationGenerationEventVariant2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatCitationGenerationEventVariant2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatCitationGenerationEventVariant2 + { + /// + /// Citations for the generated reply. + /// + [global::Newtonsoft.Json.JsonProperty("citations", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList Citations { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatConnector.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatConnector.g.verified.cs new file mode 100644 index 0000000000..e18b98f551 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatConnector.g.verified.cs @@ -0,0 +1,44 @@ +//HintName: G.Models.ChatConnector.g.cs + +#nullable enable + +namespace G +{ + /// + /// The connector used for fetching documents. + /// + public sealed partial class ChatConnector + { + /// + /// The identifier of the connector. + /// + [global::Newtonsoft.Json.JsonProperty("id", Required = global::Newtonsoft.Json.Required.Always)] + public string Id { get; set; } = default!; + + /// + /// When specified, this user access token will be passed to the connector in the Authorization header instead of the Cohere generated one. + /// + [global::Newtonsoft.Json.JsonProperty("user_access_token")] + public string? UserAccessToken { get; set; } + + /// + /// Defaults to `false`.
+ /// When `true`, the request will continue if this connector returned an error. + ///
+ [global::Newtonsoft.Json.JsonProperty("continue_on_failure")] + public bool ContinueOnFailure { get; set; } + + /// + /// Provides the connector with different settings at request time. The key/value pairs of this object are specific to each connector.
+ /// For example, the connector `web-search` supports the `site` option, which limits search results to the specified domain. + ///
+ [global::Newtonsoft.Json.JsonProperty("options")] + public global::G.ChatConnectorOptions? Options { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatConnectorOptions.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatConnectorOptions.g.verified.cs new file mode 100644 index 0000000000..058a02b490 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatConnectorOptions.g.verified.cs @@ -0,0 +1,20 @@ +//HintName: G.Models.ChatConnectorOptions.g.cs + +#nullable enable + +namespace G +{ + /// + /// Provides the connector with different settings at request time. The key/value pairs of this object are specific to each connector.
+ /// For example, the connector `web-search` supports the `site` option, which limits search results to the specified domain. + ///
+ public sealed partial class ChatConnectorOptions + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentDeltaEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentDeltaEvent.g.verified.cs new file mode 100644 index 0000000000..21aab7ee55 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentDeltaEvent.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.ChatContentDeltaEvent.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// A streamed delta event which contains a delta of chat text content. + /// + public readonly partial struct ChatContentDeltaEvent : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamEventType? Value1 { get; init; } +#else + public global::G.ChatStreamEventType? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator ChatContentDeltaEvent(global::G.ChatStreamEventType value) => new ChatContentDeltaEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamEventType?(ChatContentDeltaEvent @this) => @this.Value1; + + /// + /// + /// + public ChatContentDeltaEvent(global::G.ChatStreamEventType? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatContentDeltaEventVariant2? Value2 { get; init; } +#else + public global::G.ChatContentDeltaEventVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator ChatContentDeltaEvent(global::G.ChatContentDeltaEventVariant2 value) => new ChatContentDeltaEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatContentDeltaEventVariant2?(ChatContentDeltaEvent @this) => @this.Value2; + + /// + /// + /// + public ChatContentDeltaEvent(global::G.ChatContentDeltaEventVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public ChatContentDeltaEvent( + global::G.ChatStreamEventType? value1, + global::G.ChatContentDeltaEventVariant2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.ChatStreamEventType), + Value2, + typeof(global::G.ChatContentDeltaEventVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ChatContentDeltaEvent other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(ChatContentDeltaEvent obj1, ChatContentDeltaEvent obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ChatContentDeltaEvent obj1, ChatContentDeltaEvent obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ChatContentDeltaEvent o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentDeltaEventVariant2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentDeltaEventVariant2.g.verified.cs new file mode 100644 index 0000000000..e1ae7cc094 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentDeltaEventVariant2.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.ChatContentDeltaEventVariant2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatContentDeltaEventVariant2 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("index")] + public int Index { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("delta")] + public global::G.ChatContentDeltaEventVariant2Delta? Delta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentDeltaEventVariant2Delta.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentDeltaEventVariant2Delta.g.verified.cs new file mode 100644 index 0000000000..44c7cfe51c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentDeltaEventVariant2Delta.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatContentDeltaEventVariant2Delta.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatContentDeltaEventVariant2Delta + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("message")] + public global::G.ChatContentDeltaEventVariant2DeltaMessage? Message { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentDeltaEventVariant2DeltaMessage.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentDeltaEventVariant2DeltaMessage.g.verified.cs new file mode 100644 index 0000000000..9bbbe0e4e9 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentDeltaEventVariant2DeltaMessage.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatContentDeltaEventVariant2DeltaMessage.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatContentDeltaEventVariant2DeltaMessage + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("content")] + public global::G.ChatContentDeltaEventVariant2DeltaMessageContent? Content { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentDeltaEventVariant2DeltaMessageContent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentDeltaEventVariant2DeltaMessageContent.g.verified.cs new file mode 100644 index 0000000000..e79d33078a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentDeltaEventVariant2DeltaMessageContent.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatContentDeltaEventVariant2DeltaMessageContent.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatContentDeltaEventVariant2DeltaMessageContent + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("text")] + public string? Text { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentEndEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentEndEvent.g.verified.cs new file mode 100644 index 0000000000..c2db4582c2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentEndEvent.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.ChatContentEndEvent.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// A streamed delta event which signifies that the content block has ended. + /// + public readonly partial struct ChatContentEndEvent : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamEventType? Value1 { get; init; } +#else + public global::G.ChatStreamEventType? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator ChatContentEndEvent(global::G.ChatStreamEventType value) => new ChatContentEndEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamEventType?(ChatContentEndEvent @this) => @this.Value1; + + /// + /// + /// + public ChatContentEndEvent(global::G.ChatStreamEventType? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatContentEndEventVariant2? Value2 { get; init; } +#else + public global::G.ChatContentEndEventVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator ChatContentEndEvent(global::G.ChatContentEndEventVariant2 value) => new ChatContentEndEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatContentEndEventVariant2?(ChatContentEndEvent @this) => @this.Value2; + + /// + /// + /// + public ChatContentEndEvent(global::G.ChatContentEndEventVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public ChatContentEndEvent( + global::G.ChatStreamEventType? value1, + global::G.ChatContentEndEventVariant2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.ChatStreamEventType), + Value2, + typeof(global::G.ChatContentEndEventVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ChatContentEndEvent other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(ChatContentEndEvent obj1, ChatContentEndEvent obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ChatContentEndEvent obj1, ChatContentEndEvent obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ChatContentEndEvent o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentEndEventVariant2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentEndEventVariant2.g.verified.cs new file mode 100644 index 0000000000..663373423d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentEndEventVariant2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatContentEndEventVariant2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatContentEndEventVariant2 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("index")] + public int Index { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentStartEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentStartEvent.g.verified.cs new file mode 100644 index 0000000000..c3e3f5a4b3 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentStartEvent.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.ChatContentStartEvent.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// A streamed delta event which signifies that a new content block has started. + /// + public readonly partial struct ChatContentStartEvent : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamEventType? Value1 { get; init; } +#else + public global::G.ChatStreamEventType? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator ChatContentStartEvent(global::G.ChatStreamEventType value) => new ChatContentStartEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamEventType?(ChatContentStartEvent @this) => @this.Value1; + + /// + /// + /// + public ChatContentStartEvent(global::G.ChatStreamEventType? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatContentStartEventVariant2? Value2 { get; init; } +#else + public global::G.ChatContentStartEventVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator ChatContentStartEvent(global::G.ChatContentStartEventVariant2 value) => new ChatContentStartEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatContentStartEventVariant2?(ChatContentStartEvent @this) => @this.Value2; + + /// + /// + /// + public ChatContentStartEvent(global::G.ChatContentStartEventVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public ChatContentStartEvent( + global::G.ChatStreamEventType? value1, + global::G.ChatContentStartEventVariant2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.ChatStreamEventType), + Value2, + typeof(global::G.ChatContentStartEventVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ChatContentStartEvent other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(ChatContentStartEvent obj1, ChatContentStartEvent obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ChatContentStartEvent obj1, ChatContentStartEvent obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ChatContentStartEvent o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentStartEventVariant2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentStartEventVariant2.g.verified.cs new file mode 100644 index 0000000000..8ee0398289 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentStartEventVariant2.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.ChatContentStartEventVariant2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatContentStartEventVariant2 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("index")] + public int Index { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("delta")] + public global::G.ChatContentStartEventVariant2Delta? Delta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentStartEventVariant2Delta.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentStartEventVariant2Delta.g.verified.cs new file mode 100644 index 0000000000..973cc4711b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentStartEventVariant2Delta.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatContentStartEventVariant2Delta.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatContentStartEventVariant2Delta + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("message")] + public global::G.ChatContentStartEventVariant2DeltaMessage? Message { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentStartEventVariant2DeltaMessage.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentStartEventVariant2DeltaMessage.g.verified.cs new file mode 100644 index 0000000000..2c258b3077 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentStartEventVariant2DeltaMessage.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatContentStartEventVariant2DeltaMessage.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatContentStartEventVariant2DeltaMessage + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("content")] + public global::G.ChatContentStartEventVariant2DeltaMessageContent? Content { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentStartEventVariant2DeltaMessageContent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentStartEventVariant2DeltaMessageContent.g.verified.cs new file mode 100644 index 0000000000..6a9e6eb0d8 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentStartEventVariant2DeltaMessageContent.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.ChatContentStartEventVariant2DeltaMessageContent.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatContentStartEventVariant2DeltaMessageContent + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("text")] + public string? Text { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("type")] + public global::G.ChatContentStartEventVariant2DeltaMessageContentType? Type { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentStartEventVariant2DeltaMessageContentType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentStartEventVariant2DeltaMessageContentType.g.verified.cs new file mode 100644 index 0000000000..844a15e5c6 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatContentStartEventVariant2DeltaMessageContentType.g.verified.cs @@ -0,0 +1,48 @@ +//HintName: G.Models.ChatContentStartEventVariant2DeltaMessageContentType.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + [global::System.Runtime.Serialization.DataContract] + public enum ChatContentStartEventVariant2DeltaMessageContentType + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="text")] + Text, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ChatContentStartEventVariant2DeltaMessageContentTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ChatContentStartEventVariant2DeltaMessageContentType value) + { + return value switch + { + ChatContentStartEventVariant2DeltaMessageContentType.Text => "text", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ChatContentStartEventVariant2DeltaMessageContentType? ToEnum(string value) + { + return value switch + { + "text" => ChatContentStartEventVariant2DeltaMessageContentType.Text, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatDataMetrics.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatDataMetrics.g.verified.cs new file mode 100644 index 0000000000..283fd2f1ad --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatDataMetrics.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.ChatDataMetrics.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatDataMetrics + { + /// + /// The sum of all turns of valid train examples. + /// + [global::Newtonsoft.Json.JsonProperty("num_train_turns")] + public double NumTrainTurns { get; set; } + + /// + /// The sum of all turns of valid eval examples. + /// + [global::Newtonsoft.Json.JsonProperty("num_eval_turns")] + public double NumEvalTurns { get; set; } + + /// + /// The preamble of this dataset. + /// + [global::Newtonsoft.Json.JsonProperty("preamble")] + public string? Preamble { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatDocument.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatDocument.g.verified.cs new file mode 100644 index 0000000000..ed0e62c488 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatDocument.g.verified.cs @@ -0,0 +1,27 @@ +//HintName: G.Models.ChatDocument.g.cs + +#nullable enable + +namespace G +{ + /// + /// Relevant information that could be used by the model to generate a more accurate reply.
+ /// The contents of each document are generally short (under 300 words), and are passed in the form of a
+ /// dictionary of strings. Some suggested keys are "text", "author", "date". Both the key name and the value will be
+ /// passed to the model. + ///
+ public sealed partial class ChatDocument + { + /// + /// Unique identifier for this document. + /// + [global::Newtonsoft.Json.JsonProperty("id")] + public string? Id { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatFinishReason.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatFinishReason.g.verified.cs new file mode 100644 index 0000000000..7d4108c5b6 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatFinishReason.g.verified.cs @@ -0,0 +1,90 @@ +//HintName: G.Models.ChatFinishReason.g.cs + +#nullable enable + +namespace G +{ + /// + /// The reason a chat request has finished. + /// + [global::System.Runtime.Serialization.DataContract] + public enum ChatFinishReason + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="complete")] + Complete, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="stop_sequence")] + StopSequence, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="max_tokens")] + MaxTokens, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="tool_call")] + ToolCall, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="error")] + Error, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="content_blocked")] + ContentBlocked, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="error_limit")] + ErrorLimit, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ChatFinishReasonExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ChatFinishReason value) + { + return value switch + { + ChatFinishReason.Complete => "complete", + ChatFinishReason.StopSequence => "stop_sequence", + ChatFinishReason.MaxTokens => "max_tokens", + ChatFinishReason.ToolCall => "tool_call", + ChatFinishReason.Error => "error", + ChatFinishReason.ContentBlocked => "content_blocked", + ChatFinishReason.ErrorLimit => "error_limit", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ChatFinishReason? ToEnum(string value) + { + return value switch + { + "complete" => ChatFinishReason.Complete, + "stop_sequence" => ChatFinishReason.StopSequence, + "max_tokens" => ChatFinishReason.MaxTokens, + "tool_call" => ChatFinishReason.ToolCall, + "error" => ChatFinishReason.Error, + "content_blocked" => ChatFinishReason.ContentBlocked, + "error_limit" => ChatFinishReason.ErrorLimit, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatMessage.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatMessage.g.verified.cs new file mode 100644 index 0000000000..d33ae822a8 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatMessage.g.verified.cs @@ -0,0 +1,37 @@ +//HintName: G.Models.ChatMessage.g.cs + +#nullable enable + +namespace G +{ + /// + /// Represents a single message in the chat history, excluding the current user turn. It has two properties: `role` and `message`. The `role` identifies the sender (`CHATBOT`, `SYSTEM`, or `USER`), while the `message` contains the text content.
+ /// The chat_history parameter should not be used for `SYSTEM` messages in most cases. Instead, to add a `SYSTEM` role message at the beginning of a conversation, the `preamble` parameter should be used. + ///
+ public sealed partial class ChatMessage + { + /// + /// One of `CHATBOT`, `SYSTEM`, `TOOL` or `USER` to identify who the message is coming from. + /// + [global::Newtonsoft.Json.JsonProperty("role", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.ChatRole Role { get; set; } = default!; + + /// + /// Contents of the chat message. + /// + [global::Newtonsoft.Json.JsonProperty("message", Required = global::Newtonsoft.Json.Required.Always)] + public string Message { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("tool_calls")] + public global::System.Collections.Generic.IList? ToolCalls { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatMessage2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatMessage2.g.verified.cs new file mode 100644 index 0000000000..560b13e0bb --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatMessage2.g.verified.cs @@ -0,0 +1,249 @@ +//HintName: G.Models.ChatMessage2.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// Represents a single message in the chat history from a given role. + /// + public readonly partial struct ChatMessage2 : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.UserMessage? UserMessage { get; init; } +#else + public global::G.UserMessage? UserMessage { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(UserMessage))] +#endif + public bool IsUserMessage => UserMessage != null; + + /// + /// + /// + public static implicit operator ChatMessage2(global::G.UserMessage value) => new ChatMessage2(value); + + /// + /// + /// + public static implicit operator global::G.UserMessage?(ChatMessage2 @this) => @this.UserMessage; + + /// + /// + /// + public ChatMessage2(global::G.UserMessage? value) + { + UserMessage = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.AssistantMessage? AssistantMessage { get; init; } +#else + public global::G.AssistantMessage? AssistantMessage { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantMessage))] +#endif + public bool IsAssistantMessage => AssistantMessage != null; + + /// + /// + /// + public static implicit operator ChatMessage2(global::G.AssistantMessage value) => new ChatMessage2(value); + + /// + /// + /// + public static implicit operator global::G.AssistantMessage?(ChatMessage2 @this) => @this.AssistantMessage; + + /// + /// + /// + public ChatMessage2(global::G.AssistantMessage? value) + { + AssistantMessage = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.SystemMessage? SystemMessage { get; init; } +#else + public global::G.SystemMessage? SystemMessage { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SystemMessage))] +#endif + public bool IsSystemMessage => SystemMessage != null; + + /// + /// + /// + public static implicit operator ChatMessage2(global::G.SystemMessage value) => new ChatMessage2(value); + + /// + /// + /// + public static implicit operator global::G.SystemMessage?(ChatMessage2 @this) => @this.SystemMessage; + + /// + /// + /// + public ChatMessage2(global::G.SystemMessage? value) + { + SystemMessage = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ToolMessage2? Tool { get; init; } +#else + public global::G.ToolMessage2? Tool { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Tool))] +#endif + public bool IsTool => Tool != null; + + /// + /// + /// + public static implicit operator ChatMessage2(global::G.ToolMessage2 value) => new ChatMessage2(value); + + /// + /// + /// + public static implicit operator global::G.ToolMessage2?(ChatMessage2 @this) => @this.Tool; + + /// + /// + /// + public ChatMessage2(global::G.ToolMessage2? value) + { + Tool = value; + } + + /// + /// + /// + public ChatMessage2( + global::G.UserMessage? userMessage, + global::G.AssistantMessage? assistantMessage, + global::G.SystemMessage? systemMessage, + global::G.ToolMessage2? tool + ) + { + UserMessage = userMessage; + AssistantMessage = assistantMessage; + SystemMessage = systemMessage; + Tool = tool; + } + + /// + /// + /// + public object? Object => + Tool as object ?? + SystemMessage as object ?? + AssistantMessage as object ?? + UserMessage as object + ; + + /// + /// + /// + public bool Validate() + { + return IsUserMessage && !IsAssistantMessage && !IsSystemMessage && !IsTool || !IsUserMessage && IsAssistantMessage && !IsSystemMessage && !IsTool || !IsUserMessage && !IsAssistantMessage && IsSystemMessage && !IsTool || !IsUserMessage && !IsAssistantMessage && !IsSystemMessage && IsTool; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + UserMessage, + typeof(global::G.UserMessage), + AssistantMessage, + typeof(global::G.AssistantMessage), + SystemMessage, + typeof(global::G.SystemMessage), + Tool, + typeof(global::G.ToolMessage2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ChatMessage2 other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(UserMessage, other.UserMessage) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantMessage, other.AssistantMessage) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(SystemMessage, other.SystemMessage) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Tool, other.Tool) + ; + } + + /// + /// + /// + public static bool operator ==(ChatMessage2 obj1, ChatMessage2 obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ChatMessage2 obj1, ChatMessage2 obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ChatMessage2 o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatMessageEndEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatMessageEndEvent.g.verified.cs new file mode 100644 index 0000000000..79170f455b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatMessageEndEvent.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.ChatMessageEndEvent.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// A streamed event which signifies that the chat message has ended. + /// + public readonly partial struct ChatMessageEndEvent : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamEventType? Value1 { get; init; } +#else + public global::G.ChatStreamEventType? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator ChatMessageEndEvent(global::G.ChatStreamEventType value) => new ChatMessageEndEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamEventType?(ChatMessageEndEvent @this) => @this.Value1; + + /// + /// + /// + public ChatMessageEndEvent(global::G.ChatStreamEventType? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatMessageEndEventVariant2? Value2 { get; init; } +#else + public global::G.ChatMessageEndEventVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator ChatMessageEndEvent(global::G.ChatMessageEndEventVariant2 value) => new ChatMessageEndEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatMessageEndEventVariant2?(ChatMessageEndEvent @this) => @this.Value2; + + /// + /// + /// + public ChatMessageEndEvent(global::G.ChatMessageEndEventVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public ChatMessageEndEvent( + global::G.ChatStreamEventType? value1, + global::G.ChatMessageEndEventVariant2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.ChatStreamEventType), + Value2, + typeof(global::G.ChatMessageEndEventVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ChatMessageEndEvent other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(ChatMessageEndEvent obj1, ChatMessageEndEvent obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ChatMessageEndEvent obj1, ChatMessageEndEvent obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ChatMessageEndEvent o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatMessageEndEventVariant2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatMessageEndEventVariant2.g.verified.cs new file mode 100644 index 0000000000..4adc1613ea --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatMessageEndEventVariant2.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.ChatMessageEndEventVariant2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatMessageEndEventVariant2 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("id")] + public string? Id { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("delta")] + public global::G.ChatMessageEndEventVariant2Delta? Delta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatMessageEndEventVariant2Delta.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatMessageEndEventVariant2Delta.g.verified.cs new file mode 100644 index 0000000000..155ce3abff --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatMessageEndEventVariant2Delta.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.ChatMessageEndEventVariant2Delta.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatMessageEndEventVariant2Delta + { + /// + /// The reason a chat request has finished. + /// + [global::Newtonsoft.Json.JsonProperty("finish_reason")] + public global::G.ChatFinishReason? FinishReason { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("usage")] + public global::G.Usage? Usage { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatMessageStartEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatMessageStartEvent.g.verified.cs new file mode 100644 index 0000000000..03f2f7984c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatMessageStartEvent.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.ChatMessageStartEvent.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// A streamed event which signifies that a stream has started. + /// + public readonly partial struct ChatMessageStartEvent : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamEventType? Value1 { get; init; } +#else + public global::G.ChatStreamEventType? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator ChatMessageStartEvent(global::G.ChatStreamEventType value) => new ChatMessageStartEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamEventType?(ChatMessageStartEvent @this) => @this.Value1; + + /// + /// + /// + public ChatMessageStartEvent(global::G.ChatStreamEventType? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatMessageStartEventVariant2? Value2 { get; init; } +#else + public global::G.ChatMessageStartEventVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator ChatMessageStartEvent(global::G.ChatMessageStartEventVariant2 value) => new ChatMessageStartEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatMessageStartEventVariant2?(ChatMessageStartEvent @this) => @this.Value2; + + /// + /// + /// + public ChatMessageStartEvent(global::G.ChatMessageStartEventVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public ChatMessageStartEvent( + global::G.ChatStreamEventType? value1, + global::G.ChatMessageStartEventVariant2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.ChatStreamEventType), + Value2, + typeof(global::G.ChatMessageStartEventVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ChatMessageStartEvent other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(ChatMessageStartEvent obj1, ChatMessageStartEvent obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ChatMessageStartEvent obj1, ChatMessageStartEvent obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ChatMessageStartEvent o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatMessageStartEventVariant2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatMessageStartEventVariant2.g.verified.cs new file mode 100644 index 0000000000..28b3978c91 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatMessageStartEventVariant2.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.ChatMessageStartEventVariant2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatMessageStartEventVariant2 + { + /// + /// Unique identifier for the generated reply. + /// + [global::Newtonsoft.Json.JsonProperty("id")] + public string? Id { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("delta")] + public global::G.ChatMessageStartEventVariant2Delta? Delta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatMessageStartEventVariant2Delta.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatMessageStartEventVariant2Delta.g.verified.cs new file mode 100644 index 0000000000..7653aa1bbf --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatMessageStartEventVariant2Delta.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatMessageStartEventVariant2Delta.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatMessageStartEventVariant2Delta + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("message")] + public global::G.ChatMessageStartEventVariant2DeltaMessage? Message { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatMessageStartEventVariant2DeltaMessage.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatMessageStartEventVariant2DeltaMessage.g.verified.cs new file mode 100644 index 0000000000..6bec7138e2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatMessageStartEventVariant2DeltaMessage.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatMessageStartEventVariant2DeltaMessage.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatMessageStartEventVariant2DeltaMessage + { + /// + /// The role of the message. + /// + [global::Newtonsoft.Json.JsonProperty("role")] + public global::G.ChatMessageStartEventVariant2DeltaMessageRole? Role { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatMessageStartEventVariant2DeltaMessageRole.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatMessageStartEventVariant2DeltaMessageRole.g.verified.cs new file mode 100644 index 0000000000..3623b5e505 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatMessageStartEventVariant2DeltaMessageRole.g.verified.cs @@ -0,0 +1,48 @@ +//HintName: G.Models.ChatMessageStartEventVariant2DeltaMessageRole.g.cs + +#nullable enable + +namespace G +{ + /// + /// The role of the message. + /// + [global::System.Runtime.Serialization.DataContract] + public enum ChatMessageStartEventVariant2DeltaMessageRole + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="assistant")] + Assistant, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ChatMessageStartEventVariant2DeltaMessageRoleExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ChatMessageStartEventVariant2DeltaMessageRole value) + { + return value switch + { + ChatMessageStartEventVariant2DeltaMessageRole.Assistant => "assistant", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ChatMessageStartEventVariant2DeltaMessageRole? ToEnum(string value) + { + return value switch + { + "assistant" => ChatMessageStartEventVariant2DeltaMessageRole.Assistant, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatRequest.g.verified.cs new file mode 100644 index 0000000000..8dd0417bb7 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatRequest.g.verified.cs @@ -0,0 +1,246 @@ +//HintName: G.Models.ChatRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatRequest + { + /// + /// Text input for the model to respond to.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + ///
+ [global::Newtonsoft.Json.JsonProperty("message", Required = global::Newtonsoft.Json.Required.Always)] + public string Message { get; set; } = default!; + + /// + /// Defaults to `command-r-plus`.
+ /// The name of a compatible [Cohere model](https://docs.cohere.com/docs/models) or the ID of a [fine-tuned](https://docs.cohere.com/docs/chat-fine-tuning) model.
+ /// Compatible Deployments: Cohere Platform, Private Deployments + ///
+ [global::Newtonsoft.Json.JsonProperty("model")] + public string? Model { get; set; } + + /// + /// Defaults to `false`.
+ /// When `true`, the response will be a JSON stream of events. The final event will contain the complete response, and will have an `event_type` of `"stream-end"`.
+ /// Streaming is beneficial for user interfaces that render the contents of the response piece by piece, as it gets generated.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + ///
+ [global::Newtonsoft.Json.JsonProperty("stream")] + public bool Stream { get; set; } + + /// + /// When specified, the default Cohere preamble will be replaced with the provided one. Preambles are a part of the prompt used to adjust the model's overall behavior and conversation style, and use the `SYSTEM` role.
+ /// The `SYSTEM` role is also used for the contents of the optional `chat_history=` parameter. When used with the `chat_history=` parameter it adds content throughout a conversation. Conversely, when used with the `preamble=` parameter it adds content at the start of the conversation only.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + ///
+ [global::Newtonsoft.Json.JsonProperty("preamble")] + public string? Preamble { get; set; } + + /// + /// A list of previous messages between the user and the model, giving the model conversational context for responding to the user's `message`.
+ /// Each item represents a single message in the chat history, excluding the current user turn. It has two properties: `role` and `message`. The `role` identifies the sender (`CHATBOT`, `SYSTEM`, or `USER`), while the `message` contains the text content.
+ /// The chat_history parameter should not be used for `SYSTEM` messages in most cases. Instead, to add a `SYSTEM` role message at the beginning of a conversation, the `preamble` parameter should be used.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + ///
+ [global::Newtonsoft.Json.JsonProperty("chat_history")] + public global::System.Collections.Generic.IList? ChatHistory { get; set; } + + /// + /// An alternative to `chat_history`.
+ /// Providing a `conversation_id` creates or resumes a persisted conversation with the specified ID. The ID can be any non empty string.
+ /// Compatible Deployments: Cohere Platform + ///
+ [global::Newtonsoft.Json.JsonProperty("conversation_id")] + public string? ConversationId { get; set; } + + /// + /// Defaults to `AUTO` when `connectors` are specified and `OFF` in all other cases.
+ /// Dictates how the prompt will be constructed.
+ /// With `prompt_truncation` set to "AUTO", some elements from `chat_history` and `documents` will be dropped in an attempt to construct a prompt that fits within the model's context length limit. During this process the order of the documents and chat history will be changed and ranked by relevance.
+ /// With `prompt_truncation` set to "AUTO_PRESERVE_ORDER", some elements from `chat_history` and `documents` will be dropped in an attempt to construct a prompt that fits within the model's context length limit. During this process the order of the documents and chat history will be preserved as they are inputted into the API.
+ /// With `prompt_truncation` set to "OFF", no elements will be dropped. If the sum of the inputs exceeds the model's context length limit, a `TooManyTokens` error will be returned.
+ /// Compatible Deployments: Cohere Platform Only AUTO_PRESERVE_ORDER: Azure, AWS Sagemaker/Bedrock, Private Deployments + ///
+ [global::Newtonsoft.Json.JsonProperty("prompt_truncation")] + public global::G.ChatRequestPromptTruncation? PromptTruncation { get; set; } + + /// + /// Accepts `{"id": "web-search"}`, and/or the `"id"` for a custom [connector](https://docs.cohere.com/docs/connectors), if you've [created](https://docs.cohere.com/docs/creating-and-deploying-a-connector) one.
+ /// When specified, the model's reply will be enriched with information found by querying each of the connectors (RAG).
+ /// Compatible Deployments: Cohere Platform + ///
+ [global::Newtonsoft.Json.JsonProperty("connectors")] + public global::System.Collections.Generic.IList? Connectors { get; set; } + + /// + /// Defaults to `false`.
+ /// When `true`, the response will only contain a list of generated search queries, but no search will take place, and no reply from the model to the user's `message` will be generated.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + ///
+ [global::Newtonsoft.Json.JsonProperty("search_queries_only")] + public bool SearchQueriesOnly { get; set; } + + /// + /// A list of relevant documents that the model can cite to generate a more accurate reply. Each document is a string-string dictionary.
+ /// Example:
+ /// ```
+ /// [
+ /// { "title": "Tall penguins", "text": "Emperor penguins are the tallest." },
+ /// { "title": "Penguin habitats", "text": "Emperor penguins only live in Antarctica." },
+ /// ]
+ /// ```
+ /// Keys and values from each document will be serialized to a string and passed to the model. The resulting generation will include citations that reference some of these documents.
+ /// Some suggested keys are "text", "author", and "date". For better generation quality, it is recommended to keep the total word count of the strings in the dictionary to under 300 words.
+ /// An `id` field (string) can be optionally supplied to identify the document in the citations. This field will not be passed to the model.
+ /// An `_excludes` field (array of strings) can be optionally supplied to omit some key-value pairs from being shown to the model. The omitted fields will still show up in the citation object. The "_excludes" field will not be passed to the model.
+ /// See ['Document Mode'](https://docs.cohere.com/docs/retrieval-augmented-generation-rag#document-mode) in the guide for more information.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + ///
+ [global::Newtonsoft.Json.JsonProperty("documents")] + public global::System.Collections.Generic.IList? Documents { get; set; } + + /// + /// Defaults to `"accurate"`.
+ /// Dictates the approach taken to generating citations as part of the RAG flow by allowing the user to specify whether they want `"accurate"` results, `"fast"` results or no results.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + ///
+ [global::Newtonsoft.Json.JsonProperty("citation_quality")] + public global::G.ChatRequestCitationQuality? CitationQuality { get; set; } + + /// + /// Defaults to `0.3`.
+ /// A non-negative float that tunes the degree of randomness in generation. Lower temperatures mean less random generations, and higher temperatures mean more random generations.
+ /// Randomness can be further maximized by increasing the value of the `p` parameter.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + ///
+ [global::Newtonsoft.Json.JsonProperty("temperature")] + public float Temperature { get; set; } + + /// + /// The maximum number of tokens the model will generate as part of the response. Note: Setting a low value may result in incomplete generations.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + ///
+ [global::Newtonsoft.Json.JsonProperty("max_tokens")] + public int MaxTokens { get; set; } + + /// + /// The maximum number of input tokens to send to the model. If not specified, `max_input_tokens` is the model's context length limit minus a small buffer.
+ /// Input will be truncated according to the `prompt_truncation` parameter.
+ /// Compatible Deployments: Cohere Platform + ///
+ [global::Newtonsoft.Json.JsonProperty("max_input_tokens")] + public int MaxInputTokens { get; set; } + + /// + /// Ensures only the top `k` most likely tokens are considered for generation at each step.
+ /// Defaults to `0`, min value of `0`, max value of `500`.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments
+ /// Default Value: 0 + ///
+ [global::Newtonsoft.Json.JsonProperty("k")] + public int K { get; set; } = 0; + + /// + /// Ensures that only the most likely tokens, with total probability mass of `p`, are considered for generation at each step. If both `k` and `p` are enabled, `p` acts after `k`.
+ /// Defaults to `0.75`. min value of `0.01`, max value of `0.99`.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments
+ /// Default Value: 0.75 + ///
+ [global::Newtonsoft.Json.JsonProperty("p")] + public double P { get; set; } = 0.75; + + /// + /// If specified, the backend will make a best effort to sample tokens
+ /// deterministically, such that repeated requests with the same
+ /// seed and parameters should return the same result. However,
+ /// determinism cannot be totally guaranteed.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + ///
+ [global::Newtonsoft.Json.JsonProperty("seed")] + public int Seed { get; set; } + + /// + /// A list of up to 5 strings that the model will use to stop generation. If the model generates a string that matches any of the strings in the list, it will stop generating tokens and return the generated text up to that point not including the stop sequence.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + ///
+ [global::Newtonsoft.Json.JsonProperty("stop_sequences")] + public global::System.Collections.Generic.IList? StopSequences { get; set; } + + /// + /// Defaults to `0.0`, min value of `0.0`, max value of `1.0`.
+ /// Used to reduce repetitiveness of generated tokens. The higher the value, the stronger a penalty is applied to previously present tokens, proportional to how many times they have already appeared in the prompt or prior generation.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + ///
+ [global::Newtonsoft.Json.JsonProperty("frequency_penalty")] + public double FrequencyPenalty { get; set; } + + /// + /// Defaults to `0.0`, min value of `0.0`, max value of `1.0`.
+ /// Used to reduce repetitiveness of generated tokens. Similar to `frequency_penalty`, except that this penalty is applied equally to all tokens that have already appeared, regardless of their exact frequencies.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + ///
+ [global::Newtonsoft.Json.JsonProperty("presence_penalty")] + public double PresencePenalty { get; set; } + + /// + /// A list of available tools (functions) that the model may suggest invoking before producing a text response.
+ /// When `tools` is passed (without `tool_results`), the `text` field in the response will be `""` and the `tool_calls` field in the response will be populated with a list of tool calls that need to be made. If no calls need to be made, the `tool_calls` array will be empty.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + ///
+ [global::Newtonsoft.Json.JsonProperty("tools")] + public global::System.Collections.Generic.IList? Tools { get; set; } + + /// + /// A list of results from invoking tools recommended by the model in the previous chat turn. Results are used to produce a text response and will be referenced in citations. When using `tool_results`, `tools` must be passed as well.
+ /// Each tool_result contains information about how it was invoked, as well as a list of outputs in the form of dictionaries.
+ /// **Note**: `outputs` must be a list of objects. If your tool returns a single object (eg `{"status": 200}`), make sure to wrap it in a list.
+ /// ```
+ /// tool_results = [
+ /// {
+ /// "call": {
+ /// "name": <tool name>,
+ /// "parameters": {
+ /// <param name>: <param value>
+ /// }
+ /// },
+ /// "outputs": [{
+ /// <key>: <value>
+ /// }]
+ /// },
+ /// ...
+ /// ]
+ /// ```
+ /// **Note**: Chat calls with `tool_results` should not be included in the Chat history to avoid duplication of the message text.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + ///
+ [global::Newtonsoft.Json.JsonProperty("tool_results")] + public global::System.Collections.Generic.IList? ToolResults { get; set; } + + /// + /// Forces the chat to be single step. Defaults to `false`. + /// + [global::Newtonsoft.Json.JsonProperty("force_single_step")] + public bool ForceSingleStep { get; set; } + + /// + /// Configuration for forcing the model output to adhere to the specified format. Supported on [Command R](https://docs.cohere.com/docs/command-r), [Command R+](https://docs.cohere.com/docs/command-r-plus) and newer models.
+ /// The model can be forced into outputting JSON objects (with up to 5 levels of nesting) by setting `{ "type": "json_object" }`.
+ /// A [JSON Schema](https://json-schema.org/) can optionally be provided, to ensure a specific structure.
+ /// **Note**: When using `{ "type": "json_object" }` your `message` should always explicitly instruct the model to generate a JSON (eg: _"Generate a JSON ..."_) . Otherwise the model may end up getting stuck generating an infinite stream of characters and eventually run out of context length.
+ /// **Limitation**: The parameter is not supported in RAG mode (when any of `connectors`, `documents`, `tools`, `tool_results` are provided). + ///
+ [global::Newtonsoft.Json.JsonProperty("response_format")] + public global::G.ResponseFormat? ResponseFormat { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatRequestCitationQuality.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatRequestCitationQuality.g.verified.cs new file mode 100644 index 0000000000..7f8bdfd237 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatRequestCitationQuality.g.verified.cs @@ -0,0 +1,64 @@ +//HintName: G.Models.ChatRequestCitationQuality.g.cs + +#nullable enable + +namespace G +{ + /// + /// Defaults to `"accurate"`.
+ /// Dictates the approach taken to generating citations as part of the RAG flow by allowing the user to specify whether they want `"accurate"` results, `"fast"` results or no results.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + ///
+ [global::System.Runtime.Serialization.DataContract] + public enum ChatRequestCitationQuality + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="fast")] + Fast, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="accurate")] + Accurate, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="off")] + Off, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ChatRequestCitationQualityExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ChatRequestCitationQuality value) + { + return value switch + { + ChatRequestCitationQuality.Fast => "fast", + ChatRequestCitationQuality.Accurate => "accurate", + ChatRequestCitationQuality.Off => "off", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ChatRequestCitationQuality? ToEnum(string value) + { + return value switch + { + "fast" => ChatRequestCitationQuality.Fast, + "accurate" => ChatRequestCitationQuality.Accurate, + "off" => ChatRequestCitationQuality.Off, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatRequestPromptTruncation.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatRequestPromptTruncation.g.verified.cs new file mode 100644 index 0000000000..34aad70d66 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatRequestPromptTruncation.g.verified.cs @@ -0,0 +1,67 @@ +//HintName: G.Models.ChatRequestPromptTruncation.g.cs + +#nullable enable + +namespace G +{ + /// + /// Defaults to `AUTO` when `connectors` are specified and `OFF` in all other cases.
+ /// Dictates how the prompt will be constructed.
+ /// With `prompt_truncation` set to "AUTO", some elements from `chat_history` and `documents` will be dropped in an attempt to construct a prompt that fits within the model's context length limit. During this process the order of the documents and chat history will be changed and ranked by relevance.
+ /// With `prompt_truncation` set to "AUTO_PRESERVE_ORDER", some elements from `chat_history` and `documents` will be dropped in an attempt to construct a prompt that fits within the model's context length limit. During this process the order of the documents and chat history will be preserved as they are inputted into the API.
+ /// With `prompt_truncation` set to "OFF", no elements will be dropped. If the sum of the inputs exceeds the model's context length limit, a `TooManyTokens` error will be returned.
+ /// Compatible Deployments: Cohere Platform Only AUTO_PRESERVE_ORDER: Azure, AWS Sagemaker/Bedrock, Private Deployments + ///
+ [global::System.Runtime.Serialization.DataContract] + public enum ChatRequestPromptTruncation + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="OFF")] + OFF, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="AUTO")] + AUTO, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="AUTO_PRESERVE_ORDER")] + AUTOPRESERVEORDER, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ChatRequestPromptTruncationExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ChatRequestPromptTruncation value) + { + return value switch + { + ChatRequestPromptTruncation.OFF => "OFF", + ChatRequestPromptTruncation.AUTO => "AUTO", + ChatRequestPromptTruncation.AUTOPRESERVEORDER => "AUTO_PRESERVE_ORDER", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ChatRequestPromptTruncation? ToEnum(string value) + { + return value switch + { + "OFF" => ChatRequestPromptTruncation.OFF, + "AUTO" => ChatRequestPromptTruncation.AUTO, + "AUTO_PRESERVE_ORDER" => ChatRequestPromptTruncation.AUTOPRESERVEORDER, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse10.g.verified.cs new file mode 100644 index 0000000000..b7ddf6d431 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatResponse10 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse11.g.verified.cs new file mode 100644 index 0000000000..7dc0ecc687 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatResponse11 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse12.g.verified.cs new file mode 100644 index 0000000000..9b32eb4045 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatResponse12 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse13.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse13.g.verified.cs new file mode 100644 index 0000000000..8f68b78c4b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse13.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatResponse13.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatResponse13 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse2.g.verified.cs new file mode 100644 index 0000000000..9c026b82ea --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatResponse2 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse3.g.verified.cs new file mode 100644 index 0000000000..b33c1223a3 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatResponse3 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse4.g.verified.cs new file mode 100644 index 0000000000..c76b1bb672 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatResponse4 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse5.g.verified.cs new file mode 100644 index 0000000000..b04ba7d941 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatResponse5 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse6.g.verified.cs new file mode 100644 index 0000000000..a1459cc1cc --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatResponse6 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse7.g.verified.cs new file mode 100644 index 0000000000..8378845e2a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatResponse7 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse8.g.verified.cs new file mode 100644 index 0000000000..302c10b706 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatResponse8 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse9.g.verified.cs new file mode 100644 index 0000000000..d777e883c8 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatResponse9 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatRole.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatRole.g.verified.cs new file mode 100644 index 0000000000..2530829792 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatRole.g.verified.cs @@ -0,0 +1,69 @@ +//HintName: G.Models.ChatRole.g.cs + +#nullable enable + +namespace G +{ + /// + /// One of `CHATBOT`, `SYSTEM`, `TOOL` or `USER` to identify who the message is coming from. + /// + [global::System.Runtime.Serialization.DataContract] + public enum ChatRole + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="CHATBOT")] + CHATBOT, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="SYSTEM")] + SYSTEM, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="USER")] + USER, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="TOOL")] + TOOL, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ChatRoleExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ChatRole value) + { + return value switch + { + ChatRole.CHATBOT => "CHATBOT", + ChatRole.SYSTEM => "SYSTEM", + ChatRole.USER => "USER", + ChatRole.TOOL => "TOOL", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ChatRole? ToEnum(string value) + { + return value switch + { + "CHATBOT" => ChatRole.CHATBOT, + "SYSTEM" => ChatRole.SYSTEM, + "USER" => ChatRole.USER, + "TOOL" => ChatRole.TOOL, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatSearchQueriesGenerationEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatSearchQueriesGenerationEvent.g.verified.cs new file mode 100644 index 0000000000..e3ffb5341f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatSearchQueriesGenerationEvent.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.ChatSearchQueriesGenerationEvent.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// + /// + public readonly partial struct ChatSearchQueriesGenerationEvent : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamEvent? Value1 { get; init; } +#else + public global::G.ChatStreamEvent? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator ChatSearchQueriesGenerationEvent(global::G.ChatStreamEvent value) => new ChatSearchQueriesGenerationEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamEvent?(ChatSearchQueriesGenerationEvent @this) => @this.Value1; + + /// + /// + /// + public ChatSearchQueriesGenerationEvent(global::G.ChatStreamEvent? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatSearchQueriesGenerationEventVariant2? Value2 { get; init; } +#else + public global::G.ChatSearchQueriesGenerationEventVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator ChatSearchQueriesGenerationEvent(global::G.ChatSearchQueriesGenerationEventVariant2 value) => new ChatSearchQueriesGenerationEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatSearchQueriesGenerationEventVariant2?(ChatSearchQueriesGenerationEvent @this) => @this.Value2; + + /// + /// + /// + public ChatSearchQueriesGenerationEvent(global::G.ChatSearchQueriesGenerationEventVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public ChatSearchQueriesGenerationEvent( + global::G.ChatStreamEvent? value1, + global::G.ChatSearchQueriesGenerationEventVariant2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.ChatStreamEvent), + Value2, + typeof(global::G.ChatSearchQueriesGenerationEventVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ChatSearchQueriesGenerationEvent other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(ChatSearchQueriesGenerationEvent obj1, ChatSearchQueriesGenerationEvent obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ChatSearchQueriesGenerationEvent obj1, ChatSearchQueriesGenerationEvent obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ChatSearchQueriesGenerationEvent o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatSearchQueriesGenerationEventVariant2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatSearchQueriesGenerationEventVariant2.g.verified.cs new file mode 100644 index 0000000000..b13d614fb4 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatSearchQueriesGenerationEventVariant2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatSearchQueriesGenerationEventVariant2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatSearchQueriesGenerationEventVariant2 + { + /// + /// Generated search queries, meant to be used as part of the RAG flow. + /// + [global::Newtonsoft.Json.JsonProperty("search_queries", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList SearchQueries { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatSearchQuery.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatSearchQuery.g.verified.cs new file mode 100644 index 0000000000..ab95d34df1 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatSearchQuery.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.ChatSearchQuery.g.cs + +#nullable enable + +namespace G +{ + /// + /// The generated search query. Contains the text of the query and a unique identifier for the query. + /// + public sealed partial class ChatSearchQuery + { + /// + /// The text of the search query. + /// + [global::Newtonsoft.Json.JsonProperty("text", Required = global::Newtonsoft.Json.Required.Always)] + public string Text { get; set; } = default!; + + /// + /// Unique identifier for the generated search query. Useful for submitting feedback. + /// + [global::Newtonsoft.Json.JsonProperty("generation_id", Required = global::Newtonsoft.Json.Required.Always)] + public string GenerationId { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatSearchResult.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatSearchResult.g.verified.cs new file mode 100644 index 0000000000..0493611d34 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatSearchResult.g.verified.cs @@ -0,0 +1,48 @@ +//HintName: G.Models.ChatSearchResult.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatSearchResult + { + /// + /// The generated search query. Contains the text of the query and a unique identifier for the query. + /// + [global::Newtonsoft.Json.JsonProperty("search_query")] + public global::G.ChatSearchQuery? SearchQuery { get; set; } + + /// + /// The connector used for fetching documents. + /// + [global::Newtonsoft.Json.JsonProperty("connector", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.ChatSearchResultConnector Connector { get; set; } = default!; + + /// + /// Identifiers of documents found by this search query. + /// + [global::Newtonsoft.Json.JsonProperty("document_ids", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList DocumentIds { get; set; } = default!; + + /// + /// An error message if the search failed. + /// + [global::Newtonsoft.Json.JsonProperty("error_message")] + public string? ErrorMessage { get; set; } + + /// + /// Whether a chat request should continue or not if the request to this connector fails. + /// + [global::Newtonsoft.Json.JsonProperty("continue_on_failure")] + public bool ContinueOnFailure { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatSearchResultConnector.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatSearchResultConnector.g.verified.cs new file mode 100644 index 0000000000..f5880d7271 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatSearchResultConnector.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatSearchResultConnector.g.cs + +#nullable enable + +namespace G +{ + /// + /// The connector used for fetching documents. + /// + public sealed partial class ChatSearchResultConnector + { + /// + /// The identifier of the connector. + /// + [global::Newtonsoft.Json.JsonProperty("id", Required = global::Newtonsoft.Json.Required.Always)] + public string Id { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatSearchResultsEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatSearchResultsEvent.g.verified.cs new file mode 100644 index 0000000000..3b27ca9183 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatSearchResultsEvent.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.ChatSearchResultsEvent.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// + /// + public readonly partial struct ChatSearchResultsEvent : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamEvent? Value1 { get; init; } +#else + public global::G.ChatStreamEvent? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator ChatSearchResultsEvent(global::G.ChatStreamEvent value) => new ChatSearchResultsEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamEvent?(ChatSearchResultsEvent @this) => @this.Value1; + + /// + /// + /// + public ChatSearchResultsEvent(global::G.ChatStreamEvent? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatSearchResultsEventVariant2? Value2 { get; init; } +#else + public global::G.ChatSearchResultsEventVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator ChatSearchResultsEvent(global::G.ChatSearchResultsEventVariant2 value) => new ChatSearchResultsEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatSearchResultsEventVariant2?(ChatSearchResultsEvent @this) => @this.Value2; + + /// + /// + /// + public ChatSearchResultsEvent(global::G.ChatSearchResultsEventVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public ChatSearchResultsEvent( + global::G.ChatStreamEvent? value1, + global::G.ChatSearchResultsEventVariant2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.ChatStreamEvent), + Value2, + typeof(global::G.ChatSearchResultsEventVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ChatSearchResultsEvent other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(ChatSearchResultsEvent obj1, ChatSearchResultsEvent obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ChatSearchResultsEvent obj1, ChatSearchResultsEvent obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ChatSearchResultsEvent o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatSearchResultsEventVariant2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatSearchResultsEventVariant2.g.verified.cs new file mode 100644 index 0000000000..82aac30d87 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatSearchResultsEventVariant2.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.ChatSearchResultsEventVariant2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatSearchResultsEventVariant2 + { + /// + /// Conducted searches and the ids of documents retrieved from each of them. + /// + [global::Newtonsoft.Json.JsonProperty("search_results")] + public global::System.Collections.Generic.IList? SearchResults { get; set; } + + /// + /// Documents fetched from searches or provided by the user. + /// + [global::Newtonsoft.Json.JsonProperty("documents")] + public global::System.Collections.Generic.IList? Documents { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatStreamEndEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatStreamEndEvent.g.verified.cs new file mode 100644 index 0000000000..5f2997e5c2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatStreamEndEvent.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.ChatStreamEndEvent.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// + /// + public readonly partial struct ChatStreamEndEvent : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamEvent? Value1 { get; init; } +#else + public global::G.ChatStreamEvent? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator ChatStreamEndEvent(global::G.ChatStreamEvent value) => new ChatStreamEndEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamEvent?(ChatStreamEndEvent @this) => @this.Value1; + + /// + /// + /// + public ChatStreamEndEvent(global::G.ChatStreamEvent? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamEndEventVariant2? Value2 { get; init; } +#else + public global::G.ChatStreamEndEventVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator ChatStreamEndEvent(global::G.ChatStreamEndEventVariant2 value) => new ChatStreamEndEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamEndEventVariant2?(ChatStreamEndEvent @this) => @this.Value2; + + /// + /// + /// + public ChatStreamEndEvent(global::G.ChatStreamEndEventVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public ChatStreamEndEvent( + global::G.ChatStreamEvent? value1, + global::G.ChatStreamEndEventVariant2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.ChatStreamEvent), + Value2, + typeof(global::G.ChatStreamEndEventVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ChatStreamEndEvent other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(ChatStreamEndEvent obj1, ChatStreamEndEvent obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ChatStreamEndEvent obj1, ChatStreamEndEvent obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ChatStreamEndEvent o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatStreamEndEventVariant2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatStreamEndEventVariant2.g.verified.cs new file mode 100644 index 0000000000..df817adbc2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatStreamEndEventVariant2.g.verified.cs @@ -0,0 +1,34 @@ +//HintName: G.Models.ChatStreamEndEventVariant2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatStreamEndEventVariant2 + { + /// + /// - `COMPLETE` - the model sent back a finished reply
+ /// - `ERROR_LIMIT` - the reply was cut off because the model reached the maximum number of tokens for its context length
+ /// - `MAX_TOKENS` - the reply was cut off because the model reached the maximum number of tokens specified by the max_tokens parameter
+ /// - `ERROR` - something went wrong when generating the reply
+ /// - `ERROR_TOXIC` - the model generated a reply that was deemed toxic + ///
+ [global::Newtonsoft.Json.JsonProperty("finish_reason", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.ChatStreamEndEventVariant2FinishReason FinishReason { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("response", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.NonStreamedChatResponse Response { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatStreamEndEventVariant2FinishReason.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatStreamEndEventVariant2FinishReason.g.verified.cs new file mode 100644 index 0000000000..51cd1623aa --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatStreamEndEventVariant2FinishReason.g.verified.cs @@ -0,0 +1,80 @@ +//HintName: G.Models.ChatStreamEndEventVariant2FinishReason.g.cs + +#nullable enable + +namespace G +{ + /// + /// - `COMPLETE` - the model sent back a finished reply
+ /// - `ERROR_LIMIT` - the reply was cut off because the model reached the maximum number of tokens for its context length
+ /// - `MAX_TOKENS` - the reply was cut off because the model reached the maximum number of tokens specified by the max_tokens parameter
+ /// - `ERROR` - something went wrong when generating the reply
+ /// - `ERROR_TOXIC` - the model generated a reply that was deemed toxic + ///
+ [global::System.Runtime.Serialization.DataContract] + public enum ChatStreamEndEventVariant2FinishReason + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="COMPLETE")] + COMPLETE, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="ERROR_LIMIT")] + ERRORLIMIT, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="MAX_TOKENS")] + MAXTOKENS, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="ERROR")] + ERROR, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="ERROR_TOXIC")] + ERRORTOXIC, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ChatStreamEndEventVariant2FinishReasonExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ChatStreamEndEventVariant2FinishReason value) + { + return value switch + { + ChatStreamEndEventVariant2FinishReason.COMPLETE => "COMPLETE", + ChatStreamEndEventVariant2FinishReason.ERRORLIMIT => "ERROR_LIMIT", + ChatStreamEndEventVariant2FinishReason.MAXTOKENS => "MAX_TOKENS", + ChatStreamEndEventVariant2FinishReason.ERROR => "ERROR", + ChatStreamEndEventVariant2FinishReason.ERRORTOXIC => "ERROR_TOXIC", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ChatStreamEndEventVariant2FinishReason? ToEnum(string value) + { + return value switch + { + "COMPLETE" => ChatStreamEndEventVariant2FinishReason.COMPLETE, + "ERROR_LIMIT" => ChatStreamEndEventVariant2FinishReason.ERRORLIMIT, + "MAX_TOKENS" => ChatStreamEndEventVariant2FinishReason.MAXTOKENS, + "ERROR" => ChatStreamEndEventVariant2FinishReason.ERROR, + "ERROR_TOXIC" => ChatStreamEndEventVariant2FinishReason.ERRORTOXIC, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatStreamEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatStreamEvent.g.verified.cs new file mode 100644 index 0000000000..61b9d4524e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatStreamEvent.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatStreamEvent.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatStreamEvent + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("event_type", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.ChatStreamEventEventType EventType { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatStreamEventEventType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatStreamEventEventType.g.verified.cs new file mode 100644 index 0000000000..2eea31ec65 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatStreamEventEventType.g.verified.cs @@ -0,0 +1,83 @@ +//HintName: G.Models.ChatStreamEventEventType.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + [global::System.Runtime.Serialization.DataContract] + public enum ChatStreamEventEventType + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="stream-start")] + StreamStart, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="search-queries-generation")] + SearchQueriesGeneration, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="search-results")] + SearchResults, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="text-generation")] + TextGeneration, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="citation-generation")] + CitationGeneration, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="stream-end")] + StreamEnd, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ChatStreamEventEventTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ChatStreamEventEventType value) + { + return value switch + { + ChatStreamEventEventType.StreamStart => "stream-start", + ChatStreamEventEventType.SearchQueriesGeneration => "search-queries-generation", + ChatStreamEventEventType.SearchResults => "search-results", + ChatStreamEventEventType.TextGeneration => "text-generation", + ChatStreamEventEventType.CitationGeneration => "citation-generation", + ChatStreamEventEventType.StreamEnd => "stream-end", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ChatStreamEventEventType? ToEnum(string value) + { + return value switch + { + "stream-start" => ChatStreamEventEventType.StreamStart, + "search-queries-generation" => ChatStreamEventEventType.SearchQueriesGeneration, + "search-results" => ChatStreamEventEventType.SearchResults, + "text-generation" => ChatStreamEventEventType.TextGeneration, + "citation-generation" => ChatStreamEventEventType.CitationGeneration, + "stream-end" => ChatStreamEventEventType.StreamEnd, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatStreamEventType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatStreamEventType.g.verified.cs new file mode 100644 index 0000000000..48a7588aaa --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatStreamEventType.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatStreamEventType.g.cs + +#nullable enable + +namespace G +{ + /// + /// The streamed event types + /// + public sealed partial class ChatStreamEventType + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("type", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.ChatStreamEventTypeType Type { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatStreamEventTypeType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatStreamEventTypeType.g.verified.cs new file mode 100644 index 0000000000..b351862b04 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatStreamEventTypeType.g.verified.cs @@ -0,0 +1,118 @@ +//HintName: G.Models.ChatStreamEventTypeType.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + [global::System.Runtime.Serialization.DataContract] + public enum ChatStreamEventTypeType + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="message-start")] + MessageStart, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="content-start")] + ContentStart, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="content-delta")] + ContentDelta, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="content-end")] + ContentEnd, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="tool-call-start")] + ToolCallStart, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="tool-call-delta")] + ToolCallDelta, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="tool-call-end")] + ToolCallEnd, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="tool-plan-delta")] + ToolPlanDelta, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="citation-start")] + CitationStart, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="citation-end")] + CitationEnd, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="message-end")] + MessageEnd, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ChatStreamEventTypeTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ChatStreamEventTypeType value) + { + return value switch + { + ChatStreamEventTypeType.MessageStart => "message-start", + ChatStreamEventTypeType.ContentStart => "content-start", + ChatStreamEventTypeType.ContentDelta => "content-delta", + ChatStreamEventTypeType.ContentEnd => "content-end", + ChatStreamEventTypeType.ToolCallStart => "tool-call-start", + ChatStreamEventTypeType.ToolCallDelta => "tool-call-delta", + ChatStreamEventTypeType.ToolCallEnd => "tool-call-end", + ChatStreamEventTypeType.ToolPlanDelta => "tool-plan-delta", + ChatStreamEventTypeType.CitationStart => "citation-start", + ChatStreamEventTypeType.CitationEnd => "citation-end", + ChatStreamEventTypeType.MessageEnd => "message-end", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ChatStreamEventTypeType? ToEnum(string value) + { + return value switch + { + "message-start" => ChatStreamEventTypeType.MessageStart, + "content-start" => ChatStreamEventTypeType.ContentStart, + "content-delta" => ChatStreamEventTypeType.ContentDelta, + "content-end" => ChatStreamEventTypeType.ContentEnd, + "tool-call-start" => ChatStreamEventTypeType.ToolCallStart, + "tool-call-delta" => ChatStreamEventTypeType.ToolCallDelta, + "tool-call-end" => ChatStreamEventTypeType.ToolCallEnd, + "tool-plan-delta" => ChatStreamEventTypeType.ToolPlanDelta, + "citation-start" => ChatStreamEventTypeType.CitationStart, + "citation-end" => ChatStreamEventTypeType.CitationEnd, + "message-end" => ChatStreamEventTypeType.MessageEnd, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatStreamStartEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatStreamStartEvent.g.verified.cs new file mode 100644 index 0000000000..5898fe27b6 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatStreamStartEvent.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.ChatStreamStartEvent.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// + /// + public readonly partial struct ChatStreamStartEvent : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamEvent? Value1 { get; init; } +#else + public global::G.ChatStreamEvent? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator ChatStreamStartEvent(global::G.ChatStreamEvent value) => new ChatStreamStartEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamEvent?(ChatStreamStartEvent @this) => @this.Value1; + + /// + /// + /// + public ChatStreamStartEvent(global::G.ChatStreamEvent? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamStartEventVariant2? Value2 { get; init; } +#else + public global::G.ChatStreamStartEventVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator ChatStreamStartEvent(global::G.ChatStreamStartEventVariant2 value) => new ChatStreamStartEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamStartEventVariant2?(ChatStreamStartEvent @this) => @this.Value2; + + /// + /// + /// + public ChatStreamStartEvent(global::G.ChatStreamStartEventVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public ChatStreamStartEvent( + global::G.ChatStreamEvent? value1, + global::G.ChatStreamStartEventVariant2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.ChatStreamEvent), + Value2, + typeof(global::G.ChatStreamStartEventVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ChatStreamStartEvent other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(ChatStreamStartEvent obj1, ChatStreamStartEvent obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ChatStreamStartEvent obj1, ChatStreamStartEvent obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ChatStreamStartEvent o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatStreamStartEventVariant2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatStreamStartEventVariant2.g.verified.cs new file mode 100644 index 0000000000..e5b2e8b310 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatStreamStartEventVariant2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatStreamStartEventVariant2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatStreamStartEventVariant2 + { + /// + /// Unique identifier for the generated reply. Useful for submitting feedback. + /// + [global::Newtonsoft.Json.JsonProperty("generation_id", Required = global::Newtonsoft.Json.Required.Always)] + public string GenerationId { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatTextGenerationEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatTextGenerationEvent.g.verified.cs new file mode 100644 index 0000000000..afc019cdfe --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatTextGenerationEvent.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.ChatTextGenerationEvent.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// + /// + public readonly partial struct ChatTextGenerationEvent : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamEvent? Value1 { get; init; } +#else + public global::G.ChatStreamEvent? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator ChatTextGenerationEvent(global::G.ChatStreamEvent value) => new ChatTextGenerationEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamEvent?(ChatTextGenerationEvent @this) => @this.Value1; + + /// + /// + /// + public ChatTextGenerationEvent(global::G.ChatStreamEvent? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatTextGenerationEventVariant2? Value2 { get; init; } +#else + public global::G.ChatTextGenerationEventVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator ChatTextGenerationEvent(global::G.ChatTextGenerationEventVariant2 value) => new ChatTextGenerationEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatTextGenerationEventVariant2?(ChatTextGenerationEvent @this) => @this.Value2; + + /// + /// + /// + public ChatTextGenerationEvent(global::G.ChatTextGenerationEventVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public ChatTextGenerationEvent( + global::G.ChatStreamEvent? value1, + global::G.ChatTextGenerationEventVariant2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.ChatStreamEvent), + Value2, + typeof(global::G.ChatTextGenerationEventVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ChatTextGenerationEvent other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(ChatTextGenerationEvent obj1, ChatTextGenerationEvent obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ChatTextGenerationEvent obj1, ChatTextGenerationEvent obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ChatTextGenerationEvent o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatTextGenerationEventVariant2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatTextGenerationEventVariant2.g.verified.cs new file mode 100644 index 0000000000..09dfbb341a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatTextGenerationEventVariant2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatTextGenerationEventVariant2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatTextGenerationEventVariant2 + { + /// + /// The next batch of text generated by the model. + /// + [global::Newtonsoft.Json.JsonProperty("text", Required = global::Newtonsoft.Json.Required.Always)] + public string Text { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallDeltaEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallDeltaEvent.g.verified.cs new file mode 100644 index 0000000000..c6563be8ba --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallDeltaEvent.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.ChatToolCallDeltaEvent.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// A streamed event delta which signifies a delta in tool call arguments. + /// + public readonly partial struct ChatToolCallDeltaEvent : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamEventType? Value1 { get; init; } +#else + public global::G.ChatStreamEventType? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator ChatToolCallDeltaEvent(global::G.ChatStreamEventType value) => new ChatToolCallDeltaEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamEventType?(ChatToolCallDeltaEvent @this) => @this.Value1; + + /// + /// + /// + public ChatToolCallDeltaEvent(global::G.ChatStreamEventType? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatToolCallDeltaEventVariant2? Value2 { get; init; } +#else + public global::G.ChatToolCallDeltaEventVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator ChatToolCallDeltaEvent(global::G.ChatToolCallDeltaEventVariant2 value) => new ChatToolCallDeltaEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatToolCallDeltaEventVariant2?(ChatToolCallDeltaEvent @this) => @this.Value2; + + /// + /// + /// + public ChatToolCallDeltaEvent(global::G.ChatToolCallDeltaEventVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public ChatToolCallDeltaEvent( + global::G.ChatStreamEventType? value1, + global::G.ChatToolCallDeltaEventVariant2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.ChatStreamEventType), + Value2, + typeof(global::G.ChatToolCallDeltaEventVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ChatToolCallDeltaEvent other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(ChatToolCallDeltaEvent obj1, ChatToolCallDeltaEvent obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ChatToolCallDeltaEvent obj1, ChatToolCallDeltaEvent obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ChatToolCallDeltaEvent o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallDeltaEventVariant2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallDeltaEventVariant2.g.verified.cs new file mode 100644 index 0000000000..93be690032 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallDeltaEventVariant2.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.ChatToolCallDeltaEventVariant2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatToolCallDeltaEventVariant2 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("index")] + public int Index { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("delta")] + public global::G.ChatToolCallDeltaEventVariant2Delta? Delta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallDeltaEventVariant2Delta.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallDeltaEventVariant2Delta.g.verified.cs new file mode 100644 index 0000000000..03d83b4442 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallDeltaEventVariant2Delta.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatToolCallDeltaEventVariant2Delta.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatToolCallDeltaEventVariant2Delta + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("tool_call")] + public global::G.ChatToolCallDeltaEventVariant2DeltaToolCall? ToolCall { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallDeltaEventVariant2DeltaToolCall.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallDeltaEventVariant2DeltaToolCall.g.verified.cs new file mode 100644 index 0000000000..dccda02867 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallDeltaEventVariant2DeltaToolCall.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatToolCallDeltaEventVariant2DeltaToolCall.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatToolCallDeltaEventVariant2DeltaToolCall + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("function")] + public global::G.ChatToolCallDeltaEventVariant2DeltaToolCallFunction? Function { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallDeltaEventVariant2DeltaToolCallFunction.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallDeltaEventVariant2DeltaToolCallFunction.g.verified.cs new file mode 100644 index 0000000000..c3b61a9cb3 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallDeltaEventVariant2DeltaToolCallFunction.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatToolCallDeltaEventVariant2DeltaToolCallFunction.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatToolCallDeltaEventVariant2DeltaToolCallFunction + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("arguments")] + public string? Arguments { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallEndEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallEndEvent.g.verified.cs new file mode 100644 index 0000000000..7edd1d5dba --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallEndEvent.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.ChatToolCallEndEvent.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// A streamed event delta which signifies a tool call has finished streaming. + /// + public readonly partial struct ChatToolCallEndEvent : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamEventType? Value1 { get; init; } +#else + public global::G.ChatStreamEventType? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator ChatToolCallEndEvent(global::G.ChatStreamEventType value) => new ChatToolCallEndEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamEventType?(ChatToolCallEndEvent @this) => @this.Value1; + + /// + /// + /// + public ChatToolCallEndEvent(global::G.ChatStreamEventType? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatToolCallEndEventVariant2? Value2 { get; init; } +#else + public global::G.ChatToolCallEndEventVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator ChatToolCallEndEvent(global::G.ChatToolCallEndEventVariant2 value) => new ChatToolCallEndEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatToolCallEndEventVariant2?(ChatToolCallEndEvent @this) => @this.Value2; + + /// + /// + /// + public ChatToolCallEndEvent(global::G.ChatToolCallEndEventVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public ChatToolCallEndEvent( + global::G.ChatStreamEventType? value1, + global::G.ChatToolCallEndEventVariant2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.ChatStreamEventType), + Value2, + typeof(global::G.ChatToolCallEndEventVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ChatToolCallEndEvent other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(ChatToolCallEndEvent obj1, ChatToolCallEndEvent obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ChatToolCallEndEvent obj1, ChatToolCallEndEvent obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ChatToolCallEndEvent o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallEndEventVariant2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallEndEventVariant2.g.verified.cs new file mode 100644 index 0000000000..07b95b79c3 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallEndEventVariant2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatToolCallEndEventVariant2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatToolCallEndEventVariant2 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("index")] + public int Index { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallStartEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallStartEvent.g.verified.cs new file mode 100644 index 0000000000..686407d01c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallStartEvent.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.ChatToolCallStartEvent.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// A streamed event delta which signifies a tool call has started streaming. + /// + public readonly partial struct ChatToolCallStartEvent : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamEventType? Value1 { get; init; } +#else + public global::G.ChatStreamEventType? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator ChatToolCallStartEvent(global::G.ChatStreamEventType value) => new ChatToolCallStartEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamEventType?(ChatToolCallStartEvent @this) => @this.Value1; + + /// + /// + /// + public ChatToolCallStartEvent(global::G.ChatStreamEventType? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatToolCallStartEventVariant2? Value2 { get; init; } +#else + public global::G.ChatToolCallStartEventVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator ChatToolCallStartEvent(global::G.ChatToolCallStartEventVariant2 value) => new ChatToolCallStartEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatToolCallStartEventVariant2?(ChatToolCallStartEvent @this) => @this.Value2; + + /// + /// + /// + public ChatToolCallStartEvent(global::G.ChatToolCallStartEventVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public ChatToolCallStartEvent( + global::G.ChatStreamEventType? value1, + global::G.ChatToolCallStartEventVariant2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.ChatStreamEventType), + Value2, + typeof(global::G.ChatToolCallStartEventVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ChatToolCallStartEvent other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(ChatToolCallStartEvent obj1, ChatToolCallStartEvent obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ChatToolCallStartEvent obj1, ChatToolCallStartEvent obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ChatToolCallStartEvent o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallStartEventVariant2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallStartEventVariant2.g.verified.cs new file mode 100644 index 0000000000..1527736ebd --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallStartEventVariant2.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.ChatToolCallStartEventVariant2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatToolCallStartEventVariant2 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("index")] + public int Index { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("delta")] + public global::G.ChatToolCallStartEventVariant2Delta? Delta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallStartEventVariant2Delta.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallStartEventVariant2Delta.g.verified.cs new file mode 100644 index 0000000000..a9e16d5e11 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallStartEventVariant2Delta.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatToolCallStartEventVariant2Delta.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatToolCallStartEventVariant2Delta + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("tool_call")] + public global::G.ChatToolCallStartEventVariant2DeltaToolCall? ToolCall { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallStartEventVariant2DeltaToolCall.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallStartEventVariant2DeltaToolCall.g.verified.cs new file mode 100644 index 0000000000..ba3ec613d5 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallStartEventVariant2DeltaToolCall.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.ChatToolCallStartEventVariant2DeltaToolCall.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatToolCallStartEventVariant2DeltaToolCall + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("id")] + public string? Id { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("type")] + public global::G.ChatToolCallStartEventVariant2DeltaToolCallType? Type { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("function")] + public global::G.ChatToolCallStartEventVariant2DeltaToolCallFunction? Function { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallStartEventVariant2DeltaToolCallFunction.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallStartEventVariant2DeltaToolCallFunction.g.verified.cs new file mode 100644 index 0000000000..32098e220a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallStartEventVariant2DeltaToolCallFunction.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.ChatToolCallStartEventVariant2DeltaToolCallFunction.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatToolCallStartEventVariant2DeltaToolCallFunction + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("name")] + public string? Name { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("arguments")] + public string? Arguments { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallStartEventVariant2DeltaToolCallType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallStartEventVariant2DeltaToolCallType.g.verified.cs new file mode 100644 index 0000000000..5cee8596bd --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallStartEventVariant2DeltaToolCallType.g.verified.cs @@ -0,0 +1,48 @@ +//HintName: G.Models.ChatToolCallStartEventVariant2DeltaToolCallType.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + [global::System.Runtime.Serialization.DataContract] + public enum ChatToolCallStartEventVariant2DeltaToolCallType + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="function")] + Function, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ChatToolCallStartEventVariant2DeltaToolCallTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ChatToolCallStartEventVariant2DeltaToolCallType value) + { + return value switch + { + ChatToolCallStartEventVariant2DeltaToolCallType.Function => "function", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ChatToolCallStartEventVariant2DeltaToolCallType? ToEnum(string value) + { + return value switch + { + "function" => ChatToolCallStartEventVariant2DeltaToolCallType.Function, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallsChunkEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallsChunkEvent.g.verified.cs new file mode 100644 index 0000000000..e8ac2aa325 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallsChunkEvent.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.ChatToolCallsChunkEvent.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// + /// + public readonly partial struct ChatToolCallsChunkEvent : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamEvent? Value1 { get; init; } +#else + public global::G.ChatStreamEvent? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator ChatToolCallsChunkEvent(global::G.ChatStreamEvent value) => new ChatToolCallsChunkEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamEvent?(ChatToolCallsChunkEvent @this) => @this.Value1; + + /// + /// + /// + public ChatToolCallsChunkEvent(global::G.ChatStreamEvent? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatToolCallsChunkEventVariant2? Value2 { get; init; } +#else + public global::G.ChatToolCallsChunkEventVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator ChatToolCallsChunkEvent(global::G.ChatToolCallsChunkEventVariant2 value) => new ChatToolCallsChunkEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatToolCallsChunkEventVariant2?(ChatToolCallsChunkEvent @this) => @this.Value2; + + /// + /// + /// + public ChatToolCallsChunkEvent(global::G.ChatToolCallsChunkEventVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public ChatToolCallsChunkEvent( + global::G.ChatStreamEvent? value1, + global::G.ChatToolCallsChunkEventVariant2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.ChatStreamEvent), + Value2, + typeof(global::G.ChatToolCallsChunkEventVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ChatToolCallsChunkEvent other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(ChatToolCallsChunkEvent obj1, ChatToolCallsChunkEvent obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ChatToolCallsChunkEvent obj1, ChatToolCallsChunkEvent obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ChatToolCallsChunkEvent o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallsChunkEventVariant2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallsChunkEventVariant2.g.verified.cs new file mode 100644 index 0000000000..d1ab011d7d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallsChunkEventVariant2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatToolCallsChunkEventVariant2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatToolCallsChunkEventVariant2 + { + /// + /// Contains the chunk of the tool call generation in the stream. + /// + [global::Newtonsoft.Json.JsonProperty("tool_call_delta", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.ToolCallDelta ToolCallDelta { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallsGenerationEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallsGenerationEvent.g.verified.cs new file mode 100644 index 0000000000..08a99f1ad9 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallsGenerationEvent.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.ChatToolCallsGenerationEvent.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// + /// + public readonly partial struct ChatToolCallsGenerationEvent : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamEvent? Value1 { get; init; } +#else + public global::G.ChatStreamEvent? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator ChatToolCallsGenerationEvent(global::G.ChatStreamEvent value) => new ChatToolCallsGenerationEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamEvent?(ChatToolCallsGenerationEvent @this) => @this.Value1; + + /// + /// + /// + public ChatToolCallsGenerationEvent(global::G.ChatStreamEvent? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatToolCallsGenerationEventVariant2? Value2 { get; init; } +#else + public global::G.ChatToolCallsGenerationEventVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator ChatToolCallsGenerationEvent(global::G.ChatToolCallsGenerationEventVariant2 value) => new ChatToolCallsGenerationEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatToolCallsGenerationEventVariant2?(ChatToolCallsGenerationEvent @this) => @this.Value2; + + /// + /// + /// + public ChatToolCallsGenerationEvent(global::G.ChatToolCallsGenerationEventVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public ChatToolCallsGenerationEvent( + global::G.ChatStreamEvent? value1, + global::G.ChatToolCallsGenerationEventVariant2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.ChatStreamEvent), + Value2, + typeof(global::G.ChatToolCallsGenerationEventVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ChatToolCallsGenerationEvent other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(ChatToolCallsGenerationEvent obj1, ChatToolCallsGenerationEvent obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ChatToolCallsGenerationEvent obj1, ChatToolCallsGenerationEvent obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ChatToolCallsGenerationEvent o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallsGenerationEventVariant2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallsGenerationEventVariant2.g.verified.cs new file mode 100644 index 0000000000..4280ee3507 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolCallsGenerationEventVariant2.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.ChatToolCallsGenerationEventVariant2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatToolCallsGenerationEventVariant2 + { + /// + /// The text generated related to the tool calls generated + /// + [global::Newtonsoft.Json.JsonProperty("text")] + public string? Text { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("tool_calls", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList ToolCalls { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolPlanDeltaEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolPlanDeltaEvent.g.verified.cs new file mode 100644 index 0000000000..e097582f41 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolPlanDeltaEvent.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.ChatToolPlanDeltaEvent.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// A streamed event which contains a delta of tool plan text. + /// + public readonly partial struct ChatToolPlanDeltaEvent : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamEventType? Value1 { get; init; } +#else + public global::G.ChatStreamEventType? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator ChatToolPlanDeltaEvent(global::G.ChatStreamEventType value) => new ChatToolPlanDeltaEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamEventType?(ChatToolPlanDeltaEvent @this) => @this.Value1; + + /// + /// + /// + public ChatToolPlanDeltaEvent(global::G.ChatStreamEventType? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatToolPlanDeltaEventVariant2? Value2 { get; init; } +#else + public global::G.ChatToolPlanDeltaEventVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator ChatToolPlanDeltaEvent(global::G.ChatToolPlanDeltaEventVariant2 value) => new ChatToolPlanDeltaEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatToolPlanDeltaEventVariant2?(ChatToolPlanDeltaEvent @this) => @this.Value2; + + /// + /// + /// + public ChatToolPlanDeltaEvent(global::G.ChatToolPlanDeltaEventVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public ChatToolPlanDeltaEvent( + global::G.ChatStreamEventType? value1, + global::G.ChatToolPlanDeltaEventVariant2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.ChatStreamEventType), + Value2, + typeof(global::G.ChatToolPlanDeltaEventVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ChatToolPlanDeltaEvent other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(ChatToolPlanDeltaEvent obj1, ChatToolPlanDeltaEvent obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ChatToolPlanDeltaEvent obj1, ChatToolPlanDeltaEvent obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ChatToolPlanDeltaEvent o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolPlanDeltaEventVariant2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolPlanDeltaEventVariant2.g.verified.cs new file mode 100644 index 0000000000..590ff23a3b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolPlanDeltaEventVariant2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatToolPlanDeltaEventVariant2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatToolPlanDeltaEventVariant2 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("delta")] + public global::G.ChatToolPlanDeltaEventVariant2Delta? Delta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolPlanDeltaEventVariant2Delta.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolPlanDeltaEventVariant2Delta.g.verified.cs new file mode 100644 index 0000000000..4c487f1f10 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ChatToolPlanDeltaEventVariant2Delta.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatToolPlanDeltaEventVariant2Delta.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatToolPlanDeltaEventVariant2Delta + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("tool_plan")] + public string? ToolPlan { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Request.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Request.g.verified.cs new file mode 100644 index 0000000000..1078cda91e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Request.g.verified.cs @@ -0,0 +1,114 @@ +//HintName: G.Models.Chatv2Request.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Chatv2Request + { + /// + /// The name of a compatible [Cohere model](https://docs.cohere.com/docs/models) (such as command-r or command-r-plus) or the ID of a [fine-tuned](https://docs.cohere.com/docs/chat-fine-tuning) model. + /// + [global::Newtonsoft.Json.JsonProperty("model", Required = global::Newtonsoft.Json.Required.Always)] + public string Model { get; set; } = default!; + + /// + /// A list of chat messages in chronological order, representing a conversation between the user and the model.
+ /// Messages can be from `User`, `Assistant`, `Tool` and `System` roles. Learn more about messages and roles in [the Chat API guide](https://docs.cohere.com/docs/chat-api). + ///
+ [global::Newtonsoft.Json.JsonProperty("messages", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList Messages { get; set; } = default!; + + /// + /// A list of available tools (functions) that the model may suggest invoking before producing a text response.
+ /// When `tools` is passed (without `tool_results`), the `text` content in the response will be empty and the `tool_calls` field in the response will be populated with a list of tool calls that need to be made. If no calls need to be made, the `tool_calls` array will be empty. + ///
+ [global::Newtonsoft.Json.JsonProperty("tools")] + public global::System.Collections.Generic.IList? Tools { get; set; } + + /// + /// Defaults to `"accurate"`.
+ /// Dictates the approach taken to generating citations as part of the RAG flow by allowing the user to specify whether they want `"accurate"` results, `"fast"` results or no results. + ///
+ [global::Newtonsoft.Json.JsonProperty("citation_mode")] + public global::G.Chatv2RequestCitationMode? CitationMode { get; set; } + + /// + /// Configuration for forcing the model output to adhere to the specified format. Supported on [Command R](https://docs.cohere.com/docs/command-r), [Command R+](https://docs.cohere.com/docs/command-r-plus) and newer models.
+ /// The model can be forced into outputting JSON objects (with up to 5 levels of nesting) by setting `{ "type": "json_object" }`.
+ /// A [JSON Schema](https://json-schema.org/) can optionally be provided, to ensure a specific structure.
+ /// **Note**: When using `{ "type": "json_object" }` your `message` should always explicitly instruct the model to generate a JSON (eg: _"Generate a JSON ..."_) . Otherwise the model may end up getting stuck generating an infinite stream of characters and eventually run out of context length.
+ /// **Limitation**: The parameter is not supported in RAG mode (when any of `connectors`, `documents`, `tools`, `tool_results` are provided). + ///
+ [global::Newtonsoft.Json.JsonProperty("response_format")] + public global::G.ResponseFormat2? ResponseFormat { get; set; } + + /// + /// The maximum number of tokens the model will generate as part of the response. Note: Setting a low value may result in incomplete generations. + /// + [global::Newtonsoft.Json.JsonProperty("max_tokens")] + public int MaxTokens { get; set; } + + /// + /// A list of up to 5 strings that the model will use to stop generation. If the model generates a string that matches any of the strings in the list, it will stop generating tokens and return the generated text up to that point not including the stop sequence. + /// + [global::Newtonsoft.Json.JsonProperty("stop_sequences")] + public global::System.Collections.Generic.IList? StopSequences { get; set; } + + /// + /// Defaults to `0.3`.
+ /// A non-negative float that tunes the degree of randomness in generation. Lower temperatures mean less random generations, and higher temperatures mean more random generations.
+ /// Randomness can be further maximized by increasing the value of the `p` parameter. + ///
+ [global::Newtonsoft.Json.JsonProperty("temperature")] + public float Temperature { get; set; } + + /// + /// If specified, the backend will make a best effort to sample tokens
+ /// deterministically, such that repeated requests with the same
+ /// seed and parameters should return the same result. However,
+ /// determinism cannot be totally guaranteed. + ///
+ [global::Newtonsoft.Json.JsonProperty("seed")] + public int Seed { get; set; } + + /// + /// Defaults to `0.0`, min value of `0.0`, max value of `1.0`.
+ /// Used to reduce repetitiveness of generated tokens. The higher the value, the stronger a penalty is applied to previously present tokens, proportional to how many times they have already appeared in the prompt or prior generation. + ///
+ [global::Newtonsoft.Json.JsonProperty("frequency_penalty")] + public float FrequencyPenalty { get; set; } + + /// + /// Defaults to `0.0`, min value of `0.0`, max value of `1.0`.
+ /// Used to reduce repetitiveness of generated tokens. Similar to `frequency_penalty`, except that this penalty is applied equally to all tokens that have already appeared, regardless of their exact frequencies. + ///
+ [global::Newtonsoft.Json.JsonProperty("presence_penalty")] + public float PresencePenalty { get; set; } + + /// + /// Ensures only the top `k` most likely tokens are considered for generation at each step.
+ /// Defaults to `0`, min value of `0`, max value of `500`.
+ /// Default Value: 0F + ///
+ [global::Newtonsoft.Json.JsonProperty("k")] + public float K { get; set; } = 0F; + + /// + /// Ensures that only the most likely tokens, with total probability mass of `p`, are considered for generation at each step. If both `k` and `p` are enabled, `p` acts after `k`.
+ /// Defaults to `0.75`. min value of `0.01`, max value of `0.99`.
+ /// Default Value: 0.75F + ///
+ [global::Newtonsoft.Json.JsonProperty("p")] + public float P { get; set; } = 0.75F; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2RequestCitationMode.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2RequestCitationMode.g.verified.cs new file mode 100644 index 0000000000..d1220fb17e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2RequestCitationMode.g.verified.cs @@ -0,0 +1,63 @@ +//HintName: G.Models.Chatv2RequestCitationMode.g.cs + +#nullable enable + +namespace G +{ + /// + /// Defaults to `"accurate"`.
+ /// Dictates the approach taken to generating citations as part of the RAG flow by allowing the user to specify whether they want `"accurate"` results, `"fast"` results or no results. + ///
+ [global::System.Runtime.Serialization.DataContract] + public enum Chatv2RequestCitationMode + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="FAST")] + FAST, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="ACCURATE")] + ACCURATE, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="OFF")] + OFF, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class Chatv2RequestCitationModeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this Chatv2RequestCitationMode value) + { + return value switch + { + Chatv2RequestCitationMode.FAST => "FAST", + Chatv2RequestCitationMode.ACCURATE => "ACCURATE", + Chatv2RequestCitationMode.OFF => "OFF", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static Chatv2RequestCitationMode? ToEnum(string value) + { + return value switch + { + "FAST" => Chatv2RequestCitationMode.FAST, + "ACCURATE" => Chatv2RequestCitationMode.ACCURATE, + "OFF" => Chatv2RequestCitationMode.OFF, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response10.g.verified.cs new file mode 100644 index 0000000000..2b79db13ea --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.Chatv2Response10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Chatv2Response10 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response11.g.verified.cs new file mode 100644 index 0000000000..0c2da089b6 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.Chatv2Response11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Chatv2Response11 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response12.g.verified.cs new file mode 100644 index 0000000000..78149c1dfd --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.Chatv2Response12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Chatv2Response12 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response13.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response13.g.verified.cs new file mode 100644 index 0000000000..e020567fa7 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response13.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.Chatv2Response13.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Chatv2Response13 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response2.g.verified.cs new file mode 100644 index 0000000000..60b8109466 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.Chatv2Response2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Chatv2Response2 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response3.g.verified.cs new file mode 100644 index 0000000000..4120f73e0b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.Chatv2Response3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Chatv2Response3 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response4.g.verified.cs new file mode 100644 index 0000000000..5204b02c16 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.Chatv2Response4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Chatv2Response4 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response5.g.verified.cs new file mode 100644 index 0000000000..a88d4d18f7 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.Chatv2Response5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Chatv2Response5 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response6.g.verified.cs new file mode 100644 index 0000000000..de016535c2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.Chatv2Response6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Chatv2Response6 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response7.g.verified.cs new file mode 100644 index 0000000000..0fed62cf0c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.Chatv2Response7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Chatv2Response7 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response8.g.verified.cs new file mode 100644 index 0000000000..b834a4279e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.Chatv2Response8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Chatv2Response8 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response9.g.verified.cs new file mode 100644 index 0000000000..40b205fc94 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Chatv2Response9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.Chatv2Response9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Chatv2Response9 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse.g.verified.cs new file mode 100644 index 0000000000..e4045517eb --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.CheckAPIKeyResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CheckAPIKeyResponse + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("valid", Required = global::Newtonsoft.Json.Required.Always)] + public bool Valid { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("organization_id")] + public string? OrganizationId { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("owner_id")] + public string? OwnerId { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse10.g.verified.cs new file mode 100644 index 0000000000..be3a435371 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CheckAPIKeyResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CheckAPIKeyResponse10 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse11.g.verified.cs new file mode 100644 index 0000000000..f0e73d9ae3 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CheckAPIKeyResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CheckAPIKeyResponse11 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse12.g.verified.cs new file mode 100644 index 0000000000..a2511c1bea --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CheckAPIKeyResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CheckAPIKeyResponse12 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse13.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse13.g.verified.cs new file mode 100644 index 0000000000..6745e0c43f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse13.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CheckAPIKeyResponse13.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CheckAPIKeyResponse13 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse2.g.verified.cs new file mode 100644 index 0000000000..9d07762243 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CheckAPIKeyResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CheckAPIKeyResponse2 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse3.g.verified.cs new file mode 100644 index 0000000000..a716e3ac19 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CheckAPIKeyResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CheckAPIKeyResponse3 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse4.g.verified.cs new file mode 100644 index 0000000000..5e7440d5f6 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CheckAPIKeyResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CheckAPIKeyResponse4 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse5.g.verified.cs new file mode 100644 index 0000000000..abdd0058e6 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CheckAPIKeyResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CheckAPIKeyResponse5 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse6.g.verified.cs new file mode 100644 index 0000000000..023fe72b66 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CheckAPIKeyResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CheckAPIKeyResponse6 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse7.g.verified.cs new file mode 100644 index 0000000000..a507f08d43 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CheckAPIKeyResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CheckAPIKeyResponse7 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse8.g.verified.cs new file mode 100644 index 0000000000..387dfff464 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CheckAPIKeyResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CheckAPIKeyResponse8 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse9.g.verified.cs new file mode 100644 index 0000000000..d80fc244ab --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CheckAPIKeyResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CheckAPIKeyResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CheckAPIKeyResponse9 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Citation.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Citation.g.verified.cs new file mode 100644 index 0000000000..3b8d437348 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Citation.g.verified.cs @@ -0,0 +1,42 @@ +//HintName: G.Models.Citation.g.cs + +#nullable enable + +namespace G +{ + /// + /// Citation information containing sources and the text cited. + /// + public sealed partial class Citation + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("start")] + public int Start { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("end")] + public int End { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("text")] + public string? Text { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("sources")] + public global::System.Collections.Generic.IList? Sources { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CitationEndEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CitationEndEvent.g.verified.cs new file mode 100644 index 0000000000..f133fd6621 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CitationEndEvent.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.CitationEndEvent.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// A streamed event which signifies a citation has finished streaming. + /// + public readonly partial struct CitationEndEvent : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamEventType? Value1 { get; init; } +#else + public global::G.ChatStreamEventType? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator CitationEndEvent(global::G.ChatStreamEventType value) => new CitationEndEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamEventType?(CitationEndEvent @this) => @this.Value1; + + /// + /// + /// + public CitationEndEvent(global::G.ChatStreamEventType? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.CitationEndEventVariant2? Value2 { get; init; } +#else + public global::G.CitationEndEventVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator CitationEndEvent(global::G.CitationEndEventVariant2 value) => new CitationEndEvent(value); + + /// + /// + /// + public static implicit operator global::G.CitationEndEventVariant2?(CitationEndEvent @this) => @this.Value2; + + /// + /// + /// + public CitationEndEvent(global::G.CitationEndEventVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public CitationEndEvent( + global::G.ChatStreamEventType? value1, + global::G.CitationEndEventVariant2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.ChatStreamEventType), + Value2, + typeof(global::G.CitationEndEventVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(CitationEndEvent other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(CitationEndEvent obj1, CitationEndEvent obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(CitationEndEvent obj1, CitationEndEvent obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is CitationEndEvent o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CitationEndEventVariant2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CitationEndEventVariant2.g.verified.cs new file mode 100644 index 0000000000..a3d09d9a38 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CitationEndEventVariant2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CitationEndEventVariant2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CitationEndEventVariant2 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("index")] + public int Index { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CitationStartEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CitationStartEvent.g.verified.cs new file mode 100644 index 0000000000..8bb0843aed --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CitationStartEvent.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.CitationStartEvent.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// A streamed event which signifies a citation has been created. + /// + public readonly partial struct CitationStartEvent : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamEventType? Value1 { get; init; } +#else + public global::G.ChatStreamEventType? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator CitationStartEvent(global::G.ChatStreamEventType value) => new CitationStartEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamEventType?(CitationStartEvent @this) => @this.Value1; + + /// + /// + /// + public CitationStartEvent(global::G.ChatStreamEventType? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.CitationStartEventVariant2? Value2 { get; init; } +#else + public global::G.CitationStartEventVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator CitationStartEvent(global::G.CitationStartEventVariant2 value) => new CitationStartEvent(value); + + /// + /// + /// + public static implicit operator global::G.CitationStartEventVariant2?(CitationStartEvent @this) => @this.Value2; + + /// + /// + /// + public CitationStartEvent(global::G.CitationStartEventVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public CitationStartEvent( + global::G.ChatStreamEventType? value1, + global::G.CitationStartEventVariant2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.ChatStreamEventType), + Value2, + typeof(global::G.CitationStartEventVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(CitationStartEvent other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(CitationStartEvent obj1, CitationStartEvent obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(CitationStartEvent obj1, CitationStartEvent obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is CitationStartEvent o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CitationStartEventVariant2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CitationStartEventVariant2.g.verified.cs new file mode 100644 index 0000000000..bcf68be164 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CitationStartEventVariant2.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.CitationStartEventVariant2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CitationStartEventVariant2 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("index")] + public int Index { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("delta")] + public global::G.CitationStartEventVariant2Delta? Delta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CitationStartEventVariant2Delta.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CitationStartEventVariant2Delta.g.verified.cs new file mode 100644 index 0000000000..9b235a543d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CitationStartEventVariant2Delta.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CitationStartEventVariant2Delta.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CitationStartEventVariant2Delta + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("message")] + public global::G.CitationStartEventVariant2DeltaMessage? Message { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CitationStartEventVariant2DeltaMessage.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CitationStartEventVariant2DeltaMessage.g.verified.cs new file mode 100644 index 0000000000..f5cb9099c1 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CitationStartEventVariant2DeltaMessage.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CitationStartEventVariant2DeltaMessage.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CitationStartEventVariant2DeltaMessage + { + /// + /// Citation information containing sources and the text cited. + /// + [global::Newtonsoft.Json.JsonProperty("citations")] + public global::G.Citation? Citations { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyDataMetrics.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyDataMetrics.g.verified.cs new file mode 100644 index 0000000000..65b2f82419 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyDataMetrics.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ClassifyDataMetrics.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ClassifyDataMetrics + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("label_metrics")] + public global::System.Collections.Generic.IList? LabelMetrics { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyExample.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyExample.g.verified.cs new file mode 100644 index 0000000000..e53a861e86 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyExample.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.ClassifyExample.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ClassifyExample + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("text")] + public string? Text { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("label")] + public string? Label { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyRequest.g.verified.cs new file mode 100644 index 0000000000..8e92ac887c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyRequest.g.verified.cs @@ -0,0 +1,55 @@ +//HintName: G.Models.ClassifyRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ClassifyRequest + { + /// + /// A list of up to 96 texts to be classified. Each one must be a non-empty string.
+ /// There is, however, no consistent, universal limit to the length a particular input can be. We perform classification on the first `x` tokens of each input, and `x` varies depending on which underlying model is powering classification. The maximum token length for each model is listed in the "max tokens" column [here](https://docs.cohere.com/docs/models).
+ /// Note: by default the `truncate` parameter is set to `END`, so tokens exceeding the limit will be automatically dropped. This behavior can be disabled by setting `truncate` to `NONE`, which will result in validation errors for longer texts. + ///
+ [global::Newtonsoft.Json.JsonProperty("inputs", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList Inputs { get; set; } = default!; + + /// + /// An array of examples to provide context to the model. Each example is a text string and its associated label/class. Each unique label requires at least 2 examples associated with it; the maximum number of examples is 2500, and each example has a maximum length of 512 tokens. The values should be structured as `{text: "...",label: "..."}`.
+ /// Note: [Fine-tuned Models](https://docs.cohere.com/docs/classify-fine-tuning) trained on classification examples don't require the `examples` parameter to be passed in explicitly. + ///
+ [global::Newtonsoft.Json.JsonProperty("examples")] + public global::System.Collections.Generic.IList? Examples { get; set; } + + /// + /// The identifier of the model. Currently available models are `embed-multilingual-v2.0`, `embed-english-light-v2.0`, and `embed-english-v2.0` (default). Smaller "light" models are faster, while larger models will perform better. [Fine-tuned models](https://docs.cohere.com/docs/fine-tuning) can also be supplied with their full ID. + /// + [global::Newtonsoft.Json.JsonProperty("model")] + public string? Model { get; set; } + + /// + /// The ID of a custom playground preset. You can create presets in the [playground](https://dashboard.cohere.com/playground/classify?model=large). If you use a preset, all other parameters become optional, and any included parameters will override the preset's parameters.
+ /// Example: my-preset-a58sbd + ///
+ [global::Newtonsoft.Json.JsonProperty("preset")] + public string? Preset { get; set; } + + /// + /// One of `NONE|START|END` to specify how the API will handle inputs longer than the maximum token length.
+ /// Passing `START` will discard the start of the input. `END` will discard the end of the input. In both cases, input is discarded until the remaining input is exactly the maximum input token length for the model.
+ /// If `NONE` is selected, when the input exceeds the maximum input token length an error will be returned.
+ /// Default Value: END + ///
+ [global::Newtonsoft.Json.JsonProperty("truncate")] + public global::G.ClassifyRequestTruncate? Truncate { get; set; } = global::G.ClassifyRequestTruncate.END; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyRequestTruncate.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyRequestTruncate.g.verified.cs new file mode 100644 index 0000000000..2496510b84 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyRequestTruncate.g.verified.cs @@ -0,0 +1,65 @@ +//HintName: G.Models.ClassifyRequestTruncate.g.cs + +#nullable enable + +namespace G +{ + /// + /// One of `NONE|START|END` to specify how the API will handle inputs longer than the maximum token length.
+ /// Passing `START` will discard the start of the input. `END` will discard the end of the input. In both cases, input is discarded until the remaining input is exactly the maximum input token length for the model.
+ /// If `NONE` is selected, when the input exceeds the maximum input token length an error will be returned.
+ /// Default Value: END + ///
+ [global::System.Runtime.Serialization.DataContract] + public enum ClassifyRequestTruncate + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="NONE")] + NONE, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="START")] + START, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="END")] + END, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ClassifyRequestTruncateExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ClassifyRequestTruncate value) + { + return value switch + { + ClassifyRequestTruncate.NONE => "NONE", + ClassifyRequestTruncate.START => "START", + ClassifyRequestTruncate.END => "END", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ClassifyRequestTruncate? ToEnum(string value) + { + return value switch + { + "NONE" => ClassifyRequestTruncate.NONE, + "START" => ClassifyRequestTruncate.START, + "END" => ClassifyRequestTruncate.END, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse.g.verified.cs new file mode 100644 index 0000000000..628bf8800c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.ClassifyResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ClassifyResponse + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("id", Required = global::Newtonsoft.Json.Required.Always)] + public string Id { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("classifications", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList Classifications { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("meta")] + public global::G.ApiMeta? Meta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse10.g.verified.cs new file mode 100644 index 0000000000..1e7ff82fd4 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ClassifyResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ClassifyResponse10 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse11.g.verified.cs new file mode 100644 index 0000000000..dff3b5a9f7 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ClassifyResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ClassifyResponse11 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse12.g.verified.cs new file mode 100644 index 0000000000..5463cb7d71 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ClassifyResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ClassifyResponse12 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse13.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse13.g.verified.cs new file mode 100644 index 0000000000..8c939ef9a3 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse13.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ClassifyResponse13.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ClassifyResponse13 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse2.g.verified.cs new file mode 100644 index 0000000000..cd14b28023 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ClassifyResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ClassifyResponse2 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse3.g.verified.cs new file mode 100644 index 0000000000..64b22b0d01 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ClassifyResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ClassifyResponse3 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse4.g.verified.cs new file mode 100644 index 0000000000..d75d5a240f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ClassifyResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ClassifyResponse4 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse5.g.verified.cs new file mode 100644 index 0000000000..2f934d0a59 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ClassifyResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ClassifyResponse5 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse6.g.verified.cs new file mode 100644 index 0000000000..b77b465d28 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ClassifyResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ClassifyResponse6 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse7.g.verified.cs new file mode 100644 index 0000000000..1c6714c969 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ClassifyResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ClassifyResponse7 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse8.g.verified.cs new file mode 100644 index 0000000000..31e13edc62 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ClassifyResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ClassifyResponse8 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse9.g.verified.cs new file mode 100644 index 0000000000..b54b69d28d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ClassifyResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ClassifyResponse9 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponseClassification.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponseClassification.g.verified.cs new file mode 100644 index 0000000000..aeab305936 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponseClassification.g.verified.cs @@ -0,0 +1,68 @@ +//HintName: G.Models.ClassifyResponseClassification.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ClassifyResponseClassification + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("id", Required = global::Newtonsoft.Json.Required.Always)] + public string Id { get; set; } = default!; + + /// + /// The input text that was classified + /// + [global::Newtonsoft.Json.JsonProperty("input")] + public string? Input { get; set; } + + /// + /// The predicted label for the associated query (only filled for single-label models) + /// + [global::Newtonsoft.Json.JsonProperty("prediction")] + [global::System.Obsolete("This property marked as deprecated.")] + public string? Prediction { get; set; } + + /// + /// An array containing the predicted labels for the associated query (only filled for single-label classification) + /// + [global::Newtonsoft.Json.JsonProperty("predictions", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList Predictions { get; set; } = default!; + + /// + /// The confidence score for the top predicted class (only filled for single-label classification) + /// + [global::Newtonsoft.Json.JsonProperty("confidence")] + [global::System.Obsolete("This property marked as deprecated.")] + public float Confidence { get; set; } + + /// + /// An array containing the confidence scores of all the predictions in the same order + /// + [global::Newtonsoft.Json.JsonProperty("confidences", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList Confidences { get; set; } = default!; + + /// + /// A map containing each label and its confidence score according to the classifier. All the confidence scores add up to 1 for single-label classification. For multi-label classification the label confidences are independent of each other, so they don't have to sum up to 1. + /// + [global::Newtonsoft.Json.JsonProperty("labels", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.ClassifyResponseClassificationLabels Labels { get; set; } = default!; + + /// + /// The type of classification performed + /// + [global::Newtonsoft.Json.JsonProperty("classification_type", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.ClassifyResponseClassificationClassificationType ClassificationType { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponseClassificationClassificationType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponseClassificationClassificationType.g.verified.cs new file mode 100644 index 0000000000..8099d8bf70 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponseClassificationClassificationType.g.verified.cs @@ -0,0 +1,55 @@ +//HintName: G.Models.ClassifyResponseClassificationClassificationType.g.cs + +#nullable enable + +namespace G +{ + /// + /// The type of classification performed + /// + [global::System.Runtime.Serialization.DataContract] + public enum ClassifyResponseClassificationClassificationType + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="single-label")] + SingleLabel, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="multi-label")] + MultiLabel, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ClassifyResponseClassificationClassificationTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ClassifyResponseClassificationClassificationType value) + { + return value switch + { + ClassifyResponseClassificationClassificationType.SingleLabel => "single-label", + ClassifyResponseClassificationClassificationType.MultiLabel => "multi-label", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ClassifyResponseClassificationClassificationType? ToEnum(string value) + { + return value switch + { + "single-label" => ClassifyResponseClassificationClassificationType.SingleLabel, + "multi-label" => ClassifyResponseClassificationClassificationType.MultiLabel, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponseClassificationLabels.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponseClassificationLabels.g.verified.cs new file mode 100644 index 0000000000..595f90f7b9 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ClassifyResponseClassificationLabels.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.ClassifyResponseClassificationLabels.g.cs + +#nullable enable + +namespace G +{ + /// + /// A map containing each label and its confidence score according to the classifier. All the confidence scores add up to 1 for single-label classification. For multi-label classification the label confidences are independent of each other, so they don't have to sum up to 1. + /// + public sealed partial class ClassifyResponseClassificationLabels + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Cluster.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Cluster.g.verified.cs new file mode 100644 index 0000000000..9d940ceccc --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Cluster.g.verified.cs @@ -0,0 +1,48 @@ +//HintName: G.Models.Cluster.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Cluster + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("id")] + public string? Id { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("keywords")] + public global::System.Collections.Generic.IList? Keywords { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("description")] + public string? Description { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("size")] + public int Size { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("sample_elements")] + public global::System.Collections.Generic.IList? SampleElements { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CompatibleEndpoint.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CompatibleEndpoint.g.verified.cs new file mode 100644 index 0000000000..9e1c3531d3 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CompatibleEndpoint.g.verified.cs @@ -0,0 +1,90 @@ +//HintName: G.Models.CompatibleEndpoint.g.cs + +#nullable enable + +namespace G +{ + /// + /// One of the Cohere API endpoints that the model can be used with. + /// + [global::System.Runtime.Serialization.DataContract] + public enum CompatibleEndpoint + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="chat")] + Chat, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="embed")] + Embed, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="classify")] + Classify, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="summarize")] + Summarize, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="rerank")] + Rerank, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="rate")] + Rate, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="generate")] + Generate, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CompatibleEndpointExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CompatibleEndpoint value) + { + return value switch + { + CompatibleEndpoint.Chat => "chat", + CompatibleEndpoint.Embed => "embed", + CompatibleEndpoint.Classify => "classify", + CompatibleEndpoint.Summarize => "summarize", + CompatibleEndpoint.Rerank => "rerank", + CompatibleEndpoint.Rate => "rate", + CompatibleEndpoint.Generate => "generate", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CompatibleEndpoint? ToEnum(string value) + { + return value switch + { + "chat" => CompatibleEndpoint.Chat, + "embed" => CompatibleEndpoint.Embed, + "classify" => CompatibleEndpoint.Classify, + "summarize" => CompatibleEndpoint.Summarize, + "rerank" => CompatibleEndpoint.Rerank, + "rate" => CompatibleEndpoint.Rate, + "generate" => CompatibleEndpoint.Generate, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Connector.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Connector.g.verified.cs new file mode 100644 index 0000000000..0e2fe250af --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Connector.g.verified.cs @@ -0,0 +1,99 @@ +//HintName: G.Models.Connector.g.cs + +#nullable enable + +namespace G +{ + /// + /// A connector allows you to integrate data sources with the '/chat' endpoint to create grounded generations with citations to the data source.
+ /// documents to help answer users. + ///
+ public sealed partial class Connector + { + /// + /// The unique identifier of the connector (used in both `/connectors` & `/chat` endpoints).
+ /// This is automatically created from the name of the connector upon registration. + ///
+ [global::Newtonsoft.Json.JsonProperty("id", Required = global::Newtonsoft.Json.Required.Always)] + public string Id { get; set; } = default!; + + /// + /// The organization to which this connector belongs. This is automatically set to
+ /// the organization of the user who created the connector. + ///
+ [global::Newtonsoft.Json.JsonProperty("organization_id")] + public string? OrganizationId { get; set; } + + /// + /// A human-readable name for the connector. + /// + [global::Newtonsoft.Json.JsonProperty("name", Required = global::Newtonsoft.Json.Required.Always)] + public string Name { get; set; } = default!; + + /// + /// A description of the connector. + /// + [global::Newtonsoft.Json.JsonProperty("description")] + public string? Description { get; set; } + + /// + /// The URL of the connector that will be used to search for documents. + /// + [global::Newtonsoft.Json.JsonProperty("url")] + public string? Url { get; set; } + + /// + /// The UTC time at which the connector was created. + /// + [global::Newtonsoft.Json.JsonProperty("created_at", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.DateTime CreatedAt { get; set; } = default!; + + /// + /// The UTC time at which the connector was last updated. + /// + [global::Newtonsoft.Json.JsonProperty("updated_at", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.DateTime UpdatedAt { get; set; } = default!; + + /// + /// A list of fields to exclude from the prompt (fields remain in the document). + /// + [global::Newtonsoft.Json.JsonProperty("excludes")] + public global::System.Collections.Generic.IList? Excludes { get; set; } + + /// + /// The type of authentication/authorization used by the connector. Possible values: [oauth, service_auth] + /// + [global::Newtonsoft.Json.JsonProperty("auth_type")] + public string? AuthType { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("oauth")] + public global::G.ConnectorOAuth? Oauth { get; set; } + + /// + /// The OAuth status for the user making the request. One of ["valid", "expired", ""]. Empty string (field is omitted) means the user has not authorized the connector yet. + /// + [global::Newtonsoft.Json.JsonProperty("auth_status")] + public global::G.ConnectorAuthStatus? AuthStatus { get; set; } + + /// + /// Whether the connector is active or not. + /// + [global::Newtonsoft.Json.JsonProperty("active")] + public bool Active { get; set; } + + /// + /// Whether a chat request should continue or not if the request to this connector fails. + /// + [global::Newtonsoft.Json.JsonProperty("continue_on_failure")] + public bool ContinueOnFailure { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ConnectorAuthStatus.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ConnectorAuthStatus.g.verified.cs new file mode 100644 index 0000000000..41e0757973 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ConnectorAuthStatus.g.verified.cs @@ -0,0 +1,55 @@ +//HintName: G.Models.ConnectorAuthStatus.g.cs + +#nullable enable + +namespace G +{ + /// + /// The OAuth status for the user making the request. One of ["valid", "expired", ""]. Empty string (field is omitted) means the user has not authorized the connector yet. + /// + [global::System.Runtime.Serialization.DataContract] + public enum ConnectorAuthStatus + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="valid")] + Valid, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="expired")] + Expired, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ConnectorAuthStatusExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ConnectorAuthStatus value) + { + return value switch + { + ConnectorAuthStatus.Valid => "valid", + ConnectorAuthStatus.Expired => "expired", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ConnectorAuthStatus? ToEnum(string value) + { + return value switch + { + "valid" => ConnectorAuthStatus.Valid, + "expired" => ConnectorAuthStatus.Expired, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ConnectorLog.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ConnectorLog.g.verified.cs new file mode 100644 index 0000000000..c6de77e2c4 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ConnectorLog.g.verified.cs @@ -0,0 +1,72 @@ +//HintName: G.Models.ConnectorLog.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ConnectorLog + { + /// + /// Unique identifier for the connector log + /// + [global::Newtonsoft.Json.JsonProperty("id", Required = global::Newtonsoft.Json.Required.Always)] + public string Id { get; set; } = default!; + + /// + /// Unique identifier for the connector + /// + [global::Newtonsoft.Json.JsonProperty("connector_id", Required = global::Newtonsoft.Json.Required.Always)] + public string ConnectorId { get; set; } = default!; + + /// + /// Unique identifier for the request + /// + [global::Newtonsoft.Json.JsonProperty("request_id", Required = global::Newtonsoft.Json.Required.Always)] + public string RequestId { get; set; } = default!; + + /// + /// Unique identifier for the user + /// + [global::Newtonsoft.Json.JsonProperty("user_id", Required = global::Newtonsoft.Json.Required.Always)] + public string UserId { get; set; } = default!; + + /// + /// Unique identifier for the organization + /// + [global::Newtonsoft.Json.JsonProperty("organization_id", Required = global::Newtonsoft.Json.Required.Always)] + public string OrganizationId { get; set; } = default!; + + /// + /// Time of connector log creation in RFC3339 format + /// + [global::Newtonsoft.Json.JsonProperty("created_at", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.DateTime CreatedAt { get; set; } = default!; + + /// + /// HTTP status code of the request + /// + [global::Newtonsoft.Json.JsonProperty("status_code", Required = global::Newtonsoft.Json.Required.Always)] + public int StatusCode { get; set; } = default!; + + /// + /// Duration of the request in milliseconds + /// + [global::Newtonsoft.Json.JsonProperty("duration_millis", Required = global::Newtonsoft.Json.Required.Always)] + public int DurationMillis { get; set; } = default!; + + /// + /// Error message of the request + /// + [global::Newtonsoft.Json.JsonProperty("error_message")] + public string? ErrorMessage { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ConnectorOAuth.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ConnectorOAuth.g.verified.cs new file mode 100644 index 0000000000..42a486414d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ConnectorOAuth.g.verified.cs @@ -0,0 +1,48 @@ +//HintName: G.Models.ConnectorOAuth.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ConnectorOAuth + { + /// + /// The OAuth 2.0 client ID. This field is encrypted at rest. + /// + [global::Newtonsoft.Json.JsonProperty("client_id")] + public string? ClientId { get; set; } + + /// + /// The OAuth 2.0 client Secret. This field is encrypted at rest and never returned in a response. + /// + [global::Newtonsoft.Json.JsonProperty("client_secret")] + public string? ClientSecret { get; set; } + + /// + /// The OAuth 2.0 /authorize endpoint to use when users authorize the connector. + /// + [global::Newtonsoft.Json.JsonProperty("authorize_url", Required = global::Newtonsoft.Json.Required.Always)] + public string AuthorizeUrl { get; set; } = default!; + + /// + /// The OAuth 2.0 /token endpoint to use when users authorize the connector. + /// + [global::Newtonsoft.Json.JsonProperty("token_url", Required = global::Newtonsoft.Json.Required.Always)] + public string TokenUrl { get; set; } = default!; + + /// + /// The OAuth scopes to request when users authorize the connector. + /// + [global::Newtonsoft.Json.JsonProperty("scope")] + public string? Scope { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Content.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Content.g.verified.cs new file mode 100644 index 0000000000..e57d29485e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Content.g.verified.cs @@ -0,0 +1,116 @@ +//HintName: G.Models.Content.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// A Content block which contains information about the content type and the content itself. + /// + public readonly partial struct Content : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.TextContent? Text { get; init; } +#else + public global::G.TextContent? Text { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Text))] +#endif + public bool IsText => Text != null; + + /// + /// + /// + public static implicit operator Content(global::G.TextContent value) => new Content(value); + + /// + /// + /// + public static implicit operator global::G.TextContent?(Content @this) => @this.Text; + + /// + /// + /// + public Content(global::G.TextContent? value) + { + Text = value; + } + + /// + /// + /// + public object? Object => + Text as object + ; + + /// + /// + /// + public bool Validate() + { + return IsText; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Text, + typeof(global::G.TextContent), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(Content other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Text, other.Text) + ; + } + + /// + /// + /// + public static bool operator ==(Content obj1, Content obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(Content obj1, Content obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is Content o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateClusterJobRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateClusterJobRequest.g.verified.cs new file mode 100644 index 0000000000..793b5ffe11 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateClusterJobRequest.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: G.Models.CreateClusterJobRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateClusterJobRequest + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("embeddings_url", Required = global::Newtonsoft.Json.Required.Always)] + public string EmbeddingsUrl { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("input_dataset_id")] + public string? InputDatasetId { get; set; } + + /// + /// Defaults to `10`. Parameter for HDBSCAN. Only clusters with this number of elements will be returned with a positive cluster number.
+ /// Default Value: 10 + ///
+ [global::Newtonsoft.Json.JsonProperty("min_cluster_size")] + public int MinClusterSize { get; set; } = 10; + + /// + /// Parameter for UMAP. A scalar governing how to balance global vs local structure in the data.
+ /// Default Value: 15 + ///
+ [global::Newtonsoft.Json.JsonProperty("n_neighbors")] + public int NNeighbors { get; set; } = 15; + + /// + /// Parameter for UMAP. A boolean governing whether the embeddings from UMAP (that will be clustered with HDBSCAN) are deterministic.
+ /// Default Value: true + ///
+ [global::Newtonsoft.Json.JsonProperty("is_deterministic")] + public bool IsDeterministic { get; set; } = true; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("generate_descriptions")] + public bool GenerateDescriptions { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateClusterJobResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateClusterJobResponse.g.verified.cs new file mode 100644 index 0000000000..5af12d78d3 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateClusterJobResponse.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateClusterJobResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// Response for creating a cluster job. + /// + public sealed partial class CreateClusterJobResponse + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("job_id", Required = global::Newtonsoft.Json.Required.Always)] + public string JobId { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorOAuth.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorOAuth.g.verified.cs new file mode 100644 index 0000000000..a068e3b9d2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorOAuth.g.verified.cs @@ -0,0 +1,48 @@ +//HintName: G.Models.CreateConnectorOAuth.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateConnectorOAuth + { + /// + /// The OAuth 2.0 client ID. This fields is encrypted at rest. + /// + [global::Newtonsoft.Json.JsonProperty("client_id")] + public string? ClientId { get; set; } + + /// + /// The OAuth 2.0 client Secret. This field is encrypted at rest and never returned in a response. + /// + [global::Newtonsoft.Json.JsonProperty("client_secret")] + public string? ClientSecret { get; set; } + + /// + /// The OAuth 2.0 /authorize endpoint to use when users authorize the connector. + /// + [global::Newtonsoft.Json.JsonProperty("authorize_url")] + public string? AuthorizeUrl { get; set; } + + /// + /// The OAuth 2.0 /token endpoint to use when users authorize the connector. + /// + [global::Newtonsoft.Json.JsonProperty("token_url")] + public string? TokenUrl { get; set; } + + /// + /// The OAuth scopes to request when users authorize the connector. + /// + [global::Newtonsoft.Json.JsonProperty("scope")] + public string? Scope { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorRequest.g.verified.cs new file mode 100644 index 0000000000..49fa17bc8c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorRequest.g.verified.cs @@ -0,0 +1,68 @@ +//HintName: G.Models.CreateConnectorRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateConnectorRequest + { + /// + /// A human-readable name for the connector. + /// + [global::Newtonsoft.Json.JsonProperty("name", Required = global::Newtonsoft.Json.Required.Always)] + public string Name { get; set; } = default!; + + /// + /// A description of the connector. + /// + [global::Newtonsoft.Json.JsonProperty("description")] + public string? Description { get; set; } + + /// + /// The URL of the connector that will be used to search for documents. + /// + [global::Newtonsoft.Json.JsonProperty("url", Required = global::Newtonsoft.Json.Required.Always)] + public string Url { get; set; } = default!; + + /// + /// A list of fields to exclude from the prompt (fields remain in the document). + /// + [global::Newtonsoft.Json.JsonProperty("excludes")] + public global::System.Collections.Generic.IList? Excludes { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("oauth")] + public global::G.CreateConnectorOAuth? Oauth { get; set; } + + /// + /// Whether the connector is active or not.
+ /// Default Value: true + ///
+ [global::Newtonsoft.Json.JsonProperty("active")] + public bool Active { get; set; } = true; + + /// + /// Whether a chat request should continue or not if the request to this connector fails.
+ /// Default Value: false + ///
+ [global::Newtonsoft.Json.JsonProperty("continue_on_failure")] + public bool ContinueOnFailure { get; set; } = false; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("service_auth")] + public global::G.CreateConnectorServiceAuth? ServiceAuth { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse.g.verified.cs new file mode 100644 index 0000000000..a23f1408ee --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse.g.verified.cs @@ -0,0 +1,25 @@ +//HintName: G.Models.CreateConnectorResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateConnectorResponse + { + /// + /// A connector allows you to integrate data sources with the '/chat' endpoint to create grounded generations with citations to the data source.
+ /// documents to help answer users. + ///
+ [global::Newtonsoft.Json.JsonProperty("connector", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.Connector Connector { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse10.g.verified.cs new file mode 100644 index 0000000000..7a25c43c54 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateConnectorResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateConnectorResponse10 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse11.g.verified.cs new file mode 100644 index 0000000000..925e2caacb --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateConnectorResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateConnectorResponse11 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse12.g.verified.cs new file mode 100644 index 0000000000..cc94d3bf18 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateConnectorResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateConnectorResponse12 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse13.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse13.g.verified.cs new file mode 100644 index 0000000000..8fa328086a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse13.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateConnectorResponse13.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateConnectorResponse13 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse2.g.verified.cs new file mode 100644 index 0000000000..d8cfb62b24 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateConnectorResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateConnectorResponse2 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse3.g.verified.cs new file mode 100644 index 0000000000..1a63618b00 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateConnectorResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateConnectorResponse3 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse4.g.verified.cs new file mode 100644 index 0000000000..4c817a82eb --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateConnectorResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateConnectorResponse4 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse5.g.verified.cs new file mode 100644 index 0000000000..2740e8e508 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateConnectorResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateConnectorResponse5 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse6.g.verified.cs new file mode 100644 index 0000000000..4cbc7bbf97 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateConnectorResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateConnectorResponse6 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse7.g.verified.cs new file mode 100644 index 0000000000..2441ff3f67 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateConnectorResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateConnectorResponse7 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse8.g.verified.cs new file mode 100644 index 0000000000..32a08bce00 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateConnectorResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateConnectorResponse8 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse9.g.verified.cs new file mode 100644 index 0000000000..044d9f2d9f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateConnectorResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateConnectorResponse9 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorServiceAuth.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorServiceAuth.g.verified.cs new file mode 100644 index 0000000000..dd68931e4a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateConnectorServiceAuth.g.verified.cs @@ -0,0 +1,31 @@ +//HintName: G.Models.CreateConnectorServiceAuth.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateConnectorServiceAuth + { + /// + /// The token_type specifies the way the token is passed in the Authorization header. Valid values are "bearer", "basic", and "noscheme".
+ /// Default Value: noscheme + ///
+ [global::Newtonsoft.Json.JsonProperty("type", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.AuthTokenType Type { get; set; } = default!; + + /// + /// The token that will be used in the HTTP Authorization header when making requests to the connector. This field is encrypted at rest and never returned in a response. + /// + [global::Newtonsoft.Json.JsonProperty("token", Required = global::Newtonsoft.Json.Required.Always)] + public string Token { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetRequest.g.verified.cs new file mode 100644 index 0000000000..bb5c11ee82 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetRequest.g.verified.cs @@ -0,0 +1,42 @@ +//HintName: G.Models.CreateDatasetRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateDatasetRequest + { + /// + /// The file to upload + /// + [global::Newtonsoft.Json.JsonProperty("data", Required = global::Newtonsoft.Json.Required.Always)] + public byte[] Data { get; set; } = default!; + + /// + /// The file to upload + /// + [global::Newtonsoft.Json.JsonProperty("dataname", Required = global::Newtonsoft.Json.Required.Always)] + public string Dataname { get; set; } = default!; + + /// + /// An optional evaluation file to upload + /// + [global::Newtonsoft.Json.JsonProperty("eval_data")] + public byte[]? EvalData { get; set; } + + /// + /// An optional evaluation file to upload + /// + [global::Newtonsoft.Json.JsonProperty("eval_dataname")] + public string? EvalDataname { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse.g.verified.cs new file mode 100644 index 0000000000..1201fd9e77 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateDatasetResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateDatasetResponse + { + /// + /// The dataset ID + /// + [global::Newtonsoft.Json.JsonProperty("id")] + public string? Id { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse10.g.verified.cs new file mode 100644 index 0000000000..0369eb4101 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateDatasetResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateDatasetResponse10 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse11.g.verified.cs new file mode 100644 index 0000000000..5fc6f443e3 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateDatasetResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateDatasetResponse11 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse12.g.verified.cs new file mode 100644 index 0000000000..3375e192ad --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateDatasetResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateDatasetResponse12 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse13.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse13.g.verified.cs new file mode 100644 index 0000000000..8697a23339 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse13.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateDatasetResponse13.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateDatasetResponse13 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse2.g.verified.cs new file mode 100644 index 0000000000..4e817349fa --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateDatasetResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateDatasetResponse2 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse3.g.verified.cs new file mode 100644 index 0000000000..638ecd52ea --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateDatasetResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateDatasetResponse3 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse4.g.verified.cs new file mode 100644 index 0000000000..e021b7360a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateDatasetResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateDatasetResponse4 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse5.g.verified.cs new file mode 100644 index 0000000000..284d172be6 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateDatasetResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateDatasetResponse5 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse6.g.verified.cs new file mode 100644 index 0000000000..723297b3a4 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateDatasetResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateDatasetResponse6 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse7.g.verified.cs new file mode 100644 index 0000000000..6957653072 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateDatasetResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateDatasetResponse7 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse8.g.verified.cs new file mode 100644 index 0000000000..1686986d2c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateDatasetResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateDatasetResponse8 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse9.g.verified.cs new file mode 100644 index 0000000000..0b38bd144d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateDatasetResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateDatasetResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateDatasetResponse9 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobRequest.g.verified.cs new file mode 100644 index 0000000000..0e88805371 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobRequest.g.verified.cs @@ -0,0 +1,70 @@ +//HintName: G.Models.CreateEmbedJobRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateEmbedJobRequest + { + /// + /// ID of the embedding model.
+ /// Available models and corresponding embedding dimensions:
+ /// - `embed-english-v3.0` : 1024
+ /// - `embed-multilingual-v3.0` : 1024
+ /// - `embed-english-light-v3.0` : 384
+ /// - `embed-multilingual-light-v3.0` : 384 + ///
+ [global::Newtonsoft.Json.JsonProperty("model", Required = global::Newtonsoft.Json.Required.Always)] + public string Model { get; set; } = default!; + + /// + /// ID of a [Dataset](https://docs.cohere.com/docs/datasets). The Dataset must be of type `embed-input` and must have a validation status `Validated` + /// + [global::Newtonsoft.Json.JsonProperty("dataset_id", Required = global::Newtonsoft.Json.Required.Always)] + public string DatasetId { get; set; } = default!; + + /// + /// Specifies the type of input passed to the model. Required for embedding models v3 and higher.
+ /// - `"search_document"`: Used for embeddings stored in a vector database for search use-cases.
+ /// - `"search_query"`: Used for embeddings of search queries run against a vector DB to find relevant documents.
+ /// - `"classification"`: Used for embeddings passed through a text classifier.
+ /// - `"clustering"`: Used for the embeddings run through a clustering algorithm. + ///
+ [global::Newtonsoft.Json.JsonProperty("input_type", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.EmbedInputType InputType { get; set; } = default!; + + /// + /// The name of the embed job. + /// + [global::Newtonsoft.Json.JsonProperty("name")] + public string? Name { get; set; } + + /// + /// Specifies the types of embeddings you want to get back. Not required and default is None, which returns the Embed Floats response type. Can be one or more of the following types.
+ /// * `"float"`: Use this when you want to get back the default float embeddings. Valid for all models.
+ /// * `"int8"`: Use this when you want to get back signed int8 embeddings. Valid for only v3 models.
+ /// * `"uint8"`: Use this when you want to get back unsigned int8 embeddings. Valid for only v3 models.
+ /// * `"binary"`: Use this when you want to get back signed binary embeddings. Valid for only v3 models.
+ /// * `"ubinary"`: Use this when you want to get back unsigned binary embeddings. Valid for only v3 models. + ///
+ [global::Newtonsoft.Json.JsonProperty("embedding_types")] + public global::System.Collections.Generic.IList? EmbeddingTypes { get; set; } + + /// + /// One of `START|END` to specify how the API will handle inputs longer than the maximum token length.
+ /// Passing `START` will discard the start of the input. `END` will discard the end of the input. In both cases, input is discarded until the remaining input is exactly the maximum input token length for the model.
+ /// Default Value: END + ///
+ [global::Newtonsoft.Json.JsonProperty("truncate")] + public global::G.CreateEmbedJobRequestTruncate? Truncate { get; set; } = global::G.CreateEmbedJobRequestTruncate.END; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobRequestTruncate.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobRequestTruncate.g.verified.cs new file mode 100644 index 0000000000..34ae58f2f9 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobRequestTruncate.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: G.Models.CreateEmbedJobRequestTruncate.g.cs + +#nullable enable + +namespace G +{ + /// + /// One of `START|END` to specify how the API will handle inputs longer than the maximum token length.
+ /// Passing `START` will discard the start of the input. `END` will discard the end of the input. In both cases, input is discarded until the remaining input is exactly the maximum input token length for the model.
+ /// Default Value: END + ///
+ [global::System.Runtime.Serialization.DataContract] + public enum CreateEmbedJobRequestTruncate + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="START")] + START, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="END")] + END, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CreateEmbedJobRequestTruncateExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CreateEmbedJobRequestTruncate value) + { + return value switch + { + CreateEmbedJobRequestTruncate.START => "START", + CreateEmbedJobRequestTruncate.END => "END", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CreateEmbedJobRequestTruncate? ToEnum(string value) + { + return value switch + { + "START" => CreateEmbedJobRequestTruncate.START, + "END" => CreateEmbedJobRequestTruncate.END, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse.g.verified.cs new file mode 100644 index 0000000000..24f1dc699c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.CreateEmbedJobResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// Response from creating an embed job. + /// + public sealed partial class CreateEmbedJobResponse + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("job_id", Required = global::Newtonsoft.Json.Required.Always)] + public string JobId { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("meta")] + public global::G.ApiMeta? Meta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse10.g.verified.cs new file mode 100644 index 0000000000..42d14f9657 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateEmbedJobResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateEmbedJobResponse10 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse11.g.verified.cs new file mode 100644 index 0000000000..e7817e48c6 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateEmbedJobResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateEmbedJobResponse11 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse12.g.verified.cs new file mode 100644 index 0000000000..52535be523 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateEmbedJobResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateEmbedJobResponse12 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse13.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse13.g.verified.cs new file mode 100644 index 0000000000..f8a16a6427 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse13.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateEmbedJobResponse13.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateEmbedJobResponse13 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse2.g.verified.cs new file mode 100644 index 0000000000..a6ab43139e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateEmbedJobResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateEmbedJobResponse2 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse3.g.verified.cs new file mode 100644 index 0000000000..0a0b54cfaa --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateEmbedJobResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateEmbedJobResponse3 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse4.g.verified.cs new file mode 100644 index 0000000000..6e7b65c7b0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateEmbedJobResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateEmbedJobResponse4 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse5.g.verified.cs new file mode 100644 index 0000000000..0645f20c43 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateEmbedJobResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateEmbedJobResponse5 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse6.g.verified.cs new file mode 100644 index 0000000000..64581fb0fa --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateEmbedJobResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateEmbedJobResponse6 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse7.g.verified.cs new file mode 100644 index 0000000000..a39ccdf3f3 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateEmbedJobResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateEmbedJobResponse7 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse8.g.verified.cs new file mode 100644 index 0000000000..3b77a2c8c1 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateEmbedJobResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateEmbedJobResponse8 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse9.g.verified.cs new file mode 100644 index 0000000000..6c830a813e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateEmbedJobResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateEmbedJobResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateEmbedJobResponse9 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateFinetunedModelResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateFinetunedModelResponse.g.verified.cs new file mode 100644 index 0000000000..fe872a4223 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.CreateFinetunedModelResponse.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateFinetunedModelResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// Response to request to create a fine-tuned model. + /// + public sealed partial class CreateFinetunedModelResponse + { + /// + /// This resource represents a fine-tuned model. + /// + [global::Newtonsoft.Json.JsonProperty("finetuned_model")] + public global::G.FinetunedModel? FinetunedModel { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Dataset.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Dataset.g.verified.cs new file mode 100644 index 0000000000..e5de66b2ce --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Dataset.g.verified.cs @@ -0,0 +1,102 @@ +//HintName: G.Models.Dataset.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Dataset + { + /// + /// The dataset ID + /// + [global::Newtonsoft.Json.JsonProperty("id", Required = global::Newtonsoft.Json.Required.Always)] + public string Id { get; set; } = default!; + + /// + /// The name of the dataset + /// + [global::Newtonsoft.Json.JsonProperty("name", Required = global::Newtonsoft.Json.Required.Always)] + public string Name { get; set; } = default!; + + /// + /// The creation date + /// + [global::Newtonsoft.Json.JsonProperty("created_at", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.DateTime CreatedAt { get; set; } = default!; + + /// + /// The last update date + /// + [global::Newtonsoft.Json.JsonProperty("updated_at", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.DateTime UpdatedAt { get; set; } = default!; + + /// + /// The type of the dataset + /// + [global::Newtonsoft.Json.JsonProperty("dataset_type", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.DatasetType DatasetType { get; set; } = default!; + + /// + /// The validation status of the dataset + /// + [global::Newtonsoft.Json.JsonProperty("validation_status", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.DatasetValidationStatus ValidationStatus { get; set; } = default!; + + /// + /// Errors found during validation + /// + [global::Newtonsoft.Json.JsonProperty("validation_error")] + public string? ValidationError { get; set; } + + /// + /// the avro schema of the dataset + /// + [global::Newtonsoft.Json.JsonProperty("schema")] + public string? Schema { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("required_fields")] + public global::System.Collections.Generic.IList? RequiredFields { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("preserve_fields")] + public global::System.Collections.Generic.IList? PreserveFields { get; set; } + + /// + /// the underlying files that make up the dataset + /// + [global::Newtonsoft.Json.JsonProperty("dataset_parts")] + public global::System.Collections.Generic.IList? DatasetParts { get; set; } + + /// + /// warnings found during validation + /// + [global::Newtonsoft.Json.JsonProperty("validation_warnings")] + public global::System.Collections.Generic.IList? ValidationWarnings { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("parse_info")] + public global::G.ParseInfo? ParseInfo { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("metrics")] + public global::G.Metrics? Metrics { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DatasetPart.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DatasetPart.g.verified.cs new file mode 100644 index 0000000000..9204cd6b13 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DatasetPart.g.verified.cs @@ -0,0 +1,66 @@ +//HintName: G.Models.DatasetPart.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DatasetPart + { + /// + /// The dataset part ID + /// + [global::Newtonsoft.Json.JsonProperty("id", Required = global::Newtonsoft.Json.Required.Always)] + public string Id { get; set; } = default!; + + /// + /// The name of the dataset part + /// + [global::Newtonsoft.Json.JsonProperty("name", Required = global::Newtonsoft.Json.Required.Always)] + public string Name { get; set; } = default!; + + /// + /// The download url of the file + /// + [global::Newtonsoft.Json.JsonProperty("url")] + public string? Url { get; set; } + + /// + /// The index of the file + /// + [global::Newtonsoft.Json.JsonProperty("index")] + public int Index { get; set; } + + /// + /// The size of the file in bytes + /// + [global::Newtonsoft.Json.JsonProperty("size_bytes")] + public int SizeBytes { get; set; } + + /// + /// The number of rows in the file + /// + [global::Newtonsoft.Json.JsonProperty("num_rows")] + public int NumRows { get; set; } + + /// + /// The download url of the original file + /// + [global::Newtonsoft.Json.JsonProperty("original_url")] + public string? OriginalUrl { get; set; } + + /// + /// The first few rows of the parsed file + /// + [global::Newtonsoft.Json.JsonProperty("samples")] + public global::System.Collections.Generic.IList? Samples { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DatasetType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DatasetType.g.verified.cs new file mode 100644 index 0000000000..23c62fb075 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DatasetType.g.verified.cs @@ -0,0 +1,97 @@ +//HintName: G.Models.DatasetType.g.cs + +#nullable enable + +namespace G +{ + /// + /// The type of the dataset + /// + [global::System.Runtime.Serialization.DataContract] + public enum DatasetType + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="embed-input")] + EmbedInput, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="embed-result")] + EmbedResult, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="cluster-result")] + ClusterResult, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="cluster-outliers")] + ClusterOutliers, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="reranker-finetune-input")] + RerankerFinetuneInput, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="single-label-classification-finetune-input")] + SingleLabelClassificationFinetuneInput, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="chat-finetune-input")] + ChatFinetuneInput, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="multi-label-classification-finetune-input")] + MultiLabelClassificationFinetuneInput, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class DatasetTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this DatasetType value) + { + return value switch + { + DatasetType.EmbedInput => "embed-input", + DatasetType.EmbedResult => "embed-result", + DatasetType.ClusterResult => "cluster-result", + DatasetType.ClusterOutliers => "cluster-outliers", + DatasetType.RerankerFinetuneInput => "reranker-finetune-input", + DatasetType.SingleLabelClassificationFinetuneInput => "single-label-classification-finetune-input", + DatasetType.ChatFinetuneInput => "chat-finetune-input", + DatasetType.MultiLabelClassificationFinetuneInput => "multi-label-classification-finetune-input", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static DatasetType? ToEnum(string value) + { + return value switch + { + "embed-input" => DatasetType.EmbedInput, + "embed-result" => DatasetType.EmbedResult, + "cluster-result" => DatasetType.ClusterResult, + "cluster-outliers" => DatasetType.ClusterOutliers, + "reranker-finetune-input" => DatasetType.RerankerFinetuneInput, + "single-label-classification-finetune-input" => DatasetType.SingleLabelClassificationFinetuneInput, + "chat-finetune-input" => DatasetType.ChatFinetuneInput, + "multi-label-classification-finetune-input" => DatasetType.MultiLabelClassificationFinetuneInput, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DatasetValidationStatus.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DatasetValidationStatus.g.verified.cs new file mode 100644 index 0000000000..5bf62d031b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DatasetValidationStatus.g.verified.cs @@ -0,0 +1,83 @@ +//HintName: G.Models.DatasetValidationStatus.g.cs + +#nullable enable + +namespace G +{ + /// + /// The validation status of the dataset + /// + [global::System.Runtime.Serialization.DataContract] + public enum DatasetValidationStatus + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="unknown")] + Unknown, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="queued")] + Queued, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="processing")] + Processing, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="failed")] + Failed, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="validated")] + Validated, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="skipped")] + Skipped, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class DatasetValidationStatusExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this DatasetValidationStatus value) + { + return value switch + { + DatasetValidationStatus.Unknown => "unknown", + DatasetValidationStatus.Queued => "queued", + DatasetValidationStatus.Processing => "processing", + DatasetValidationStatus.Failed => "failed", + DatasetValidationStatus.Validated => "validated", + DatasetValidationStatus.Skipped => "skipped", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static DatasetValidationStatus? ToEnum(string value) + { + return value switch + { + "unknown" => DatasetValidationStatus.Unknown, + "queued" => DatasetValidationStatus.Queued, + "processing" => DatasetValidationStatus.Processing, + "failed" => DatasetValidationStatus.Failed, + "validated" => DatasetValidationStatus.Validated, + "skipped" => DatasetValidationStatus.Skipped, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse.g.verified.cs new file mode 100644 index 0000000000..72b09bc4b4 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.DeleteConnectorResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteConnectorResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse10.g.verified.cs new file mode 100644 index 0000000000..fada2cbf83 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteConnectorResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteConnectorResponse10 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse11.g.verified.cs new file mode 100644 index 0000000000..7b0816d6fb --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteConnectorResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteConnectorResponse11 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse12.g.verified.cs new file mode 100644 index 0000000000..ace73dbe1f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteConnectorResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteConnectorResponse12 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse13.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse13.g.verified.cs new file mode 100644 index 0000000000..3cb28a385c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse13.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteConnectorResponse13.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteConnectorResponse13 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse2.g.verified.cs new file mode 100644 index 0000000000..0e1cb4f67f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteConnectorResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteConnectorResponse2 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse3.g.verified.cs new file mode 100644 index 0000000000..4917b8da20 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteConnectorResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteConnectorResponse3 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse4.g.verified.cs new file mode 100644 index 0000000000..a623704314 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteConnectorResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteConnectorResponse4 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse5.g.verified.cs new file mode 100644 index 0000000000..a3a8b9644c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteConnectorResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteConnectorResponse5 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse6.g.verified.cs new file mode 100644 index 0000000000..eb1f221d63 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteConnectorResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteConnectorResponse6 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse7.g.verified.cs new file mode 100644 index 0000000000..ea75d62b04 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteConnectorResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteConnectorResponse7 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse8.g.verified.cs new file mode 100644 index 0000000000..2717b1e8da --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteConnectorResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteConnectorResponse8 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse9.g.verified.cs new file mode 100644 index 0000000000..5f8b9a3ccd --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteConnectorResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteConnectorResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteConnectorResponse9 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse.g.verified.cs new file mode 100644 index 0000000000..c4025c8dc3 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.DeleteDatasetResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteDatasetResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse10.g.verified.cs new file mode 100644 index 0000000000..080e232c4a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteDatasetResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteDatasetResponse10 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse11.g.verified.cs new file mode 100644 index 0000000000..dd26363af8 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteDatasetResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteDatasetResponse11 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse12.g.verified.cs new file mode 100644 index 0000000000..0679389aa9 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteDatasetResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteDatasetResponse12 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse13.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse13.g.verified.cs new file mode 100644 index 0000000000..2d8a2ee9f7 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse13.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteDatasetResponse13.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteDatasetResponse13 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse2.g.verified.cs new file mode 100644 index 0000000000..f3fc3f1825 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteDatasetResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteDatasetResponse2 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse3.g.verified.cs new file mode 100644 index 0000000000..e7df71f51a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteDatasetResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteDatasetResponse3 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse4.g.verified.cs new file mode 100644 index 0000000000..2c21028213 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteDatasetResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteDatasetResponse4 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse5.g.verified.cs new file mode 100644 index 0000000000..18d419e25f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteDatasetResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteDatasetResponse5 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse6.g.verified.cs new file mode 100644 index 0000000000..738a9e3f10 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteDatasetResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteDatasetResponse6 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse7.g.verified.cs new file mode 100644 index 0000000000..d9929630bc --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteDatasetResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteDatasetResponse7 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse8.g.verified.cs new file mode 100644 index 0000000000..74a1740430 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteDatasetResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteDatasetResponse8 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse9.g.verified.cs new file mode 100644 index 0000000000..da3c24056a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteDatasetResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteDatasetResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteDatasetResponse9 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteFinetunedModelResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteFinetunedModelResponse.g.verified.cs new file mode 100644 index 0000000000..a8e2fb2c96 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DeleteFinetunedModelResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.DeleteFinetunedModelResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// Response to request to delete a fine-tuned model. + /// + public sealed partial class DeleteFinetunedModelResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeRequest.g.verified.cs new file mode 100644 index 0000000000..e0fc30efd4 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeRequest.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.DetokenizeRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DetokenizeRequest + { + /// + /// The list of tokens to be detokenized. + /// + [global::Newtonsoft.Json.JsonProperty("tokens", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList Tokens { get; set; } = default!; + + /// + /// An optional parameter to provide the model name. This will ensure that the detokenization is done by the tokenizer used by that model. + /// + [global::Newtonsoft.Json.JsonProperty("model", Required = global::Newtonsoft.Json.Required.Always)] + public string Model { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse.g.verified.cs new file mode 100644 index 0000000000..2e0cd2b446 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.DetokenizeResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DetokenizeResponse + { + /// + /// A string representing the list of tokens. + /// + [global::Newtonsoft.Json.JsonProperty("text", Required = global::Newtonsoft.Json.Required.Always)] + public string Text { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("meta")] + public global::G.ApiMeta? Meta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse10.g.verified.cs new file mode 100644 index 0000000000..7e3f54f8a2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DetokenizeResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DetokenizeResponse10 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse11.g.verified.cs new file mode 100644 index 0000000000..44c31e307c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DetokenizeResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DetokenizeResponse11 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse12.g.verified.cs new file mode 100644 index 0000000000..3eeb91c51c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DetokenizeResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DetokenizeResponse12 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse13.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse13.g.verified.cs new file mode 100644 index 0000000000..fde754734d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse13.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DetokenizeResponse13.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DetokenizeResponse13 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse2.g.verified.cs new file mode 100644 index 0000000000..47f6fcbe3a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DetokenizeResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DetokenizeResponse2 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse3.g.verified.cs new file mode 100644 index 0000000000..818bc326ca --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DetokenizeResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DetokenizeResponse3 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse4.g.verified.cs new file mode 100644 index 0000000000..bc744cac72 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DetokenizeResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DetokenizeResponse4 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse5.g.verified.cs new file mode 100644 index 0000000000..6541c06194 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DetokenizeResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DetokenizeResponse5 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse6.g.verified.cs new file mode 100644 index 0000000000..3226e18ad8 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DetokenizeResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DetokenizeResponse6 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse7.g.verified.cs new file mode 100644 index 0000000000..b5ade4141b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DetokenizeResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DetokenizeResponse7 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse8.g.verified.cs new file mode 100644 index 0000000000..1111a27f4d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DetokenizeResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DetokenizeResponse8 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse9.g.verified.cs new file mode 100644 index 0000000000..8e4f8594ca --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DetokenizeResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DetokenizeResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DetokenizeResponse9 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DocumentSource.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DocumentSource.g.verified.cs new file mode 100644 index 0000000000..ced7da4a87 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DocumentSource.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.DocumentSource.g.cs + +#nullable enable + +namespace G +{ + /// + /// A document source object containing the unique identifier of the document and the document itself. + /// + public sealed partial class DocumentSource + { + /// + /// The unique identifier of the document + /// + [global::Newtonsoft.Json.JsonProperty("id")] + public string? Id { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("document")] + public global::G.DocumentSourceDocument? Document { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DocumentSourceDocument.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DocumentSourceDocument.g.verified.cs new file mode 100644 index 0000000000..8386770b41 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.DocumentSourceDocument.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.DocumentSourceDocument.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DocumentSourceDocument + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedByTypeResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedByTypeResponse.g.verified.cs new file mode 100644 index 0000000000..5d08637202 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedByTypeResponse.g.verified.cs @@ -0,0 +1,48 @@ +//HintName: G.Models.EmbedByTypeResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class EmbedByTypeResponse + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("response_type")] + public global::G.EmbedByTypeResponseResponseType? ResponseType { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("id", Required = global::Newtonsoft.Json.Required.Always)] + public string Id { get; set; } = default!; + + /// + /// An object with different embedding types. The length of each embedding type array will be the same as the length of the original `texts` array. + /// + [global::Newtonsoft.Json.JsonProperty("embeddings", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.EmbedByTypeResponseEmbeddings Embeddings { get; set; } = default!; + + /// + /// The text entries for which embeddings were returned. + /// + [global::Newtonsoft.Json.JsonProperty("texts", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList Texts { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("meta")] + public global::G.ApiMeta? Meta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedByTypeResponseEmbeddings.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedByTypeResponseEmbeddings.g.verified.cs new file mode 100644 index 0000000000..f62c9c8f75 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedByTypeResponseEmbeddings.g.verified.cs @@ -0,0 +1,48 @@ +//HintName: G.Models.EmbedByTypeResponseEmbeddings.g.cs + +#nullable enable + +namespace G +{ + /// + /// An object with different embedding types. The length of each embedding type array will be the same as the length of the original `texts` array. + /// + public sealed partial class EmbedByTypeResponseEmbeddings + { + /// + /// An array of float embeddings. + /// + [global::Newtonsoft.Json.JsonProperty("float")] + public global::System.Collections.Generic.IList>? Float { get; set; } + + /// + /// An array of signed int8 embeddings. Each value is between -128 and 127. + /// + [global::Newtonsoft.Json.JsonProperty("int8")] + public global::System.Collections.Generic.IList>? Int8 { get; set; } + + /// + /// An array of unsigned int8 embeddings. Each value is between 0 and 255. + /// + [global::Newtonsoft.Json.JsonProperty("uint8")] + public global::System.Collections.Generic.IList>? Uint8 { get; set; } + + /// + /// An array of packed signed binary embeddings. The length of each binary embedding is 1/8 the length of the float embeddings of the provided model. Each value is between -128 and 127. + /// + [global::Newtonsoft.Json.JsonProperty("binary")] + public global::System.Collections.Generic.IList>? Binary { get; set; } + + /// + /// An array of packed unsigned binary embeddings. The length of each binary embedding is 1/8 the length of the float embeddings of the provided model. Each value is between 0 and 255. + /// + [global::Newtonsoft.Json.JsonProperty("ubinary")] + public global::System.Collections.Generic.IList>? Ubinary { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedByTypeResponseResponseType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedByTypeResponseResponseType.g.verified.cs new file mode 100644 index 0000000000..e72d35e2b2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedByTypeResponseResponseType.g.verified.cs @@ -0,0 +1,55 @@ +//HintName: G.Models.EmbedByTypeResponseResponseType.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + [global::System.Runtime.Serialization.DataContract] + public enum EmbedByTypeResponseResponseType + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="embeddings_floats")] + EmbeddingsFloats, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="embeddings_by_type")] + EmbeddingsByType, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class EmbedByTypeResponseResponseTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this EmbedByTypeResponseResponseType value) + { + return value switch + { + EmbedByTypeResponseResponseType.EmbeddingsFloats => "embeddings_floats", + EmbedByTypeResponseResponseType.EmbeddingsByType => "embeddings_by_type", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static EmbedByTypeResponseResponseType? ToEnum(string value) + { + return value switch + { + "embeddings_floats" => EmbedByTypeResponseResponseType.EmbeddingsFloats, + "embeddings_by_type" => EmbedByTypeResponseResponseType.EmbeddingsByType, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedFloatsResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedFloatsResponse.g.verified.cs new file mode 100644 index 0000000000..b3a39ce216 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedFloatsResponse.g.verified.cs @@ -0,0 +1,48 @@ +//HintName: G.Models.EmbedFloatsResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class EmbedFloatsResponse + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("response_type")] + public global::G.EmbedFloatsResponseResponseType? ResponseType { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("id", Required = global::Newtonsoft.Json.Required.Always)] + public string Id { get; set; } = default!; + + /// + /// An array of embeddings, where each embedding is an array of floats. The length of the `embeddings` array will be the same as the length of the original `texts` array. + /// + [global::Newtonsoft.Json.JsonProperty("embeddings", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList> Embeddings { get; set; } = default!; + + /// + /// The text entries for which embeddings were returned. + /// + [global::Newtonsoft.Json.JsonProperty("texts", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList Texts { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("meta")] + public global::G.ApiMeta? Meta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedFloatsResponseResponseType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedFloatsResponseResponseType.g.verified.cs new file mode 100644 index 0000000000..aa64c07eeb --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedFloatsResponseResponseType.g.verified.cs @@ -0,0 +1,55 @@ +//HintName: G.Models.EmbedFloatsResponseResponseType.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + [global::System.Runtime.Serialization.DataContract] + public enum EmbedFloatsResponseResponseType + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="embeddings_floats")] + EmbeddingsFloats, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="embeddings_by_type")] + EmbeddingsByType, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class EmbedFloatsResponseResponseTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this EmbedFloatsResponseResponseType value) + { + return value switch + { + EmbedFloatsResponseResponseType.EmbeddingsFloats => "embeddings_floats", + EmbedFloatsResponseResponseType.EmbeddingsByType => "embeddings_by_type", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static EmbedFloatsResponseResponseType? ToEnum(string value) + { + return value switch + { + "embeddings_floats" => EmbedFloatsResponseResponseType.EmbeddingsFloats, + "embeddings_by_type" => EmbedFloatsResponseResponseType.EmbeddingsByType, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedInputType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedInputType.g.verified.cs new file mode 100644 index 0000000000..aed76e687b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedInputType.g.verified.cs @@ -0,0 +1,73 @@ +//HintName: G.Models.EmbedInputType.g.cs + +#nullable enable + +namespace G +{ + /// + /// Specifies the type of input passed to the model. Required for embedding models v3 and higher.
+ /// - `"search_document"`: Used for embeddings stored in a vector database for search use-cases.
+ /// - `"search_query"`: Used for embeddings of search queries run against a vector DB to find relevant documents.
+ /// - `"classification"`: Used for embeddings passed through a text classifier.
+ /// - `"clustering"`: Used for the embeddings run through a clustering algorithm. + ///
+ [global::System.Runtime.Serialization.DataContract] + public enum EmbedInputType + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="search_document")] + SearchDocument, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="search_query")] + SearchQuery, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="classification")] + Classification, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="clustering")] + Clustering, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class EmbedInputTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this EmbedInputType value) + { + return value switch + { + EmbedInputType.SearchDocument => "search_document", + EmbedInputType.SearchQuery => "search_query", + EmbedInputType.Classification => "classification", + EmbedInputType.Clustering => "clustering", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static EmbedInputType? ToEnum(string value) + { + return value switch + { + "search_document" => EmbedInputType.SearchDocument, + "search_query" => EmbedInputType.SearchQuery, + "classification" => EmbedInputType.Classification, + "clustering" => EmbedInputType.Clustering, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedJob.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedJob.g.verified.cs new file mode 100644 index 0000000000..5f84aa23c1 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedJob.g.verified.cs @@ -0,0 +1,72 @@ +//HintName: G.Models.EmbedJob.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class EmbedJob + { + /// + /// ID of the embed job + /// + [global::Newtonsoft.Json.JsonProperty("job_id", Required = global::Newtonsoft.Json.Required.Always)] + public string JobId { get; set; } = default!; + + /// + /// The name of the embed job + /// + [global::Newtonsoft.Json.JsonProperty("name")] + public string? Name { get; set; } + + /// + /// The status of the embed job + /// + [global::Newtonsoft.Json.JsonProperty("status", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.EmbedJobStatus Status { get; set; } = default!; + + /// + /// The creation date of the embed job + /// + [global::Newtonsoft.Json.JsonProperty("created_at", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.DateTime CreatedAt { get; set; } = default!; + + /// + /// ID of the input dataset + /// + [global::Newtonsoft.Json.JsonProperty("input_dataset_id", Required = global::Newtonsoft.Json.Required.Always)] + public string InputDatasetId { get; set; } = default!; + + /// + /// ID of the resulting output dataset + /// + [global::Newtonsoft.Json.JsonProperty("output_dataset_id")] + public string? OutputDatasetId { get; set; } + + /// + /// ID of the model used to embed + /// + [global::Newtonsoft.Json.JsonProperty("model", Required = global::Newtonsoft.Json.Required.Always)] + public string Model { get; set; } = default!; + + /// + /// The truncation option used + /// + [global::Newtonsoft.Json.JsonProperty("truncate", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.EmbedJobTruncate Truncate { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("meta")] + public global::G.ApiMeta? Meta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedJobStatus.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedJobStatus.g.verified.cs new file mode 100644 index 0000000000..0c74543b25 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedJobStatus.g.verified.cs @@ -0,0 +1,76 @@ +//HintName: G.Models.EmbedJobStatus.g.cs + +#nullable enable + +namespace G +{ + /// + /// The status of the embed job + /// + [global::System.Runtime.Serialization.DataContract] + public enum EmbedJobStatus + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="processing")] + Processing, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="complete")] + Complete, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="cancelling")] + Cancelling, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="cancelled")] + Cancelled, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="failed")] + Failed, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class EmbedJobStatusExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this EmbedJobStatus value) + { + return value switch + { + EmbedJobStatus.Processing => "processing", + EmbedJobStatus.Complete => "complete", + EmbedJobStatus.Cancelling => "cancelling", + EmbedJobStatus.Cancelled => "cancelled", + EmbedJobStatus.Failed => "failed", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static EmbedJobStatus? ToEnum(string value) + { + return value switch + { + "processing" => EmbedJobStatus.Processing, + "complete" => EmbedJobStatus.Complete, + "cancelling" => EmbedJobStatus.Cancelling, + "cancelled" => EmbedJobStatus.Cancelled, + "failed" => EmbedJobStatus.Failed, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedJobTruncate.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedJobTruncate.g.verified.cs new file mode 100644 index 0000000000..e689372c11 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedJobTruncate.g.verified.cs @@ -0,0 +1,55 @@ +//HintName: G.Models.EmbedJobTruncate.g.cs + +#nullable enable + +namespace G +{ + /// + /// The truncation option used + /// + [global::System.Runtime.Serialization.DataContract] + public enum EmbedJobTruncate + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="START")] + START, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="END")] + END, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class EmbedJobTruncateExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this EmbedJobTruncate value) + { + return value switch + { + EmbedJobTruncate.START => "START", + EmbedJobTruncate.END => "END", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static EmbedJobTruncate? ToEnum(string value) + { + return value switch + { + "START" => EmbedJobTruncate.START, + "END" => EmbedJobTruncate.END, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedRequest.g.verified.cs new file mode 100644 index 0000000000..13a2c3b061 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedRequest.g.verified.cs @@ -0,0 +1,69 @@ +//HintName: G.Models.EmbedRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class EmbedRequest + { + /// + /// An array of strings for the model to embed. Maximum number of texts per call is `96`. We recommend reducing the length of each text to be under `512` tokens for optimal quality. + /// + [global::Newtonsoft.Json.JsonProperty("texts", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList Texts { get; set; } = default!; + + /// + /// Defaults to embed-english-v2.0
+ /// The identifier of the model. Smaller "light" models are faster, while larger models will perform better. [Custom models](/docs/training-custom-models) can also be supplied with their full ID.
+ /// Available models and corresponding embedding dimensions:
+ /// * `embed-english-v3.0` 1024
+ /// * `embed-multilingual-v3.0` 1024
+ /// * `embed-english-light-v3.0` 384
+ /// * `embed-multilingual-light-v3.0` 384
+ /// * `embed-english-v2.0` 4096
+ /// * `embed-english-light-v2.0` 1024
+ /// * `embed-multilingual-v2.0` 768 + ///
+ [global::Newtonsoft.Json.JsonProperty("model")] + public string? Model { get; set; } + + /// + /// Specifies the type of input passed to the model. Required for embedding models v3 and higher.
+ /// - `"search_document"`: Used for embeddings stored in a vector database for search use-cases.
+ /// - `"search_query"`: Used for embeddings of search queries run against a vector DB to find relevant documents.
+ /// - `"classification"`: Used for embeddings passed through a text classifier.
+ /// - `"clustering"`: Used for the embeddings run through a clustering algorithm. + ///
+ [global::Newtonsoft.Json.JsonProperty("input_type")] + public global::G.EmbedInputType? InputType { get; set; } + + /// + /// Specifies the types of embeddings you want to get back. Not required and default is None, which returns the Embed Floats response type. Can be one or more of the following types.
+ /// * `"float"`: Use this when you want to get back the default float embeddings. Valid for all models.
+ /// * `"int8"`: Use this when you want to get back signed int8 embeddings. Valid for only v3 models.
+ /// * `"uint8"`: Use this when you want to get back unsigned int8 embeddings. Valid for only v3 models.
+ /// * `"binary"`: Use this when you want to get back signed binary embeddings. Valid for only v3 models.
+ /// * `"ubinary"`: Use this when you want to get back unsigned binary embeddings. Valid for only v3 models. + ///
+ [global::Newtonsoft.Json.JsonProperty("embedding_types")] + public global::System.Collections.Generic.IList? EmbeddingTypes { get; set; } + + /// + /// One of `NONE|START|END` to specify how the API will handle inputs longer than the maximum token length.
+ /// Passing `START` will discard the start of the input. `END` will discard the end of the input. In both cases, input is discarded until the remaining input is exactly the maximum input token length for the model.
+ /// If `NONE` is selected, when the input exceeds the maximum input token length an error will be returned.
+ /// Default Value: END + ///
+ [global::Newtonsoft.Json.JsonProperty("truncate")] + public global::G.EmbedRequestTruncate? Truncate { get; set; } = global::G.EmbedRequestTruncate.END; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedRequestTruncate.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedRequestTruncate.g.verified.cs new file mode 100644 index 0000000000..b7936fe6c0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedRequestTruncate.g.verified.cs @@ -0,0 +1,65 @@ +//HintName: G.Models.EmbedRequestTruncate.g.cs + +#nullable enable + +namespace G +{ + /// + /// One of `NONE|START|END` to specify how the API will handle inputs longer than the maximum token length.
+ /// Passing `START` will discard the start of the input. `END` will discard the end of the input. In both cases, input is discarded until the remaining input is exactly the maximum input token length for the model.
+ /// If `NONE` is selected, when the input exceeds the maximum input token length an error will be returned.
+ /// Default Value: END + ///
+ [global::System.Runtime.Serialization.DataContract] + public enum EmbedRequestTruncate + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="NONE")] + NONE, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="START")] + START, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="END")] + END, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class EmbedRequestTruncateExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this EmbedRequestTruncate value) + { + return value switch + { + EmbedRequestTruncate.NONE => "NONE", + EmbedRequestTruncate.START => "START", + EmbedRequestTruncate.END => "END", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static EmbedRequestTruncate? ToEnum(string value) + { + return value switch + { + "NONE" => EmbedRequestTruncate.NONE, + "START" => EmbedRequestTruncate.START, + "END" => EmbedRequestTruncate.END, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse10.g.verified.cs new file mode 100644 index 0000000000..0f388b5e14 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.EmbedResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class EmbedResponse10 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse11.g.verified.cs new file mode 100644 index 0000000000..d1ba95a4bb --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.EmbedResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class EmbedResponse11 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse12.g.verified.cs new file mode 100644 index 0000000000..4539d70139 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.EmbedResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class EmbedResponse12 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse13.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse13.g.verified.cs new file mode 100644 index 0000000000..c9461e426b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse13.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.EmbedResponse13.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class EmbedResponse13 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse2.g.verified.cs new file mode 100644 index 0000000000..013213663f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.EmbedResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class EmbedResponse2 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse3.g.verified.cs new file mode 100644 index 0000000000..4b81aa5170 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.EmbedResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class EmbedResponse3 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse4.g.verified.cs new file mode 100644 index 0000000000..cbcb93f111 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.EmbedResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class EmbedResponse4 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse5.g.verified.cs new file mode 100644 index 0000000000..b44b3b2677 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.EmbedResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class EmbedResponse5 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse6.g.verified.cs new file mode 100644 index 0000000000..5f6f7e80f6 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.EmbedResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class EmbedResponse6 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse7.g.verified.cs new file mode 100644 index 0000000000..e9bd9d17a0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.EmbedResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class EmbedResponse7 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse8.g.verified.cs new file mode 100644 index 0000000000..1a0508868d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.EmbedResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class EmbedResponse8 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse9.g.verified.cs new file mode 100644 index 0000000000..a8375be0a2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbedResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.EmbedResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class EmbedResponse9 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbeddingType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbeddingType.g.verified.cs new file mode 100644 index 0000000000..5c10b61b7c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.EmbeddingType.g.verified.cs @@ -0,0 +1,76 @@ +//HintName: G.Models.EmbeddingType.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + [global::System.Runtime.Serialization.DataContract] + public enum EmbeddingType + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="float")] + Float, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="int8")] + Int8, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="uint8")] + Uint8, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="binary")] + Binary, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="ubinary")] + Ubinary, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class EmbeddingTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this EmbeddingType value) + { + return value switch + { + EmbeddingType.Float => "float", + EmbeddingType.Int8 => "int8", + EmbeddingType.Uint8 => "uint8", + EmbeddingType.Binary => "binary", + EmbeddingType.Ubinary => "ubinary", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static EmbeddingType? ToEnum(string value) + { + return value switch + { + "float" => EmbeddingType.Float, + "int8" => EmbeddingType.Int8, + "uint8" => EmbeddingType.Uint8, + "binary" => EmbeddingType.Binary, + "ubinary" => EmbeddingType.Ubinary, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Error.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Error.g.verified.cs new file mode 100644 index 0000000000..245aaa44da --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Error.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.Error.g.cs + +#nullable enable + +namespace G +{ + /// + /// Error is the response for any unsuccessful event. + /// + public sealed partial class Error + { + /// + /// A developer-facing error message. + /// + [global::Newtonsoft.Json.JsonProperty("message")] + public string? Message { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Event.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Event.g.verified.cs new file mode 100644 index 0000000000..b99dac47ac --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Event.g.verified.cs @@ -0,0 +1,46 @@ +//HintName: G.Models.Event.g.cs + +#nullable enable + +namespace G +{ + /// + /// A change in status of a fine-tuned model. + /// + public sealed partial class Event + { + /// + /// ID of the user who initiated the event. Empty if initiated by the system. + /// + [global::Newtonsoft.Json.JsonProperty("user_id")] + public string? UserId { get; set; } + + /// + /// The possible stages of a fine-tuned model life-cycle.
+ /// - STATUS_UNSPECIFIED: Unspecified status.
+ /// - STATUS_FINETUNING: The fine-tuned model is being fine-tuned.
+ /// - STATUS_DEPLOYING_API: The fine-tuned model is being deployed.
+ /// - STATUS_READY: The fine-tuned model is ready to receive requests.
+ /// - STATUS_FAILED: The fine-tuned model failed.
+ /// - STATUS_DELETED: The fine-tuned model was deleted.
+ /// - STATUS_TEMPORARILY_OFFLINE: The fine-tuned model is temporarily unavailable.
+ /// - STATUS_PAUSED: The fine-tuned model is paused (Vanilla only).
+ /// - STATUS_QUEUED: The fine-tuned model is queued for training.
+ /// Default Value: STATUS_UNSPECIFIED + ///
+ [global::Newtonsoft.Json.JsonProperty("status")] + public global::G.Status? Status { get; set; } = global::G.Status.STATUSUNSPECIFIED; + + /// + /// Timestamp when the event happened. + /// + [global::Newtonsoft.Json.JsonProperty("created_at")] + public global::System.DateTime CreatedAt { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.FinetuneDatasetMetrics.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.FinetuneDatasetMetrics.g.verified.cs new file mode 100644 index 0000000000..54a8d43398 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.FinetuneDatasetMetrics.g.verified.cs @@ -0,0 +1,72 @@ +//HintName: G.Models.FinetuneDatasetMetrics.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class FinetuneDatasetMetrics + { + /// + /// The number of tokens of valid examples that can be used for training. + /// + [global::Newtonsoft.Json.JsonProperty("trainable_token_count")] + public double TrainableTokenCount { get; set; } + + /// + /// The overall number of examples. + /// + [global::Newtonsoft.Json.JsonProperty("total_examples")] + public double TotalExamples { get; set; } + + /// + /// The number of training examples. + /// + [global::Newtonsoft.Json.JsonProperty("train_examples")] + public double TrainExamples { get; set; } + + /// + /// The size in bytes of all training examples. + /// + [global::Newtonsoft.Json.JsonProperty("train_size_bytes")] + public double TrainSizeBytes { get; set; } + + /// + /// Number of evaluation examples. + /// + [global::Newtonsoft.Json.JsonProperty("eval_examples")] + public double EvalExamples { get; set; } + + /// + /// The size in bytes of all eval examples. + /// + [global::Newtonsoft.Json.JsonProperty("eval_size_bytes")] + public double EvalSizeBytes { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("reranker_data_metrics")] + public global::G.RerankerDataMetrics? RerankerDataMetrics { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("chat_data_metrics")] + public global::G.ChatDataMetrics? ChatDataMetrics { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("classify_data_metrics")] + public global::G.ClassifyDataMetrics? ClassifyDataMetrics { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.FinetunedModel.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.FinetunedModel.g.verified.cs new file mode 100644 index 0000000000..620c0d77c3 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.FinetunedModel.g.verified.cs @@ -0,0 +1,88 @@ +//HintName: G.Models.FinetunedModel.g.cs + +#nullable enable + +namespace G +{ + /// + /// This resource represents a fine-tuned model. + /// + public sealed partial class FinetunedModel + { + /// + /// read-only. FinetunedModel ID. + /// + [global::Newtonsoft.Json.JsonProperty("id")] + public string? Id { get; set; } + + /// + /// FinetunedModel name (e.g. `foobar`). + /// + [global::Newtonsoft.Json.JsonProperty("name", Required = global::Newtonsoft.Json.Required.Always)] + public string Name { get; set; } = default!; + + /// + /// read-only. User ID of the creator. + /// + [global::Newtonsoft.Json.JsonProperty("creator_id")] + public string? CreatorId { get; set; } + + /// + /// read-only. Organization ID. + /// + [global::Newtonsoft.Json.JsonProperty("organization_id")] + public string? OrganizationId { get; set; } + + /// + /// The configuration used for fine-tuning. + /// + [global::Newtonsoft.Json.JsonProperty("settings", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.Settings Settings { get; set; } = default!; + + /// + /// The possible stages of a fine-tuned model life-cycle.
+ /// - STATUS_UNSPECIFIED: Unspecified status.
+ /// - STATUS_FINETUNING: The fine-tuned model is being fine-tuned.
+ /// - STATUS_DEPLOYING_API: The fine-tuned model is being deployed.
+ /// - STATUS_READY: The fine-tuned model is ready to receive requests.
+ /// - STATUS_FAILED: The fine-tuned model failed.
+ /// - STATUS_DELETED: The fine-tuned model was deleted.
+ /// - STATUS_TEMPORARILY_OFFLINE: The fine-tuned model is temporarily unavailable.
+ /// - STATUS_PAUSED: The fine-tuned model is paused (Vanilla only).
+ /// - STATUS_QUEUED: The fine-tuned model is queued for training.
+ /// Default Value: STATUS_UNSPECIFIED + ///
+ [global::Newtonsoft.Json.JsonProperty("status")] + public global::G.Status? Status { get; set; } = global::G.Status.STATUSUNSPECIFIED; + + /// + /// read-only. Creation timestamp. + /// + [global::Newtonsoft.Json.JsonProperty("created_at")] + public global::System.DateTime CreatedAt { get; set; } + + /// + /// read-only. Latest update timestamp. + /// + [global::Newtonsoft.Json.JsonProperty("updated_at")] + public global::System.DateTime UpdatedAt { get; set; } + + /// + /// read-only. Timestamp for the completed fine-tuning. + /// + [global::Newtonsoft.Json.JsonProperty("completed_at")] + public global::System.DateTime CompletedAt { get; set; } + + /// + /// read-only. Timestamp for the latest request to this fine-tuned model. + /// + [global::Newtonsoft.Json.JsonProperty("last_used")] + public global::System.DateTime LastUsed { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.FinishReason.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.FinishReason.g.verified.cs new file mode 100644 index 0000000000..4a35c69e7c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.FinishReason.g.verified.cs @@ -0,0 +1,90 @@ +//HintName: G.Models.FinishReason.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + [global::System.Runtime.Serialization.DataContract] + public enum FinishReason + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="COMPLETE")] + COMPLETE, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="STOP_SEQUENCE")] + STOPSEQUENCE, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="ERROR")] + ERROR, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="ERROR_TOXIC")] + ERRORTOXIC, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="ERROR_LIMIT")] + ERRORLIMIT, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="USER_CANCEL")] + USERCANCEL, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="MAX_TOKENS")] + MAXTOKENS, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class FinishReasonExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this FinishReason value) + { + return value switch + { + FinishReason.COMPLETE => "COMPLETE", + FinishReason.STOPSEQUENCE => "STOP_SEQUENCE", + FinishReason.ERROR => "ERROR", + FinishReason.ERRORTOXIC => "ERROR_TOXIC", + FinishReason.ERRORLIMIT => "ERROR_LIMIT", + FinishReason.USERCANCEL => "USER_CANCEL", + FinishReason.MAXTOKENS => "MAX_TOKENS", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static FinishReason? ToEnum(string value) + { + return value switch + { + "COMPLETE" => FinishReason.COMPLETE, + "STOP_SEQUENCE" => FinishReason.STOPSEQUENCE, + "ERROR" => FinishReason.ERROR, + "ERROR_TOXIC" => FinishReason.ERRORTOXIC, + "ERROR_LIMIT" => FinishReason.ERRORLIMIT, + "USER_CANCEL" => FinishReason.USERCANCEL, + "MAX_TOKENS" => FinishReason.MAXTOKENS, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateRequest.g.verified.cs new file mode 100644 index 0000000000..d3b3d315d6 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateRequest.g.verified.cs @@ -0,0 +1,148 @@ +//HintName: G.Models.GenerateRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateRequest + { + /// + /// The input text that serves as the starting point for generating the response.
+ /// Note: The prompt will be pre-processed and modified before reaching the model.
+ /// Example: Please explain to me how LLMs work + ///
+ [global::Newtonsoft.Json.JsonProperty("prompt", Required = global::Newtonsoft.Json.Required.Always)] + public string Prompt { get; set; } = default!; + + /// + /// The identifier of the model to generate with. Currently available models are `command` (default), `command-nightly` (experimental), `command-light`, and `command-light-nightly` (experimental).
+ /// Smaller, "light" models are faster, while larger models will perform better. [Custom models](/docs/training-custom-models) can also be supplied with their full ID. + ///
+ [global::Newtonsoft.Json.JsonProperty("model")] + public string? Model { get; set; } + + /// + /// The maximum number of generations that will be returned. Defaults to `1`, min value of `1`, max value of `5`. + /// + [global::Newtonsoft.Json.JsonProperty("num_generations")] + public int NumGenerations { get; set; } + + /// + /// When `true`, the response will be a JSON stream of events. Streaming is beneficial for user interfaces that render the contents of the response piece by piece, as it gets generated.
+ /// The final event will contain the complete response, and will contain an `is_finished` field set to `true`. The event will also contain a `finish_reason`, which can be one of the following:
+ /// - `COMPLETE` - the model sent back a finished reply
+ /// - `MAX_TOKENS` - the reply was cut off because the model reached the maximum number of tokens for its context length
+ /// - `ERROR` - something went wrong when generating the reply
+ /// - `ERROR_TOXIC` - the model generated a reply that was deemed toxic + ///
+ [global::Newtonsoft.Json.JsonProperty("stream")] + public bool Stream { get; set; } + + /// + /// The maximum number of tokens the model will generate as part of the response. Note: Setting a low value may result in incomplete generations.
+ /// This parameter is off by default, and if it's not specified, the model will continue generating until it emits an EOS completion token. See [BPE Tokens](/bpe-tokens-wiki) for more details.
+ /// Can only be set to `0` if `return_likelihoods` is set to `ALL` to get the likelihood of the prompt. + ///
+ [global::Newtonsoft.Json.JsonProperty("max_tokens")] + public int MaxTokens { get; set; } + + /// + /// One of `NONE|START|END` to specify how the API will handle inputs longer than the maximum token length.
+ /// Passing `START` will discard the start of the input. `END` will discard the end of the input. In both cases, input is discarded until the remaining input is exactly the maximum input token length for the model.
+ /// If `NONE` is selected, when the input exceeds the maximum input token length an error will be returned.
+ /// Default Value: END + ///
+ [global::Newtonsoft.Json.JsonProperty("truncate")] + public global::G.GenerateRequestTruncate? Truncate { get; set; } = global::G.GenerateRequestTruncate.END; + + /// + /// A non-negative float that tunes the degree of randomness in generation. Lower temperatures mean less random generations. See [Temperature](/temperature-wiki) for more details.
+ /// Defaults to `0.75`, min value of `0.0`, max value of `5.0`. + ///
+ [global::Newtonsoft.Json.JsonProperty("temperature")] + public double Temperature { get; set; } + + /// + /// If specified, the backend will make a best effort to sample tokens
+ /// deterministically, such that repeated requests with the same
+ /// seed and parameters should return the same result. However,
+ /// determinism cannot be totally guaranteed.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + ///
+ [global::Newtonsoft.Json.JsonProperty("seed")] + public int Seed { get; set; } + + /// + /// Identifier of a custom preset. A preset is a combination of parameters, such as prompt, temperature etc. You can create presets in the [playground](https://dashboard.cohere.com/playground/generate).
+ /// When a preset is specified, the `prompt` parameter becomes optional, and any included parameters will override the preset's parameters.
+ /// Example: my-preset-a58sbd + ///
+ [global::Newtonsoft.Json.JsonProperty("preset")] + public string? Preset { get; set; } + + /// + /// The generated text will be cut at the beginning of the earliest occurrence of an end sequence. The sequence will be excluded from the text. + /// + [global::Newtonsoft.Json.JsonProperty("end_sequences")] + public global::System.Collections.Generic.IList? EndSequences { get; set; } + + /// + /// The generated text will be cut at the end of the earliest occurrence of a stop sequence. The sequence will be included the text. + /// + [global::Newtonsoft.Json.JsonProperty("stop_sequences")] + public global::System.Collections.Generic.IList? StopSequences { get; set; } + + /// + /// Ensures only the top `k` most likely tokens are considered for generation at each step.
+ /// Defaults to `0`, min value of `0`, max value of `500`. + ///
+ [global::Newtonsoft.Json.JsonProperty("k")] + public int K { get; set; } + + /// + /// Ensures that only the most likely tokens, with total probability mass of `p`, are considered for generation at each step. If both `k` and `p` are enabled, `p` acts after `k`.
+ /// Defaults to `0.75`. min value of `0.01`, max value of `0.99`. + ///
+ [global::Newtonsoft.Json.JsonProperty("p")] + public double P { get; set; } + + /// + /// Used to reduce repetitiveness of generated tokens. The higher the value, the stronger a penalty is applied to previously present tokens, proportional to how many times they have already appeared in the prompt or prior generation.
+ /// Using `frequency_penalty` in combination with `presence_penalty` is not supported on newer models. + ///
+ [global::Newtonsoft.Json.JsonProperty("frequency_penalty")] + public double FrequencyPenalty { get; set; } + + /// + /// Defaults to `0.0`, min value of `0.0`, max value of `1.0`.
+ /// Can be used to reduce repetitiveness of generated tokens. Similar to `frequency_penalty`, except that this penalty is applied equally to all tokens that have already appeared, regardless of their exact frequencies.
+ /// Using `frequency_penalty` in combination with `presence_penalty` is not supported on newer models. + ///
+ [global::Newtonsoft.Json.JsonProperty("presence_penalty")] + public double PresencePenalty { get; set; } + + /// + /// One of `GENERATION|ALL|NONE` to specify how and if the token likelihoods are returned with the response. Defaults to `NONE`.
+ /// If `GENERATION` is selected, the token likelihoods will only be provided for generated text.
+ /// If `ALL` is selected, the token likelihoods will be provided both for the prompt and the generated text.
+ /// Default Value: NONE + ///
+ [global::Newtonsoft.Json.JsonProperty("return_likelihoods")] + public global::G.GenerateRequestReturnLikelihoods? ReturnLikelihoods { get; set; } = global::G.GenerateRequestReturnLikelihoods.NONE; + + /// + /// When enabled, the user's prompt will be sent to the model without any pre-processing. + /// + [global::Newtonsoft.Json.JsonProperty("raw_prompting")] + public bool RawPrompting { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateRequestReturnLikelihoods.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateRequestReturnLikelihoods.g.verified.cs new file mode 100644 index 0000000000..58bff09604 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateRequestReturnLikelihoods.g.verified.cs @@ -0,0 +1,65 @@ +//HintName: G.Models.GenerateRequestReturnLikelihoods.g.cs + +#nullable enable + +namespace G +{ + /// + /// One of `GENERATION|ALL|NONE` to specify how and if the token likelihoods are returned with the response. Defaults to `NONE`.
+ /// If `GENERATION` is selected, the token likelihoods will only be provided for generated text.
+ /// If `ALL` is selected, the token likelihoods will be provided both for the prompt and the generated text.
+ /// Default Value: NONE + ///
+ [global::System.Runtime.Serialization.DataContract] + public enum GenerateRequestReturnLikelihoods + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="GENERATION")] + GENERATION, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="ALL")] + ALL, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="NONE")] + NONE, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class GenerateRequestReturnLikelihoodsExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this GenerateRequestReturnLikelihoods value) + { + return value switch + { + GenerateRequestReturnLikelihoods.GENERATION => "GENERATION", + GenerateRequestReturnLikelihoods.ALL => "ALL", + GenerateRequestReturnLikelihoods.NONE => "NONE", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static GenerateRequestReturnLikelihoods? ToEnum(string value) + { + return value switch + { + "GENERATION" => GenerateRequestReturnLikelihoods.GENERATION, + "ALL" => GenerateRequestReturnLikelihoods.ALL, + "NONE" => GenerateRequestReturnLikelihoods.NONE, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateRequestTruncate.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateRequestTruncate.g.verified.cs new file mode 100644 index 0000000000..313c6e4c67 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateRequestTruncate.g.verified.cs @@ -0,0 +1,65 @@ +//HintName: G.Models.GenerateRequestTruncate.g.cs + +#nullable enable + +namespace G +{ + /// + /// One of `NONE|START|END` to specify how the API will handle inputs longer than the maximum token length.
+ /// Passing `START` will discard the start of the input. `END` will discard the end of the input. In both cases, input is discarded until the remaining input is exactly the maximum input token length for the model.
+ /// If `NONE` is selected, when the input exceeds the maximum input token length an error will be returned.
+ /// Default Value: END + ///
+ [global::System.Runtime.Serialization.DataContract] + public enum GenerateRequestTruncate + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="NONE")] + NONE, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="START")] + START, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="END")] + END, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class GenerateRequestTruncateExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this GenerateRequestTruncate value) + { + return value switch + { + GenerateRequestTruncate.NONE => "NONE", + GenerateRequestTruncate.START => "START", + GenerateRequestTruncate.END => "END", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static GenerateRequestTruncate? ToEnum(string value) + { + return value switch + { + "NONE" => GenerateRequestTruncate.NONE, + "START" => GenerateRequestTruncate.START, + "END" => GenerateRequestTruncate.END, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse.g.verified.cs new file mode 100644 index 0000000000..19511de363 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GenerateResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateResponse + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse10.g.verified.cs new file mode 100644 index 0000000000..9cb849f648 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GenerateResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateResponse10 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse11.g.verified.cs new file mode 100644 index 0000000000..2298b829e7 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GenerateResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateResponse11 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse12.g.verified.cs new file mode 100644 index 0000000000..d67f66b4df --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GenerateResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateResponse12 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse2.g.verified.cs new file mode 100644 index 0000000000..22bdfe2266 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GenerateResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateResponse2 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse3.g.verified.cs new file mode 100644 index 0000000000..e878bb58f2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GenerateResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateResponse3 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse4.g.verified.cs new file mode 100644 index 0000000000..7548b4f559 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GenerateResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateResponse4 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse5.g.verified.cs new file mode 100644 index 0000000000..6363a60649 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GenerateResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateResponse5 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse6.g.verified.cs new file mode 100644 index 0000000000..036df5f438 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GenerateResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateResponse6 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse7.g.verified.cs new file mode 100644 index 0000000000..4b08f87ef1 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GenerateResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateResponse7 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse8.g.verified.cs new file mode 100644 index 0000000000..12bfe7de08 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GenerateResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateResponse8 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse9.g.verified.cs new file mode 100644 index 0000000000..34a7eb0692 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GenerateResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateResponse9 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateStreamEnd.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateStreamEnd.g.verified.cs new file mode 100644 index 0000000000..1b02abd149 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateStreamEnd.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.GenerateStreamEnd.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// + /// + public readonly partial struct GenerateStreamEnd : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.GenerateStreamEvent? Value1 { get; init; } +#else + public global::G.GenerateStreamEvent? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator GenerateStreamEnd(global::G.GenerateStreamEvent value) => new GenerateStreamEnd(value); + + /// + /// + /// + public static implicit operator global::G.GenerateStreamEvent?(GenerateStreamEnd @this) => @this.Value1; + + /// + /// + /// + public GenerateStreamEnd(global::G.GenerateStreamEvent? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.GenerateStreamEndVariant2? Value2 { get; init; } +#else + public global::G.GenerateStreamEndVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator GenerateStreamEnd(global::G.GenerateStreamEndVariant2 value) => new GenerateStreamEnd(value); + + /// + /// + /// + public static implicit operator global::G.GenerateStreamEndVariant2?(GenerateStreamEnd @this) => @this.Value2; + + /// + /// + /// + public GenerateStreamEnd(global::G.GenerateStreamEndVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public GenerateStreamEnd( + global::G.GenerateStreamEvent? value1, + global::G.GenerateStreamEndVariant2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.GenerateStreamEvent), + Value2, + typeof(global::G.GenerateStreamEndVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(GenerateStreamEnd other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(GenerateStreamEnd obj1, GenerateStreamEnd obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(GenerateStreamEnd obj1, GenerateStreamEnd obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is GenerateStreamEnd o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateStreamEndVariant2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateStreamEndVariant2.g.verified.cs new file mode 100644 index 0000000000..537d180088 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateStreamEndVariant2.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.GenerateStreamEndVariant2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateStreamEndVariant2 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("is_finished", Required = global::Newtonsoft.Json.Required.Always)] + public bool IsFinished { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("finish_reason")] + public global::G.FinishReason? FinishReason { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("response", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.GenerateStreamEndVariant2Response Response { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateStreamEndVariant2Response.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateStreamEndVariant2Response.g.verified.cs new file mode 100644 index 0000000000..b0489dba36 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateStreamEndVariant2Response.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.GenerateStreamEndVariant2Response.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateStreamEndVariant2Response + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("id", Required = global::Newtonsoft.Json.Required.Always)] + public string Id { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("prompt")] + public string? Prompt { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("generations")] + public global::System.Collections.Generic.IList? Generations { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateStreamError.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateStreamError.g.verified.cs new file mode 100644 index 0000000000..271faf6f04 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateStreamError.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.GenerateStreamError.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// + /// + public readonly partial struct GenerateStreamError : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.GenerateStreamEvent? Value1 { get; init; } +#else + public global::G.GenerateStreamEvent? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator GenerateStreamError(global::G.GenerateStreamEvent value) => new GenerateStreamError(value); + + /// + /// + /// + public static implicit operator global::G.GenerateStreamEvent?(GenerateStreamError @this) => @this.Value1; + + /// + /// + /// + public GenerateStreamError(global::G.GenerateStreamEvent? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.GenerateStreamErrorVariant2? Value2 { get; init; } +#else + public global::G.GenerateStreamErrorVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator GenerateStreamError(global::G.GenerateStreamErrorVariant2 value) => new GenerateStreamError(value); + + /// + /// + /// + public static implicit operator global::G.GenerateStreamErrorVariant2?(GenerateStreamError @this) => @this.Value2; + + /// + /// + /// + public GenerateStreamError(global::G.GenerateStreamErrorVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public GenerateStreamError( + global::G.GenerateStreamEvent? value1, + global::G.GenerateStreamErrorVariant2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.GenerateStreamEvent), + Value2, + typeof(global::G.GenerateStreamErrorVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(GenerateStreamError other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(GenerateStreamError obj1, GenerateStreamError obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(GenerateStreamError obj1, GenerateStreamError obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is GenerateStreamError o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateStreamErrorVariant2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateStreamErrorVariant2.g.verified.cs new file mode 100644 index 0000000000..1c49e13fdf --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateStreamErrorVariant2.g.verified.cs @@ -0,0 +1,42 @@ +//HintName: G.Models.GenerateStreamErrorVariant2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateStreamErrorVariant2 + { + /// + /// Refers to the nth generation. Only present when `num_generations` is greater than zero. + /// + [global::Newtonsoft.Json.JsonProperty("index")] + public int Index { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("is_finished", Required = global::Newtonsoft.Json.Required.Always)] + public bool IsFinished { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("finish_reason", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.FinishReason FinishReason { get; set; } = default!; + + /// + /// Error message + /// + [global::Newtonsoft.Json.JsonProperty("err", Required = global::Newtonsoft.Json.Required.Always)] + public string Err { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateStreamEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateStreamEvent.g.verified.cs new file mode 100644 index 0000000000..a0dd2cff2c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateStreamEvent.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GenerateStreamEvent.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateStreamEvent + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("event_type", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.GenerateStreamEventEventType EventType { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateStreamEventEventType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateStreamEventEventType.g.verified.cs new file mode 100644 index 0000000000..c628163af6 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateStreamEventEventType.g.verified.cs @@ -0,0 +1,62 @@ +//HintName: G.Models.GenerateStreamEventEventType.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + [global::System.Runtime.Serialization.DataContract] + public enum GenerateStreamEventEventType + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="text-generation")] + TextGeneration, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="stream-end")] + StreamEnd, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="stream-error")] + StreamError, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class GenerateStreamEventEventTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this GenerateStreamEventEventType value) + { + return value switch + { + GenerateStreamEventEventType.TextGeneration => "text-generation", + GenerateStreamEventEventType.StreamEnd => "stream-end", + GenerateStreamEventEventType.StreamError => "stream-error", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static GenerateStreamEventEventType? ToEnum(string value) + { + return value switch + { + "text-generation" => GenerateStreamEventEventType.TextGeneration, + "stream-end" => GenerateStreamEventEventType.StreamEnd, + "stream-error" => GenerateStreamEventEventType.StreamError, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateStreamText.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateStreamText.g.verified.cs new file mode 100644 index 0000000000..e6e8bb6b3f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateStreamText.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.GenerateStreamText.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// + /// + public readonly partial struct GenerateStreamText : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.GenerateStreamEvent? Value1 { get; init; } +#else + public global::G.GenerateStreamEvent? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator GenerateStreamText(global::G.GenerateStreamEvent value) => new GenerateStreamText(value); + + /// + /// + /// + public static implicit operator global::G.GenerateStreamEvent?(GenerateStreamText @this) => @this.Value1; + + /// + /// + /// + public GenerateStreamText(global::G.GenerateStreamEvent? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.GenerateStreamTextVariant2? Value2 { get; init; } +#else + public global::G.GenerateStreamTextVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator GenerateStreamText(global::G.GenerateStreamTextVariant2 value) => new GenerateStreamText(value); + + /// + /// + /// + public static implicit operator global::G.GenerateStreamTextVariant2?(GenerateStreamText @this) => @this.Value2; + + /// + /// + /// + public GenerateStreamText(global::G.GenerateStreamTextVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public GenerateStreamText( + global::G.GenerateStreamEvent? value1, + global::G.GenerateStreamTextVariant2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.GenerateStreamEvent), + Value2, + typeof(global::G.GenerateStreamTextVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(GenerateStreamText other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(GenerateStreamText obj1, GenerateStreamText obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(GenerateStreamText obj1, GenerateStreamText obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is GenerateStreamText o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateStreamTextVariant2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateStreamTextVariant2.g.verified.cs new file mode 100644 index 0000000000..606fe458e2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateStreamTextVariant2.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.GenerateStreamTextVariant2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateStreamTextVariant2 + { + /// + /// A segment of text of the generation. + /// + [global::Newtonsoft.Json.JsonProperty("text", Required = global::Newtonsoft.Json.Required.Always)] + public string Text { get; set; } = default!; + + /// + /// Refers to the nth generation. Only present when `num_generations` is greater than zero, and only when text responses are being streamed. + /// + [global::Newtonsoft.Json.JsonProperty("index")] + public int Index { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("is_finished", Required = global::Newtonsoft.Json.Required.Always)] + public bool IsFinished { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateStreamedResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateStreamedResponse.g.verified.cs new file mode 100644 index 0000000000..0d47968447 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GenerateStreamedResponse.g.verified.cs @@ -0,0 +1,208 @@ +//HintName: G.Models.GenerateStreamedResponse.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// Response in content type stream when `stream` is `true` in the request parameters. Generation tokens are streamed with the GenerationStream response. The final response is of type GenerationFinalResponse. + /// + public readonly partial struct GenerateStreamedResponse : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.GenerateStreamText? StreamText { get; init; } +#else + public global::G.GenerateStreamText? StreamText { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StreamText))] +#endif + public bool IsStreamText => StreamText != null; + + /// + /// + /// + public static implicit operator GenerateStreamedResponse(global::G.GenerateStreamText value) => new GenerateStreamedResponse(value); + + /// + /// + /// + public static implicit operator global::G.GenerateStreamText?(GenerateStreamedResponse @this) => @this.StreamText; + + /// + /// + /// + public GenerateStreamedResponse(global::G.GenerateStreamText? value) + { + StreamText = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.GenerateStreamEnd? StreamEnd { get; init; } +#else + public global::G.GenerateStreamEnd? StreamEnd { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StreamEnd))] +#endif + public bool IsStreamEnd => StreamEnd != null; + + /// + /// + /// + public static implicit operator GenerateStreamedResponse(global::G.GenerateStreamEnd value) => new GenerateStreamedResponse(value); + + /// + /// + /// + public static implicit operator global::G.GenerateStreamEnd?(GenerateStreamedResponse @this) => @this.StreamEnd; + + /// + /// + /// + public GenerateStreamedResponse(global::G.GenerateStreamEnd? value) + { + StreamEnd = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.GenerateStreamError? StreamError { get; init; } +#else + public global::G.GenerateStreamError? StreamError { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StreamError))] +#endif + public bool IsStreamError => StreamError != null; + + /// + /// + /// + public static implicit operator GenerateStreamedResponse(global::G.GenerateStreamError value) => new GenerateStreamedResponse(value); + + /// + /// + /// + public static implicit operator global::G.GenerateStreamError?(GenerateStreamedResponse @this) => @this.StreamError; + + /// + /// + /// + public GenerateStreamedResponse(global::G.GenerateStreamError? value) + { + StreamError = value; + } + + /// + /// + /// + public GenerateStreamedResponse( + global::G.GenerateStreamText? streamText, + global::G.GenerateStreamEnd? streamEnd, + global::G.GenerateStreamError? streamError + ) + { + StreamText = streamText; + StreamEnd = streamEnd; + StreamError = streamError; + } + + /// + /// + /// + public object? Object => + StreamError as object ?? + StreamEnd as object ?? + StreamText as object + ; + + /// + /// + /// + public bool Validate() + { + return IsStreamText && !IsStreamEnd && !IsStreamError || !IsStreamText && IsStreamEnd && !IsStreamError || !IsStreamText && !IsStreamEnd && IsStreamError; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + StreamText, + typeof(global::G.GenerateStreamText), + StreamEnd, + typeof(global::G.GenerateStreamEnd), + StreamError, + typeof(global::G.GenerateStreamError), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(GenerateStreamedResponse other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(StreamText, other.StreamText) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(StreamEnd, other.StreamEnd) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(StreamError, other.StreamError) + ; + } + + /// + /// + /// + public static bool operator ==(GenerateStreamedResponse obj1, GenerateStreamedResponse obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(GenerateStreamedResponse obj1, GenerateStreamedResponse obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is GenerateStreamedResponse o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Generation.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Generation.g.verified.cs new file mode 100644 index 0000000000..9817f661a0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Generation.g.verified.cs @@ -0,0 +1,42 @@ +//HintName: G.Models.Generation.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Generation + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("id", Required = global::Newtonsoft.Json.Required.Always)] + public string Id { get; set; } = default!; + + /// + /// Prompt used for generations. + /// + [global::Newtonsoft.Json.JsonProperty("prompt")] + public string? Prompt { get; set; } + + /// + /// List of generated results + /// + [global::Newtonsoft.Json.JsonProperty("generations", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList Generations { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("meta")] + public global::G.ApiMeta? Meta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetClusterJobResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetClusterJobResponse.g.verified.cs new file mode 100644 index 0000000000..bedd05fa93 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetClusterJobResponse.g.verified.cs @@ -0,0 +1,102 @@ +//HintName: G.Models.GetClusterJobResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// Response for getting a cluster job. + /// + public sealed partial class GetClusterJobResponse + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("job_id", Required = global::Newtonsoft.Json.Required.Always)] + public string JobId { get; set; } = default!; + + /// + /// Time of job creation in RFC3339 format + /// + [global::Newtonsoft.Json.JsonProperty("created_at")] + public global::System.DateTime CreatedAt { get; set; } + + /// + /// The input file URL used for the job + /// + [global::Newtonsoft.Json.JsonProperty("embeddings_url")] + public string? EmbeddingsUrl { get; set; } + + /// + /// The input dataset ID used for the job + /// + [global::Newtonsoft.Json.JsonProperty("input_dataset_id")] + public string? InputDatasetId { get; set; } + + /// + /// The parameter used in the job creation. Please refer to the job creation endpoint for more details + /// + [global::Newtonsoft.Json.JsonProperty("min_cluster_size")] + public int MinClusterSize { get; set; } + + /// + /// The parameter used in the job creation. Please refer to the job creation endpoint for more details + /// + [global::Newtonsoft.Json.JsonProperty("n_neighbors")] + public int NNeighbors { get; set; } + + /// + /// The parameter used in the job creation. Please refer to the job creation endpoint for more details + /// + [global::Newtonsoft.Json.JsonProperty("is_deterministic")] + public bool IsDeterministic { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("status")] + public global::G.GetClusterJobResponseStatus? Status { get; set; } + + /// + /// A boolean indicating whether the job is in a final state, whether completed or failed + /// + [global::Newtonsoft.Json.JsonProperty("is_final_state")] + public bool IsFinalState { get; set; } + + /// + /// The output file URL for the clusters (signed url that expires) + /// + [global::Newtonsoft.Json.JsonProperty("output_clusters_url")] + public string? OutputClustersUrl { get; set; } + + /// + /// The output file URL for the outliers (signed url that expires) + /// + [global::Newtonsoft.Json.JsonProperty("output_outliers_url")] + public string? OutputOutliersUrl { get; set; } + + /// + /// The list of cluster summaries for the job + /// + [global::Newtonsoft.Json.JsonProperty("clusters")] + public global::System.Collections.Generic.IList? Clusters { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("error")] + public string? Error { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("meta")] + public global::G.ApiMeta? Meta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetClusterJobResponseStatus.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetClusterJobResponseStatus.g.verified.cs new file mode 100644 index 0000000000..0d28f41576 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetClusterJobResponseStatus.g.verified.cs @@ -0,0 +1,76 @@ +//HintName: G.Models.GetClusterJobResponseStatus.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + [global::System.Runtime.Serialization.DataContract] + public enum GetClusterJobResponseStatus + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="unknown")] + Unknown, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="processing")] + Processing, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="failed")] + Failed, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="complete")] + Complete, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="queued")] + Queued, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class GetClusterJobResponseStatusExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this GetClusterJobResponseStatus value) + { + return value switch + { + GetClusterJobResponseStatus.Unknown => "unknown", + GetClusterJobResponseStatus.Processing => "processing", + GetClusterJobResponseStatus.Failed => "failed", + GetClusterJobResponseStatus.Complete => "complete", + GetClusterJobResponseStatus.Queued => "queued", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static GetClusterJobResponseStatus? ToEnum(string value) + { + return value switch + { + "unknown" => GetClusterJobResponseStatus.Unknown, + "processing" => GetClusterJobResponseStatus.Processing, + "failed" => GetClusterJobResponseStatus.Failed, + "complete" => GetClusterJobResponseStatus.Complete, + "queued" => GetClusterJobResponseStatus.Queued, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse.g.verified.cs new file mode 100644 index 0000000000..29a87c68fa --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse.g.verified.cs @@ -0,0 +1,25 @@ +//HintName: G.Models.GetConnectorResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetConnectorResponse + { + /// + /// A connector allows you to integrate data sources with the '/chat' endpoint to create grounded generations with citations to the data source.
+ /// documents to help answer users. + ///
+ [global::Newtonsoft.Json.JsonProperty("connector", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.Connector Connector { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse10.g.verified.cs new file mode 100644 index 0000000000..48bebce0fd --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetConnectorResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetConnectorResponse10 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse11.g.verified.cs new file mode 100644 index 0000000000..b58cc91880 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetConnectorResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetConnectorResponse11 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse12.g.verified.cs new file mode 100644 index 0000000000..596d29ab55 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetConnectorResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetConnectorResponse12 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse13.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse13.g.verified.cs new file mode 100644 index 0000000000..a42bb6f599 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse13.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetConnectorResponse13.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetConnectorResponse13 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse2.g.verified.cs new file mode 100644 index 0000000000..381276c235 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetConnectorResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetConnectorResponse2 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse3.g.verified.cs new file mode 100644 index 0000000000..ef0657462b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetConnectorResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetConnectorResponse3 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse4.g.verified.cs new file mode 100644 index 0000000000..3f52855175 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetConnectorResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetConnectorResponse4 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse5.g.verified.cs new file mode 100644 index 0000000000..b70cfd91de --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetConnectorResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetConnectorResponse5 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse6.g.verified.cs new file mode 100644 index 0000000000..79edfecc5b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetConnectorResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetConnectorResponse6 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse7.g.verified.cs new file mode 100644 index 0000000000..213f578b63 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetConnectorResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetConnectorResponse7 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse8.g.verified.cs new file mode 100644 index 0000000000..7ce123716a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetConnectorResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetConnectorResponse8 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse9.g.verified.cs new file mode 100644 index 0000000000..ddf18147b7 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetConnectorResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetConnectorResponse9 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorsLogsResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorsLogsResponse.g.verified.cs new file mode 100644 index 0000000000..18921a7efb --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetConnectorsLogsResponse.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.GetConnectorsLogsResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetConnectorsLogsResponse + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("connector_logs", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList ConnectorLogs { get; set; } = default!; + + /// + /// Total number of connector logs + /// + [global::Newtonsoft.Json.JsonProperty("total", Required = global::Newtonsoft.Json.Required.Always)] + public double Total { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse.g.verified.cs new file mode 100644 index 0000000000..09a22c1cae --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetResponse + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("dataset", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.Dataset Dataset { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse10.g.verified.cs new file mode 100644 index 0000000000..a96f64d8b1 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetResponse10 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse11.g.verified.cs new file mode 100644 index 0000000000..11e1389844 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetResponse11 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse12.g.verified.cs new file mode 100644 index 0000000000..b7a9950263 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetResponse12 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse13.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse13.g.verified.cs new file mode 100644 index 0000000000..663c81364c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse13.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetResponse13.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetResponse13 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse2.g.verified.cs new file mode 100644 index 0000000000..d527e1a287 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetResponse2 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse3.g.verified.cs new file mode 100644 index 0000000000..38b99f3cb1 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetResponse3 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse4.g.verified.cs new file mode 100644 index 0000000000..bc71a284b2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetResponse4 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse5.g.verified.cs new file mode 100644 index 0000000000..838f101e1d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetResponse5 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse6.g.verified.cs new file mode 100644 index 0000000000..0f04a30694 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetResponse6 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse7.g.verified.cs new file mode 100644 index 0000000000..b140298376 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetResponse7 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse8.g.verified.cs new file mode 100644 index 0000000000..ca5a489b5b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetResponse8 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse9.g.verified.cs new file mode 100644 index 0000000000..a4bc98b2ae --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetResponse9 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse.g.verified.cs new file mode 100644 index 0000000000..4fbb5227d0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetUsageResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetUsageResponse + { + /// + /// The total number of bytes used by the organization. + /// + [global::Newtonsoft.Json.JsonProperty("organization_usage")] + public double OrganizationUsage { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse10.g.verified.cs new file mode 100644 index 0000000000..ab5295e4d2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetUsageResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetUsageResponse10 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse11.g.verified.cs new file mode 100644 index 0000000000..46301910dd --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetUsageResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetUsageResponse11 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse12.g.verified.cs new file mode 100644 index 0000000000..655d5825fd --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetUsageResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetUsageResponse12 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse13.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse13.g.verified.cs new file mode 100644 index 0000000000..a09949bac6 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse13.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetUsageResponse13.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetUsageResponse13 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse2.g.verified.cs new file mode 100644 index 0000000000..111dab3e29 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetUsageResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetUsageResponse2 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse3.g.verified.cs new file mode 100644 index 0000000000..d4920c7d1e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetUsageResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetUsageResponse3 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse4.g.verified.cs new file mode 100644 index 0000000000..d5700d962f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetUsageResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetUsageResponse4 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse5.g.verified.cs new file mode 100644 index 0000000000..21b3437117 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetUsageResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetUsageResponse5 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse6.g.verified.cs new file mode 100644 index 0000000000..dc42e5e40a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetUsageResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetUsageResponse6 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse7.g.verified.cs new file mode 100644 index 0000000000..43491ddfdc --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetUsageResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetUsageResponse7 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse8.g.verified.cs new file mode 100644 index 0000000000..293935e22a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetUsageResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetUsageResponse8 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse9.g.verified.cs new file mode 100644 index 0000000000..8d1d2d0f54 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetDatasetUsageResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetUsageResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetUsageResponse9 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse.g.verified.cs new file mode 100644 index 0000000000..33f604f562 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetEmbedJobResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetEmbedJobResponse + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse10.g.verified.cs new file mode 100644 index 0000000000..bc573d00f9 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetEmbedJobResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetEmbedJobResponse10 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse11.g.verified.cs new file mode 100644 index 0000000000..f4c8e1769c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetEmbedJobResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetEmbedJobResponse11 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse12.g.verified.cs new file mode 100644 index 0000000000..ddc0487e4f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetEmbedJobResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetEmbedJobResponse12 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse2.g.verified.cs new file mode 100644 index 0000000000..78ccccdd7d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetEmbedJobResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetEmbedJobResponse2 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse3.g.verified.cs new file mode 100644 index 0000000000..cc2fb9f427 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetEmbedJobResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetEmbedJobResponse3 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse4.g.verified.cs new file mode 100644 index 0000000000..eb0f3a3fe5 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetEmbedJobResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetEmbedJobResponse4 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse5.g.verified.cs new file mode 100644 index 0000000000..6303aeb8e0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetEmbedJobResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetEmbedJobResponse5 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse6.g.verified.cs new file mode 100644 index 0000000000..0617d8a3a5 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetEmbedJobResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetEmbedJobResponse6 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse7.g.verified.cs new file mode 100644 index 0000000000..2837dfcb51 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetEmbedJobResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetEmbedJobResponse7 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse8.g.verified.cs new file mode 100644 index 0000000000..fc6113193d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetEmbedJobResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetEmbedJobResponse8 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse9.g.verified.cs new file mode 100644 index 0000000000..4b238ab51f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetEmbedJobResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetEmbedJobResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetEmbedJobResponse9 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetFinetunedModelResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetFinetunedModelResponse.g.verified.cs new file mode 100644 index 0000000000..9926fc4998 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetFinetunedModelResponse.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetFinetunedModelResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// Response to a request to get a fine-tuned model. + /// + public sealed partial class GetFinetunedModelResponse + { + /// + /// This resource represents a fine-tuned model. + /// + [global::Newtonsoft.Json.JsonProperty("finetuned_model")] + public global::G.FinetunedModel? FinetunedModel { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse.g.verified.cs new file mode 100644 index 0000000000..399729d885 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse.g.verified.cs @@ -0,0 +1,54 @@ +//HintName: G.Models.GetModelResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// Contains information about the model and which API endpoints it can be used with. + /// + public sealed partial class GetModelResponse + { + /// + /// Specify this name in the `model` parameter of API requests to use your chosen model. + /// + [global::Newtonsoft.Json.JsonProperty("name")] + public string? Name { get; set; } + + /// + /// The API endpoints that the model is compatible with. + /// + [global::Newtonsoft.Json.JsonProperty("endpoints")] + public global::System.Collections.Generic.IList? Endpoints { get; set; } + + /// + /// Whether the model has been fine-tuned or not. + /// + [global::Newtonsoft.Json.JsonProperty("finetuned")] + public bool Finetuned { get; set; } + + /// + /// The maximum number of tokens that the model can process in a single request. Note that not all of these tokens are always available due to special tokens and preambles that Cohere has added by default. + /// + [global::Newtonsoft.Json.JsonProperty("context_length")] + public double ContextLength { get; set; } + + /// + /// Public URL to the tokenizer's configuration file. + /// + [global::Newtonsoft.Json.JsonProperty("tokenizer_url")] + public string? TokenizerUrl { get; set; } + + /// + /// The API endpoints that the model is default to. + /// + [global::Newtonsoft.Json.JsonProperty("default_endpoints")] + public global::System.Collections.Generic.IList? DefaultEndpoints { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse10.g.verified.cs new file mode 100644 index 0000000000..3ca691161b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetModelResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetModelResponse10 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse11.g.verified.cs new file mode 100644 index 0000000000..30509b9845 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetModelResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetModelResponse11 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse12.g.verified.cs new file mode 100644 index 0000000000..0ebe5bee8c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetModelResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetModelResponse12 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse13.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse13.g.verified.cs new file mode 100644 index 0000000000..c41546f9ab --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse13.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetModelResponse13.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetModelResponse13 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse2.g.verified.cs new file mode 100644 index 0000000000..3ca107d4ff --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetModelResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetModelResponse2 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse3.g.verified.cs new file mode 100644 index 0000000000..b677655031 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetModelResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetModelResponse3 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse4.g.verified.cs new file mode 100644 index 0000000000..91a699902b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetModelResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetModelResponse4 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse5.g.verified.cs new file mode 100644 index 0000000000..0487ff3f04 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetModelResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetModelResponse5 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse6.g.verified.cs new file mode 100644 index 0000000000..e7ea241873 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetModelResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetModelResponse6 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse7.g.verified.cs new file mode 100644 index 0000000000..04df6669f4 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetModelResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetModelResponse7 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse8.g.verified.cs new file mode 100644 index 0000000000..93782b096c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetModelResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetModelResponse8 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse9.g.verified.cs new file mode 100644 index 0000000000..c6ef10cd9f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.GetModelResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetModelResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetModelResponse9 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Hyperparameters.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Hyperparameters.g.verified.cs new file mode 100644 index 0000000000..3521c62ec1 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Hyperparameters.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: G.Models.Hyperparameters.g.cs + +#nullable enable + +namespace G +{ + /// + /// The fine-tuning hyperparameters. + /// + public sealed partial class Hyperparameters + { + /// + /// Stops training if the loss metric does not improve beyond the value of
+ /// `early_stopping_threshold` after this many times of evaluation. + ///
+ [global::Newtonsoft.Json.JsonProperty("early_stopping_patience")] + public int EarlyStoppingPatience { get; set; } + + /// + /// How much the loss must improve to prevent early stopping. + /// + [global::Newtonsoft.Json.JsonProperty("early_stopping_threshold")] + public double EarlyStoppingThreshold { get; set; } + + /// + /// The batch size is the number of training examples included in a single
+ /// training pass. + ///
+ [global::Newtonsoft.Json.JsonProperty("train_batch_size")] + public int TrainBatchSize { get; set; } + + /// + /// The number of epochs to train for. + /// + [global::Newtonsoft.Json.JsonProperty("train_epochs")] + public int TrainEpochs { get; set; } + + /// + /// The learning rate to be used during training. + /// + [global::Newtonsoft.Json.JsonProperty("learning_rate")] + public double LearningRate { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.JSONResponseFormat.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.JSONResponseFormat.g.verified.cs new file mode 100644 index 0000000000..c6b5326faf --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.JSONResponseFormat.g.verified.cs @@ -0,0 +1,43 @@ +//HintName: G.Models.JSONResponseFormat.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class JSONResponseFormat + { + /// + /// Defaults to `"text"`.
+ /// When set to `"json_object"`, the model's output will be a valid JSON Object. + ///
+ [global::Newtonsoft.Json.JsonProperty("type", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.ResponseFormatType Type { get; set; } = default!; + + /// + /// A JSON schema object that the output will adhere to. There are some restrictions we have on the schema, refer to [our guide](/docs/structured-outputs-json#schema-constraints) for more information.
+ /// Example (required name and age object):
+ /// ```json
+ /// {
+ /// "type": "object",
+ /// "properties": {
+ /// "name": {"type": "string"},
+ /// "age": {"type": "integer"}
+ /// },
+ /// "required": ["name", "age"]
+ /// }
+ /// ```
+ /// **Note**: This field must not be specified when the `type` is set to `"text"`. + ///
+ [global::Newtonsoft.Json.JsonProperty("schema")] + public global::G.JSONResponseFormatSchema? Schema { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.JSONResponseFormat2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.JSONResponseFormat2.g.verified.cs new file mode 100644 index 0000000000..f4c0629d8e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.JSONResponseFormat2.g.verified.cs @@ -0,0 +1,43 @@ +//HintName: G.Models.JSONResponseFormat2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class JSONResponseFormat2 + { + /// + /// Defaults to `"text"`.
+ /// When set to `"json_object"`, the model's output will be a valid JSON Object. + ///
+ [global::Newtonsoft.Json.JsonProperty("type", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.ResponseFormatType Type { get; set; } = default!; + + /// + /// [BETA] A JSON schema object that the output will adhere to. There are some restrictions we have on the schema, refer to [our guide](/docs/structured-outputs-json#schema-constraints) for more information.
+ /// Example (required name and age object):
+ /// ```json
+ /// {
+ /// "type": "object",
+ /// "properties": {
+ /// "name": {"type": "string"},
+ /// "age": {"type": "integer"}
+ /// },
+ /// "required": ["name", "age"]
+ /// }
+ /// ```
+ /// **Note**: This field must not be specified when the `type` is set to `"text"`. + ///
+ [global::Newtonsoft.Json.JsonProperty("json_schema")] + public global::G.JSONResponseFormat2JsonSchema? JsonSchema { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.JSONResponseFormat2JsonSchema.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.JSONResponseFormat2JsonSchema.g.verified.cs new file mode 100644 index 0000000000..ab7f3204be --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.JSONResponseFormat2JsonSchema.g.verified.cs @@ -0,0 +1,31 @@ +//HintName: G.Models.JSONResponseFormat2JsonSchema.g.cs + +#nullable enable + +namespace G +{ + /// + /// [BETA] A JSON schema object that the output will adhere to. There are some restrictions we have on the schema, refer to [our guide](/docs/structured-outputs-json#schema-constraints) for more information.
+ /// Example (required name and age object):
+ /// ```json
+ /// {
+ /// "type": "object",
+ /// "properties": {
+ /// "name": {"type": "string"},
+ /// "age": {"type": "integer"}
+ /// },
+ /// "required": ["name", "age"]
+ /// }
+ /// ```
+ /// **Note**: This field must not be specified when the `type` is set to `"text"`. + ///
+ public sealed partial class JSONResponseFormat2JsonSchema + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.JSONResponseFormatSchema.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.JSONResponseFormatSchema.g.verified.cs new file mode 100644 index 0000000000..0774b0719a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.JSONResponseFormatSchema.g.verified.cs @@ -0,0 +1,31 @@ +//HintName: G.Models.JSONResponseFormatSchema.g.cs + +#nullable enable + +namespace G +{ + /// + /// A JSON schema object that the output will adhere to. There are some restrictions we have on the schema, refer to [our guide](/docs/structured-outputs-json#schema-constraints) for more information.
+ /// Example (required name and age object):
+ /// ```json
+ /// {
+ /// "type": "object",
+ /// "properties": {
+ /// "name": {"type": "string"},
+ /// "age": {"type": "integer"}
+ /// },
+ /// "required": ["name", "age"]
+ /// }
+ /// ```
+ /// **Note**: This field must not be specified when the `type` is set to `"text"`. + ///
+ public sealed partial class JSONResponseFormatSchema + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.LabelMetric.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.LabelMetric.g.verified.cs new file mode 100644 index 0000000000..69e1af80d1 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.LabelMetric.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.LabelMetric.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class LabelMetric + { + /// + /// Total number of examples for this label + /// + [global::Newtonsoft.Json.JsonProperty("total_examples")] + public double TotalExamples { get; set; } + + /// + /// value of the label + /// + [global::Newtonsoft.Json.JsonProperty("label")] + public string? Label { get; set; } + + /// + /// samples for this label + /// + [global::Newtonsoft.Json.JsonProperty("samples")] + public global::System.Collections.Generic.IList? Samples { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListClusterJobsResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListClusterJobsResponse.g.verified.cs new file mode 100644 index 0000000000..9f2dc9081a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListClusterJobsResponse.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.ListClusterJobsResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListClusterJobsResponse + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("jobs", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList Jobs { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("total_count")] + public int TotalCount { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("meta")] + public global::G.ApiMeta? Meta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse.g.verified.cs new file mode 100644 index 0000000000..9c1a3ec3d0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.ListConnectorsResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListConnectorsResponse + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("connectors", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList Connectors { get; set; } = default!; + + /// + /// Total number of connectors. + /// + [global::Newtonsoft.Json.JsonProperty("total_count")] + public double TotalCount { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse10.g.verified.cs new file mode 100644 index 0000000000..bba80659f5 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListConnectorsResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListConnectorsResponse10 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse11.g.verified.cs new file mode 100644 index 0000000000..0386bf05db --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListConnectorsResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListConnectorsResponse11 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse12.g.verified.cs new file mode 100644 index 0000000000..3b7c2bbe02 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListConnectorsResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListConnectorsResponse12 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse13.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse13.g.verified.cs new file mode 100644 index 0000000000..5b8e158639 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse13.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListConnectorsResponse13.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListConnectorsResponse13 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse2.g.verified.cs new file mode 100644 index 0000000000..d3f3eb5962 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListConnectorsResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListConnectorsResponse2 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse3.g.verified.cs new file mode 100644 index 0000000000..5faed3bb9a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListConnectorsResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListConnectorsResponse3 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse4.g.verified.cs new file mode 100644 index 0000000000..b474404c48 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListConnectorsResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListConnectorsResponse4 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse5.g.verified.cs new file mode 100644 index 0000000000..79830d84ab --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListConnectorsResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListConnectorsResponse5 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse6.g.verified.cs new file mode 100644 index 0000000000..fcf7f4028a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListConnectorsResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListConnectorsResponse6 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse7.g.verified.cs new file mode 100644 index 0000000000..6061d079cd --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListConnectorsResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListConnectorsResponse7 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse8.g.verified.cs new file mode 100644 index 0000000000..b6d0e8eaf4 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListConnectorsResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListConnectorsResponse8 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse9.g.verified.cs new file mode 100644 index 0000000000..675f93eff2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListConnectorsResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListConnectorsResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListConnectorsResponse9 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse.g.verified.cs new file mode 100644 index 0000000000..ede78cf893 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListDatasetsResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListDatasetsResponse + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("datasets")] + public global::System.Collections.Generic.IList? Datasets { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse10.g.verified.cs new file mode 100644 index 0000000000..633877b29e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListDatasetsResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListDatasetsResponse10 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse11.g.verified.cs new file mode 100644 index 0000000000..e41cffb363 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListDatasetsResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListDatasetsResponse11 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse12.g.verified.cs new file mode 100644 index 0000000000..e41fe795ca --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListDatasetsResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListDatasetsResponse12 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse13.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse13.g.verified.cs new file mode 100644 index 0000000000..3d7694fb1d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse13.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListDatasetsResponse13.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListDatasetsResponse13 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse2.g.verified.cs new file mode 100644 index 0000000000..16bb00a2ba --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListDatasetsResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListDatasetsResponse2 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse3.g.verified.cs new file mode 100644 index 0000000000..193e395654 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListDatasetsResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListDatasetsResponse3 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse4.g.verified.cs new file mode 100644 index 0000000000..5f7b9f3825 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListDatasetsResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListDatasetsResponse4 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse5.g.verified.cs new file mode 100644 index 0000000000..f77cbb0194 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListDatasetsResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListDatasetsResponse5 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse6.g.verified.cs new file mode 100644 index 0000000000..3239e280af --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListDatasetsResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListDatasetsResponse6 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse7.g.verified.cs new file mode 100644 index 0000000000..de408b2631 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListDatasetsResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListDatasetsResponse7 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse8.g.verified.cs new file mode 100644 index 0000000000..a1e2838568 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListDatasetsResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListDatasetsResponse8 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse9.g.verified.cs new file mode 100644 index 0000000000..17d5b68905 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListDatasetsResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListDatasetsResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListDatasetsResponse9 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobResponse.g.verified.cs new file mode 100644 index 0000000000..30d8f88d17 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobResponse.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListEmbedJobResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListEmbedJobResponse + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("embed_jobs")] + public global::System.Collections.Generic.IList? EmbedJobs { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse.g.verified.cs new file mode 100644 index 0000000000..f943872f63 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListEmbedJobsResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListEmbedJobsResponse + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse10.g.verified.cs new file mode 100644 index 0000000000..6ed4bc3a2b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListEmbedJobsResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListEmbedJobsResponse10 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse11.g.verified.cs new file mode 100644 index 0000000000..48ddf561e4 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListEmbedJobsResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListEmbedJobsResponse11 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse12.g.verified.cs new file mode 100644 index 0000000000..0cb62599eb --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListEmbedJobsResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListEmbedJobsResponse12 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse2.g.verified.cs new file mode 100644 index 0000000000..a541f2aa8e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListEmbedJobsResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListEmbedJobsResponse2 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse3.g.verified.cs new file mode 100644 index 0000000000..5a25fc80ac --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListEmbedJobsResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListEmbedJobsResponse3 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse4.g.verified.cs new file mode 100644 index 0000000000..d9aa28ff00 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListEmbedJobsResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListEmbedJobsResponse4 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse5.g.verified.cs new file mode 100644 index 0000000000..0d46ad034c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListEmbedJobsResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListEmbedJobsResponse5 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse6.g.verified.cs new file mode 100644 index 0000000000..89f32b04e4 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListEmbedJobsResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListEmbedJobsResponse6 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse7.g.verified.cs new file mode 100644 index 0000000000..8406f19615 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListEmbedJobsResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListEmbedJobsResponse7 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse8.g.verified.cs new file mode 100644 index 0000000000..bd0d5a6fea --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListEmbedJobsResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListEmbedJobsResponse8 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse9.g.verified.cs new file mode 100644 index 0000000000..65b91369bf --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEmbedJobsResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListEmbedJobsResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListEmbedJobsResponse9 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEventsResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEventsResponse.g.verified.cs new file mode 100644 index 0000000000..744b3ab12f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListEventsResponse.g.verified.cs @@ -0,0 +1,37 @@ +//HintName: G.Models.ListEventsResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// Response to a request to list events of a fine-tuned model. + /// + public sealed partial class ListEventsResponse + { + /// + /// List of events for the fine-tuned model. + /// + [global::Newtonsoft.Json.JsonProperty("events")] + public global::System.Collections.Generic.IList? Events { get; set; } + + /// + /// Pagination token to retrieve the next page of results. If the value is "",
+ /// it means no further results for the request. + ///
+ [global::Newtonsoft.Json.JsonProperty("next_page_token")] + public string? NextPageToken { get; set; } + + /// + /// Total count of results. + /// + [global::Newtonsoft.Json.JsonProperty("total_size")] + public int TotalSize { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListFinetunedModelsResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListFinetunedModelsResponse.g.verified.cs new file mode 100644 index 0000000000..cf2dbf51e7 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListFinetunedModelsResponse.g.verified.cs @@ -0,0 +1,37 @@ +//HintName: G.Models.ListFinetunedModelsResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// Response to a request to list fine-tuned models. + /// + public sealed partial class ListFinetunedModelsResponse + { + /// + /// List of fine-tuned models matching the request. + /// + [global::Newtonsoft.Json.JsonProperty("finetuned_models")] + public global::System.Collections.Generic.IList? FinetunedModels { get; set; } + + /// + /// Pagination token to retrieve the next page of results. If the value is "",
+ /// it means no further results for the request. + ///
+ [global::Newtonsoft.Json.JsonProperty("next_page_token")] + public string? NextPageToken { get; set; } + + /// + /// Total count of results. + /// + [global::Newtonsoft.Json.JsonProperty("total_size")] + public int TotalSize { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse.g.verified.cs new file mode 100644 index 0000000000..07bc8153c8 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.ListModelsResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListModelsResponse + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("models", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList Models { get; set; } = default!; + + /// + /// A token to retrieve the next page of results. Provide in the page_token parameter of the next request. + /// + [global::Newtonsoft.Json.JsonProperty("next_page_token")] + public string? NextPageToken { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse10.g.verified.cs new file mode 100644 index 0000000000..cfedeb859a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListModelsResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListModelsResponse10 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse11.g.verified.cs new file mode 100644 index 0000000000..3458b20078 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListModelsResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListModelsResponse11 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse12.g.verified.cs new file mode 100644 index 0000000000..4eae4be5b9 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListModelsResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListModelsResponse12 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse13.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse13.g.verified.cs new file mode 100644 index 0000000000..ef051a62c1 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse13.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListModelsResponse13.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListModelsResponse13 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse2.g.verified.cs new file mode 100644 index 0000000000..cece168dba --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListModelsResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListModelsResponse2 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse3.g.verified.cs new file mode 100644 index 0000000000..009a5400f0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListModelsResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListModelsResponse3 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse4.g.verified.cs new file mode 100644 index 0000000000..50ade352c4 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListModelsResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListModelsResponse4 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse5.g.verified.cs new file mode 100644 index 0000000000..354052903a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListModelsResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListModelsResponse5 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse6.g.verified.cs new file mode 100644 index 0000000000..21a242b9aa --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListModelsResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListModelsResponse6 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse7.g.verified.cs new file mode 100644 index 0000000000..b02f6acee3 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListModelsResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListModelsResponse7 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse8.g.verified.cs new file mode 100644 index 0000000000..6736bb5ec8 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListModelsResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListModelsResponse8 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse9.g.verified.cs new file mode 100644 index 0000000000..060734c2a8 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListModelsResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListModelsResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListModelsResponse9 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListTrainingStepMetricsResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListTrainingStepMetricsResponse.g.verified.cs new file mode 100644 index 0000000000..8a9ebb0cce --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ListTrainingStepMetricsResponse.g.verified.cs @@ -0,0 +1,31 @@ +//HintName: G.Models.ListTrainingStepMetricsResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// Response to a request to list training-step metrics of a fine-tuned model. + /// + public sealed partial class ListTrainingStepMetricsResponse + { + /// + /// The metrics for each step the evaluation was run on. + /// + [global::Newtonsoft.Json.JsonProperty("step_metrics")] + public global::System.Collections.Generic.IList? StepMetrics { get; set; } + + /// + /// Pagination token to retrieve the next page of results. If the value is "",
+ /// it means no further results for the request. + ///
+ [global::Newtonsoft.Json.JsonProperty("next_page_token")] + public string? NextPageToken { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.LogLikelihoodResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.LogLikelihoodResponse.g.verified.cs new file mode 100644 index 0000000000..b5f13e0f51 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.LogLikelihoodResponse.g.verified.cs @@ -0,0 +1,48 @@ +//HintName: G.Models.LogLikelihoodResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class LogLikelihoodResponse + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("id", Required = global::Newtonsoft.Json.Required.Always)] + public string Id { get; set; } = default!; + + /// + /// Probabilities for tokens in the request prompt + /// + [global::Newtonsoft.Json.JsonProperty("prompt_tokens", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList PromptTokens { get; set; } = default!; + + /// + /// Probabilities for tokens in the request completion + /// + [global::Newtonsoft.Json.JsonProperty("completion_tokens", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList CompletionTokens { get; set; } = default!; + + /// + /// Probabilities for tokens in the request raw_prompt + /// + [global::Newtonsoft.Json.JsonProperty("raw_prompt_tokens", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList RawPromptTokens { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("meta")] + public global::G.ApiMeta? Meta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Message.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Message.g.verified.cs new file mode 100644 index 0000000000..4a8901b745 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Message.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.Message.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// + /// + public readonly partial struct Message : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatMessage? Chat { get; init; } +#else + public global::G.ChatMessage? Chat { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Chat))] +#endif + public bool IsChat => Chat != null; + + /// + /// + /// + public static implicit operator Message(global::G.ChatMessage value) => new Message(value); + + /// + /// + /// + public static implicit operator global::G.ChatMessage?(Message @this) => @this.Chat; + + /// + /// + /// + public Message(global::G.ChatMessage? value) + { + Chat = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ToolMessage? Tool { get; init; } +#else + public global::G.ToolMessage? Tool { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Tool))] +#endif + public bool IsTool => Tool != null; + + /// + /// + /// + public static implicit operator Message(global::G.ToolMessage value) => new Message(value); + + /// + /// + /// + public static implicit operator global::G.ToolMessage?(Message @this) => @this.Tool; + + /// + /// + /// + public Message(global::G.ToolMessage? value) + { + Tool = value; + } + + /// + /// + /// + public Message( + global::G.ChatMessage? chat, + global::G.ToolMessage? tool + ) + { + Chat = chat; + Tool = tool; + } + + /// + /// + /// + public object? Object => + Tool as object ?? + Chat as object + ; + + /// + /// + /// + public bool Validate() + { + return IsChat && !IsTool || !IsChat && IsTool; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Chat, + typeof(global::G.ChatMessage), + Tool, + typeof(global::G.ToolMessage), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(Message other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Chat, other.Chat) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Tool, other.Tool) + ; + } + + /// + /// + /// + public static bool operator ==(Message obj1, Message obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(Message obj1, Message obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is Message o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Metrics.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Metrics.g.verified.cs new file mode 100644 index 0000000000..2c6b4e311b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Metrics.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.Metrics.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Metrics + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("finetune_dataset_metrics")] + public global::G.FinetuneDatasetMetrics? FinetuneDatasetMetrics { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.NonStreamedChatResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.NonStreamedChatResponse.g.verified.cs new file mode 100644 index 0000000000..ae7f29d6c2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.NonStreamedChatResponse.g.verified.cs @@ -0,0 +1,84 @@ +//HintName: G.Models.NonStreamedChatResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class NonStreamedChatResponse + { + /// + /// Contents of the reply generated by the model. + /// + [global::Newtonsoft.Json.JsonProperty("text", Required = global::Newtonsoft.Json.Required.Always)] + public string Text { get; set; } = default!; + + /// + /// Unique identifier for the generated reply. Useful for submitting feedback. + /// + [global::Newtonsoft.Json.JsonProperty("generation_id")] + public string? GenerationId { get; set; } + + /// + /// Inline citations for the generated reply. + /// + [global::Newtonsoft.Json.JsonProperty("citations")] + public global::System.Collections.Generic.IList? Citations { get; set; } + + /// + /// Documents seen by the model when generating the reply. + /// + [global::Newtonsoft.Json.JsonProperty("documents")] + public global::System.Collections.Generic.IList? Documents { get; set; } + + /// + /// Denotes that a search for documents is required during the RAG flow. + /// + [global::Newtonsoft.Json.JsonProperty("is_search_required")] + public bool IsSearchRequired { get; set; } + + /// + /// Generated search queries, meant to be used as part of the RAG flow. + /// + [global::Newtonsoft.Json.JsonProperty("search_queries")] + public global::System.Collections.Generic.IList? SearchQueries { get; set; } + + /// + /// Documents retrieved from each of the conducted searches. + /// + [global::Newtonsoft.Json.JsonProperty("search_results")] + public global::System.Collections.Generic.IList? SearchResults { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("finish_reason")] + public global::G.FinishReason? FinishReason { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("tool_calls")] + public global::System.Collections.Generic.IList? ToolCalls { get; set; } + + /// + /// A list of previous messages between the user and the model, meant to give the model conversational context for responding to the user's `message`. + /// + [global::Newtonsoft.Json.JsonProperty("chat_history")] + public global::System.Collections.Generic.IList? ChatHistory { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("meta")] + public global::G.ApiMeta? Meta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.NonStreamedChatResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.NonStreamedChatResponse2.g.verified.cs new file mode 100644 index 0000000000..edee16125e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.NonStreamedChatResponse2.g.verified.cs @@ -0,0 +1,42 @@ +//HintName: G.Models.NonStreamedChatResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class NonStreamedChatResponse2 + { + /// + /// Unique identifier for the generated reply. Useful for submitting feedback. + /// + [global::Newtonsoft.Json.JsonProperty("id", Required = global::Newtonsoft.Json.Required.Always)] + public string Id { get; set; } = default!; + + /// + /// The reason a chat request has finished. + /// + [global::Newtonsoft.Json.JsonProperty("finish_reason", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.ChatFinishReason FinishReason { get; set; } = default!; + + /// + /// A message from the assistant role can contain text and tool call information. + /// + [global::Newtonsoft.Json.JsonProperty("message")] + public global::G.AssistantMessageResponse? Message { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("usage")] + public global::G.Usage? Usage { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse.g.verified.cs new file mode 100644 index 0000000000..fef2404a59 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.OAuthAuthorizeConnectorResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class OAuthAuthorizeConnectorResponse + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse10.g.verified.cs new file mode 100644 index 0000000000..aa916b273e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.OAuthAuthorizeConnectorResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class OAuthAuthorizeConnectorResponse10 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse11.g.verified.cs new file mode 100644 index 0000000000..65b0116d60 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.OAuthAuthorizeConnectorResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class OAuthAuthorizeConnectorResponse11 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse12.g.verified.cs new file mode 100644 index 0000000000..1de891def7 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.OAuthAuthorizeConnectorResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class OAuthAuthorizeConnectorResponse12 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse2.g.verified.cs new file mode 100644 index 0000000000..8a4e696be6 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.OAuthAuthorizeConnectorResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class OAuthAuthorizeConnectorResponse2 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse3.g.verified.cs new file mode 100644 index 0000000000..5e4ca38dd0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.OAuthAuthorizeConnectorResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class OAuthAuthorizeConnectorResponse3 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse4.g.verified.cs new file mode 100644 index 0000000000..b341d1546a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.OAuthAuthorizeConnectorResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class OAuthAuthorizeConnectorResponse4 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse5.g.verified.cs new file mode 100644 index 0000000000..3ead0397a0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.OAuthAuthorizeConnectorResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class OAuthAuthorizeConnectorResponse5 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse6.g.verified.cs new file mode 100644 index 0000000000..a09e5ab918 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.OAuthAuthorizeConnectorResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class OAuthAuthorizeConnectorResponse6 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse7.g.verified.cs new file mode 100644 index 0000000000..5fa5f0dbed --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.OAuthAuthorizeConnectorResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class OAuthAuthorizeConnectorResponse7 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse8.g.verified.cs new file mode 100644 index 0000000000..b9090ffed3 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.OAuthAuthorizeConnectorResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class OAuthAuthorizeConnectorResponse8 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse9.g.verified.cs new file mode 100644 index 0000000000..579b1b10c4 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeConnectorResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.OAuthAuthorizeConnectorResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class OAuthAuthorizeConnectorResponse9 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeResponse.g.verified.cs new file mode 100644 index 0000000000..34687d6a6b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.OAuthAuthorizeResponse.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.OAuthAuthorizeResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class OAuthAuthorizeResponse + { + /// + /// The OAuth 2.0 redirect url. Redirect the user to this url to authorize the connector. + /// + [global::Newtonsoft.Json.JsonProperty("redirect_url")] + public string? RedirectUrl { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ParseInfo.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ParseInfo.g.verified.cs new file mode 100644 index 0000000000..49581a07ec --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ParseInfo.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.ParseInfo.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ParseInfo + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("separator")] + public string? Separator { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("delimiter")] + public string? Delimiter { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankDocument.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankDocument.g.verified.cs new file mode 100644 index 0000000000..e74942210e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankDocument.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.RerankDocument.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class RerankDocument + { + /// + /// The text of the document to rerank. + /// + [global::Newtonsoft.Json.JsonProperty("text", Required = global::Newtonsoft.Json.Required.Always)] + public string Text { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankRequest.g.verified.cs new file mode 100644 index 0000000000..040d93bf35 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankRequest.g.verified.cs @@ -0,0 +1,68 @@ +//HintName: G.Models.RerankRequest.g.cs + +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class RerankRequest + { + /// + /// The identifier of the model to use, one of : `rerank-english-v3.0`, `rerank-multilingual-v3.0`, `rerank-english-v2.0`, `rerank-multilingual-v2.0` + /// + [global::Newtonsoft.Json.JsonProperty("model")] + public string? Model { get; set; } + + /// + /// The search query + /// + [global::Newtonsoft.Json.JsonProperty("query", Required = global::Newtonsoft.Json.Required.Always)] + public string Query { get; set; } = default!; + + /// + /// A list of document objects or strings to rerank.
+ /// If a document is provided the text fields is required and all other fields will be preserved in the response.
+ /// The total max chunks (length of documents * max_chunks_per_doc) must be less than 10000.
+ /// We recommend a maximum of 1,000 documents for optimal endpoint performance. + ///
+ [global::Newtonsoft.Json.JsonProperty("documents", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList> Documents { get; set; } = default!; + + /// + /// The number of most relevant documents or indices to return, defaults to the length of the documents + /// + [global::Newtonsoft.Json.JsonProperty("top_n")] + public int TopN { get; set; } + + /// + /// If a JSON object is provided, you can specify which keys you would like to have considered for reranking. The model will rerank based on order of the fields passed in (i.e. rank_fields=['title','author','text'] will rerank using the values in title, author, text sequentially. If the length of title, author, and text exceeds the context length of the model, the chunking will not re-consider earlier fields). If not provided, the model will use the default text field for ranking. + /// + [global::Newtonsoft.Json.JsonProperty("rank_fields")] + public global::System.Collections.Generic.IList? RankFields { get; set; } + + /// + /// - If false, returns results without the doc text - the api will return a list of {index, relevance score} where index is inferred from the list passed into the request.
+ /// - If true, returns results with the doc text passed in - the api will return an ordered list of {index, text, relevance score} where index + text refers to the list passed into the request.
+ /// Default Value: false + ///
+ [global::Newtonsoft.Json.JsonProperty("return_documents")] + public bool ReturnDocuments { get; set; } = false; + + /// + /// The maximum number of chunks to produce internally from a document
+ /// Default Value: 10 + ///
+ [global::Newtonsoft.Json.JsonProperty("max_chunks_per_doc")] + public int MaxChunksPerDoc { get; set; } = 10; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse.g.verified.cs new file mode 100644 index 0000000000..9e22185d33 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.RerankResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class RerankResponse + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("id")] + public string? Id { get; set; } + + /// + /// An ordered list of ranked documents + /// + [global::Newtonsoft.Json.JsonProperty("results", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList Results { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("meta")] + public global::G.ApiMeta? Meta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse10.g.verified.cs new file mode 100644 index 0000000000..e58bce4a68 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.RerankResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class RerankResponse10 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse11.g.verified.cs new file mode 100644 index 0000000000..6541fc8938 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.RerankResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class RerankResponse11 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse12.g.verified.cs new file mode 100644 index 0000000000..5ad7b1a3bc --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.RerankResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class RerankResponse12 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse13.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse13.g.verified.cs new file mode 100644 index 0000000000..4e5649b386 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse13.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.RerankResponse13.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class RerankResponse13 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse2.g.verified.cs new file mode 100644 index 0000000000..6d09080c25 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.RerankResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class RerankResponse2 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse3.g.verified.cs new file mode 100644 index 0000000000..3cc8d877bd --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.RerankResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class RerankResponse3 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse4.g.verified.cs new file mode 100644 index 0000000000..72de77d1fd --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.RerankResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class RerankResponse4 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse5.g.verified.cs new file mode 100644 index 0000000000..b5d23d820c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.RerankResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class RerankResponse5 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse6.g.verified.cs new file mode 100644 index 0000000000..c7d5624bd4 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.RerankResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class RerankResponse6 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse7.g.verified.cs new file mode 100644 index 0000000000..380131c336 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.RerankResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class RerankResponse7 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse8.g.verified.cs new file mode 100644 index 0000000000..0798cf1cb2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.RerankResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class RerankResponse8 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse9.g.verified.cs new file mode 100644 index 0000000000..76ffad929f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.RerankResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class RerankResponse9 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponseResult.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponseResult.g.verified.cs new file mode 100644 index 0000000000..c08bd6262f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponseResult.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.RerankResponseResult.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class RerankResponseResult + { + /// + /// If `return_documents` is set as `false` this will return none, if `true` it will return the documents passed in + /// + [global::Newtonsoft.Json.JsonProperty("document")] + public global::G.RerankResponseResultDocument? Document { get; set; } + + /// + /// Corresponds to the index in the original list of documents to which the ranked document belongs. (i.e. if the first value in the `results` object has an `index` value of 3, it means in the list of documents passed in, the document at `index=3` had the highest relevance) + /// + [global::Newtonsoft.Json.JsonProperty("index", Required = global::Newtonsoft.Json.Required.Always)] + public int Index { get; set; } = default!; + + /// + /// Relevance scores are normalized to be in the range `[0, 1]`. Scores close to `1` indicate a high relevance to the query, and scores closer to `0` indicate low relevance. It is not accurate to assume a score of 0.9 means the document is 2x more relevant than a document with a score of 0.45 + /// + [global::Newtonsoft.Json.JsonProperty("relevance_score", Required = global::Newtonsoft.Json.Required.Always)] + public float RelevanceScore { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponseResultDocument.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponseResultDocument.g.verified.cs new file mode 100644 index 0000000000..e14219910e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankResponseResultDocument.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.RerankResponseResultDocument.g.cs + +#nullable enable + +namespace G +{ + /// + /// If `return_documents` is set as `false` this will return none, if `true` it will return the documents passed in + /// + public sealed partial class RerankResponseResultDocument + { + /// + /// The text of the document to rerank + /// + [global::Newtonsoft.Json.JsonProperty("text", Required = global::Newtonsoft.Json.Required.Always)] + public string Text { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankerDataMetrics.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankerDataMetrics.g.verified.cs new file mode 100644 index 0000000000..cf81c19b00 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.RerankerDataMetrics.g.verified.cs @@ -0,0 +1,54 @@ +//HintName: G.Models.RerankerDataMetrics.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class RerankerDataMetrics + { + /// + /// The number of training queries. + /// + [global::Newtonsoft.Json.JsonProperty("num_train_queries")] + public double NumTrainQueries { get; set; } + + /// + /// The sum of all relevant passages of valid training examples. + /// + [global::Newtonsoft.Json.JsonProperty("num_train_relevant_passages")] + public double NumTrainRelevantPassages { get; set; } + + /// + /// The sum of all hard negatives of valid training examples. + /// + [global::Newtonsoft.Json.JsonProperty("num_train_hard_negatives")] + public double NumTrainHardNegatives { get; set; } + + /// + /// The number of evaluation queries. + /// + [global::Newtonsoft.Json.JsonProperty("num_eval_queries")] + public double NumEvalQueries { get; set; } + + /// + /// The sum of all relevant passages of valid eval examples. + /// + [global::Newtonsoft.Json.JsonProperty("num_eval_relevant_passages")] + public double NumEvalRelevantPassages { get; set; } + + /// + /// The sum of all hard negatives of valid eval examples. + /// + [global::Newtonsoft.Json.JsonProperty("num_eval_hard_negatives")] + public double NumEvalHardNegatives { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ResponseFormat.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ResponseFormat.g.verified.cs new file mode 100644 index 0000000000..a6ebfb5ab1 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ResponseFormat.g.verified.cs @@ -0,0 +1,171 @@ +//HintName: G.Models.ResponseFormat.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// Configuration for forcing the model output to adhere to the specified format. Supported on [Command R](https://docs.cohere.com/docs/command-r), [Command R+](https://docs.cohere.com/docs/command-r-plus) and newer models.
+ /// The model can be forced into outputting JSON objects (with up to 5 levels of nesting) by setting `{ "type": "json_object" }`.
+ /// A [JSON Schema](https://json-schema.org/) can optionally be provided, to ensure a specific structure.
+ /// **Note**: When using `{ "type": "json_object" }` your `message` should always explicitly instruct the model to generate a JSON (eg: _"Generate a JSON ..."_) . Otherwise the model may end up getting stuck generating an infinite stream of characters and eventually run out of context length.
+ /// **Limitation**: The parameter is not supported in RAG mode (when any of `connectors`, `documents`, `tools`, `tool_results` are provided). + ///
+ public readonly partial struct ResponseFormat : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.TextResponseFormat? Text { get; init; } +#else + public global::G.TextResponseFormat? Text { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Text))] +#endif + public bool IsText => Text != null; + + /// + /// + /// + public static implicit operator ResponseFormat(global::G.TextResponseFormat value) => new ResponseFormat(value); + + /// + /// + /// + public static implicit operator global::G.TextResponseFormat?(ResponseFormat @this) => @this.Text; + + /// + /// + /// + public ResponseFormat(global::G.TextResponseFormat? value) + { + Text = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.JSONResponseFormat? JSON { get; init; } +#else + public global::G.JSONResponseFormat? JSON { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(JSON))] +#endif + public bool IsJSON => JSON != null; + + /// + /// + /// + public static implicit operator ResponseFormat(global::G.JSONResponseFormat value) => new ResponseFormat(value); + + /// + /// + /// + public static implicit operator global::G.JSONResponseFormat?(ResponseFormat @this) => @this.JSON; + + /// + /// + /// + public ResponseFormat(global::G.JSONResponseFormat? value) + { + JSON = value; + } + + /// + /// + /// + public ResponseFormat( + global::G.TextResponseFormat? text, + global::G.JSONResponseFormat? jSON + ) + { + Text = text; + JSON = jSON; + } + + /// + /// + /// + public object? Object => + JSON as object ?? + Text as object + ; + + /// + /// + /// + public bool Validate() + { + return IsText && !IsJSON || !IsText && IsJSON; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Text, + typeof(global::G.TextResponseFormat), + JSON, + typeof(global::G.JSONResponseFormat), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ResponseFormat other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Text, other.Text) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(JSON, other.JSON) + ; + } + + /// + /// + /// + public static bool operator ==(ResponseFormat obj1, ResponseFormat obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ResponseFormat obj1, ResponseFormat obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ResponseFormat o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ResponseFormat2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ResponseFormat2.g.verified.cs new file mode 100644 index 0000000000..b91c596f44 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ResponseFormat2.g.verified.cs @@ -0,0 +1,171 @@ +//HintName: G.Models.ResponseFormat2.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// Configuration for forcing the model output to adhere to the specified format. Supported on [Command R](https://docs.cohere.com/docs/command-r), [Command R+](https://docs.cohere.com/docs/command-r-plus) and newer models.
+ /// The model can be forced into outputting JSON objects (with up to 5 levels of nesting) by setting `{ "type": "json_object" }`.
+ /// A [JSON Schema](https://json-schema.org/) can optionally be provided, to ensure a specific structure.
+ /// **Note**: When using `{ "type": "json_object" }` your `message` should always explicitly instruct the model to generate a JSON (eg: _"Generate a JSON ..."_) . Otherwise the model may end up getting stuck generating an infinite stream of characters and eventually run out of context length.
+ /// **Limitation**: The parameter is not supported in RAG mode (when any of `connectors`, `documents`, `tools`, `tool_results` are provided). + ///
+ public readonly partial struct ResponseFormat2 : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.TextResponseFormat? TextFormat { get; init; } +#else + public global::G.TextResponseFormat? TextFormat { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(TextFormat))] +#endif + public bool IsTextFormat => TextFormat != null; + + /// + /// + /// + public static implicit operator ResponseFormat2(global::G.TextResponseFormat value) => new ResponseFormat2(value); + + /// + /// + /// + public static implicit operator global::G.TextResponseFormat?(ResponseFormat2 @this) => @this.TextFormat; + + /// + /// + /// + public ResponseFormat2(global::G.TextResponseFormat? value) + { + TextFormat = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.JSONResponseFormat2? JSON { get; init; } +#else + public global::G.JSONResponseFormat2? JSON { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(JSON))] +#endif + public bool IsJSON => JSON != null; + + /// + /// + /// + public static implicit operator ResponseFormat2(global::G.JSONResponseFormat2 value) => new ResponseFormat2(value); + + /// + /// + /// + public static implicit operator global::G.JSONResponseFormat2?(ResponseFormat2 @this) => @this.JSON; + + /// + /// + /// + public ResponseFormat2(global::G.JSONResponseFormat2? value) + { + JSON = value; + } + + /// + /// + /// + public ResponseFormat2( + global::G.TextResponseFormat? textFormat, + global::G.JSONResponseFormat2? jSON + ) + { + TextFormat = textFormat; + JSON = jSON; + } + + /// + /// + /// + public object? Object => + JSON as object ?? + TextFormat as object + ; + + /// + /// + /// + public bool Validate() + { + return IsTextFormat && !IsJSON || !IsTextFormat && IsJSON; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + TextFormat, + typeof(global::G.TextResponseFormat), + JSON, + typeof(global::G.JSONResponseFormat2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ResponseFormat2 other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(TextFormat, other.TextFormat) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(JSON, other.JSON) + ; + } + + /// + /// + /// + public static bool operator ==(ResponseFormat2 obj1, ResponseFormat2 obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ResponseFormat2 obj1, ResponseFormat2 obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ResponseFormat2 o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ResponseFormatType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ResponseFormatType.g.verified.cs new file mode 100644 index 0000000000..e1682b25e2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ResponseFormatType.g.verified.cs @@ -0,0 +1,56 @@ +//HintName: G.Models.ResponseFormatType.g.cs + +#nullable enable + +namespace G +{ + /// + /// Defaults to `"text"`.
+ /// When set to `"json_object"`, the model's output will be a valid JSON Object. + ///
+ [global::System.Runtime.Serialization.DataContract] + public enum ResponseFormatType + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="text")] + Text, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="json_object")] + JsonObject, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ResponseFormatTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ResponseFormatType value) + { + return value switch + { + ResponseFormatType.Text => "text", + ResponseFormatType.JsonObject => "json_object", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ResponseFormatType? ToEnum(string value) + { + return value switch + { + "text" => ResponseFormatType.Text, + "json_object" => ResponseFormatType.JsonObject, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Settings.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Settings.g.verified.cs new file mode 100644 index 0000000000..22432619a9 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Settings.g.verified.cs @@ -0,0 +1,48 @@ +//HintName: G.Models.Settings.g.cs + +#nullable enable + +namespace G +{ + /// + /// The configuration used for fine-tuning. + /// + public sealed partial class Settings + { + /// + /// The base model used for fine-tuning. + /// + [global::Newtonsoft.Json.JsonProperty("base_model", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.BaseModel BaseModel { get; set; } = default!; + + /// + /// The data used for training and evaluating the fine-tuned model. + /// + [global::Newtonsoft.Json.JsonProperty("dataset_id", Required = global::Newtonsoft.Json.Required.Always)] + public string DatasetId { get; set; } = default!; + + /// + /// The fine-tuning hyperparameters. + /// + [global::Newtonsoft.Json.JsonProperty("hyperparameters")] + public global::G.Hyperparameters? Hyperparameters { get; set; } + + /// + /// read-only. Whether the model is single-label or multi-label (only for classification). + /// + [global::Newtonsoft.Json.JsonProperty("multi_label")] + public bool MultiLabel { get; set; } + + /// + /// The Weights & Biases configuration. + /// + [global::Newtonsoft.Json.JsonProperty("wandb")] + public global::G.WandbConfig? Wandb { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SingleGeneration.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SingleGeneration.g.verified.cs new file mode 100644 index 0000000000..d0992ddd92 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SingleGeneration.g.verified.cs @@ -0,0 +1,48 @@ +//HintName: G.Models.SingleGeneration.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SingleGeneration + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("id", Required = global::Newtonsoft.Json.Required.Always)] + public string Id { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("text", Required = global::Newtonsoft.Json.Required.Always)] + public string Text { get; set; } = default!; + + /// + /// Refers to the nth generation. Only present when `num_generations` is greater than zero. + /// + [global::Newtonsoft.Json.JsonProperty("index")] + public int Index { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("likelihood")] + public double Likelihood { get; set; } + + /// + /// Only returned if `return_likelihoods` is set to `GENERATION` or `ALL`. The likelihood refers to the average log-likelihood of the entire specified string, which is useful for [evaluating the performance of your model](likelihood-eval), especially if you've created a [custom model](/docs/training-custom-models). Individual token likelihoods provide the log-likelihood of each token. The first token will not have a likelihood. + /// + [global::Newtonsoft.Json.JsonProperty("token_likelihoods")] + public global::System.Collections.Generic.IList? TokenLikelihoods { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SingleGenerationInStream.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SingleGenerationInStream.g.verified.cs new file mode 100644 index 0000000000..ac64554f9a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SingleGenerationInStream.g.verified.cs @@ -0,0 +1,42 @@ +//HintName: G.Models.SingleGenerationInStream.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SingleGenerationInStream + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("id", Required = global::Newtonsoft.Json.Required.Always)] + public string Id { get; set; } = default!; + + /// + /// Full text of the generation. + /// + [global::Newtonsoft.Json.JsonProperty("text", Required = global::Newtonsoft.Json.Required.Always)] + public string Text { get; set; } = default!; + + /// + /// Refers to the nth generation. Only present when `num_generations` is greater than zero. + /// + [global::Newtonsoft.Json.JsonProperty("index")] + public int Index { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("finish_reason", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.FinishReason FinishReason { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SingleGenerationTokenLikelihood.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SingleGenerationTokenLikelihood.g.verified.cs new file mode 100644 index 0000000000..2db10962fc --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SingleGenerationTokenLikelihood.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.SingleGenerationTokenLikelihood.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SingleGenerationTokenLikelihood + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("token", Required = global::Newtonsoft.Json.Required.Always)] + public string Token { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("likelihood", Required = global::Newtonsoft.Json.Required.Always)] + public double Likelihood { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Source.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Source.g.verified.cs new file mode 100644 index 0000000000..41fb2e7807 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Source.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.Source.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// A source object containing information about the source of the data cited. + /// + public readonly partial struct Source : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ToolSource? Tool { get; init; } +#else + public global::G.ToolSource? Tool { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Tool))] +#endif + public bool IsTool => Tool != null; + + /// + /// + /// + public static implicit operator Source(global::G.ToolSource value) => new Source(value); + + /// + /// + /// + public static implicit operator global::G.ToolSource?(Source @this) => @this.Tool; + + /// + /// + /// + public Source(global::G.ToolSource? value) + { + Tool = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.DocumentSource? Document { get; init; } +#else + public global::G.DocumentSource? Document { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Document))] +#endif + public bool IsDocument => Document != null; + + /// + /// + /// + public static implicit operator Source(global::G.DocumentSource value) => new Source(value); + + /// + /// + /// + public static implicit operator global::G.DocumentSource?(Source @this) => @this.Document; + + /// + /// + /// + public Source(global::G.DocumentSource? value) + { + Document = value; + } + + /// + /// + /// + public Source( + global::G.ToolSource? tool, + global::G.DocumentSource? document + ) + { + Tool = tool; + Document = document; + } + + /// + /// + /// + public object? Object => + Document as object ?? + Tool as object + ; + + /// + /// + /// + public bool Validate() + { + return IsTool && !IsDocument || !IsTool && IsDocument; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Tool, + typeof(global::G.ToolSource), + Document, + typeof(global::G.DocumentSource), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(Source other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Tool, other.Tool) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Document, other.Document) + ; + } + + /// + /// + /// + public static bool operator ==(Source obj1, Source obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(Source obj1, Source obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is Source o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Status.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Status.g.verified.cs new file mode 100644 index 0000000000..b133831dca --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Status.g.verified.cs @@ -0,0 +1,114 @@ +//HintName: G.Models.Status.g.cs + +#nullable enable + +namespace G +{ + /// + /// The possible stages of a fine-tuned model life-cycle.
+ /// - STATUS_UNSPECIFIED: Unspecified status.
+ /// - STATUS_FINETUNING: The fine-tuned model is being fine-tuned.
+ /// - STATUS_DEPLOYING_API: The fine-tuned model is being deployed.
+ /// - STATUS_READY: The fine-tuned model is ready to receive requests.
+ /// - STATUS_FAILED: The fine-tuned model failed.
+ /// - STATUS_DELETED: The fine-tuned model was deleted.
+ /// - STATUS_TEMPORARILY_OFFLINE: The fine-tuned model is temporarily unavailable.
+ /// - STATUS_PAUSED: The fine-tuned model is paused (Vanilla only).
+ /// - STATUS_QUEUED: The fine-tuned model is queued for training.
+ /// Default Value: STATUS_UNSPECIFIED + ///
+ [global::System.Runtime.Serialization.DataContract] + public enum Status + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="STATUS_UNSPECIFIED")] + STATUSUNSPECIFIED, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="STATUS_FINETUNING")] + STATUSFINETUNING, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="STATUS_DEPLOYING_API")] + STATUSDEPLOYINGAPI, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="STATUS_READY")] + STATUSREADY, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="STATUS_FAILED")] + STATUSFAILED, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="STATUS_DELETED")] + STATUSDELETED, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="STATUS_TEMPORARILY_OFFLINE")] + STATUSTEMPORARILYOFFLINE, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="STATUS_PAUSED")] + STATUSPAUSED, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="STATUS_QUEUED")] + STATUSQUEUED, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class StatusExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this Status value) + { + return value switch + { + Status.STATUSUNSPECIFIED => "STATUS_UNSPECIFIED", + Status.STATUSFINETUNING => "STATUS_FINETUNING", + Status.STATUSDEPLOYINGAPI => "STATUS_DEPLOYING_API", + Status.STATUSREADY => "STATUS_READY", + Status.STATUSFAILED => "STATUS_FAILED", + Status.STATUSDELETED => "STATUS_DELETED", + Status.STATUSTEMPORARILYOFFLINE => "STATUS_TEMPORARILY_OFFLINE", + Status.STATUSPAUSED => "STATUS_PAUSED", + Status.STATUSQUEUED => "STATUS_QUEUED", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static Status? ToEnum(string value) + { + return value switch + { + "STATUS_UNSPECIFIED" => Status.STATUSUNSPECIFIED, + "STATUS_FINETUNING" => Status.STATUSFINETUNING, + "STATUS_DEPLOYING_API" => Status.STATUSDEPLOYINGAPI, + "STATUS_READY" => Status.STATUSREADY, + "STATUS_FAILED" => Status.STATUSFAILED, + "STATUS_DELETED" => Status.STATUSDELETED, + "STATUS_TEMPORARILY_OFFLINE" => Status.STATUSTEMPORARILYOFFLINE, + "STATUS_PAUSED" => Status.STATUSPAUSED, + "STATUS_QUEUED" => Status.STATUSQUEUED, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Strategy.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Strategy.g.verified.cs new file mode 100644 index 0000000000..b54837a4eb --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Strategy.g.verified.cs @@ -0,0 +1,66 @@ +//HintName: G.Models.Strategy.g.cs + +#nullable enable + +namespace G +{ + /// + /// The possible strategy used to serve a fine-tuned models.
+ /// - STRATEGY_UNSPECIFIED: Unspecified strategy.
+ /// - STRATEGY_VANILLA: Serve the fine-tuned model on a dedicated GPU.
+ /// - STRATEGY_TFEW: Serve the fine-tuned model on a shared GPU.
+ /// Default Value: STRATEGY_UNSPECIFIED + ///
+ [global::System.Runtime.Serialization.DataContract] + public enum Strategy + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="STRATEGY_UNSPECIFIED")] + STRATEGYUNSPECIFIED, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="STRATEGY_VANILLA")] + STRATEGYVANILLA, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="STRATEGY_TFEW")] + STRATEGYTFEW, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class StrategyExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this Strategy value) + { + return value switch + { + Strategy.STRATEGYUNSPECIFIED => "STRATEGY_UNSPECIFIED", + Strategy.STRATEGYVANILLA => "STRATEGY_VANILLA", + Strategy.STRATEGYTFEW => "STRATEGY_TFEW", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static Strategy? ToEnum(string value) + { + return value switch + { + "STRATEGY_UNSPECIFIED" => Strategy.STRATEGYUNSPECIFIED, + "STRATEGY_VANILLA" => Strategy.STRATEGYVANILLA, + "STRATEGY_TFEW" => Strategy.STRATEGYTFEW, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.StreamedChatResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.StreamedChatResponse.g.verified.cs new file mode 100644 index 0000000000..73ede4f959 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.StreamedChatResponse.g.verified.cs @@ -0,0 +1,413 @@ +//HintName: G.Models.StreamedChatResponse.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// StreamedChatResponse is returned in streaming mode (specified with `stream=True` in the request). + /// + public readonly partial struct StreamedChatResponse : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamStartEvent? StreamStartEvent { get; init; } +#else + public global::G.ChatStreamStartEvent? StreamStartEvent { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StreamStartEvent))] +#endif + public bool IsStreamStartEvent => StreamStartEvent != null; + + /// + /// + /// + public static implicit operator StreamedChatResponse(global::G.ChatStreamStartEvent value) => new StreamedChatResponse(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamStartEvent?(StreamedChatResponse @this) => @this.StreamStartEvent; + + /// + /// + /// + public StreamedChatResponse(global::G.ChatStreamStartEvent? value) + { + StreamStartEvent = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatSearchQueriesGenerationEvent? SearchQueriesGenerationEvent { get; init; } +#else + public global::G.ChatSearchQueriesGenerationEvent? SearchQueriesGenerationEvent { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SearchQueriesGenerationEvent))] +#endif + public bool IsSearchQueriesGenerationEvent => SearchQueriesGenerationEvent != null; + + /// + /// + /// + public static implicit operator StreamedChatResponse(global::G.ChatSearchQueriesGenerationEvent value) => new StreamedChatResponse(value); + + /// + /// + /// + public static implicit operator global::G.ChatSearchQueriesGenerationEvent?(StreamedChatResponse @this) => @this.SearchQueriesGenerationEvent; + + /// + /// + /// + public StreamedChatResponse(global::G.ChatSearchQueriesGenerationEvent? value) + { + SearchQueriesGenerationEvent = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatSearchResultsEvent? SearchResultsEvent { get; init; } +#else + public global::G.ChatSearchResultsEvent? SearchResultsEvent { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SearchResultsEvent))] +#endif + public bool IsSearchResultsEvent => SearchResultsEvent != null; + + /// + /// + /// + public static implicit operator StreamedChatResponse(global::G.ChatSearchResultsEvent value) => new StreamedChatResponse(value); + + /// + /// + /// + public static implicit operator global::G.ChatSearchResultsEvent?(StreamedChatResponse @this) => @this.SearchResultsEvent; + + /// + /// + /// + public StreamedChatResponse(global::G.ChatSearchResultsEvent? value) + { + SearchResultsEvent = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatTextGenerationEvent? TextGenerationEvent { get; init; } +#else + public global::G.ChatTextGenerationEvent? TextGenerationEvent { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(TextGenerationEvent))] +#endif + public bool IsTextGenerationEvent => TextGenerationEvent != null; + + /// + /// + /// + public static implicit operator StreamedChatResponse(global::G.ChatTextGenerationEvent value) => new StreamedChatResponse(value); + + /// + /// + /// + public static implicit operator global::G.ChatTextGenerationEvent?(StreamedChatResponse @this) => @this.TextGenerationEvent; + + /// + /// + /// + public StreamedChatResponse(global::G.ChatTextGenerationEvent? value) + { + TextGenerationEvent = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatCitationGenerationEvent? CitationGenerationEvent { get; init; } +#else + public global::G.ChatCitationGenerationEvent? CitationGenerationEvent { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CitationGenerationEvent))] +#endif + public bool IsCitationGenerationEvent => CitationGenerationEvent != null; + + /// + /// + /// + public static implicit operator StreamedChatResponse(global::G.ChatCitationGenerationEvent value) => new StreamedChatResponse(value); + + /// + /// + /// + public static implicit operator global::G.ChatCitationGenerationEvent?(StreamedChatResponse @this) => @this.CitationGenerationEvent; + + /// + /// + /// + public StreamedChatResponse(global::G.ChatCitationGenerationEvent? value) + { + CitationGenerationEvent = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatToolCallsGenerationEvent? ToolCallsGenerationEvent { get; init; } +#else + public global::G.ChatToolCallsGenerationEvent? ToolCallsGenerationEvent { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ToolCallsGenerationEvent))] +#endif + public bool IsToolCallsGenerationEvent => ToolCallsGenerationEvent != null; + + /// + /// + /// + public static implicit operator StreamedChatResponse(global::G.ChatToolCallsGenerationEvent value) => new StreamedChatResponse(value); + + /// + /// + /// + public static implicit operator global::G.ChatToolCallsGenerationEvent?(StreamedChatResponse @this) => @this.ToolCallsGenerationEvent; + + /// + /// + /// + public StreamedChatResponse(global::G.ChatToolCallsGenerationEvent? value) + { + ToolCallsGenerationEvent = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamEndEvent? StreamEndEvent { get; init; } +#else + public global::G.ChatStreamEndEvent? StreamEndEvent { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StreamEndEvent))] +#endif + public bool IsStreamEndEvent => StreamEndEvent != null; + + /// + /// + /// + public static implicit operator StreamedChatResponse(global::G.ChatStreamEndEvent value) => new StreamedChatResponse(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamEndEvent?(StreamedChatResponse @this) => @this.StreamEndEvent; + + /// + /// + /// + public StreamedChatResponse(global::G.ChatStreamEndEvent? value) + { + StreamEndEvent = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatToolCallsChunkEvent? ToolCallsChunkEvent { get; init; } +#else + public global::G.ChatToolCallsChunkEvent? ToolCallsChunkEvent { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ToolCallsChunkEvent))] +#endif + public bool IsToolCallsChunkEvent => ToolCallsChunkEvent != null; + + /// + /// + /// + public static implicit operator StreamedChatResponse(global::G.ChatToolCallsChunkEvent value) => new StreamedChatResponse(value); + + /// + /// + /// + public static implicit operator global::G.ChatToolCallsChunkEvent?(StreamedChatResponse @this) => @this.ToolCallsChunkEvent; + + /// + /// + /// + public StreamedChatResponse(global::G.ChatToolCallsChunkEvent? value) + { + ToolCallsChunkEvent = value; + } + + /// + /// + /// + public StreamedChatResponse( + global::G.ChatStreamStartEvent? streamStartEvent, + global::G.ChatSearchQueriesGenerationEvent? searchQueriesGenerationEvent, + global::G.ChatSearchResultsEvent? searchResultsEvent, + global::G.ChatTextGenerationEvent? textGenerationEvent, + global::G.ChatCitationGenerationEvent? citationGenerationEvent, + global::G.ChatToolCallsGenerationEvent? toolCallsGenerationEvent, + global::G.ChatStreamEndEvent? streamEndEvent, + global::G.ChatToolCallsChunkEvent? toolCallsChunkEvent + ) + { + StreamStartEvent = streamStartEvent; + SearchQueriesGenerationEvent = searchQueriesGenerationEvent; + SearchResultsEvent = searchResultsEvent; + TextGenerationEvent = textGenerationEvent; + CitationGenerationEvent = citationGenerationEvent; + ToolCallsGenerationEvent = toolCallsGenerationEvent; + StreamEndEvent = streamEndEvent; + ToolCallsChunkEvent = toolCallsChunkEvent; + } + + /// + /// + /// + public object? Object => + ToolCallsChunkEvent as object ?? + StreamEndEvent as object ?? + ToolCallsGenerationEvent as object ?? + CitationGenerationEvent as object ?? + TextGenerationEvent as object ?? + SearchResultsEvent as object ?? + SearchQueriesGenerationEvent as object ?? + StreamStartEvent as object + ; + + /// + /// + /// + public bool Validate() + { + return IsStreamStartEvent && !IsSearchQueriesGenerationEvent && !IsSearchResultsEvent && !IsTextGenerationEvent && !IsCitationGenerationEvent && !IsToolCallsGenerationEvent && !IsStreamEndEvent && !IsToolCallsChunkEvent || !IsStreamStartEvent && IsSearchQueriesGenerationEvent && !IsSearchResultsEvent && !IsTextGenerationEvent && !IsCitationGenerationEvent && !IsToolCallsGenerationEvent && !IsStreamEndEvent && !IsToolCallsChunkEvent || !IsStreamStartEvent && !IsSearchQueriesGenerationEvent && IsSearchResultsEvent && !IsTextGenerationEvent && !IsCitationGenerationEvent && !IsToolCallsGenerationEvent && !IsStreamEndEvent && !IsToolCallsChunkEvent || !IsStreamStartEvent && !IsSearchQueriesGenerationEvent && !IsSearchResultsEvent && IsTextGenerationEvent && !IsCitationGenerationEvent && !IsToolCallsGenerationEvent && !IsStreamEndEvent && !IsToolCallsChunkEvent || !IsStreamStartEvent && !IsSearchQueriesGenerationEvent && !IsSearchResultsEvent && !IsTextGenerationEvent && IsCitationGenerationEvent && !IsToolCallsGenerationEvent && !IsStreamEndEvent && !IsToolCallsChunkEvent || !IsStreamStartEvent && !IsSearchQueriesGenerationEvent && !IsSearchResultsEvent && !IsTextGenerationEvent && !IsCitationGenerationEvent && IsToolCallsGenerationEvent && !IsStreamEndEvent && !IsToolCallsChunkEvent || !IsStreamStartEvent && !IsSearchQueriesGenerationEvent && !IsSearchResultsEvent && !IsTextGenerationEvent && !IsCitationGenerationEvent && !IsToolCallsGenerationEvent && IsStreamEndEvent && !IsToolCallsChunkEvent || !IsStreamStartEvent && !IsSearchQueriesGenerationEvent && !IsSearchResultsEvent && !IsTextGenerationEvent && !IsCitationGenerationEvent && !IsToolCallsGenerationEvent && !IsStreamEndEvent && IsToolCallsChunkEvent; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + StreamStartEvent, + typeof(global::G.ChatStreamStartEvent), + SearchQueriesGenerationEvent, + typeof(global::G.ChatSearchQueriesGenerationEvent), + SearchResultsEvent, + typeof(global::G.ChatSearchResultsEvent), + TextGenerationEvent, + typeof(global::G.ChatTextGenerationEvent), + CitationGenerationEvent, + typeof(global::G.ChatCitationGenerationEvent), + ToolCallsGenerationEvent, + typeof(global::G.ChatToolCallsGenerationEvent), + StreamEndEvent, + typeof(global::G.ChatStreamEndEvent), + ToolCallsChunkEvent, + typeof(global::G.ChatToolCallsChunkEvent), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(StreamedChatResponse other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(StreamStartEvent, other.StreamStartEvent) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(SearchQueriesGenerationEvent, other.SearchQueriesGenerationEvent) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(SearchResultsEvent, other.SearchResultsEvent) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(TextGenerationEvent, other.TextGenerationEvent) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(CitationGenerationEvent, other.CitationGenerationEvent) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ToolCallsGenerationEvent, other.ToolCallsGenerationEvent) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(StreamEndEvent, other.StreamEndEvent) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ToolCallsChunkEvent, other.ToolCallsChunkEvent) + ; + } + + /// + /// + /// + public static bool operator ==(StreamedChatResponse obj1, StreamedChatResponse obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(StreamedChatResponse obj1, StreamedChatResponse obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is StreamedChatResponse o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.StreamedChatResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.StreamedChatResponse2.g.verified.cs new file mode 100644 index 0000000000..bcda57ac97 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.StreamedChatResponse2.g.verified.cs @@ -0,0 +1,454 @@ +//HintName: G.Models.StreamedChatResponse2.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// StreamedChatResponse is returned in streaming mode (specified with `stream=True` in the request). + /// + public readonly partial struct StreamedChatResponse2 : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatMessageStartEvent? MessageStartEvent { get; init; } +#else + public global::G.ChatMessageStartEvent? MessageStartEvent { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageStartEvent))] +#endif + public bool IsMessageStartEvent => MessageStartEvent != null; + + /// + /// + /// + public static implicit operator StreamedChatResponse2(global::G.ChatMessageStartEvent value) => new StreamedChatResponse2(value); + + /// + /// + /// + public static implicit operator global::G.ChatMessageStartEvent?(StreamedChatResponse2 @this) => @this.MessageStartEvent; + + /// + /// + /// + public StreamedChatResponse2(global::G.ChatMessageStartEvent? value) + { + MessageStartEvent = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatContentStartEvent? ContentStartEvent { get; init; } +#else + public global::G.ChatContentStartEvent? ContentStartEvent { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ContentStartEvent))] +#endif + public bool IsContentStartEvent => ContentStartEvent != null; + + /// + /// + /// + public static implicit operator StreamedChatResponse2(global::G.ChatContentStartEvent value) => new StreamedChatResponse2(value); + + /// + /// + /// + public static implicit operator global::G.ChatContentStartEvent?(StreamedChatResponse2 @this) => @this.ContentStartEvent; + + /// + /// + /// + public StreamedChatResponse2(global::G.ChatContentStartEvent? value) + { + ContentStartEvent = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatContentDeltaEvent? ContentDeltaEvent { get; init; } +#else + public global::G.ChatContentDeltaEvent? ContentDeltaEvent { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ContentDeltaEvent))] +#endif + public bool IsContentDeltaEvent => ContentDeltaEvent != null; + + /// + /// + /// + public static implicit operator StreamedChatResponse2(global::G.ChatContentDeltaEvent value) => new StreamedChatResponse2(value); + + /// + /// + /// + public static implicit operator global::G.ChatContentDeltaEvent?(StreamedChatResponse2 @this) => @this.ContentDeltaEvent; + + /// + /// + /// + public StreamedChatResponse2(global::G.ChatContentDeltaEvent? value) + { + ContentDeltaEvent = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatContentEndEvent? ContentEndEvent { get; init; } +#else + public global::G.ChatContentEndEvent? ContentEndEvent { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ContentEndEvent))] +#endif + public bool IsContentEndEvent => ContentEndEvent != null; + + /// + /// + /// + public static implicit operator StreamedChatResponse2(global::G.ChatContentEndEvent value) => new StreamedChatResponse2(value); + + /// + /// + /// + public static implicit operator global::G.ChatContentEndEvent?(StreamedChatResponse2 @this) => @this.ContentEndEvent; + + /// + /// + /// + public StreamedChatResponse2(global::G.ChatContentEndEvent? value) + { + ContentEndEvent = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatToolPlanDeltaEvent? ToolPlanDeltaEvent { get; init; } +#else + public global::G.ChatToolPlanDeltaEvent? ToolPlanDeltaEvent { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ToolPlanDeltaEvent))] +#endif + public bool IsToolPlanDeltaEvent => ToolPlanDeltaEvent != null; + + /// + /// + /// + public static implicit operator StreamedChatResponse2(global::G.ChatToolPlanDeltaEvent value) => new StreamedChatResponse2(value); + + /// + /// + /// + public static implicit operator global::G.ChatToolPlanDeltaEvent?(StreamedChatResponse2 @this) => @this.ToolPlanDeltaEvent; + + /// + /// + /// + public StreamedChatResponse2(global::G.ChatToolPlanDeltaEvent? value) + { + ToolPlanDeltaEvent = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatToolCallStartEvent? ToolCallStartEvent { get; init; } +#else + public global::G.ChatToolCallStartEvent? ToolCallStartEvent { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ToolCallStartEvent))] +#endif + public bool IsToolCallStartEvent => ToolCallStartEvent != null; + + /// + /// + /// + public static implicit operator StreamedChatResponse2(global::G.ChatToolCallStartEvent value) => new StreamedChatResponse2(value); + + /// + /// + /// + public static implicit operator global::G.ChatToolCallStartEvent?(StreamedChatResponse2 @this) => @this.ToolCallStartEvent; + + /// + /// + /// + public StreamedChatResponse2(global::G.ChatToolCallStartEvent? value) + { + ToolCallStartEvent = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatToolCallDeltaEvent? ToolCallDeltaEvent { get; init; } +#else + public global::G.ChatToolCallDeltaEvent? ToolCallDeltaEvent { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ToolCallDeltaEvent))] +#endif + public bool IsToolCallDeltaEvent => ToolCallDeltaEvent != null; + + /// + /// + /// + public static implicit operator StreamedChatResponse2(global::G.ChatToolCallDeltaEvent value) => new StreamedChatResponse2(value); + + /// + /// + /// + public static implicit operator global::G.ChatToolCallDeltaEvent?(StreamedChatResponse2 @this) => @this.ToolCallDeltaEvent; + + /// + /// + /// + public StreamedChatResponse2(global::G.ChatToolCallDeltaEvent? value) + { + ToolCallDeltaEvent = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatToolCallEndEvent? ToolCallEndEvent { get; init; } +#else + public global::G.ChatToolCallEndEvent? ToolCallEndEvent { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ToolCallEndEvent))] +#endif + public bool IsToolCallEndEvent => ToolCallEndEvent != null; + + /// + /// + /// + public static implicit operator StreamedChatResponse2(global::G.ChatToolCallEndEvent value) => new StreamedChatResponse2(value); + + /// + /// + /// + public static implicit operator global::G.ChatToolCallEndEvent?(StreamedChatResponse2 @this) => @this.ToolCallEndEvent; + + /// + /// + /// + public StreamedChatResponse2(global::G.ChatToolCallEndEvent? value) + { + ToolCallEndEvent = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatMessageEndEvent? MessageEndEvent { get; init; } +#else + public global::G.ChatMessageEndEvent? MessageEndEvent { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageEndEvent))] +#endif + public bool IsMessageEndEvent => MessageEndEvent != null; + + /// + /// + /// + public static implicit operator StreamedChatResponse2(global::G.ChatMessageEndEvent value) => new StreamedChatResponse2(value); + + /// + /// + /// + public static implicit operator global::G.ChatMessageEndEvent?(StreamedChatResponse2 @this) => @this.MessageEndEvent; + + /// + /// + /// + public StreamedChatResponse2(global::G.ChatMessageEndEvent? value) + { + MessageEndEvent = value; + } + + /// + /// + /// + public StreamedChatResponse2( + global::G.ChatMessageStartEvent? messageStartEvent, + global::G.ChatContentStartEvent? contentStartEvent, + global::G.ChatContentDeltaEvent? contentDeltaEvent, + global::G.ChatContentEndEvent? contentEndEvent, + global::G.ChatToolPlanDeltaEvent? toolPlanDeltaEvent, + global::G.ChatToolCallStartEvent? toolCallStartEvent, + global::G.ChatToolCallDeltaEvent? toolCallDeltaEvent, + global::G.ChatToolCallEndEvent? toolCallEndEvent, + global::G.ChatMessageEndEvent? messageEndEvent + ) + { + MessageStartEvent = messageStartEvent; + ContentStartEvent = contentStartEvent; + ContentDeltaEvent = contentDeltaEvent; + ContentEndEvent = contentEndEvent; + ToolPlanDeltaEvent = toolPlanDeltaEvent; + ToolCallStartEvent = toolCallStartEvent; + ToolCallDeltaEvent = toolCallDeltaEvent; + ToolCallEndEvent = toolCallEndEvent; + MessageEndEvent = messageEndEvent; + } + + /// + /// + /// + public object? Object => + MessageEndEvent as object ?? + ToolCallEndEvent as object ?? + ToolCallDeltaEvent as object ?? + ToolCallStartEvent as object ?? + ToolPlanDeltaEvent as object ?? + ContentEndEvent as object ?? + ContentDeltaEvent as object ?? + ContentStartEvent as object ?? + MessageStartEvent as object + ; + + /// + /// + /// + public bool Validate() + { + return IsMessageStartEvent && !IsContentStartEvent && !IsContentDeltaEvent && !IsContentEndEvent && !IsToolPlanDeltaEvent && !IsToolCallStartEvent && !IsToolCallDeltaEvent && !IsToolCallEndEvent && !IsMessageEndEvent || !IsMessageStartEvent && IsContentStartEvent && !IsContentDeltaEvent && !IsContentEndEvent && !IsToolPlanDeltaEvent && !IsToolCallStartEvent && !IsToolCallDeltaEvent && !IsToolCallEndEvent && !IsMessageEndEvent || !IsMessageStartEvent && !IsContentStartEvent && IsContentDeltaEvent && !IsContentEndEvent && !IsToolPlanDeltaEvent && !IsToolCallStartEvent && !IsToolCallDeltaEvent && !IsToolCallEndEvent && !IsMessageEndEvent || !IsMessageStartEvent && !IsContentStartEvent && !IsContentDeltaEvent && IsContentEndEvent && !IsToolPlanDeltaEvent && !IsToolCallStartEvent && !IsToolCallDeltaEvent && !IsToolCallEndEvent && !IsMessageEndEvent || !IsMessageStartEvent && !IsContentStartEvent && !IsContentDeltaEvent && !IsContentEndEvent && IsToolPlanDeltaEvent && !IsToolCallStartEvent && !IsToolCallDeltaEvent && !IsToolCallEndEvent && !IsMessageEndEvent || !IsMessageStartEvent && !IsContentStartEvent && !IsContentDeltaEvent && !IsContentEndEvent && !IsToolPlanDeltaEvent && IsToolCallStartEvent && !IsToolCallDeltaEvent && !IsToolCallEndEvent && !IsMessageEndEvent || !IsMessageStartEvent && !IsContentStartEvent && !IsContentDeltaEvent && !IsContentEndEvent && !IsToolPlanDeltaEvent && !IsToolCallStartEvent && IsToolCallDeltaEvent && !IsToolCallEndEvent && !IsMessageEndEvent || !IsMessageStartEvent && !IsContentStartEvent && !IsContentDeltaEvent && !IsContentEndEvent && !IsToolPlanDeltaEvent && !IsToolCallStartEvent && !IsToolCallDeltaEvent && IsToolCallEndEvent && !IsMessageEndEvent || !IsMessageStartEvent && !IsContentStartEvent && !IsContentDeltaEvent && !IsContentEndEvent && !IsToolPlanDeltaEvent && !IsToolCallStartEvent && !IsToolCallDeltaEvent && !IsToolCallEndEvent && IsMessageEndEvent; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + MessageStartEvent, + typeof(global::G.ChatMessageStartEvent), + ContentStartEvent, + typeof(global::G.ChatContentStartEvent), + ContentDeltaEvent, + typeof(global::G.ChatContentDeltaEvent), + ContentEndEvent, + typeof(global::G.ChatContentEndEvent), + ToolPlanDeltaEvent, + typeof(global::G.ChatToolPlanDeltaEvent), + ToolCallStartEvent, + typeof(global::G.ChatToolCallStartEvent), + ToolCallDeltaEvent, + typeof(global::G.ChatToolCallDeltaEvent), + ToolCallEndEvent, + typeof(global::G.ChatToolCallEndEvent), + MessageEndEvent, + typeof(global::G.ChatMessageEndEvent), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(StreamedChatResponse2 other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageStartEvent, other.MessageStartEvent) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ContentStartEvent, other.ContentStartEvent) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ContentDeltaEvent, other.ContentDeltaEvent) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ContentEndEvent, other.ContentEndEvent) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ToolPlanDeltaEvent, other.ToolPlanDeltaEvent) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ToolCallStartEvent, other.ToolCallStartEvent) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ToolCallDeltaEvent, other.ToolCallDeltaEvent) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ToolCallEndEvent, other.ToolCallEndEvent) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageEndEvent, other.MessageEndEvent) + ; + } + + /// + /// + /// + public static bool operator ==(StreamedChatResponse2 obj1, StreamedChatResponse2 obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(StreamedChatResponse2 obj1, StreamedChatResponse2 obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is StreamedChatResponse2 o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeRequest.g.verified.cs new file mode 100644 index 0000000000..4083ba52e0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeRequest.g.verified.cs @@ -0,0 +1,64 @@ +//HintName: G.Models.SummarizeRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SummarizeRequest + { + /// + /// The text to generate a summary for. Can be up to 100,000 characters long. Currently the only supported language is English. + /// + [global::Newtonsoft.Json.JsonProperty("text", Required = global::Newtonsoft.Json.Required.Always)] + public string Text { get; set; } = default!; + + /// + /// One of `short`, `medium`, `long`, or `auto` defaults to `auto`. Indicates the approximate length of the summary. If `auto` is selected, the best option will be picked based on the input text.
+ /// Default Value: medium + ///
+ [global::Newtonsoft.Json.JsonProperty("length")] + public global::G.SummarizeRequestLength? Length { get; set; } = global::G.SummarizeRequestLength.Medium; + + /// + /// One of `paragraph`, `bullets`, or `auto`, defaults to `auto`. Indicates the style in which the summary will be delivered - in a free form paragraph or in bullet points. If `auto` is selected, the best option will be picked based on the input text.
+ /// Default Value: paragraph + ///
+ [global::Newtonsoft.Json.JsonProperty("format")] + public global::G.SummarizeRequestFormat? Format { get; set; } = global::G.SummarizeRequestFormat.Paragraph; + + /// + /// The identifier of the model to generate the summary with. Currently available models are `command` (default), `command-nightly` (experimental), `command-light`, and `command-light-nightly` (experimental). Smaller, "light" models are faster, while larger models will perform better. + /// + [global::Newtonsoft.Json.JsonProperty("model")] + public string? Model { get; set; } + + /// + /// One of `low`, `medium`, `high`, or `auto`, defaults to `auto`. Controls how close to the original text the summary is. `high` extractiveness summaries will lean towards reusing sentences verbatim, while `low` extractiveness summaries will tend to paraphrase more. If `auto` is selected, the best option will be picked based on the input text.
+ /// Default Value: low + ///
+ [global::Newtonsoft.Json.JsonProperty("extractiveness")] + public global::G.SummarizeRequestExtractiveness? Extractiveness { get; set; } = global::G.SummarizeRequestExtractiveness.Low; + + /// + /// Ranges from 0 to 5. Controls the randomness of the output. Lower values tend to generate more “predictable” output, while higher values tend to generate more “creative” output. The sweet spot is typically between 0 and 1.
+ /// Default Value: 0.3 + ///
+ [global::Newtonsoft.Json.JsonProperty("temperature")] + public double Temperature { get; set; } = 0.3; + + /// + /// A free-form instruction for modifying how the summaries get generated. Should complete the sentence "Generate a summary _". Eg. "focusing on the next steps" or "written by Yoda" + /// + [global::Newtonsoft.Json.JsonProperty("additional_command")] + public string? AdditionalCommand { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeRequestExtractiveness.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeRequestExtractiveness.g.verified.cs new file mode 100644 index 0000000000..7bb97a3080 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeRequestExtractiveness.g.verified.cs @@ -0,0 +1,63 @@ +//HintName: G.Models.SummarizeRequestExtractiveness.g.cs + +#nullable enable + +namespace G +{ + /// + /// One of `low`, `medium`, `high`, or `auto`, defaults to `auto`. Controls how close to the original text the summary is. `high` extractiveness summaries will lean towards reusing sentences verbatim, while `low` extractiveness summaries will tend to paraphrase more. If `auto` is selected, the best option will be picked based on the input text.
+ /// Default Value: low + ///
+ [global::System.Runtime.Serialization.DataContract] + public enum SummarizeRequestExtractiveness + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="low")] + Low, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="medium")] + Medium, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="high")] + High, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class SummarizeRequestExtractivenessExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this SummarizeRequestExtractiveness value) + { + return value switch + { + SummarizeRequestExtractiveness.Low => "low", + SummarizeRequestExtractiveness.Medium => "medium", + SummarizeRequestExtractiveness.High => "high", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static SummarizeRequestExtractiveness? ToEnum(string value) + { + return value switch + { + "low" => SummarizeRequestExtractiveness.Low, + "medium" => SummarizeRequestExtractiveness.Medium, + "high" => SummarizeRequestExtractiveness.High, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeRequestFormat.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeRequestFormat.g.verified.cs new file mode 100644 index 0000000000..a5868b56c0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeRequestFormat.g.verified.cs @@ -0,0 +1,56 @@ +//HintName: G.Models.SummarizeRequestFormat.g.cs + +#nullable enable + +namespace G +{ + /// + /// One of `paragraph`, `bullets`, or `auto`, defaults to `auto`. Indicates the style in which the summary will be delivered - in a free form paragraph or in bullet points. If `auto` is selected, the best option will be picked based on the input text.
+ /// Default Value: paragraph + ///
+ [global::System.Runtime.Serialization.DataContract] + public enum SummarizeRequestFormat + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="paragraph")] + Paragraph, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="bullets")] + Bullets, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class SummarizeRequestFormatExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this SummarizeRequestFormat value) + { + return value switch + { + SummarizeRequestFormat.Paragraph => "paragraph", + SummarizeRequestFormat.Bullets => "bullets", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static SummarizeRequestFormat? ToEnum(string value) + { + return value switch + { + "paragraph" => SummarizeRequestFormat.Paragraph, + "bullets" => SummarizeRequestFormat.Bullets, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeRequestLength.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeRequestLength.g.verified.cs new file mode 100644 index 0000000000..621542cf62 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeRequestLength.g.verified.cs @@ -0,0 +1,63 @@ +//HintName: G.Models.SummarizeRequestLength.g.cs + +#nullable enable + +namespace G +{ + /// + /// One of `short`, `medium`, `long`, or `auto` defaults to `auto`. Indicates the approximate length of the summary. If `auto` is selected, the best option will be picked based on the input text.
+ /// Default Value: medium + ///
+ [global::System.Runtime.Serialization.DataContract] + public enum SummarizeRequestLength + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="short")] + Short, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="medium")] + Medium, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="long")] + Long, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class SummarizeRequestLengthExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this SummarizeRequestLength value) + { + return value switch + { + SummarizeRequestLength.Short => "short", + SummarizeRequestLength.Medium => "medium", + SummarizeRequestLength.Long => "long", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static SummarizeRequestLength? ToEnum(string value) + { + return value switch + { + "short" => SummarizeRequestLength.Short, + "medium" => SummarizeRequestLength.Medium, + "long" => SummarizeRequestLength.Long, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse.g.verified.cs new file mode 100644 index 0000000000..04bc148a1c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.SummarizeResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SummarizeResponse + { + /// + /// Generated ID for the summary + /// + [global::Newtonsoft.Json.JsonProperty("id")] + public string? Id { get; set; } + + /// + /// Generated summary for the text + /// + [global::Newtonsoft.Json.JsonProperty("summary")] + public string? Summary { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("meta")] + public global::G.ApiMeta? Meta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse10.g.verified.cs new file mode 100644 index 0000000000..4b47c1972a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.SummarizeResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SummarizeResponse10 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse11.g.verified.cs new file mode 100644 index 0000000000..0f9fafe571 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.SummarizeResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SummarizeResponse11 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse12.g.verified.cs new file mode 100644 index 0000000000..12ae1dd6c0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.SummarizeResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SummarizeResponse12 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse13.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse13.g.verified.cs new file mode 100644 index 0000000000..67a690b518 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse13.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.SummarizeResponse13.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SummarizeResponse13 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse2.g.verified.cs new file mode 100644 index 0000000000..802c34890b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.SummarizeResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SummarizeResponse2 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse3.g.verified.cs new file mode 100644 index 0000000000..22ef0fd21e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.SummarizeResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SummarizeResponse3 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse4.g.verified.cs new file mode 100644 index 0000000000..279c05c2cf --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.SummarizeResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SummarizeResponse4 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse5.g.verified.cs new file mode 100644 index 0000000000..24e9d2214f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.SummarizeResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SummarizeResponse5 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse6.g.verified.cs new file mode 100644 index 0000000000..fc7ac8db58 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.SummarizeResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SummarizeResponse6 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse7.g.verified.cs new file mode 100644 index 0000000000..6c8dd5360c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.SummarizeResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SummarizeResponse7 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse8.g.verified.cs new file mode 100644 index 0000000000..384535875a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.SummarizeResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SummarizeResponse8 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse9.g.verified.cs new file mode 100644 index 0000000000..5e86b510d7 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SummarizeResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.SummarizeResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SummarizeResponse9 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SystemMessage.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SystemMessage.g.verified.cs new file mode 100644 index 0000000000..db8c6e77eb --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SystemMessage.g.verified.cs @@ -0,0 +1,32 @@ +//HintName: G.Models.SystemMessage.g.cs + +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// A message from the system. + /// + public sealed partial class SystemMessage + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("role")] + public global::G.SystemMessageRole Role { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("content", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.OneOf>> Content { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SystemMessageRole.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SystemMessageRole.g.verified.cs new file mode 100644 index 0000000000..7b390832a4 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.SystemMessageRole.g.verified.cs @@ -0,0 +1,48 @@ +//HintName: G.Models.SystemMessageRole.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + [global::System.Runtime.Serialization.DataContract] + public enum SystemMessageRole + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="system")] + System, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class SystemMessageRoleExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this SystemMessageRole value) + { + return value switch + { + SystemMessageRole.System => "system", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static SystemMessageRole? ToEnum(string value) + { + return value switch + { + "system" => SystemMessageRole.System, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TextContent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TextContent.g.verified.cs new file mode 100644 index 0000000000..8824b022ba --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TextContent.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.TextContent.g.cs + +#nullable enable + +namespace G +{ + /// + /// Text content of the message. + /// + public sealed partial class TextContent + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("type")] + public global::G.TextContentType Type { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("text", Required = global::Newtonsoft.Json.Required.Always)] + public string Text { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TextContentType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TextContentType.g.verified.cs new file mode 100644 index 0000000000..d163c4fbf4 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TextContentType.g.verified.cs @@ -0,0 +1,48 @@ +//HintName: G.Models.TextContentType.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + [global::System.Runtime.Serialization.DataContract] + public enum TextContentType + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="text")] + Text, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class TextContentTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this TextContentType value) + { + return value switch + { + TextContentType.Text => "text", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static TextContentType? ToEnum(string value) + { + return value switch + { + "text" => TextContentType.Text, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TextResponseFormat.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TextResponseFormat.g.verified.cs new file mode 100644 index 0000000000..590bf4529b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TextResponseFormat.g.verified.cs @@ -0,0 +1,25 @@ +//HintName: G.Models.TextResponseFormat.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class TextResponseFormat + { + /// + /// Defaults to `"text"`.
+ /// When set to `"json_object"`, the model's output will be a valid JSON Object. + ///
+ [global::Newtonsoft.Json.JsonProperty("type", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.ResponseFormatType Type { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenLikelihood.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenLikelihood.g.verified.cs new file mode 100644 index 0000000000..77c53487d8 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenLikelihood.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.TokenLikelihood.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class TokenLikelihood + { + /// + /// Tokenized text + /// + [global::Newtonsoft.Json.JsonProperty("encoded")] + public int Encoded { get; set; } + + /// + /// Detokenized text + /// + [global::Newtonsoft.Json.JsonProperty("decoded")] + public string? Decoded { get; set; } + + /// + /// Non normalized probability of the token + /// + [global::Newtonsoft.Json.JsonProperty("log_likelihood")] + public double LogLikelihood { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeRequest.g.verified.cs new file mode 100644 index 0000000000..6efca5d68d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeRequest.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.TokenizeRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class TokenizeRequest + { + /// + /// The string to be tokenized, the minimum text length is 1 character, and the maximum text length is 65536 characters. + /// + [global::Newtonsoft.Json.JsonProperty("text", Required = global::Newtonsoft.Json.Required.Always)] + public string Text { get; set; } = default!; + + /// + /// An optional parameter to provide the model name. This will ensure that the tokenization uses the tokenizer used by that model. + /// + [global::Newtonsoft.Json.JsonProperty("model", Required = global::Newtonsoft.Json.Required.Always)] + public string Model { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse.g.verified.cs new file mode 100644 index 0000000000..b6e7e6ab7e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.TokenizeResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class TokenizeResponse + { + /// + /// An array of tokens, where each token is an integer. + /// + [global::Newtonsoft.Json.JsonProperty("tokens", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList Tokens { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("token_strings", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList TokenStrings { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("meta")] + public global::G.ApiMeta? Meta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse10.g.verified.cs new file mode 100644 index 0000000000..f851af6392 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.TokenizeResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class TokenizeResponse10 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse11.g.verified.cs new file mode 100644 index 0000000000..9ed7510d4a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.TokenizeResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class TokenizeResponse11 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse12.g.verified.cs new file mode 100644 index 0000000000..88b12c8614 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.TokenizeResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class TokenizeResponse12 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse13.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse13.g.verified.cs new file mode 100644 index 0000000000..c52afef976 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse13.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.TokenizeResponse13.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class TokenizeResponse13 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse2.g.verified.cs new file mode 100644 index 0000000000..9466e74a6b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.TokenizeResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class TokenizeResponse2 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse3.g.verified.cs new file mode 100644 index 0000000000..055759dcc2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.TokenizeResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class TokenizeResponse3 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse4.g.verified.cs new file mode 100644 index 0000000000..5ca889252f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.TokenizeResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class TokenizeResponse4 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse5.g.verified.cs new file mode 100644 index 0000000000..2a0d1f1628 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.TokenizeResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class TokenizeResponse5 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse6.g.verified.cs new file mode 100644 index 0000000000..18f3a9ea7b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.TokenizeResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class TokenizeResponse6 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse7.g.verified.cs new file mode 100644 index 0000000000..efc1925776 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.TokenizeResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class TokenizeResponse7 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse8.g.verified.cs new file mode 100644 index 0000000000..ec9d8dc061 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.TokenizeResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class TokenizeResponse8 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse9.g.verified.cs new file mode 100644 index 0000000000..0c0d77bd88 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TokenizeResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.TokenizeResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class TokenizeResponse9 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Tool.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Tool.g.verified.cs new file mode 100644 index 0000000000..cf4a4c7fcc --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Tool.g.verified.cs @@ -0,0 +1,45 @@ +//HintName: G.Models.Tool.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Tool + { + /// + /// The name of the tool to be called. Valid names contain only the characters `a-z`, `A-Z`, `0-9`, `_` and must not begin with a digit. + /// + [global::Newtonsoft.Json.JsonProperty("name", Required = global::Newtonsoft.Json.Required.Always)] + public string Name { get; set; } = default!; + + /// + /// The description of what the tool does, the model uses the description to choose when and how to call the function. + /// + [global::Newtonsoft.Json.JsonProperty("description", Required = global::Newtonsoft.Json.Required.Always)] + public string Description { get; set; } = default!; + + /// + /// The input parameters of the tool. Accepts a dictionary where the key is the name of the parameter and the value is the parameter spec. Valid parameter names contain only the characters `a-z`, `A-Z`, `0-9`, `_` and must not begin with a digit.
+ /// ```
+ /// {
+ /// "my_param": {
+ /// "description": <string>,
+ /// "type": <string>, // any python data type, such as 'str', 'bool'
+ /// "required": <boolean>
+ /// }
+ /// }
+ /// ``` + ///
+ [global::Newtonsoft.Json.JsonProperty("parameter_definitions")] + public global::G.ToolParameterDefinitions? ParameterDefinitions { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Tool2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Tool2.g.verified.cs new file mode 100644 index 0000000000..aec283a7bd --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Tool2.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.Tool2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Tool2 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("type")] + public global::G.Tool2Type? Type { get; set; } + + /// + /// The function to be executed. + /// + [global::Newtonsoft.Json.JsonProperty("function")] + public global::G.Tool2Function? Function { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Tool2Function.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Tool2Function.g.verified.cs new file mode 100644 index 0000000000..acaa04885b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Tool2Function.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.Tool2Function.g.cs + +#nullable enable + +namespace G +{ + /// + /// The function to be executed. + /// + public sealed partial class Tool2Function + { + /// + /// The name of the function. + /// + [global::Newtonsoft.Json.JsonProperty("name")] + public string? Name { get; set; } + + /// + /// The description of the function. + /// + [global::Newtonsoft.Json.JsonProperty("description")] + public string? Description { get; set; } + + /// + /// The parameters of the function as a JSON schema. + /// + [global::Newtonsoft.Json.JsonProperty("parameters")] + public global::G.Tool2FunctionParameters? Parameters { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Tool2FunctionParameters.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Tool2FunctionParameters.g.verified.cs new file mode 100644 index 0000000000..84a136efae --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Tool2FunctionParameters.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.Tool2FunctionParameters.g.cs + +#nullable enable + +namespace G +{ + /// + /// The parameters of the function as a JSON schema. + /// + public sealed partial class Tool2FunctionParameters + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Tool2Type.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Tool2Type.g.verified.cs new file mode 100644 index 0000000000..c708575a52 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Tool2Type.g.verified.cs @@ -0,0 +1,48 @@ +//HintName: G.Models.Tool2Type.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + [global::System.Runtime.Serialization.DataContract] + public enum Tool2Type + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="function")] + Function, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class Tool2TypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this Tool2Type value) + { + return value switch + { + Tool2Type.Function => "function", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static Tool2Type? ToEnum(string value) + { + return value switch + { + "function" => Tool2Type.Function, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolCall.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolCall.g.verified.cs new file mode 100644 index 0000000000..af2660d991 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolCall.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.ToolCall.g.cs + +#nullable enable + +namespace G +{ + /// + /// Contains the tool calls generated by the model. Use it to invoke your tools. + /// + public sealed partial class ToolCall + { + /// + /// Name of the tool to call. + /// + [global::Newtonsoft.Json.JsonProperty("name", Required = global::Newtonsoft.Json.Required.Always)] + public string Name { get; set; } = default!; + + /// + /// The name and value of the parameters to use when invoking a tool. + /// + [global::Newtonsoft.Json.JsonProperty("parameters", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.ToolCallParameters Parameters { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolCall2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolCall2.g.verified.cs new file mode 100644 index 0000000000..296f50ca0c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolCall2.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.ToolCall2.g.cs + +#nullable enable + +namespace G +{ + /// + /// A array of tool calls to be made. + /// + public sealed partial class ToolCall2 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("id")] + public string? Id { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("type")] + public global::G.ToolCall2Type? Type { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("function")] + public global::G.ToolCall2Function? Function { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolCall2Function.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolCall2Function.g.verified.cs new file mode 100644 index 0000000000..df3d55b019 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolCall2Function.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.ToolCall2Function.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ToolCall2Function + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("name")] + public string? Name { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("arguments")] + public string? Arguments { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolCall2Type.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolCall2Type.g.verified.cs new file mode 100644 index 0000000000..6b7fe4a376 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolCall2Type.g.verified.cs @@ -0,0 +1,48 @@ +//HintName: G.Models.ToolCall2Type.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + [global::System.Runtime.Serialization.DataContract] + public enum ToolCall2Type + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="function")] + Function, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ToolCall2TypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ToolCall2Type value) + { + return value switch + { + ToolCall2Type.Function => "function", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ToolCall2Type? ToEnum(string value) + { + return value switch + { + "function" => ToolCall2Type.Function, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolCallDelta.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolCallDelta.g.verified.cs new file mode 100644 index 0000000000..c6c5260faa --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolCallDelta.g.verified.cs @@ -0,0 +1,42 @@ +//HintName: G.Models.ToolCallDelta.g.cs + +#nullable enable + +namespace G +{ + /// + /// Contains the chunk of the tool call generation in the stream. + /// + public sealed partial class ToolCallDelta + { + /// + /// Name of the tool call + /// + [global::Newtonsoft.Json.JsonProperty("name")] + public string? Name { get; set; } + + /// + /// Index of the tool call generated + /// + [global::Newtonsoft.Json.JsonProperty("index")] + public double Index { get; set; } + + /// + /// Chunk of the tool parameters + /// + [global::Newtonsoft.Json.JsonProperty("parameters")] + public string? Parameters { get; set; } + + /// + /// Chunk of the tool plan text + /// + [global::Newtonsoft.Json.JsonProperty("text")] + public string? Text { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolCallParameters.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolCallParameters.g.verified.cs new file mode 100644 index 0000000000..af36a0de85 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolCallParameters.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.ToolCallParameters.g.cs + +#nullable enable + +namespace G +{ + /// + /// The name and value of the parameters to use when invoking a tool. + /// + public sealed partial class ToolCallParameters + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolContent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolContent.g.verified.cs new file mode 100644 index 0000000000..50d6b65dbc --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolContent.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.ToolContent.g.cs + +#nullable enable + +namespace G +{ + /// + /// Tool content result object + /// + public sealed partial class ToolContent + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("type")] + public global::G.ToolContentType Type { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("output", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.ToolContentOutput Output { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolContentOutput.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolContentOutput.g.verified.cs new file mode 100644 index 0000000000..4ad2aa2321 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolContentOutput.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.ToolContentOutput.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ToolContentOutput + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolContentType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolContentType.g.verified.cs new file mode 100644 index 0000000000..251c88b180 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolContentType.g.verified.cs @@ -0,0 +1,48 @@ +//HintName: G.Models.ToolContentType.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + [global::System.Runtime.Serialization.DataContract] + public enum ToolContentType + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="tool_result_object")] + ToolResultObject, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ToolContentTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ToolContentType value) + { + return value switch + { + ToolContentType.ToolResultObject => "tool_result_object", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ToolContentType? ToEnum(string value) + { + return value switch + { + "tool_result_object" => ToolContentType.ToolResultObject, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolMessage.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolMessage.g.verified.cs new file mode 100644 index 0000000000..d514a69d68 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolMessage.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.ToolMessage.g.cs + +#nullable enable + +namespace G +{ + /// + /// Represents tool result in the chat history. + /// + public sealed partial class ToolMessage + { + /// + /// One of `CHATBOT`, `SYSTEM`, `TOOL` or `USER` to identify who the message is coming from. + /// + [global::Newtonsoft.Json.JsonProperty("role", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.ChatRole Role { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("tool_results")] + public global::System.Collections.Generic.IList? ToolResults { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolMessage2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolMessage2.g.verified.cs new file mode 100644 index 0000000000..07b16c4612 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolMessage2.g.verified.cs @@ -0,0 +1,38 @@ +//HintName: G.Models.ToolMessage2.g.cs + +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// A message from the system. + /// + public sealed partial class ToolMessage2 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("role")] + public global::G.ToolMessage2Role Role { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("tool_call_id", Required = global::Newtonsoft.Json.Required.Always)] + public string ToolCallId { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("tool_content", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList> ToolContent { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolMessage2Role.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolMessage2Role.g.verified.cs new file mode 100644 index 0000000000..07881679ad --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolMessage2Role.g.verified.cs @@ -0,0 +1,48 @@ +//HintName: G.Models.ToolMessage2Role.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + [global::System.Runtime.Serialization.DataContract] + public enum ToolMessage2Role + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="tool")] + Tool, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ToolMessage2RoleExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ToolMessage2Role value) + { + return value switch + { + ToolMessage2Role.Tool => "tool", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ToolMessage2Role? ToEnum(string value) + { + return value switch + { + "tool" => ToolMessage2Role.Tool, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolParameterDefinitions.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolParameterDefinitions.g.verified.cs new file mode 100644 index 0000000000..ffe2b4398e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolParameterDefinitions.g.verified.cs @@ -0,0 +1,28 @@ +//HintName: G.Models.ToolParameterDefinitions.g.cs + +#nullable enable + +namespace G +{ + /// + /// The input parameters of the tool. Accepts a dictionary where the key is the name of the parameter and the value is the parameter spec. Valid parameter names contain only the characters `a-z`, `A-Z`, `0-9`, `_` and must not begin with a digit.
+ /// ```
+ /// {
+ /// "my_param": {
+ /// "description": <string>,
+ /// "type": <string>, // any python data type, such as 'str', 'bool'
+ /// "required": <boolean>
+ /// }
+ /// }
+ /// ``` + ///
+ public sealed partial class ToolParameterDefinitions + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolResult.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolResult.g.verified.cs new file mode 100644 index 0000000000..2a5b515ca1 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolResult.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.ToolResult.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ToolResult + { + /// + /// Contains the tool calls generated by the model. Use it to invoke your tools. + /// + [global::Newtonsoft.Json.JsonProperty("call", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.ToolCall Call { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("outputs", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.Collections.Generic.IList Outputs { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolResultOutput.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolResultOutput.g.verified.cs new file mode 100644 index 0000000000..438a677b9a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolResultOutput.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.ToolResultOutput.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ToolResultOutput + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolSource.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolSource.g.verified.cs new file mode 100644 index 0000000000..0025e6314b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolSource.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.ToolSource.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ToolSource + { + /// + /// The unique identifier of the document + /// + [global::Newtonsoft.Json.JsonProperty("id")] + public string? Id { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("tool_output")] + public global::G.ToolSourceToolOutput? ToolOutput { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolSourceToolOutput.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolSourceToolOutput.g.verified.cs new file mode 100644 index 0000000000..91917402f1 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ToolSourceToolOutput.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.ToolSourceToolOutput.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ToolSourceToolOutput + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TrainingStepMetrics.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TrainingStepMetrics.g.verified.cs new file mode 100644 index 0000000000..bce7a3d54f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TrainingStepMetrics.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.TrainingStepMetrics.g.cs + +#nullable enable + +namespace G +{ + /// + /// The evaluation metrics at a given step of the training of a fine-tuned model. + /// + public sealed partial class TrainingStepMetrics + { + /// + /// Creation timestamp. + /// + [global::Newtonsoft.Json.JsonProperty("created_at")] + public global::System.DateTime CreatedAt { get; set; } + + /// + /// Step number. + /// + [global::Newtonsoft.Json.JsonProperty("step_number")] + public int StepNumber { get; set; } + + /// + /// Map of names and values for each evaluation metrics. + /// + [global::Newtonsoft.Json.JsonProperty("metrics")] + public global::G.TrainingStepMetricsMetrics? Metrics { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TrainingStepMetricsMetrics.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TrainingStepMetricsMetrics.g.verified.cs new file mode 100644 index 0000000000..83053902c6 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.TrainingStepMetricsMetrics.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.TrainingStepMetricsMetrics.g.cs + +#nullable enable + +namespace G +{ + /// + /// Map of names and values for each evaluation metrics. + /// + public sealed partial class TrainingStepMetricsMetrics + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateClusterJobRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateClusterJobRequest.g.verified.cs new file mode 100644 index 0000000000..763c29a55f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateClusterJobRequest.g.verified.cs @@ -0,0 +1,60 @@ +//HintName: G.Models.UpdateClusterJobRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UpdateClusterJobRequest + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("status")] + public global::G.UpdateClusterJobRequestStatus? Status { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("clusters")] + public global::System.Collections.Generic.IList? Clusters { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("output_clusters_gs_path")] + public string? OutputClustersGsPath { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("output_outliers_gs_path")] + public string? OutputOutliersGsPath { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("error")] + public string? Error { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("input_tracking_metrics")] + public global::G.UpdateClusterJobRequestInputTrackingMetrics? InputTrackingMetrics { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("output_tracking_metrics")] + public global::G.UpdateClusterJobRequestOutputTrackingMetrics? OutputTrackingMetrics { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateClusterJobRequestInputTrackingMetrics.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateClusterJobRequestInputTrackingMetrics.g.verified.cs new file mode 100644 index 0000000000..8d91642c0b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateClusterJobRequestInputTrackingMetrics.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.UpdateClusterJobRequestInputTrackingMetrics.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UpdateClusterJobRequestInputTrackingMetrics + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateClusterJobRequestOutputTrackingMetrics.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateClusterJobRequestOutputTrackingMetrics.g.verified.cs new file mode 100644 index 0000000000..dcb897e11d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateClusterJobRequestOutputTrackingMetrics.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.UpdateClusterJobRequestOutputTrackingMetrics.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UpdateClusterJobRequestOutputTrackingMetrics + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateClusterJobRequestStatus.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateClusterJobRequestStatus.g.verified.cs new file mode 100644 index 0000000000..e9623f0042 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateClusterJobRequestStatus.g.verified.cs @@ -0,0 +1,76 @@ +//HintName: G.Models.UpdateClusterJobRequestStatus.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + [global::System.Runtime.Serialization.DataContract] + public enum UpdateClusterJobRequestStatus + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="unknown")] + Unknown, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="processing")] + Processing, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="failed")] + Failed, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="complete")] + Complete, + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="queued")] + Queued, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UpdateClusterJobRequestStatusExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UpdateClusterJobRequestStatus value) + { + return value switch + { + UpdateClusterJobRequestStatus.Unknown => "unknown", + UpdateClusterJobRequestStatus.Processing => "processing", + UpdateClusterJobRequestStatus.Failed => "failed", + UpdateClusterJobRequestStatus.Complete => "complete", + UpdateClusterJobRequestStatus.Queued => "queued", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UpdateClusterJobRequestStatus? ToEnum(string value) + { + return value switch + { + "unknown" => UpdateClusterJobRequestStatus.Unknown, + "processing" => UpdateClusterJobRequestStatus.Processing, + "failed" => UpdateClusterJobRequestStatus.Failed, + "complete" => UpdateClusterJobRequestStatus.Complete, + "queued" => UpdateClusterJobRequestStatus.Queued, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateClusterJobResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateClusterJobResponse.g.verified.cs new file mode 100644 index 0000000000..dfe2949f5e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateClusterJobResponse.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.UpdateClusterJobResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// Response for updating a cluster job. + /// + public sealed partial class UpdateClusterJobResponse + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("job_id", Required = global::Newtonsoft.Json.Required.Always)] + public string JobId { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorRequest.g.verified.cs new file mode 100644 index 0000000000..d18747d34d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorRequest.g.verified.cs @@ -0,0 +1,60 @@ +//HintName: G.Models.UpdateConnectorRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UpdateConnectorRequest + { + /// + /// A human-readable name for the connector. + /// + [global::Newtonsoft.Json.JsonProperty("name")] + public string? Name { get; set; } + + /// + /// The URL of the connector that will be used to search for documents. + /// + [global::Newtonsoft.Json.JsonProperty("url")] + public string? Url { get; set; } + + /// + /// A list of fields to exclude from the prompt (fields remain in the document). + /// + [global::Newtonsoft.Json.JsonProperty("excludes")] + public global::System.Collections.Generic.IList? Excludes { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("oauth")] + public global::G.CreateConnectorOAuth? Oauth { get; set; } + + /// + /// Default Value: true + /// + [global::Newtonsoft.Json.JsonProperty("active")] + public bool Active { get; set; } = true; + + /// + /// Default Value: false + /// + [global::Newtonsoft.Json.JsonProperty("continue_on_failure")] + public bool ContinueOnFailure { get; set; } = false; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("service_auth")] + public global::G.CreateConnectorServiceAuth? ServiceAuth { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse.g.verified.cs new file mode 100644 index 0000000000..64c23b2716 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse.g.verified.cs @@ -0,0 +1,25 @@ +//HintName: G.Models.UpdateConnectorResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UpdateConnectorResponse + { + /// + /// A connector allows you to integrate data sources with the '/chat' endpoint to create grounded generations with citations to the data source.
+ /// documents to help answer users. + ///
+ [global::Newtonsoft.Json.JsonProperty("connector", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.Connector Connector { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse10.g.verified.cs new file mode 100644 index 0000000000..b834a408a7 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.UpdateConnectorResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UpdateConnectorResponse10 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse11.g.verified.cs new file mode 100644 index 0000000000..f275aa114e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.UpdateConnectorResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UpdateConnectorResponse11 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse12.g.verified.cs new file mode 100644 index 0000000000..87bfb2c93c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.UpdateConnectorResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UpdateConnectorResponse12 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse13.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse13.g.verified.cs new file mode 100644 index 0000000000..6184398105 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse13.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.UpdateConnectorResponse13.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UpdateConnectorResponse13 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse2.g.verified.cs new file mode 100644 index 0000000000..49498ca24a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.UpdateConnectorResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UpdateConnectorResponse2 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse3.g.verified.cs new file mode 100644 index 0000000000..1a7f6fbe43 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.UpdateConnectorResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UpdateConnectorResponse3 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse4.g.verified.cs new file mode 100644 index 0000000000..011038d218 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.UpdateConnectorResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UpdateConnectorResponse4 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse5.g.verified.cs new file mode 100644 index 0000000000..bd39a2e7b3 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.UpdateConnectorResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UpdateConnectorResponse5 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse6.g.verified.cs new file mode 100644 index 0000000000..66f49deea2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.UpdateConnectorResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UpdateConnectorResponse6 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse7.g.verified.cs new file mode 100644 index 0000000000..9cf3e0339c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.UpdateConnectorResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UpdateConnectorResponse7 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse8.g.verified.cs new file mode 100644 index 0000000000..83661936f3 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.UpdateConnectorResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UpdateConnectorResponse8 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse9.g.verified.cs new file mode 100644 index 0000000000..ec6833dcee --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateConnectorResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.UpdateConnectorResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UpdateConnectorResponse9 + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateFinetunedModelRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateFinetunedModelRequest.g.verified.cs new file mode 100644 index 0000000000..dbb9288114 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateFinetunedModelRequest.g.verified.cs @@ -0,0 +1,82 @@ +//HintName: G.Models.UpdateFinetunedModelRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UpdateFinetunedModelRequest + { + /// + /// FinetunedModel name (e.g. `foobar`). + /// + [global::Newtonsoft.Json.JsonProperty("name", Required = global::Newtonsoft.Json.Required.Always)] + public string Name { get; set; } = default!; + + /// + /// User ID of the creator. + /// + [global::Newtonsoft.Json.JsonProperty("creator_id")] + public string? CreatorId { get; set; } + + /// + /// Organization ID. + /// + [global::Newtonsoft.Json.JsonProperty("organization_id")] + public string? OrganizationId { get; set; } + + /// + /// The configuration used for fine-tuning. + /// + [global::Newtonsoft.Json.JsonProperty("settings", Required = global::Newtonsoft.Json.Required.Always)] + public global::G.Settings Settings { get; set; } = default!; + + /// + /// The possible stages of a fine-tuned model life-cycle.
+ /// - STATUS_UNSPECIFIED: Unspecified status.
+ /// - STATUS_FINETUNING: The fine-tuned model is being fine-tuned.
+ /// - STATUS_DEPLOYING_API: The fine-tuned model is being deployed.
+ /// - STATUS_READY: The fine-tuned model is ready to receive requests.
+ /// - STATUS_FAILED: The fine-tuned model failed.
+ /// - STATUS_DELETED: The fine-tuned model was deleted.
+ /// - STATUS_TEMPORARILY_OFFLINE: The fine-tuned model is temporarily unavailable.
+ /// - STATUS_PAUSED: The fine-tuned model is paused (Vanilla only).
+ /// - STATUS_QUEUED: The fine-tuned model is queued for training.
+ /// Default Value: STATUS_UNSPECIFIED + ///
+ [global::Newtonsoft.Json.JsonProperty("status")] + public global::G.Status? Status { get; set; } = global::G.Status.STATUSUNSPECIFIED; + + /// + /// Creation timestamp. + /// + [global::Newtonsoft.Json.JsonProperty("created_at")] + public global::System.DateTime CreatedAt { get; set; } + + /// + /// Latest update timestamp. + /// + [global::Newtonsoft.Json.JsonProperty("updated_at")] + public global::System.DateTime UpdatedAt { get; set; } + + /// + /// Timestamp for the completed fine-tuning. + /// + [global::Newtonsoft.Json.JsonProperty("completed_at")] + public global::System.DateTime CompletedAt { get; set; } + + /// + /// Timestamp for the latest request to this fine-tuned model. + /// + [global::Newtonsoft.Json.JsonProperty("last_used")] + public global::System.DateTime LastUsed { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateFinetunedModelResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateFinetunedModelResponse.g.verified.cs new file mode 100644 index 0000000000..32dc17b13f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UpdateFinetunedModelResponse.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.UpdateFinetunedModelResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// Response to a request to update a fine-tuned model. + /// + public sealed partial class UpdateFinetunedModelResponse + { + /// + /// This resource represents a fine-tuned model. + /// + [global::Newtonsoft.Json.JsonProperty("finetuned_model")] + public global::G.FinetunedModel? FinetunedModel { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Usage.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Usage.g.verified.cs new file mode 100644 index 0000000000..c54f2a6124 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.Usage.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.Usage.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Usage + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("billed_units")] + public global::G.UsageBilledUnits? BilledUnits { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("tokens")] + public global::G.UsageTokens? Tokens { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UsageBilledUnits.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UsageBilledUnits.g.verified.cs new file mode 100644 index 0000000000..a858975431 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UsageBilledUnits.g.verified.cs @@ -0,0 +1,42 @@ +//HintName: G.Models.UsageBilledUnits.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UsageBilledUnits + { + /// + /// The number of billed input tokens. + /// + [global::Newtonsoft.Json.JsonProperty("input_tokens")] + public double InputTokens { get; set; } + + /// + /// The number of billed output tokens. + /// + [global::Newtonsoft.Json.JsonProperty("output_tokens")] + public double OutputTokens { get; set; } + + /// + /// The number of billed search units. + /// + [global::Newtonsoft.Json.JsonProperty("search_units")] + public double SearchUnits { get; set; } + + /// + /// The number of billed classifications units. + /// + [global::Newtonsoft.Json.JsonProperty("classifications")] + public double Classifications { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UsageTokens.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UsageTokens.g.verified.cs new file mode 100644 index 0000000000..6e97a92c81 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UsageTokens.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.UsageTokens.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UsageTokens + { + /// + /// The number of tokens used as input to the model. + /// + [global::Newtonsoft.Json.JsonProperty("input_tokens")] + public double InputTokens { get; set; } + + /// + /// The number of tokens produced by the model. + /// + [global::Newtonsoft.Json.JsonProperty("output_tokens")] + public double OutputTokens { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UserMessage.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UserMessage.g.verified.cs new file mode 100644 index 0000000000..987b5fb4fc --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UserMessage.g.verified.cs @@ -0,0 +1,39 @@ +//HintName: G.Models.UserMessage.g.cs + +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// A message from the user. + /// + public sealed partial class UserMessage + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("role")] + public global::G.UserMessageRole Role { get; set; } + + /// + /// The content of the message. This can be a string or a list of content blocks.
+ /// If a string is provided, it will be treated as a text content block. + ///
+ [global::Newtonsoft.Json.JsonProperty("content", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.OneOf> Content { get; set; } = default!; + + /// + /// Documents seen by the model when generating the reply. + /// + [global::Newtonsoft.Json.JsonProperty("documents")] + public global::System.Collections.Generic.IList? Documents { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UserMessageRole.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UserMessageRole.g.verified.cs new file mode 100644 index 0000000000..64860d6dd3 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.UserMessageRole.g.verified.cs @@ -0,0 +1,48 @@ +//HintName: G.Models.UserMessageRole.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + [global::System.Runtime.Serialization.DataContract] + public enum UserMessageRole + { + /// + /// + /// + [global::System.Runtime.Serialization.EnumMember(Value="user")] + User, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UserMessageRoleExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UserMessageRole value) + { + return value switch + { + UserMessageRole.User => "user", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UserMessageRole? ToEnum(string value) + { + return value switch + { + "user" => UserMessageRole.User, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.WandbConfig.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.WandbConfig.g.verified.cs new file mode 100644 index 0000000000..ee24d46173 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.WandbConfig.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.WandbConfig.g.cs + +#nullable enable + +namespace G +{ + /// + /// The Weights & Biases configuration. + /// + public sealed partial class WandbConfig + { + /// + /// The WandB project name to be used during training. + /// + [global::Newtonsoft.Json.JsonProperty("project", Required = global::Newtonsoft.Json.Required.Always)] + public string Project { get; set; } = default!; + + /// + /// The WandB API key to be used during training. + /// + [global::Newtonsoft.Json.JsonProperty("api_key", Required = global::Newtonsoft.Json.Required.Always)] + public string ApiKey { get; set; } = default!; + + /// + /// The WandB entity name to be used during training. + /// + [global::Newtonsoft.Json.JsonProperty("entity")] + public string? Entity { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.ModelsClient.GetModel.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.ModelsClient.GetModel.g.verified.cs new file mode 100644 index 0000000000..e927d05d0f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.ModelsClient.GetModel.g.verified.cs @@ -0,0 +1,99 @@ +//HintName: G.ModelsClient.GetModel.g.cs + +#nullable enable + +namespace G +{ + public partial class ModelsClient + { + partial void PrepareGetModelArguments( + global::System.Net.Http.HttpClient httpClient, + ref string model, + ref string? xClientName); + partial void PrepareGetModelRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string model, + string? xClientName); + partial void ProcessGetModelResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetModelResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get a Model
+ /// Returns the details of a model, provided its name. + ///
+ /// + /// Example: command-r + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GetModelAsync( + string model, + string? xClientName, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareGetModelArguments( + httpClient: _httpClient, + model: ref model, + xClientName: ref xClientName); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/models/{model}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareGetModelRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + model: model, + xClientName: xClientName); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessGetModelResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessGetModelResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.ModelsClient.ListModels.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.ModelsClient.ListModels.g.verified.cs new file mode 100644 index 0000000000..43a0b16eeb --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.ModelsClient.ListModels.g.verified.cs @@ -0,0 +1,122 @@ +//HintName: G.ModelsClient.ListModels.g.cs + +#nullable enable + +namespace G +{ + public partial class ModelsClient + { + partial void PrepareListModelsArguments( + global::System.Net.Http.HttpClient httpClient, + ref double pageSize, + ref string? pageToken, + ref global::G.CompatibleEndpoint? endpoint, + ref bool defaultOnly); + partial void PrepareListModelsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + double pageSize, + string? pageToken, + global::G.CompatibleEndpoint? endpoint, + bool defaultOnly); + partial void ProcessListModelsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListModelsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// List Models
+ /// Returns a list of models available for use. The list contains models from Cohere as well as your fine-tuned models. + ///
+ /// + /// + /// + /// One of the Cohere API endpoints that the model can be used with. + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ListModelsAsync( + double pageSize, + string? pageToken, + global::G.CompatibleEndpoint? endpoint, + bool defaultOnly, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareListModelsArguments( + httpClient: _httpClient, + pageSize: ref pageSize, + pageToken: ref pageToken, + endpoint: ref endpoint, + defaultOnly: ref defaultOnly); + + var endpointValue = endpoint switch + { + global::G.CompatibleEndpoint.Chat => "chat", + global::G.CompatibleEndpoint.Embed => "embed", + global::G.CompatibleEndpoint.Classify => "classify", + global::G.CompatibleEndpoint.Summarize => "summarize", + global::G.CompatibleEndpoint.Rerank => "rerank", + global::G.CompatibleEndpoint.Rate => "rate", + global::G.CompatibleEndpoint.Generate => "generate", + _ => throw new global::System.NotImplementedException("Enum value not implemented."), + }; + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/models?page_size={pageSize}&page_token={pageToken}&endpoint={endpointValue}&default_only={defaultOnly}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareListModelsRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + pageSize: pageSize, + pageToken: pageToken, + endpoint: endpoint, + defaultOnly: defaultOnly); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessListModelsResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessListModelsResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.ModelsClient.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.ModelsClient.g.verified.cs new file mode 100644 index 0000000000..c3f9d5fd19 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.ModelsClient.g.verified.cs @@ -0,0 +1,60 @@ +//HintName: G.ModelsClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class ModelsClient : global::System.IDisposable + { + /// + /// production + /// + public const string BaseUrl = "https://api.cohere.com"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::Newtonsoft.Json.JsonSerializerSettings _jsonSerializerOptions; + + + /// + /// Creates a new instance of the ModelsClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public ModelsClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::Newtonsoft.Json.JsonSerializerSettings? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::Newtonsoft.Json.JsonSerializerSettings(); + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Polyfills.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Polyfills.g.verified.cs new file mode 100644 index 0000000000..241c8bfd80 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Polyfills.g.verified.cs @@ -0,0 +1,54 @@ +//HintName: G.Polyfills.g.cs + +#if !NET6_0_OR_GREATER +#nullable enable + +namespace G +{ + /// + /// + /// + public static partial class OpenApiGeneratorPolyfills + { + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsStringAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsStringAsync(); + } + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsStreamAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsStreamAsync(); + } + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsByteArrayAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsByteArrayAsync(); + } + } +} +#endif \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#OneOf.1.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#OneOf.1.g.verified.cs new file mode 100644 index 0000000000..5f34723afb --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#OneOf.1.g.verified.cs @@ -0,0 +1,115 @@ +//HintName: OneOf.1.g.cs +using System.Linq; + +#nullable enable + +namespace System +{ + /// + /// + /// + public readonly partial struct OneOf : global::System.IEquatable> + { + /// + /// + /// +#if NET6_0_OR_GREATER + public T1? Value1 { get; init; } +#else + public T1? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator OneOf(T1 value) => new OneOf(value); + + /// + /// + /// + public static implicit operator T1?(OneOf @this) => @this.Value1; + + /// + /// + /// + public OneOf(T1? value) + { + Value1 = value; + } + + /// + /// + /// + public object? Object => + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(T1), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(OneOf other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) + ; + } + + /// + /// + /// + public static bool operator ==(OneOf obj1, OneOf obj2) + { + return global::System.Collections.Generic.EqualityComparer>.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(OneOf obj1, OneOf obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is OneOf o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#OneOf.2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#OneOf.2.g.verified.cs new file mode 100644 index 0000000000..43d464658e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#OneOf.2.g.verified.cs @@ -0,0 +1,166 @@ +//HintName: OneOf.2.g.cs +using System.Linq; + +#nullable enable + +namespace System +{ + /// + /// + /// + public readonly partial struct OneOf : global::System.IEquatable> + { + /// + /// + /// +#if NET6_0_OR_GREATER + public T1? Value1 { get; init; } +#else + public T1? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator OneOf(T1 value) => new OneOf(value); + + /// + /// + /// + public static implicit operator T1?(OneOf @this) => @this.Value1; + + /// + /// + /// + public OneOf(T1? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public T2? Value2 { get; init; } +#else + public T2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator OneOf(T2 value) => new OneOf(value); + + /// + /// + /// + public static implicit operator T2?(OneOf @this) => @this.Value2; + + /// + /// + /// + public OneOf(T2? value) + { + Value2 = value; + } + + /// + /// + /// + public OneOf( + T1? value1, + T2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && !IsValue2 || !IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(T1), + Value2, + typeof(T2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(OneOf other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(OneOf obj1, OneOf obj2) + { + return global::System.Collections.Generic.EqualityComparer>.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(OneOf obj1, OneOf obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is OneOf o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/Tests.Cohere_Diagnostics.verified.txt b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/Tests.Cohere_Diagnostics.verified.txt new file mode 100644 index 0000000000..ad47dbb93f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/Tests.Cohere_Diagnostics.verified.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.Authorizations.Bearer.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.Authorizations.Bearer.g.verified.cs new file mode 100644 index 0000000000..9e50a716ae --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.Authorizations.Bearer.g.verified.cs @@ -0,0 +1,23 @@ +//HintName: G.Api.Authorizations.Bearer.g.cs + +#nullable enable + +namespace G +{ + public sealed partial class Api + { + /// + /// Authorize using bearer authentication. + /// + /// + public void AuthorizeUsingBearer( + string apiKey) + { + apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + + _httpClient.DefaultRequestHeaders.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: "Bearer", + parameter: apiKey); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.Chat.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.Chat.g.verified.cs new file mode 100644 index 0000000000..adc65c7b23 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.Chat.g.verified.cs @@ -0,0 +1,332 @@ +//HintName: G.Api.Chat.g.cs + +#nullable enable + +namespace G +{ + public partial class Api + { + partial void PrepareChatArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? xClientName, + global::G.ChatRequest request); + partial void PrepareChatRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? xClientName, + global::G.ChatRequest request); + partial void ProcessChatResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessChatResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Chat
+ /// Generates a text response to a user message.
+ /// To learn how to use the Chat API with Streaming and RAG follow our [Text Generation guides](https://docs.cohere.com/docs/chat-api). + ///
+ /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ChatAsync( + string? xClientName, + global::G.ChatRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareChatArguments( + httpClient: _httpClient, + xClientName: ref xClientName, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/chat", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareChatRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + xClientName: xClientName, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessChatResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessChatResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize?>(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Chat
+ /// Generates a text response to a user message.
+ /// To learn how to use the Chat API with Streaming and RAG follow our [Text Generation guides](https://docs.cohere.com/docs/chat-api). + ///
+ /// + /// + /// Text input for the model to respond to.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + /// + /// + /// Defaults to `command-r-plus`.
+ /// The name of a compatible [Cohere model](https://docs.cohere.com/docs/models) or the ID of a [fine-tuned](https://docs.cohere.com/docs/chat-fine-tuning) model.
+ /// Compatible Deployments: Cohere Platform, Private Deployments + /// + /// + /// Defaults to `false`.
+ /// When `true`, the response will be a JSON stream of events. The final event will contain the complete response, and will have an `event_type` of `"stream-end"`.
+ /// Streaming is beneficial for user interfaces that render the contents of the response piece by piece, as it gets generated.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + /// + /// + /// When specified, the default Cohere preamble will be replaced with the provided one. Preambles are a part of the prompt used to adjust the model's overall behavior and conversation style, and use the `SYSTEM` role.
+ /// The `SYSTEM` role is also used for the contents of the optional `chat_history=` parameter. When used with the `chat_history=` parameter it adds content throughout a conversation. Conversely, when used with the `preamble=` parameter it adds content at the start of the conversation only.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + /// + /// + /// A list of previous messages between the user and the model, giving the model conversational context for responding to the user's `message`.
+ /// Each item represents a single message in the chat history, excluding the current user turn. It has two properties: `role` and `message`. The `role` identifies the sender (`CHATBOT`, `SYSTEM`, or `USER`), while the `message` contains the text content.
+ /// The chat_history parameter should not be used for `SYSTEM` messages in most cases. Instead, to add a `SYSTEM` role message at the beginning of a conversation, the `preamble` parameter should be used.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + /// + /// + /// An alternative to `chat_history`.
+ /// Providing a `conversation_id` creates or resumes a persisted conversation with the specified ID. The ID can be any non empty string.
+ /// Compatible Deployments: Cohere Platform + /// + /// + /// Defaults to `AUTO` when `connectors` are specified and `OFF` in all other cases.
+ /// Dictates how the prompt will be constructed.
+ /// With `prompt_truncation` set to "AUTO", some elements from `chat_history` and `documents` will be dropped in an attempt to construct a prompt that fits within the model's context length limit. During this process the order of the documents and chat history will be changed and ranked by relevance.
+ /// With `prompt_truncation` set to "AUTO_PRESERVE_ORDER", some elements from `chat_history` and `documents` will be dropped in an attempt to construct a prompt that fits within the model's context length limit. During this process the order of the documents and chat history will be preserved as they are inputted into the API.
+ /// With `prompt_truncation` set to "OFF", no elements will be dropped. If the sum of the inputs exceeds the model's context length limit, a `TooManyTokens` error will be returned.
+ /// Compatible Deployments: Cohere Platform Only AUTO_PRESERVE_ORDER: Azure, AWS Sagemaker/Bedrock, Private Deployments + /// + /// + /// Accepts `{"id": "web-search"}`, and/or the `"id"` for a custom [connector](https://docs.cohere.com/docs/connectors), if you've [created](https://docs.cohere.com/docs/creating-and-deploying-a-connector) one.
+ /// When specified, the model's reply will be enriched with information found by querying each of the connectors (RAG).
+ /// Compatible Deployments: Cohere Platform + /// + /// + /// Defaults to `false`.
+ /// When `true`, the response will only contain a list of generated search queries, but no search will take place, and no reply from the model to the user's `message` will be generated.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + /// + /// + /// A list of relevant documents that the model can cite to generate a more accurate reply. Each document is a string-string dictionary.
+ /// Example:
+ /// ```
+ /// [
+ /// { "title": "Tall penguins", "text": "Emperor penguins are the tallest." },
+ /// { "title": "Penguin habitats", "text": "Emperor penguins only live in Antarctica." },
+ /// ]
+ /// ```
+ /// Keys and values from each document will be serialized to a string and passed to the model. The resulting generation will include citations that reference some of these documents.
+ /// Some suggested keys are "text", "author", and "date". For better generation quality, it is recommended to keep the total word count of the strings in the dictionary to under 300 words.
+ /// An `id` field (string) can be optionally supplied to identify the document in the citations. This field will not be passed to the model.
+ /// An `_excludes` field (array of strings) can be optionally supplied to omit some key-value pairs from being shown to the model. The omitted fields will still show up in the citation object. The "_excludes" field will not be passed to the model.
+ /// See ['Document Mode'](https://docs.cohere.com/docs/retrieval-augmented-generation-rag#document-mode) in the guide for more information.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + /// + /// + /// Defaults to `"accurate"`.
+ /// Dictates the approach taken to generating citations as part of the RAG flow by allowing the user to specify whether they want `"accurate"` results, `"fast"` results or no results.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + /// + /// + /// Defaults to `0.3`.
+ /// A non-negative float that tunes the degree of randomness in generation. Lower temperatures mean less random generations, and higher temperatures mean more random generations.
+ /// Randomness can be further maximized by increasing the value of the `p` parameter.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + /// + /// + /// The maximum number of tokens the model will generate as part of the response. Note: Setting a low value may result in incomplete generations.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + /// + /// + /// The maximum number of input tokens to send to the model. If not specified, `max_input_tokens` is the model's context length limit minus a small buffer.
+ /// Input will be truncated according to the `prompt_truncation` parameter.
+ /// Compatible Deployments: Cohere Platform + /// + /// + /// Ensures only the top `k` most likely tokens are considered for generation at each step.
+ /// Defaults to `0`, min value of `0`, max value of `500`.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments
+ /// Default Value: 0 + /// + /// + /// Ensures that only the most likely tokens, with total probability mass of `p`, are considered for generation at each step. If both `k` and `p` are enabled, `p` acts after `k`.
+ /// Defaults to `0.75`. min value of `0.01`, max value of `0.99`.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments
+ /// Default Value: 0.75 + /// + /// + /// If specified, the backend will make a best effort to sample tokens
+ /// deterministically, such that repeated requests with the same
+ /// seed and parameters should return the same result. However,
+ /// determinism cannot be totally guaranteed.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + /// + /// + /// A list of up to 5 strings that the model will use to stop generation. If the model generates a string that matches any of the strings in the list, it will stop generating tokens and return the generated text up to that point not including the stop sequence.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + /// + /// + /// Defaults to `0.0`, min value of `0.0`, max value of `1.0`.
+ /// Used to reduce repetitiveness of generated tokens. The higher the value, the stronger a penalty is applied to previously present tokens, proportional to how many times they have already appeared in the prompt or prior generation.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + /// + /// + /// Defaults to `0.0`, min value of `0.0`, max value of `1.0`.
+ /// Used to reduce repetitiveness of generated tokens. Similar to `frequency_penalty`, except that this penalty is applied equally to all tokens that have already appeared, regardless of their exact frequencies.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + /// + /// + /// A list of available tools (functions) that the model may suggest invoking before producing a text response.
+ /// When `tools` is passed (without `tool_results`), the `text` field in the response will be `""` and the `tool_calls` field in the response will be populated with a list of tool calls that need to be made. If no calls need to be made, the `tool_calls` array will be empty.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + /// + /// + /// A list of results from invoking tools recommended by the model in the previous chat turn. Results are used to produce a text response and will be referenced in citations. When using `tool_results`, `tools` must be passed as well.
+ /// Each tool_result contains information about how it was invoked, as well as a list of outputs in the form of dictionaries.
+ /// **Note**: `outputs` must be a list of objects. If your tool returns a single object (eg `{"status": 200}`), make sure to wrap it in a list.
+ /// ```
+ /// tool_results = [
+ /// {
+ /// "call": {
+ /// "name": <tool name>,
+ /// "parameters": {
+ /// <param name>: <param value>
+ /// }
+ /// },
+ /// "outputs": [{
+ /// <key>: <value>
+ /// }]
+ /// },
+ /// ...
+ /// ]
+ /// ```
+ /// **Note**: Chat calls with `tool_results` should not be included in the Chat history to avoid duplication of the message text.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + /// + /// + /// Forces the chat to be single step. Defaults to `false`. + /// + /// + /// Configuration for forcing the model output to adhere to the specified format. Supported on [Command R](https://docs.cohere.com/docs/command-r), [Command R+](https://docs.cohere.com/docs/command-r-plus) and newer models.
+ /// The model can be forced into outputting JSON objects (with up to 5 levels of nesting) by setting `{ "type": "json_object" }`.
+ /// A [JSON Schema](https://json-schema.org/) can optionally be provided, to ensure a specific structure.
+ /// **Note**: When using `{ "type": "json_object" }` your `message` should always explicitly instruct the model to generate a JSON (eg: _"Generate a JSON ..."_) . Otherwise the model may end up getting stuck generating an infinite stream of characters and eventually run out of context length.
+ /// **Limitation**: The parameter is not supported in RAG mode (when any of `connectors`, `documents`, `tools`, `tool_results` are provided). + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ChatAsync( + string message, + string? xClientName = default, + string? model = default, + bool stream = default, + string? preamble = default, + global::System.Collections.Generic.IList? chatHistory = default, + string? conversationId = default, + global::G.ChatRequestPromptTruncation? promptTruncation = default, + global::System.Collections.Generic.IList? connectors = default, + bool searchQueriesOnly = default, + global::System.Collections.Generic.IList? documents = default, + global::G.ChatRequestCitationQuality? citationQuality = default, + float temperature = default, + int maxTokens = default, + int maxInputTokens = default, + int k = 0, + double p = 0.75, + int seed = default, + global::System.Collections.Generic.IList? stopSequences = default, + double frequencyPenalty = default, + double presencePenalty = default, + global::System.Collections.Generic.IList? tools = default, + global::System.Collections.Generic.IList? toolResults = default, + bool forceSingleStep = default, + global::G.ResponseFormat? responseFormat = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.ChatRequest + { + Message = message, + Model = model, + Stream = stream, + Preamble = preamble, + ChatHistory = chatHistory, + ConversationId = conversationId, + PromptTruncation = promptTruncation, + Connectors = connectors, + SearchQueriesOnly = searchQueriesOnly, + Documents = documents, + CitationQuality = citationQuality, + Temperature = temperature, + MaxTokens = maxTokens, + MaxInputTokens = maxInputTokens, + K = k, + P = p, + Seed = seed, + StopSequences = stopSequences, + FrequencyPenalty = frequencyPenalty, + PresencePenalty = presencePenalty, + Tools = tools, + ToolResults = toolResults, + ForceSingleStep = forceSingleStep, + ResponseFormat = responseFormat, + }; + + return await ChatAsync( + xClientName: xClientName, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.Chatv2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.Chatv2.g.verified.cs new file mode 100644 index 0000000000..aa455dad8a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.Chatv2.g.verified.cs @@ -0,0 +1,200 @@ +//HintName: G.Api.Chatv2.g.cs + +#nullable enable + +namespace G +{ + public partial class Api + { + partial void PrepareChatv2Arguments( + global::System.Net.Http.HttpClient httpClient, + global::G.Chatv2Request request); + partial void PrepareChatv2Request( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::G.Chatv2Request request); + partial void ProcessChatv2Response( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessChatv2ResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Chat with the model
+ /// Generates a message from the model in response to a provided conversation. To learn how to use the Chat API with Streaming and RAG follow our Text Generation guides. + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> Chatv2Async( + global::G.Chatv2Request request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareChatv2Arguments( + httpClient: _httpClient, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v2/chat", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareChatv2Request( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessChatv2Response( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessChatv2ResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize?>(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Chat with the model
+ /// Generates a message from the model in response to a provided conversation. To learn how to use the Chat API with Streaming and RAG follow our Text Generation guides. + ///
+ /// + /// The name of a compatible [Cohere model](https://docs.cohere.com/docs/models) (such as command-r or command-r-plus) or the ID of a [fine-tuned](https://docs.cohere.com/docs/chat-fine-tuning) model. + /// + /// + /// A list of chat messages in chronological order, representing a conversation between the user and the model.
+ /// Messages can be from `User`, `Assistant`, `Tool` and `System` roles. Learn more about messages and roles in [the Chat API guide](https://docs.cohere.com/docs/chat-api). + /// + /// + /// A list of available tools (functions) that the model may suggest invoking before producing a text response.
+ /// When `tools` is passed (without `tool_results`), the `text` content in the response will be empty and the `tool_calls` field in the response will be populated with a list of tool calls that need to be made. If no calls need to be made, the `tool_calls` array will be empty. + /// + /// + /// Defaults to `"accurate"`.
+ /// Dictates the approach taken to generating citations as part of the RAG flow by allowing the user to specify whether they want `"accurate"` results, `"fast"` results or no results. + /// + /// + /// Configuration for forcing the model output to adhere to the specified format. Supported on [Command R](https://docs.cohere.com/docs/command-r), [Command R+](https://docs.cohere.com/docs/command-r-plus) and newer models.
+ /// The model can be forced into outputting JSON objects (with up to 5 levels of nesting) by setting `{ "type": "json_object" }`.
+ /// A [JSON Schema](https://json-schema.org/) can optionally be provided, to ensure a specific structure.
+ /// **Note**: When using `{ "type": "json_object" }` your `message` should always explicitly instruct the model to generate a JSON (eg: _"Generate a JSON ..."_) . Otherwise the model may end up getting stuck generating an infinite stream of characters and eventually run out of context length.
+ /// **Limitation**: The parameter is not supported in RAG mode (when any of `connectors`, `documents`, `tools`, `tool_results` are provided). + /// + /// + /// The maximum number of tokens the model will generate as part of the response. Note: Setting a low value may result in incomplete generations. + /// + /// + /// A list of up to 5 strings that the model will use to stop generation. If the model generates a string that matches any of the strings in the list, it will stop generating tokens and return the generated text up to that point not including the stop sequence. + /// + /// + /// Defaults to `0.3`.
+ /// A non-negative float that tunes the degree of randomness in generation. Lower temperatures mean less random generations, and higher temperatures mean more random generations.
+ /// Randomness can be further maximized by increasing the value of the `p` parameter. + /// + /// + /// If specified, the backend will make a best effort to sample tokens
+ /// deterministically, such that repeated requests with the same
+ /// seed and parameters should return the same result. However,
+ /// determinism cannot be totally guaranteed. + /// + /// + /// Defaults to `0.0`, min value of `0.0`, max value of `1.0`.
+ /// Used to reduce repetitiveness of generated tokens. The higher the value, the stronger a penalty is applied to previously present tokens, proportional to how many times they have already appeared in the prompt or prior generation. + /// + /// + /// Defaults to `0.0`, min value of `0.0`, max value of `1.0`.
+ /// Used to reduce repetitiveness of generated tokens. Similar to `frequency_penalty`, except that this penalty is applied equally to all tokens that have already appeared, regardless of their exact frequencies. + /// + /// + /// Ensures only the top `k` most likely tokens are considered for generation at each step.
+ /// Defaults to `0`, min value of `0`, max value of `500`.
+ /// Default Value: 0F + /// + /// + /// Ensures that only the most likely tokens, with total probability mass of `p`, are considered for generation at each step. If both `k` and `p` are enabled, `p` acts after `k`.
+ /// Defaults to `0.75`. min value of `0.01`, max value of `0.99`.
+ /// Default Value: 0.75F + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> Chatv2Async( + string model, + global::System.Collections.Generic.IList messages, + global::System.Collections.Generic.IList? tools = default, + global::G.Chatv2RequestCitationMode? citationMode = default, + global::G.ResponseFormat2? responseFormat = default, + int maxTokens = default, + global::System.Collections.Generic.IList? stopSequences = default, + float temperature = default, + int seed = default, + float frequencyPenalty = default, + float presencePenalty = default, + float k = 0F, + float p = 0.75F, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.Chatv2Request + { + Model = model, + Messages = messages, + Tools = tools, + CitationMode = citationMode, + ResponseFormat = responseFormat, + MaxTokens = maxTokens, + StopSequences = stopSequences, + Temperature = temperature, + Seed = seed, + FrequencyPenalty = frequencyPenalty, + PresencePenalty = presencePenalty, + K = k, + P = p, + }; + + return await Chatv2Async( + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.CheckAPIKey.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.CheckAPIKey.g.verified.cs new file mode 100644 index 0000000000..41a772ffbf --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.CheckAPIKey.g.verified.cs @@ -0,0 +1,91 @@ +//HintName: G.Api.CheckAPIKey.g.cs + +#nullable enable + +namespace G +{ + public partial class Api + { + partial void PrepareCheckAPIKeyArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? xClientName); + partial void PrepareCheckAPIKeyRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? xClientName); + partial void ProcessCheckAPIKeyResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCheckAPIKeyResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Check API key
+ /// Checks that the api key in the Authorization header is valid and active + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CheckAPIKeyAsync( + string? xClientName, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareCheckAPIKeyArguments( + httpClient: _httpClient, + xClientName: ref xClientName); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/check-api-key", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareCheckAPIKeyRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + xClientName: xClientName); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessCheckAPIKeyResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessCheckAPIKeyResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.Classify.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.Classify.g.verified.cs new file mode 100644 index 0000000000..f29aef5ac8 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.Classify.g.verified.cs @@ -0,0 +1,160 @@ +//HintName: G.Api.Classify.g.cs + +#nullable enable + +namespace G +{ + public partial class Api + { + partial void PrepareClassifyArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? xClientName, + global::G.ClassifyRequest request); + partial void PrepareClassifyRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? xClientName, + global::G.ClassifyRequest request); + partial void ProcessClassifyResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessClassifyResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Classify
+ /// This endpoint makes a prediction about which label fits the specified text inputs best. To make a prediction, Classify uses the provided `examples` of text + label pairs as a reference.
+ /// Note: [Fine-tuned models](https://docs.cohere.com/docs/classify-fine-tuning) trained on classification examples don't require the `examples` parameter to be passed in explicitly. + ///
+ /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ClassifyAsync( + string? xClientName, + global::G.ClassifyRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareClassifyArguments( + httpClient: _httpClient, + xClientName: ref xClientName, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/classify", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareClassifyRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + xClientName: xClientName, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessClassifyResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessClassifyResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Classify
+ /// This endpoint makes a prediction about which label fits the specified text inputs best. To make a prediction, Classify uses the provided `examples` of text + label pairs as a reference.
+ /// Note: [Fine-tuned models](https://docs.cohere.com/docs/classify-fine-tuning) trained on classification examples don't require the `examples` parameter to be passed in explicitly. + ///
+ /// + /// + /// A list of up to 96 texts to be classified. Each one must be a non-empty string.
+ /// There is, however, no consistent, universal limit to the length a particular input can be. We perform classification on the first `x` tokens of each input, and `x` varies depending on which underlying model is powering classification. The maximum token length for each model is listed in the "max tokens" column [here](https://docs.cohere.com/docs/models).
+ /// Note: by default the `truncate` parameter is set to `END`, so tokens exceeding the limit will be automatically dropped. This behavior can be disabled by setting `truncate` to `NONE`, which will result in validation errors for longer texts. + /// + /// + /// An array of examples to provide context to the model. Each example is a text string and its associated label/class. Each unique label requires at least 2 examples associated with it; the maximum number of examples is 2500, and each example has a maximum length of 512 tokens. The values should be structured as `{text: "...",label: "..."}`.
+ /// Note: [Fine-tuned Models](https://docs.cohere.com/docs/classify-fine-tuning) trained on classification examples don't require the `examples` parameter to be passed in explicitly. + /// + /// + /// The identifier of the model. Currently available models are `embed-multilingual-v2.0`, `embed-english-light-v2.0`, and `embed-english-v2.0` (default). Smaller "light" models are faster, while larger models will perform better. [Fine-tuned models](https://docs.cohere.com/docs/fine-tuning) can also be supplied with their full ID. + /// + /// + /// The ID of a custom playground preset. You can create presets in the [playground](https://dashboard.cohere.com/playground/classify?model=large). If you use a preset, all other parameters become optional, and any included parameters will override the preset's parameters.
+ /// Example: my-preset-a58sbd + /// + /// + /// One of `NONE|START|END` to specify how the API will handle inputs longer than the maximum token length.
+ /// Passing `START` will discard the start of the input. `END` will discard the end of the input. In both cases, input is discarded until the remaining input is exactly the maximum input token length for the model.
+ /// If `NONE` is selected, when the input exceeds the maximum input token length an error will be returned.
+ /// Default Value: END + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ClassifyAsync( + global::System.Collections.Generic.IList inputs, + string? xClientName = default, + global::System.Collections.Generic.IList? examples = default, + string? model = default, + string? preset = default, + global::G.ClassifyRequestTruncate? truncate = global::G.ClassifyRequestTruncate.END, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.ClassifyRequest + { + Inputs = inputs, + Examples = examples, + Model = model, + Preset = preset, + Truncate = truncate, + }; + + return await ClassifyAsync( + xClientName: xClientName, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.Constructors.Bearer.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.Constructors.Bearer.g.verified.cs new file mode 100644 index 0000000000..1905775566 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.Constructors.Bearer.g.verified.cs @@ -0,0 +1,18 @@ +//HintName: G.Api.Constructors.Bearer.g.cs + +#nullable enable + +namespace G +{ + public sealed partial class Api + { + /// + public Api( + string apiKey, + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null) : this(httpClient, baseUri) + { + AuthorizeUsingBearer(apiKey); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.Detokenize.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.Detokenize.g.verified.cs new file mode 100644 index 0000000000..8178602edc --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.Detokenize.g.verified.cs @@ -0,0 +1,136 @@ +//HintName: G.Api.Detokenize.g.cs + +#nullable enable + +namespace G +{ + public partial class Api + { + partial void PrepareDetokenizeArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? xClientName, + global::G.DetokenizeRequest request); + partial void PrepareDetokenizeRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? xClientName, + global::G.DetokenizeRequest request); + partial void ProcessDetokenizeResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessDetokenizeResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Detokenize
+ /// This endpoint takes tokens using byte-pair encoding and returns their text representation. To learn more about tokenization and byte pair encoding, see the tokens page. + ///
+ /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DetokenizeAsync( + string? xClientName, + global::G.DetokenizeRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareDetokenizeArguments( + httpClient: _httpClient, + xClientName: ref xClientName, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/detokenize", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareDetokenizeRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + xClientName: xClientName, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessDetokenizeResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessDetokenizeResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Detokenize
+ /// This endpoint takes tokens using byte-pair encoding and returns their text representation. To learn more about tokenization and byte pair encoding, see the tokens page. + ///
+ /// + /// + /// The list of tokens to be detokenized. + /// + /// + /// An optional parameter to provide the model name. This will ensure that the detokenization is done by the tokenizer used by that model. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DetokenizeAsync( + global::System.Collections.Generic.IList tokens, + string model, + string? xClientName = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.DetokenizeRequest + { + Tokens = tokens, + Model = model, + }; + + return await DetokenizeAsync( + xClientName: xClientName, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.Embed.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.Embed.g.verified.cs new file mode 100644 index 0000000000..e64efd80e0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.Embed.g.verified.cs @@ -0,0 +1,176 @@ +//HintName: G.Api.Embed.g.cs + +#nullable enable + +namespace G +{ + public partial class Api + { + partial void PrepareEmbedArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? xClientName, + global::G.EmbedRequest request); + partial void PrepareEmbedRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? xClientName, + global::G.EmbedRequest request); + partial void ProcessEmbedResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessEmbedResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Embed
+ /// This endpoint returns text embeddings. An embedding is a list of floating point numbers that captures semantic information about the text that it represents.
+ /// Embeddings can be used to create text classifiers as well as empower semantic search. To learn more about embeddings, see the embedding page.
+ /// If you want to learn more how to use the embedding model, have a look at the [Semantic Search Guide](/docs/semantic-search). + ///
+ /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> EmbedAsync( + string? xClientName, + global::G.EmbedRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareEmbedArguments( + httpClient: _httpClient, + xClientName: ref xClientName, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/embed", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareEmbedRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + xClientName: xClientName, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessEmbedResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessEmbedResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize?>(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Embed
+ /// This endpoint returns text embeddings. An embedding is a list of floating point numbers that captures semantic information about the text that it represents.
+ /// Embeddings can be used to create text classifiers as well as empower semantic search. To learn more about embeddings, see the embedding page.
+ /// If you want to learn more how to use the embedding model, have a look at the [Semantic Search Guide](/docs/semantic-search). + ///
+ /// + /// + /// An array of strings for the model to embed. Maximum number of texts per call is `96`. We recommend reducing the length of each text to be under `512` tokens for optimal quality. + /// + /// + /// Defaults to embed-english-v2.0
+ /// The identifier of the model. Smaller "light" models are faster, while larger models will perform better. [Custom models](/docs/training-custom-models) can also be supplied with their full ID.
+ /// Available models and corresponding embedding dimensions:
+ /// * `embed-english-v3.0` 1024
+ /// * `embed-multilingual-v3.0` 1024
+ /// * `embed-english-light-v3.0` 384
+ /// * `embed-multilingual-light-v3.0` 384
+ /// * `embed-english-v2.0` 4096
+ /// * `embed-english-light-v2.0` 1024
+ /// * `embed-multilingual-v2.0` 768 + /// + /// + /// Specifies the type of input passed to the model. Required for embedding models v3 and higher.
+ /// - `"search_document"`: Used for embeddings stored in a vector database for search use-cases.
+ /// - `"search_query"`: Used for embeddings of search queries run against a vector DB to find relevant documents.
+ /// - `"classification"`: Used for embeddings passed through a text classifier.
+ /// - `"clustering"`: Used for the embeddings run through a clustering algorithm. + /// + /// + /// Specifies the types of embeddings you want to get back. Not required and default is None, which returns the Embed Floats response type. Can be one or more of the following types.
+ /// * `"float"`: Use this when you want to get back the default float embeddings. Valid for all models.
+ /// * `"int8"`: Use this when you want to get back signed int8 embeddings. Valid for only v3 models.
+ /// * `"uint8"`: Use this when you want to get back unsigned int8 embeddings. Valid for only v3 models.
+ /// * `"binary"`: Use this when you want to get back signed binary embeddings. Valid for only v3 models.
+ /// * `"ubinary"`: Use this when you want to get back unsigned binary embeddings. Valid for only v3 models. + /// + /// + /// One of `NONE|START|END` to specify how the API will handle inputs longer than the maximum token length.
+ /// Passing `START` will discard the start of the input. `END` will discard the end of the input. In both cases, input is discarded until the remaining input is exactly the maximum input token length for the model.
+ /// If `NONE` is selected, when the input exceeds the maximum input token length an error will be returned.
+ /// Default Value: END + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> EmbedAsync( + global::System.Collections.Generic.IList texts, + string? xClientName = default, + string? model = default, + global::G.EmbedInputType? inputType = default, + global::System.Collections.Generic.IList? embeddingTypes = default, + global::G.EmbedRequestTruncate? truncate = global::G.EmbedRequestTruncate.END, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.EmbedRequest + { + Texts = texts, + Model = model, + InputType = inputType, + EmbeddingTypes = embeddingTypes, + Truncate = truncate, + }; + + return await EmbedAsync( + xClientName: xClientName, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.Generate.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.Generate.g.verified.cs new file mode 100644 index 0000000000..2381274398 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.Generate.g.verified.cs @@ -0,0 +1,245 @@ +//HintName: G.Api.Generate.g.cs + +#nullable enable + +namespace G +{ + public partial class Api + { + partial void PrepareGenerateArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? xClientName, + global::G.GenerateRequest request); + partial void PrepareGenerateRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? xClientName, + global::G.GenerateRequest request); + partial void ProcessGenerateResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGenerateResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Generate
+ /// <Warning>
+ /// This API is marked as "Legacy" and is no longer maintained. Follow the [migration guide](/docs/migrating-from-cogenerate-to-cochat) to start using the Chat API.
+ /// </Warning>
+ /// Generates realistic text conditioned on a given input. + ///
+ /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GenerateAsync( + string? xClientName, + global::G.GenerateRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareGenerateArguments( + httpClient: _httpClient, + xClientName: ref xClientName, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/generate", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareGenerateRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + xClientName: xClientName, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessGenerateResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessGenerateResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Generate
+ /// <Warning>
+ /// This API is marked as "Legacy" and is no longer maintained. Follow the [migration guide](/docs/migrating-from-cogenerate-to-cochat) to start using the Chat API.
+ /// </Warning>
+ /// Generates realistic text conditioned on a given input. + ///
+ /// + /// + /// The input text that serves as the starting point for generating the response.
+ /// Note: The prompt will be pre-processed and modified before reaching the model.
+ /// Example: Please explain to me how LLMs work + /// + /// + /// The identifier of the model to generate with. Currently available models are `command` (default), `command-nightly` (experimental), `command-light`, and `command-light-nightly` (experimental).
+ /// Smaller, "light" models are faster, while larger models will perform better. [Custom models](/docs/training-custom-models) can also be supplied with their full ID. + /// + /// + /// The maximum number of generations that will be returned. Defaults to `1`, min value of `1`, max value of `5`. + /// + /// + /// When `true`, the response will be a JSON stream of events. Streaming is beneficial for user interfaces that render the contents of the response piece by piece, as it gets generated.
+ /// The final event will contain the complete response, and will contain an `is_finished` field set to `true`. The event will also contain a `finish_reason`, which can be one of the following:
+ /// - `COMPLETE` - the model sent back a finished reply
+ /// - `MAX_TOKENS` - the reply was cut off because the model reached the maximum number of tokens for its context length
+ /// - `ERROR` - something went wrong when generating the reply
+ /// - `ERROR_TOXIC` - the model generated a reply that was deemed toxic + /// + /// + /// The maximum number of tokens the model will generate as part of the response. Note: Setting a low value may result in incomplete generations.
+ /// This parameter is off by default, and if it's not specified, the model will continue generating until it emits an EOS completion token. See [BPE Tokens](/bpe-tokens-wiki) for more details.
+ /// Can only be set to `0` if `return_likelihoods` is set to `ALL` to get the likelihood of the prompt. + /// + /// + /// One of `NONE|START|END` to specify how the API will handle inputs longer than the maximum token length.
+ /// Passing `START` will discard the start of the input. `END` will discard the end of the input. In both cases, input is discarded until the remaining input is exactly the maximum input token length for the model.
+ /// If `NONE` is selected, when the input exceeds the maximum input token length an error will be returned.
+ /// Default Value: END + /// + /// + /// A non-negative float that tunes the degree of randomness in generation. Lower temperatures mean less random generations. See [Temperature](/temperature-wiki) for more details.
+ /// Defaults to `0.75`, min value of `0.0`, max value of `5.0`. + /// + /// + /// If specified, the backend will make a best effort to sample tokens
+ /// deterministically, such that repeated requests with the same
+ /// seed and parameters should return the same result. However,
+ /// determinism cannot be totally guaranteed.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + /// + /// + /// Identifier of a custom preset. A preset is a combination of parameters, such as prompt, temperature etc. You can create presets in the [playground](https://dashboard.cohere.com/playground/generate).
+ /// When a preset is specified, the `prompt` parameter becomes optional, and any included parameters will override the preset's parameters.
+ /// Example: my-preset-a58sbd + /// + /// + /// The generated text will be cut at the beginning of the earliest occurrence of an end sequence. The sequence will be excluded from the text. + /// + /// + /// The generated text will be cut at the end of the earliest occurrence of a stop sequence. The sequence will be included the text. + /// + /// + /// Ensures only the top `k` most likely tokens are considered for generation at each step.
+ /// Defaults to `0`, min value of `0`, max value of `500`. + /// + /// + /// Ensures that only the most likely tokens, with total probability mass of `p`, are considered for generation at each step. If both `k` and `p` are enabled, `p` acts after `k`.
+ /// Defaults to `0.75`. min value of `0.01`, max value of `0.99`. + /// + /// + /// Used to reduce repetitiveness of generated tokens. The higher the value, the stronger a penalty is applied to previously present tokens, proportional to how many times they have already appeared in the prompt or prior generation.
+ /// Using `frequency_penalty` in combination with `presence_penalty` is not supported on newer models. + /// + /// + /// Defaults to `0.0`, min value of `0.0`, max value of `1.0`.
+ /// Can be used to reduce repetitiveness of generated tokens. Similar to `frequency_penalty`, except that this penalty is applied equally to all tokens that have already appeared, regardless of their exact frequencies.
+ /// Using `frequency_penalty` in combination with `presence_penalty` is not supported on newer models. + /// + /// + /// One of `GENERATION|ALL|NONE` to specify how and if the token likelihoods are returned with the response. Defaults to `NONE`.
+ /// If `GENERATION` is selected, the token likelihoods will only be provided for generated text.
+ /// If `ALL` is selected, the token likelihoods will be provided both for the prompt and the generated text.
+ /// Default Value: NONE + /// + /// + /// When enabled, the user's prompt will be sent to the model without any pre-processing. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GenerateAsync( + string prompt, + string? xClientName = default, + string? model = default, + int numGenerations = default, + bool stream = default, + int maxTokens = default, + global::G.GenerateRequestTruncate? truncate = global::G.GenerateRequestTruncate.END, + double temperature = default, + int seed = default, + string? preset = default, + global::System.Collections.Generic.IList? endSequences = default, + global::System.Collections.Generic.IList? stopSequences = default, + int k = default, + double p = default, + double frequencyPenalty = default, + double presencePenalty = default, + global::G.GenerateRequestReturnLikelihoods? returnLikelihoods = global::G.GenerateRequestReturnLikelihoods.NONE, + bool rawPrompting = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.GenerateRequest + { + Prompt = prompt, + Model = model, + NumGenerations = numGenerations, + Stream = stream, + MaxTokens = maxTokens, + Truncate = truncate, + Temperature = temperature, + Seed = seed, + Preset = preset, + EndSequences = endSequences, + StopSequences = stopSequences, + K = k, + P = p, + FrequencyPenalty = frequencyPenalty, + PresencePenalty = presencePenalty, + ReturnLikelihoods = returnLikelihoods, + RawPrompting = rawPrompting, + }; + + return await GenerateAsync( + xClientName: xClientName, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.Rerank.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.Rerank.g.verified.cs new file mode 100644 index 0000000000..727769b3d5 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.Rerank.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Api.Rerank.g.cs + +#nullable enable + +namespace G +{ + public partial class Api + { + partial void PrepareRerankArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? xClientName, + global::G.RerankRequest request); + partial void PrepareRerankRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? xClientName, + global::G.RerankRequest request); + partial void ProcessRerankResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessRerankResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Rerank
+ /// This endpoint takes in a query and a list of texts and produces an ordered array with each text assigned a relevance score. + ///
+ /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task RerankAsync( + string? xClientName, + global::G.RerankRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareRerankArguments( + httpClient: _httpClient, + xClientName: ref xClientName, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/rerank", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareRerankRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + xClientName: xClientName, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessRerankResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessRerankResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Rerank
+ /// This endpoint takes in a query and a list of texts and produces an ordered array with each text assigned a relevance score. + ///
+ /// + /// + /// The identifier of the model to use, one of : `rerank-english-v3.0`, `rerank-multilingual-v3.0`, `rerank-english-v2.0`, `rerank-multilingual-v2.0` + /// + /// + /// The search query + /// + /// + /// A list of document objects or strings to rerank.
+ /// If a document is provided the text fields is required and all other fields will be preserved in the response.
+ /// The total max chunks (length of documents * max_chunks_per_doc) must be less than 10000.
+ /// We recommend a maximum of 1,000 documents for optimal endpoint performance. + /// + /// + /// The number of most relevant documents or indices to return, defaults to the length of the documents + /// + /// + /// If a JSON object is provided, you can specify which keys you would like to have considered for reranking. The model will rerank based on order of the fields passed in (i.e. rank_fields=['title','author','text'] will rerank using the values in title, author, text sequentially. If the length of title, author, and text exceeds the context length of the model, the chunking will not re-consider earlier fields). If not provided, the model will use the default text field for ranking. + /// + /// + /// - If false, returns results without the doc text - the api will return a list of {index, relevance score} where index is inferred from the list passed into the request.
+ /// - If true, returns results with the doc text passed in - the api will return an ordered list of {index, text, relevance score} where index + text refers to the list passed into the request.
+ /// Default Value: false + /// + /// + /// The maximum number of chunks to produce internally from a document
+ /// Default Value: 10 + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task RerankAsync( + string query, + global::System.Collections.Generic.IList> documents, + string? xClientName = default, + string? model = default, + int topN = default, + global::System.Collections.Generic.IList? rankFields = default, + bool returnDocuments = false, + int maxChunksPerDoc = 10, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.RerankRequest + { + Model = model, + Query = query, + Documents = documents, + TopN = topN, + RankFields = rankFields, + ReturnDocuments = returnDocuments, + MaxChunksPerDoc = maxChunksPerDoc, + }; + + return await RerankAsync( + xClientName: xClientName, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.Summarize.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.Summarize.g.verified.cs new file mode 100644 index 0000000000..3d8c352f7b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.Summarize.g.verified.cs @@ -0,0 +1,171 @@ +//HintName: G.Api.Summarize.g.cs + +#nullable enable + +namespace G +{ + public partial class Api + { + partial void PrepareSummarizeArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? xClientName, + global::G.SummarizeRequest request); + partial void PrepareSummarizeRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? xClientName, + global::G.SummarizeRequest request); + partial void ProcessSummarizeResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessSummarizeResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Summarize
+ /// <Warning>
+ /// This API is marked as "Legacy" and is no longer maintained. Follow the [migration guide](/docs/migrating-from-cogenerate-to-cochat) to start using the Chat API.
+ /// </Warning>
+ /// Generates a summary in English for a given text. + ///
+ /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task SummarizeAsync( + string? xClientName, + global::G.SummarizeRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareSummarizeArguments( + httpClient: _httpClient, + xClientName: ref xClientName, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/summarize", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareSummarizeRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + xClientName: xClientName, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessSummarizeResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessSummarizeResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Summarize
+ /// <Warning>
+ /// This API is marked as "Legacy" and is no longer maintained. Follow the [migration guide](/docs/migrating-from-cogenerate-to-cochat) to start using the Chat API.
+ /// </Warning>
+ /// Generates a summary in English for a given text. + ///
+ /// + /// + /// The text to generate a summary for. Can be up to 100,000 characters long. Currently the only supported language is English. + /// + /// + /// One of `short`, `medium`, `long`, or `auto` defaults to `auto`. Indicates the approximate length of the summary. If `auto` is selected, the best option will be picked based on the input text.
+ /// Default Value: medium + /// + /// + /// One of `paragraph`, `bullets`, or `auto`, defaults to `auto`. Indicates the style in which the summary will be delivered - in a free form paragraph or in bullet points. If `auto` is selected, the best option will be picked based on the input text.
+ /// Default Value: paragraph + /// + /// + /// The identifier of the model to generate the summary with. Currently available models are `command` (default), `command-nightly` (experimental), `command-light`, and `command-light-nightly` (experimental). Smaller, "light" models are faster, while larger models will perform better. + /// + /// + /// One of `low`, `medium`, `high`, or `auto`, defaults to `auto`. Controls how close to the original text the summary is. `high` extractiveness summaries will lean towards reusing sentences verbatim, while `low` extractiveness summaries will tend to paraphrase more. If `auto` is selected, the best option will be picked based on the input text.
+ /// Default Value: low + /// + /// + /// Ranges from 0 to 5. Controls the randomness of the output. Lower values tend to generate more “predictable” output, while higher values tend to generate more “creative” output. The sweet spot is typically between 0 and 1.
+ /// Default Value: 0.3 + /// + /// + /// A free-form instruction for modifying how the summaries get generated. Should complete the sentence "Generate a summary _". Eg. "focusing on the next steps" or "written by Yoda" + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task SummarizeAsync( + string text, + string? xClientName = default, + global::G.SummarizeRequestLength? length = global::G.SummarizeRequestLength.Medium, + global::G.SummarizeRequestFormat? format = global::G.SummarizeRequestFormat.Paragraph, + string? model = default, + global::G.SummarizeRequestExtractiveness? extractiveness = global::G.SummarizeRequestExtractiveness.Low, + double temperature = 0.3, + string? additionalCommand = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.SummarizeRequest + { + Text = text, + Length = length, + Format = format, + Model = model, + Extractiveness = extractiveness, + Temperature = temperature, + AdditionalCommand = additionalCommand, + }; + + return await SummarizeAsync( + xClientName: xClientName, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.Tokenize.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.Tokenize.g.verified.cs new file mode 100644 index 0000000000..c2a6eb463f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.Tokenize.g.verified.cs @@ -0,0 +1,136 @@ +//HintName: G.Api.Tokenize.g.cs + +#nullable enable + +namespace G +{ + public partial class Api + { + partial void PrepareTokenizeArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? xClientName, + global::G.TokenizeRequest request); + partial void PrepareTokenizeRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? xClientName, + global::G.TokenizeRequest request); + partial void ProcessTokenizeResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessTokenizeResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Tokenize
+ /// This endpoint splits input text into smaller units called tokens using byte-pair encoding (BPE). To learn more about tokenization and byte pair encoding, see the tokens page. + ///
+ /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task TokenizeAsync( + string? xClientName, + global::G.TokenizeRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareTokenizeArguments( + httpClient: _httpClient, + xClientName: ref xClientName, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/tokenize", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareTokenizeRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + xClientName: xClientName, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessTokenizeResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessTokenizeResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Tokenize
+ /// This endpoint splits input text into smaller units called tokens using byte-pair encoding (BPE). To learn more about tokenization and byte pair encoding, see the tokens page. + ///
+ /// + /// + /// The string to be tokenized, the minimum text length is 1 character, and the maximum text length is 65536 characters. + /// + /// + /// An optional parameter to provide the model name. This will ensure that the tokenization uses the tokenizer used by that model. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task TokenizeAsync( + string text, + string model, + string? xClientName = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.TokenizeRequest + { + Text = text, + Model = model, + }; + + return await TokenizeAsync( + xClientName: xClientName, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.g.verified.cs new file mode 100644 index 0000000000..3f5236fa25 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Api.g.verified.cs @@ -0,0 +1,224 @@ +//HintName: G.Api.g.cs + +#nullable enable + +namespace G +{ + /// + /// The Cohere Platform is centered around models.
+ /// Each model has a different amount of power (i.e. parameters), to be used for different tasks.
+ /// Cohere also supports finetuning of baseline models to improve performance on downstream tasks or to teach the model large quantities of information which cannot be extracted with few-shot learning or prompt engineering.
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class Api : global::System.IDisposable + { + /// + /// production + /// + public const string BaseUrl = "https://api.cohere.com"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::System.Text.Json.JsonSerializerOptions _jsonSerializerOptions; + + + /// + /// Datasets API + /// + public DatasetsClient Datasets => new DatasetsClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// Connectors API + /// + public ConnectorsClient Connectors => new ConnectorsClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// Embed Jobs API + /// + public EmbedJobsClient EmbedJobs => new EmbedJobsClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// Finetuning API (Beta) + /// + public FinetuningClient Finetuning => new FinetuningClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// + /// + public ModelsClient Models => new ModelsClient(_httpClient, jsonSerializerOptions: _jsonSerializerOptions); + + /// + /// Creates a new instance of the Api. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public Api( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::System.Text.Json.JsonSerializerOptions + { + PropertyNameCaseInsensitive = true, + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = + { + new global::OpenApiGenerator.JsonConverters.ChatRoleJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ChatRoleNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ResponseFormatTypeJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ResponseFormatTypeNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.FinishReasonJsonConverter(), + new global::OpenApiGenerator.JsonConverters.FinishReasonNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ChatStreamEventEventTypeJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ChatStreamEventEventTypeNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ChatStreamEndEventVariant2FinishReasonJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ChatStreamEndEventVariant2FinishReasonNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.TextContentTypeJsonConverter(), + new global::OpenApiGenerator.JsonConverters.TextContentTypeNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.UserMessageRoleJsonConverter(), + new global::OpenApiGenerator.JsonConverters.UserMessageRoleNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ToolCall2TypeJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ToolCall2TypeNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.AssistantMessageRoleJsonConverter(), + new global::OpenApiGenerator.JsonConverters.AssistantMessageRoleNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.SystemMessageRoleJsonConverter(), + new global::OpenApiGenerator.JsonConverters.SystemMessageRoleNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ToolContentTypeJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ToolContentTypeNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ToolMessage2RoleJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ToolMessage2RoleNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.Tool2TypeJsonConverter(), + new global::OpenApiGenerator.JsonConverters.Tool2TypeNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ChatFinishReasonJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ChatFinishReasonNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.AssistantMessageResponseRoleJsonConverter(), + new global::OpenApiGenerator.JsonConverters.AssistantMessageResponseRoleNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ChatStreamEventTypeTypeJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ChatStreamEventTypeTypeNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ChatMessageStartEventVariant2DeltaMessageRoleJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ChatMessageStartEventVariant2DeltaMessageRoleNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ChatContentStartEventVariant2DeltaMessageContentTypeJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ChatContentStartEventVariant2DeltaMessageContentTypeNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ChatToolCallStartEventVariant2DeltaToolCallTypeJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ChatToolCallStartEventVariant2DeltaToolCallTypeNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.GenerateStreamEventEventTypeJsonConverter(), + new global::OpenApiGenerator.JsonConverters.GenerateStreamEventEventTypeNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.EmbedInputTypeJsonConverter(), + new global::OpenApiGenerator.JsonConverters.EmbedInputTypeNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.EmbeddingTypeJsonConverter(), + new global::OpenApiGenerator.JsonConverters.EmbeddingTypeNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.EmbedFloatsResponseResponseTypeJsonConverter(), + new global::OpenApiGenerator.JsonConverters.EmbedFloatsResponseResponseTypeNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.EmbedByTypeResponseResponseTypeJsonConverter(), + new global::OpenApiGenerator.JsonConverters.EmbedByTypeResponseResponseTypeNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.EmbedJobStatusJsonConverter(), + new global::OpenApiGenerator.JsonConverters.EmbedJobStatusNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.EmbedJobTruncateJsonConverter(), + new global::OpenApiGenerator.JsonConverters.EmbedJobTruncateNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.CreateEmbedJobRequestTruncateJsonConverter(), + new global::OpenApiGenerator.JsonConverters.CreateEmbedJobRequestTruncateNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.DatasetValidationStatusJsonConverter(), + new global::OpenApiGenerator.JsonConverters.DatasetValidationStatusNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.DatasetTypeJsonConverter(), + new global::OpenApiGenerator.JsonConverters.DatasetTypeNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ConnectorAuthStatusJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ConnectorAuthStatusNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.AuthTokenTypeJsonConverter(), + new global::OpenApiGenerator.JsonConverters.AuthTokenTypeNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.GetClusterJobResponseStatusJsonConverter(), + new global::OpenApiGenerator.JsonConverters.GetClusterJobResponseStatusNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.UpdateClusterJobRequestStatusJsonConverter(), + new global::OpenApiGenerator.JsonConverters.UpdateClusterJobRequestStatusNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.CompatibleEndpointJsonConverter(), + new global::OpenApiGenerator.JsonConverters.CompatibleEndpointNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.BaseTypeJsonConverter(), + new global::OpenApiGenerator.JsonConverters.BaseTypeNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.StrategyJsonConverter(), + new global::OpenApiGenerator.JsonConverters.StrategyNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.StatusJsonConverter(), + new global::OpenApiGenerator.JsonConverters.StatusNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ChatRequestPromptTruncationJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ChatRequestPromptTruncationNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ChatRequestCitationQualityJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ChatRequestCitationQualityNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.Chatv2RequestCitationModeJsonConverter(), + new global::OpenApiGenerator.JsonConverters.Chatv2RequestCitationModeNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.GenerateRequestTruncateJsonConverter(), + new global::OpenApiGenerator.JsonConverters.GenerateRequestTruncateNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.GenerateRequestReturnLikelihoodsJsonConverter(), + new global::OpenApiGenerator.JsonConverters.GenerateRequestReturnLikelihoodsNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.EmbedRequestTruncateJsonConverter(), + new global::OpenApiGenerator.JsonConverters.EmbedRequestTruncateNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ClassifyRequestTruncateJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ClassifyRequestTruncateNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.SummarizeRequestLengthJsonConverter(), + new global::OpenApiGenerator.JsonConverters.SummarizeRequestLengthNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.SummarizeRequestFormatJsonConverter(), + new global::OpenApiGenerator.JsonConverters.SummarizeRequestFormatNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.SummarizeRequestExtractivenessJsonConverter(), + new global::OpenApiGenerator.JsonConverters.SummarizeRequestExtractivenessNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ClassifyResponseClassificationClassificationTypeJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ClassifyResponseClassificationClassificationTypeNullableJsonConverter(), + new global::OpenApiGenerator.JsonConverters.MessageJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ResponseFormatJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ChatStreamStartEventJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ChatSearchQueriesGenerationEventJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ChatSearchResultsEventJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ChatTextGenerationEventJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ChatCitationGenerationEventJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ChatToolCallsGenerationEventJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ChatStreamEndEventJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ChatToolCallsChunkEventJsonConverter(), + new global::OpenApiGenerator.JsonConverters.StreamedChatResponseJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ContentJsonConverter(), + new global::OpenApiGenerator.JsonConverters.OneOfJsonConverterFactory2(), + new global::OpenApiGenerator.JsonConverters.SourceJsonConverter(), + new global::OpenApiGenerator.JsonConverters.OneOfJsonConverterFactory1(), + new global::OpenApiGenerator.JsonConverters.ChatMessage2JsonConverter(), + new global::OpenApiGenerator.JsonConverters.ResponseFormat2JsonConverter(), + new global::OpenApiGenerator.JsonConverters.ChatMessageStartEventJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ChatContentStartEventJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ChatContentDeltaEventJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ChatContentEndEventJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ChatToolPlanDeltaEventJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ChatToolCallStartEventJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ChatToolCallDeltaEventJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ChatToolCallEndEventJsonConverter(), + new global::OpenApiGenerator.JsonConverters.CitationStartEventJsonConverter(), + new global::OpenApiGenerator.JsonConverters.CitationEndEventJsonConverter(), + new global::OpenApiGenerator.JsonConverters.ChatMessageEndEventJsonConverter(), + new global::OpenApiGenerator.JsonConverters.StreamedChatResponse2JsonConverter(), + new global::OpenApiGenerator.JsonConverters.GenerateStreamTextJsonConverter(), + new global::OpenApiGenerator.JsonConverters.GenerateStreamEndJsonConverter(), + new global::OpenApiGenerator.JsonConverters.GenerateStreamErrorJsonConverter(), + new global::OpenApiGenerator.JsonConverters.GenerateStreamedResponseJsonConverter(), + } + }; + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.ConnectorsClient.CreateConnector.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.ConnectorsClient.CreateConnector.g.verified.cs new file mode 100644 index 0000000000..451f9db1e2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.ConnectorsClient.CreateConnector.g.verified.cs @@ -0,0 +1,164 @@ +//HintName: G.ConnectorsClient.CreateConnector.g.cs + +#nullable enable + +namespace G +{ + public partial class ConnectorsClient + { + partial void PrepareCreateConnectorArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? xClientName, + global::G.CreateConnectorRequest request); + partial void PrepareCreateConnectorRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? xClientName, + global::G.CreateConnectorRequest request); + partial void ProcessCreateConnectorResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateConnectorResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Create a Connector
+ /// Creates a new connector. The connector is tested during registration and will cancel registration when the test is unsuccessful. See ['Creating and Deploying a Connector'](https://docs.cohere.com/docs/creating-and-deploying-a-connector) for more information. + ///
+ /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateConnectorAsync( + string? xClientName, + global::G.CreateConnectorRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareCreateConnectorArguments( + httpClient: _httpClient, + xClientName: ref xClientName, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/connectors", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareCreateConnectorRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + xClientName: xClientName, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessCreateConnectorResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessCreateConnectorResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Create a Connector
+ /// Creates a new connector. The connector is tested during registration and will cancel registration when the test is unsuccessful. See ['Creating and Deploying a Connector'](https://docs.cohere.com/docs/creating-and-deploying-a-connector) for more information. + ///
+ /// + /// + /// A human-readable name for the connector. + /// + /// + /// A description of the connector. + /// + /// + /// The URL of the connector that will be used to search for documents. + /// + /// + /// A list of fields to exclude from the prompt (fields remain in the document). + /// + /// + /// + /// Whether the connector is active or not.
+ /// Default Value: true + /// + /// + /// Whether a chat request should continue or not if the request to this connector fails.
+ /// Default Value: false + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateConnectorAsync( + string name, + string url, + string? xClientName = default, + string? description = default, + global::System.Collections.Generic.IList? excludes = default, + global::G.CreateConnectorOAuth? oauth = default, + bool active = true, + bool continueOnFailure = false, + global::G.CreateConnectorServiceAuth? serviceAuth = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.CreateConnectorRequest + { + Name = name, + Description = description, + Url = url, + Excludes = excludes, + Oauth = oauth, + Active = active, + ContinueOnFailure = continueOnFailure, + ServiceAuth = serviceAuth, + }; + + return await CreateConnectorAsync( + xClientName: xClientName, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.ConnectorsClient.DeleteConnector.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.ConnectorsClient.DeleteConnector.g.verified.cs new file mode 100644 index 0000000000..e37643d784 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.ConnectorsClient.DeleteConnector.g.verified.cs @@ -0,0 +1,97 @@ +//HintName: G.ConnectorsClient.DeleteConnector.g.cs + +#nullable enable + +namespace G +{ + public partial class ConnectorsClient + { + partial void PrepareDeleteConnectorArguments( + global::System.Net.Http.HttpClient httpClient, + ref string id, + ref string? xClientName); + partial void PrepareDeleteConnectorRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string id, + string? xClientName); + partial void ProcessDeleteConnectorResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessDeleteConnectorResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Delete a Connector
+ /// Delete a connector by ID. See ['Connectors'](https://docs.cohere.com/docs/connectors) for more information. + ///
+ /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteConnectorAsync( + string id, + string? xClientName, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareDeleteConnectorArguments( + httpClient: _httpClient, + id: ref id, + xClientName: ref xClientName); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Delete, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/connectors/{id}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareDeleteConnectorRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + id: id, + xClientName: xClientName); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessDeleteConnectorResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessDeleteConnectorResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.ConnectorsClient.GetConnector.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.ConnectorsClient.GetConnector.g.verified.cs new file mode 100644 index 0000000000..8de67eac16 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.ConnectorsClient.GetConnector.g.verified.cs @@ -0,0 +1,97 @@ +//HintName: G.ConnectorsClient.GetConnector.g.cs + +#nullable enable + +namespace G +{ + public partial class ConnectorsClient + { + partial void PrepareGetConnectorArguments( + global::System.Net.Http.HttpClient httpClient, + ref string id, + ref string? xClientName); + partial void PrepareGetConnectorRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string id, + string? xClientName); + partial void ProcessGetConnectorResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetConnectorResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get a Connector
+ /// Retrieve a connector by ID. See ['Connectors'](https://docs.cohere.com/docs/connectors) for more information. + ///
+ /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GetConnectorAsync( + string id, + string? xClientName, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareGetConnectorArguments( + httpClient: _httpClient, + id: ref id, + xClientName: ref xClientName); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/connectors/{id}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareGetConnectorRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + id: id, + xClientName: xClientName); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessGetConnectorResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessGetConnectorResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.ConnectorsClient.ListConnectors.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.ConnectorsClient.ListConnectors.g.verified.cs new file mode 100644 index 0000000000..6bad7bc280 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.ConnectorsClient.ListConnectors.g.verified.cs @@ -0,0 +1,107 @@ +//HintName: G.ConnectorsClient.ListConnectors.g.cs + +#nullable enable + +namespace G +{ + public partial class ConnectorsClient + { + partial void PrepareListConnectorsArguments( + global::System.Net.Http.HttpClient httpClient, + ref double limit, + ref double offset, + ref string? xClientName); + partial void PrepareListConnectorsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + double limit, + double offset, + string? xClientName); + partial void ProcessListConnectorsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListConnectorsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// List Connectors
+ /// Returns a list of connectors ordered by descending creation date (newer first). See ['Managing your Connector'](https://docs.cohere.com/docs/managing-your-connector) for more information. + ///
+ /// + /// Default Value: 30 + /// + /// + /// Default Value: 0 + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ListConnectorsAsync( + double limit, + double offset, + string? xClientName, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareListConnectorsArguments( + httpClient: _httpClient, + limit: ref limit, + offset: ref offset, + xClientName: ref xClientName); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/connectors?limit={limit}&offset={offset}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareListConnectorsRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + limit: limit, + offset: offset, + xClientName: xClientName); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessListConnectorsResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessListConnectorsResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.ConnectorsClient.OAuthAuthorizeConnector.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.ConnectorsClient.OAuthAuthorizeConnector.g.verified.cs new file mode 100644 index 0000000000..c577800cc6 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.ConnectorsClient.OAuthAuthorizeConnector.g.verified.cs @@ -0,0 +1,103 @@ +//HintName: G.ConnectorsClient.OAuthAuthorizeConnector.g.cs + +#nullable enable + +namespace G +{ + public partial class ConnectorsClient + { + partial void PrepareOAuthAuthorizeConnectorArguments( + global::System.Net.Http.HttpClient httpClient, + ref string id, + ref string? afterTokenRedirect, + ref string? xClientName); + partial void PrepareOAuthAuthorizeConnectorRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string id, + string? afterTokenRedirect, + string? xClientName); + partial void ProcessOAuthAuthorizeConnectorResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessOAuthAuthorizeConnectorResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Authorize with oAuth
+ /// Authorize the connector with the given ID for the connector oauth app. See ['Connector Authentication'](https://docs.cohere.com/docs/connector-authentication) for more information. + ///
+ /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task OAuthAuthorizeConnectorAsync( + string id, + string? afterTokenRedirect, + string? xClientName, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareOAuthAuthorizeConnectorArguments( + httpClient: _httpClient, + id: ref id, + afterTokenRedirect: ref afterTokenRedirect, + xClientName: ref xClientName); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/connectors/{id}/oauth/authorize?after_token_redirect={afterTokenRedirect}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareOAuthAuthorizeConnectorRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + id: id, + afterTokenRedirect: afterTokenRedirect, + xClientName: xClientName); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessOAuthAuthorizeConnectorResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessOAuthAuthorizeConnectorResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.ConnectorsClient.UpdateConnector.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.ConnectorsClient.UpdateConnector.g.verified.cs new file mode 100644 index 0000000000..bf25c6e7d6 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.ConnectorsClient.UpdateConnector.g.verified.cs @@ -0,0 +1,166 @@ +//HintName: G.ConnectorsClient.UpdateConnector.g.cs + +#nullable enable + +namespace G +{ + public partial class ConnectorsClient + { + partial void PrepareUpdateConnectorArguments( + global::System.Net.Http.HttpClient httpClient, + ref string id, + ref string? xClientName, + global::G.UpdateConnectorRequest request); + partial void PrepareUpdateConnectorRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string id, + string? xClientName, + global::G.UpdateConnectorRequest request); + partial void ProcessUpdateConnectorResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessUpdateConnectorResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Update a Connector
+ /// Update a connector by ID. Omitted fields will not be updated. See ['Managing your Connector'](https://docs.cohere.com/docs/managing-your-connector) for more information. + ///
+ /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UpdateConnectorAsync( + string id, + string? xClientName, + global::G.UpdateConnectorRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareUpdateConnectorArguments( + httpClient: _httpClient, + id: ref id, + xClientName: ref xClientName, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: new global::System.Net.Http.HttpMethod("PATCH"), + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/connectors/{id}", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareUpdateConnectorRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + id: id, + xClientName: xClientName, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessUpdateConnectorResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessUpdateConnectorResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Update a Connector
+ /// Update a connector by ID. Omitted fields will not be updated. See ['Managing your Connector'](https://docs.cohere.com/docs/managing-your-connector) for more information. + ///
+ /// + /// + /// + /// A human-readable name for the connector. + /// + /// + /// The URL of the connector that will be used to search for documents. + /// + /// + /// A list of fields to exclude from the prompt (fields remain in the document). + /// + /// + /// + /// Default Value: true + /// + /// + /// Default Value: false + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UpdateConnectorAsync( + string id, + string? xClientName = default, + string? name = default, + string? url = default, + global::System.Collections.Generic.IList? excludes = default, + global::G.CreateConnectorOAuth? oauth = default, + bool active = true, + bool continueOnFailure = false, + global::G.CreateConnectorServiceAuth? serviceAuth = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.UpdateConnectorRequest + { + Name = name, + Url = url, + Excludes = excludes, + Oauth = oauth, + Active = active, + ContinueOnFailure = continueOnFailure, + ServiceAuth = serviceAuth, + }; + + return await UpdateConnectorAsync( + id: id, + xClientName: xClientName, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.ConnectorsClient.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.ConnectorsClient.g.verified.cs new file mode 100644 index 0000000000..b00585f565 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.ConnectorsClient.g.verified.cs @@ -0,0 +1,61 @@ +//HintName: G.ConnectorsClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// Connectors API
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class ConnectorsClient : global::System.IDisposable + { + /// + /// production + /// + public const string BaseUrl = "https://api.cohere.com"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::System.Text.Json.JsonSerializerOptions _jsonSerializerOptions; + + + /// + /// Creates a new instance of the ConnectorsClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public ConnectorsClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::System.Text.Json.JsonSerializerOptions(); + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.DatasetsClient.CreateDataset.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.DatasetsClient.CreateDataset.g.verified.cs new file mode 100644 index 0000000000..7a74bbd78f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.DatasetsClient.CreateDataset.g.verified.cs @@ -0,0 +1,290 @@ +//HintName: G.DatasetsClient.CreateDataset.g.cs +using System.Linq; + +#nullable enable + +namespace G +{ + public partial class DatasetsClient + { + partial void PrepareCreateDatasetArguments( + global::System.Net.Http.HttpClient httpClient, + ref string name, + ref global::G.DatasetType type, + ref bool keepOriginalFile, + ref bool skipMalformedInput, + global::System.Collections.Generic.IList? keepFields, + global::System.Collections.Generic.IList? optionalFields, + ref string? textSeparator, + ref string? csvDelimiter, + ref string? xClientName, + global::G.CreateDatasetRequest request); + partial void PrepareCreateDatasetRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string name, + global::G.DatasetType type, + bool keepOriginalFile, + bool skipMalformedInput, + global::System.Collections.Generic.IList? keepFields, + global::System.Collections.Generic.IList? optionalFields, + string? textSeparator, + string? csvDelimiter, + string? xClientName, + global::G.CreateDatasetRequest request); + partial void ProcessCreateDatasetResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateDatasetResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Create a Dataset
+ /// Create a dataset by uploading a file. See ['Dataset Creation'](https://docs.cohere.com/docs/datasets#dataset-creation) for more information. + ///
+ /// + /// + /// The type of the dataset + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateDatasetAsync( + string name, + global::G.DatasetType type, + bool keepOriginalFile, + bool skipMalformedInput, + global::System.Collections.Generic.IList? keepFields, + global::System.Collections.Generic.IList? optionalFields, + string? textSeparator, + string? csvDelimiter, + string? xClientName, + global::G.CreateDatasetRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareCreateDatasetArguments( + httpClient: _httpClient, + name: ref name, + type: ref type, + keepOriginalFile: ref keepOriginalFile, + skipMalformedInput: ref skipMalformedInput, + keepFields: keepFields, + optionalFields: optionalFields, + textSeparator: ref textSeparator, + csvDelimiter: ref csvDelimiter, + xClientName: ref xClientName, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/datasets?name={name}&type={type}&keep_original_file={keepOriginalFile}&skip_malformed_input={skipMalformedInput}&{string.Join("&", keepFields?.Select(static x => $"keepFields={x}") ?? global::System.Array.Empty())}&{string.Join("&", optionalFields?.Select(static x => $"optionalFields={x}") ?? global::System.Array.Empty())}&text_separator={textSeparator}&csv_delimiter={csvDelimiter}", global::System.UriKind.RelativeOrAbsolute)); + using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{name}"), + name: "name"); + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{type.ToValueString()}"), + name: "type"); + if (keepOriginalFile != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{keepOriginalFile}"), + name: "keep_original_file"); + } + if (skipMalformedInput != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{skipMalformedInput}"), + name: "skip_malformed_input"); + } + if (keepFields != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"[{string.Join(",", keepFields.Select(x => x))}]"), + name: "keep_fields"); + } + if (optionalFields != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"[{string.Join(",", optionalFields.Select(x => x))}]"), + name: "optional_fields"); + } + if (textSeparator != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{textSeparator}"), + name: "text_separator"); + } + if (csvDelimiter != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{csvDelimiter}"), + name: "csv_delimiter"); + } + if (xClientName != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{xClientName}"), + name: "X-Client-Name"); + } + __httpRequestContent.Add( + content: new global::System.Net.Http.ByteArrayContent(request.Data ?? global::System.Array.Empty()) + { + Headers = + { + ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("multipart/form-data"), + }, + }, + name: "data", + fileName: request.Dataname ?? string.Empty); + if (request.EvalData != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.ByteArrayContent(request.EvalData ?? global::System.Array.Empty()) + { + Headers = + { + ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("multipart/form-data"), + }, + }, + name: "eval_data", + fileName: request.EvalDataname ?? string.Empty); + } + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareCreateDatasetRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + name: name, + type: type, + keepOriginalFile: keepOriginalFile, + skipMalformedInput: skipMalformedInput, + keepFields: keepFields, + optionalFields: optionalFields, + textSeparator: textSeparator, + csvDelimiter: csvDelimiter, + xClientName: xClientName, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessCreateDatasetResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessCreateDatasetResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Create a Dataset
+ /// Create a dataset by uploading a file. See ['Dataset Creation'](https://docs.cohere.com/docs/datasets#dataset-creation) for more information. + ///
+ /// + /// + /// The type of the dataset + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// The file to upload + /// + /// + /// The file to upload + /// + /// + /// An optional evaluation file to upload + /// + /// + /// An optional evaluation file to upload + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateDatasetAsync( + string name, + global::G.DatasetType type, + byte[] data, + string dataname, + bool keepOriginalFile = default, + bool skipMalformedInput = default, + global::System.Collections.Generic.IList? keepFields = default, + global::System.Collections.Generic.IList? optionalFields = default, + string? textSeparator = default, + string? csvDelimiter = default, + string? xClientName = default, + byte[]? evalData = default, + string? evalDataname = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.CreateDatasetRequest + { + Data = data, + Dataname = dataname, + EvalData = evalData, + EvalDataname = evalDataname, + }; + + return await CreateDatasetAsync( + name: name, + type: type, + keepOriginalFile: keepOriginalFile, + skipMalformedInput: skipMalformedInput, + keepFields: keepFields, + optionalFields: optionalFields, + textSeparator: textSeparator, + csvDelimiter: csvDelimiter, + xClientName: xClientName, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.DatasetsClient.DeleteDataset.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.DatasetsClient.DeleteDataset.g.verified.cs new file mode 100644 index 0000000000..b64afcfdf8 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.DatasetsClient.DeleteDataset.g.verified.cs @@ -0,0 +1,97 @@ +//HintName: G.DatasetsClient.DeleteDataset.g.cs + +#nullable enable + +namespace G +{ + public partial class DatasetsClient + { + partial void PrepareDeleteDatasetArguments( + global::System.Net.Http.HttpClient httpClient, + ref string id, + ref string? xClientName); + partial void PrepareDeleteDatasetRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string id, + string? xClientName); + partial void ProcessDeleteDatasetResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessDeleteDatasetResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Delete a Dataset
+ /// Delete a dataset by ID. Datasets are automatically deleted after 30 days, but they can also be deleted manually. + ///
+ /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteDatasetAsync( + string id, + string? xClientName, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareDeleteDatasetArguments( + httpClient: _httpClient, + id: ref id, + xClientName: ref xClientName); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Delete, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/datasets/{id}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareDeleteDatasetRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + id: id, + xClientName: xClientName); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessDeleteDatasetResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessDeleteDatasetResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.DatasetsClient.GetDataset.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.DatasetsClient.GetDataset.g.verified.cs new file mode 100644 index 0000000000..2d0883d59c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.DatasetsClient.GetDataset.g.verified.cs @@ -0,0 +1,97 @@ +//HintName: G.DatasetsClient.GetDataset.g.cs + +#nullable enable + +namespace G +{ + public partial class DatasetsClient + { + partial void PrepareGetDatasetArguments( + global::System.Net.Http.HttpClient httpClient, + ref string id, + ref string? xClientName); + partial void PrepareGetDatasetRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string id, + string? xClientName); + partial void ProcessGetDatasetResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetDatasetResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get a Dataset
+ /// Retrieve a dataset by ID. See ['Datasets'](https://docs.cohere.com/docs/datasets) for more information. + ///
+ /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GetDatasetAsync( + string id, + string? xClientName, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareGetDatasetArguments( + httpClient: _httpClient, + id: ref id, + xClientName: ref xClientName); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/datasets/{id}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareGetDatasetRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + id: id, + xClientName: xClientName); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessGetDatasetResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessGetDatasetResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.DatasetsClient.GetDatasetUsage.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.DatasetsClient.GetDatasetUsage.g.verified.cs new file mode 100644 index 0000000000..a1215fc4b3 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.DatasetsClient.GetDatasetUsage.g.verified.cs @@ -0,0 +1,91 @@ +//HintName: G.DatasetsClient.GetDatasetUsage.g.cs + +#nullable enable + +namespace G +{ + public partial class DatasetsClient + { + partial void PrepareGetDatasetUsageArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? xClientName); + partial void PrepareGetDatasetUsageRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? xClientName); + partial void ProcessGetDatasetUsageResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetDatasetUsageResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get Dataset Usage
+ /// View the dataset storage usage for your Organization. Each Organization can have up to 10GB of storage across all their users. + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GetDatasetUsageAsync( + string? xClientName, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareGetDatasetUsageArguments( + httpClient: _httpClient, + xClientName: ref xClientName); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/datasets/usage", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareGetDatasetUsageRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + xClientName: xClientName); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessGetDatasetUsageResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessGetDatasetUsageResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.DatasetsClient.ListDatasets.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.DatasetsClient.ListDatasets.g.verified.cs new file mode 100644 index 0000000000..65dfc41c05 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.DatasetsClient.ListDatasets.g.verified.cs @@ -0,0 +1,129 @@ +//HintName: G.DatasetsClient.ListDatasets.g.cs + +#nullable enable + +namespace G +{ + public partial class DatasetsClient + { + partial void PrepareListDatasetsArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? datasetType, + global::System.DateTime before, + global::System.DateTime after, + ref double limit, + ref double offset, + ref global::G.DatasetValidationStatus? validationStatus, + ref string? xClientName); + partial void PrepareListDatasetsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? datasetType, + global::System.DateTime before, + global::System.DateTime after, + double limit, + double offset, + global::G.DatasetValidationStatus? validationStatus, + string? xClientName); + partial void ProcessListDatasetsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListDatasetsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// List Datasets
+ /// List datasets that have been created. + ///
+ /// + /// + /// + /// + /// + /// + /// The validation status of the dataset + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ListDatasetsAsync( + string? datasetType, + global::System.DateTime before, + global::System.DateTime after, + double limit, + double offset, + global::G.DatasetValidationStatus? validationStatus, + string? xClientName, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareListDatasetsArguments( + httpClient: _httpClient, + datasetType: ref datasetType, + before: before, + after: after, + limit: ref limit, + offset: ref offset, + validationStatus: ref validationStatus, + xClientName: ref xClientName); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/datasets?datasetType={datasetType}&before={before:yyyy-MM-ddTHH:mm:ssZ}&after={after:yyyy-MM-ddTHH:mm:ssZ}&limit={limit}&offset={offset}&validationStatus={validationStatus}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareListDatasetsRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + datasetType: datasetType, + before: before, + after: after, + limit: limit, + offset: offset, + validationStatus: validationStatus, + xClientName: xClientName); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessListDatasetsResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessListDatasetsResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.DatasetsClient.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.DatasetsClient.g.verified.cs new file mode 100644 index 0000000000..46b783132d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.DatasetsClient.g.verified.cs @@ -0,0 +1,61 @@ +//HintName: G.DatasetsClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// Datasets API
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class DatasetsClient : global::System.IDisposable + { + /// + /// production + /// + public const string BaseUrl = "https://api.cohere.com"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::System.Text.Json.JsonSerializerOptions _jsonSerializerOptions; + + + /// + /// Creates a new instance of the DatasetsClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public DatasetsClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::System.Text.Json.JsonSerializerOptions(); + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.EmbedJobsClient.CancelEmbedJob.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.EmbedJobsClient.CancelEmbedJob.g.verified.cs new file mode 100644 index 0000000000..32a5e5ab6c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.EmbedJobsClient.CancelEmbedJob.g.verified.cs @@ -0,0 +1,97 @@ +//HintName: G.EmbedJobsClient.CancelEmbedJob.g.cs + +#nullable enable + +namespace G +{ + public partial class EmbedJobsClient + { + partial void PrepareCancelEmbedJobArguments( + global::System.Net.Http.HttpClient httpClient, + ref string id, + ref string? xClientName); + partial void PrepareCancelEmbedJobRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string id, + string? xClientName); + partial void ProcessCancelEmbedJobResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCancelEmbedJobResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Cancel an Embed Job
+ /// This API allows users to cancel an active embed job. Once invoked, the embedding process will be terminated, and users will be charged for the embeddings processed up to the cancellation point. It's important to note that partial results will not be available to users after cancellation. + ///
+ /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CancelEmbedJobAsync( + string id, + string? xClientName, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareCancelEmbedJobArguments( + httpClient: _httpClient, + id: ref id, + xClientName: ref xClientName); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/embed-jobs/{id}/cancel", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareCancelEmbedJobRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + id: id, + xClientName: xClientName); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessCancelEmbedJobResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessCancelEmbedJobResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.EmbedJobsClient.CreateEmbedJob.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.EmbedJobsClient.CreateEmbedJob.g.verified.cs new file mode 100644 index 0000000000..e8105a698a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.EmbedJobsClient.CreateEmbedJob.g.verified.cs @@ -0,0 +1,172 @@ +//HintName: G.EmbedJobsClient.CreateEmbedJob.g.cs + +#nullable enable + +namespace G +{ + public partial class EmbedJobsClient + { + partial void PrepareCreateEmbedJobArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? xClientName, + global::G.CreateEmbedJobRequest request); + partial void PrepareCreateEmbedJobRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? xClientName, + global::G.CreateEmbedJobRequest request); + partial void ProcessCreateEmbedJobResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateEmbedJobResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Create an Embed Job
+ /// This API launches an async Embed job for a [Dataset](https://docs.cohere.com/docs/datasets) of type `embed-input`. The result of a completed embed job is new Dataset of type `embed-output`, which contains the original text entries and the corresponding embeddings. + ///
+ /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateEmbedJobAsync( + string? xClientName, + global::G.CreateEmbedJobRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareCreateEmbedJobArguments( + httpClient: _httpClient, + xClientName: ref xClientName, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/embed-jobs", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareCreateEmbedJobRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + xClientName: xClientName, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessCreateEmbedJobResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessCreateEmbedJobResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Create an Embed Job
+ /// This API launches an async Embed job for a [Dataset](https://docs.cohere.com/docs/datasets) of type `embed-input`. The result of a completed embed job is new Dataset of type `embed-output`, which contains the original text entries and the corresponding embeddings. + ///
+ /// + /// + /// ID of the embedding model.
+ /// Available models and corresponding embedding dimensions:
+ /// - `embed-english-v3.0` : 1024
+ /// - `embed-multilingual-v3.0` : 1024
+ /// - `embed-english-light-v3.0` : 384
+ /// - `embed-multilingual-light-v3.0` : 384 + /// + /// + /// ID of a [Dataset](https://docs.cohere.com/docs/datasets). The Dataset must be of type `embed-input` and must have a validation status `Validated` + /// + /// + /// Specifies the type of input passed to the model. Required for embedding models v3 and higher.
+ /// - `"search_document"`: Used for embeddings stored in a vector database for search use-cases.
+ /// - `"search_query"`: Used for embeddings of search queries run against a vector DB to find relevant documents.
+ /// - `"classification"`: Used for embeddings passed through a text classifier.
+ /// - `"clustering"`: Used for the embeddings run through a clustering algorithm. + /// + /// + /// The name of the embed job. + /// + /// + /// Specifies the types of embeddings you want to get back. Not required and default is None, which returns the Embed Floats response type. Can be one or more of the following types.
+ /// * `"float"`: Use this when you want to get back the default float embeddings. Valid for all models.
+ /// * `"int8"`: Use this when you want to get back signed int8 embeddings. Valid for only v3 models.
+ /// * `"uint8"`: Use this when you want to get back unsigned int8 embeddings. Valid for only v3 models.
+ /// * `"binary"`: Use this when you want to get back signed binary embeddings. Valid for only v3 models.
+ /// * `"ubinary"`: Use this when you want to get back unsigned binary embeddings. Valid for only v3 models. + /// + /// + /// One of `START|END` to specify how the API will handle inputs longer than the maximum token length.
+ /// Passing `START` will discard the start of the input. `END` will discard the end of the input. In both cases, input is discarded until the remaining input is exactly the maximum input token length for the model.
+ /// Default Value: END + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateEmbedJobAsync( + string model, + string datasetId, + global::G.EmbedInputType inputType, + string? xClientName = default, + string? name = default, + global::System.Collections.Generic.IList? embeddingTypes = default, + global::G.CreateEmbedJobRequestTruncate? truncate = global::G.CreateEmbedJobRequestTruncate.END, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.CreateEmbedJobRequest + { + Model = model, + DatasetId = datasetId, + InputType = inputType, + Name = name, + EmbeddingTypes = embeddingTypes, + Truncate = truncate, + }; + + return await CreateEmbedJobAsync( + xClientName: xClientName, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.EmbedJobsClient.GetEmbedJob.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.EmbedJobsClient.GetEmbedJob.g.verified.cs new file mode 100644 index 0000000000..42c96e107c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.EmbedJobsClient.GetEmbedJob.g.verified.cs @@ -0,0 +1,97 @@ +//HintName: G.EmbedJobsClient.GetEmbedJob.g.cs + +#nullable enable + +namespace G +{ + public partial class EmbedJobsClient + { + partial void PrepareGetEmbedJobArguments( + global::System.Net.Http.HttpClient httpClient, + ref string id, + ref string? xClientName); + partial void PrepareGetEmbedJobRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string id, + string? xClientName); + partial void ProcessGetEmbedJobResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetEmbedJobResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Fetch an Embed Job
+ /// This API retrieves the details about an embed job started by the same user. + ///
+ /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GetEmbedJobAsync( + string id, + string? xClientName, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareGetEmbedJobArguments( + httpClient: _httpClient, + id: ref id, + xClientName: ref xClientName); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/embed-jobs/{id}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareGetEmbedJobRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + id: id, + xClientName: xClientName); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessGetEmbedJobResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessGetEmbedJobResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.EmbedJobsClient.ListEmbedJobs.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.EmbedJobsClient.ListEmbedJobs.g.verified.cs new file mode 100644 index 0000000000..9feedd7cf7 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.EmbedJobsClient.ListEmbedJobs.g.verified.cs @@ -0,0 +1,91 @@ +//HintName: G.EmbedJobsClient.ListEmbedJobs.g.cs + +#nullable enable + +namespace G +{ + public partial class EmbedJobsClient + { + partial void PrepareListEmbedJobsArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? xClientName); + partial void PrepareListEmbedJobsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? xClientName); + partial void ProcessListEmbedJobsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListEmbedJobsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// List Embed Jobs
+ /// The list embed job endpoint allows users to view all embed jobs history for that specific user. + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ListEmbedJobsAsync( + string? xClientName, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareListEmbedJobsArguments( + httpClient: _httpClient, + xClientName: ref xClientName); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/embed-jobs", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareListEmbedJobsRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + xClientName: xClientName); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessListEmbedJobsResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessListEmbedJobsResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.EmbedJobsClient.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.EmbedJobsClient.g.verified.cs new file mode 100644 index 0000000000..06c5f81a55 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.EmbedJobsClient.g.verified.cs @@ -0,0 +1,61 @@ +//HintName: G.EmbedJobsClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// Embed Jobs API
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class EmbedJobsClient : global::System.IDisposable + { + /// + /// production + /// + public const string BaseUrl = "https://api.cohere.com"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::System.Text.Json.JsonSerializerOptions _jsonSerializerOptions; + + + /// + /// Creates a new instance of the EmbedJobsClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public EmbedJobsClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::System.Text.Json.JsonSerializerOptions(); + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.FinetuningClient.CreateFinetunedModel.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.FinetuningClient.CreateFinetunedModel.g.verified.cs new file mode 100644 index 0000000000..ef14301100 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.FinetuningClient.CreateFinetunedModel.g.verified.cs @@ -0,0 +1,184 @@ +//HintName: G.FinetuningClient.CreateFinetunedModel.g.cs + +#nullable enable + +namespace G +{ + public partial class FinetuningClient + { + partial void PrepareCreateFinetunedModelArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? xClientName, + global::G.FinetunedModel request); + partial void PrepareCreateFinetunedModelRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? xClientName, + global::G.FinetunedModel request); + partial void ProcessCreateFinetunedModelResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateFinetunedModelResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Trains and deploys a fine-tuned model. + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateFinetunedModelAsync( + string? xClientName, + global::G.FinetunedModel request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareCreateFinetunedModelArguments( + httpClient: _httpClient, + xClientName: ref xClientName, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/finetuning/finetuned-models", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareCreateFinetunedModelRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + xClientName: xClientName, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessCreateFinetunedModelResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessCreateFinetunedModelResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Trains and deploys a fine-tuned model. + /// + /// + /// + /// read-only. FinetunedModel ID. + /// + /// + /// FinetunedModel name (e.g. `foobar`). + /// + /// + /// read-only. User ID of the creator. + /// + /// + /// read-only. Organization ID. + /// + /// + /// The configuration used for fine-tuning. + /// + /// + /// The possible stages of a fine-tuned model life-cycle.
+ /// - STATUS_UNSPECIFIED: Unspecified status.
+ /// - STATUS_FINETUNING: The fine-tuned model is being fine-tuned.
+ /// - STATUS_DEPLOYING_API: The fine-tuned model is being deployed.
+ /// - STATUS_READY: The fine-tuned model is ready to receive requests.
+ /// - STATUS_FAILED: The fine-tuned model failed.
+ /// - STATUS_DELETED: The fine-tuned model was deleted.
+ /// - STATUS_TEMPORARILY_OFFLINE: The fine-tuned model is temporarily unavailable.
+ /// - STATUS_PAUSED: The fine-tuned model is paused (Vanilla only).
+ /// - STATUS_QUEUED: The fine-tuned model is queued for training.
+ /// Default Value: STATUS_UNSPECIFIED + /// + /// + /// read-only. Creation timestamp. + /// + /// + /// read-only. Latest update timestamp. + /// + /// + /// read-only. Timestamp for the completed fine-tuning. + /// + /// + /// read-only. Timestamp for the latest request to this fine-tuned model. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateFinetunedModelAsync( + string name, + global::G.Settings settings, + string? xClientName = default, + string? id = default, + string? creatorId = default, + string? organizationId = default, + global::G.Status? status = global::G.Status.STATUSUNSPECIFIED, + global::System.DateTime createdAt = default, + global::System.DateTime updatedAt = default, + global::System.DateTime completedAt = default, + global::System.DateTime lastUsed = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.FinetunedModel + { + Id = id, + Name = name, + CreatorId = creatorId, + OrganizationId = organizationId, + Settings = settings, + Status = status, + CreatedAt = createdAt, + UpdatedAt = updatedAt, + CompletedAt = completedAt, + LastUsed = lastUsed, + }; + + return await CreateFinetunedModelAsync( + xClientName: xClientName, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.FinetuningClient.DeleteFinetunedModel.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.FinetuningClient.DeleteFinetunedModel.g.verified.cs new file mode 100644 index 0000000000..a353750b8e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.FinetuningClient.DeleteFinetunedModel.g.verified.cs @@ -0,0 +1,96 @@ +//HintName: G.FinetuningClient.DeleteFinetunedModel.g.cs + +#nullable enable + +namespace G +{ + public partial class FinetuningClient + { + partial void PrepareDeleteFinetunedModelArguments( + global::System.Net.Http.HttpClient httpClient, + ref string id, + ref string? xClientName); + partial void PrepareDeleteFinetunedModelRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string id, + string? xClientName); + partial void ProcessDeleteFinetunedModelResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessDeleteFinetunedModelResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Deletes a fine-tuned model. + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteFinetunedModelAsync( + string id, + string? xClientName, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareDeleteFinetunedModelArguments( + httpClient: _httpClient, + id: ref id, + xClientName: ref xClientName); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Delete, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/finetuning/finetuned-models/{id}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareDeleteFinetunedModelRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + id: id, + xClientName: xClientName); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessDeleteFinetunedModelResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessDeleteFinetunedModelResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.FinetuningClient.GetFinetunedModel.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.FinetuningClient.GetFinetunedModel.g.verified.cs new file mode 100644 index 0000000000..81988e2e08 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.FinetuningClient.GetFinetunedModel.g.verified.cs @@ -0,0 +1,96 @@ +//HintName: G.FinetuningClient.GetFinetunedModel.g.cs + +#nullable enable + +namespace G +{ + public partial class FinetuningClient + { + partial void PrepareGetFinetunedModelArguments( + global::System.Net.Http.HttpClient httpClient, + ref string id, + ref string? xClientName); + partial void PrepareGetFinetunedModelRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string id, + string? xClientName); + partial void ProcessGetFinetunedModelResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetFinetunedModelResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Returns a fine-tuned model by ID. + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GetFinetunedModelAsync( + string id, + string? xClientName, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareGetFinetunedModelArguments( + httpClient: _httpClient, + id: ref id, + xClientName: ref xClientName); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/finetuning/finetuned-models/{id}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareGetFinetunedModelRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + id: id, + xClientName: xClientName); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessGetFinetunedModelResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessGetFinetunedModelResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.FinetuningClient.ListEvents.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.FinetuningClient.ListEvents.g.verified.cs new file mode 100644 index 0000000000..7153bc2258 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.FinetuningClient.ListEvents.g.verified.cs @@ -0,0 +1,114 @@ +//HintName: G.FinetuningClient.ListEvents.g.cs + +#nullable enable + +namespace G +{ + public partial class FinetuningClient + { + partial void PrepareListEventsArguments( + global::System.Net.Http.HttpClient httpClient, + ref string finetunedModelId, + ref int pageSize, + ref string? pageToken, + ref string? orderBy, + ref string? xClientName); + partial void PrepareListEventsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string finetunedModelId, + int pageSize, + string? pageToken, + string? orderBy, + string? xClientName); + partial void ProcessListEventsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListEventsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Retrieves the chronology of statuses the fine-tuned model has been through. + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ListEventsAsync( + string finetunedModelId, + int pageSize, + string? pageToken, + string? orderBy, + string? xClientName, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareListEventsArguments( + httpClient: _httpClient, + finetunedModelId: ref finetunedModelId, + pageSize: ref pageSize, + pageToken: ref pageToken, + orderBy: ref orderBy, + xClientName: ref xClientName); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/finetuning/finetuned-models/{finetunedModelId}/events?page_size={pageSize}&page_token={pageToken}&order_by={orderBy}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareListEventsRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + finetunedModelId: finetunedModelId, + pageSize: pageSize, + pageToken: pageToken, + orderBy: orderBy, + xClientName: xClientName); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessListEventsResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessListEventsResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.FinetuningClient.ListFinetunedModels.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.FinetuningClient.ListFinetunedModels.g.verified.cs new file mode 100644 index 0000000000..e20896cf71 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.FinetuningClient.ListFinetunedModels.g.verified.cs @@ -0,0 +1,108 @@ +//HintName: G.FinetuningClient.ListFinetunedModels.g.cs + +#nullable enable + +namespace G +{ + public partial class FinetuningClient + { + partial void PrepareListFinetunedModelsArguments( + global::System.Net.Http.HttpClient httpClient, + ref int pageSize, + ref string? pageToken, + ref string? orderBy, + ref string? xClientName); + partial void PrepareListFinetunedModelsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int pageSize, + string? pageToken, + string? orderBy, + string? xClientName); + partial void ProcessListFinetunedModelsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListFinetunedModelsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Lists fine-tuned models. + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ListFinetunedModelsAsync( + int pageSize, + string? pageToken, + string? orderBy, + string? xClientName, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareListFinetunedModelsArguments( + httpClient: _httpClient, + pageSize: ref pageSize, + pageToken: ref pageToken, + orderBy: ref orderBy, + xClientName: ref xClientName); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/finetuning/finetuned-models?page_size={pageSize}&page_token={pageToken}&order_by={orderBy}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareListFinetunedModelsRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + pageSize: pageSize, + pageToken: pageToken, + orderBy: orderBy, + xClientName: xClientName); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessListFinetunedModelsResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessListFinetunedModelsResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.FinetuningClient.ListTrainingStepMetrics.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.FinetuningClient.ListTrainingStepMetrics.g.verified.cs new file mode 100644 index 0000000000..bf4fa45256 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.FinetuningClient.ListTrainingStepMetrics.g.verified.cs @@ -0,0 +1,108 @@ +//HintName: G.FinetuningClient.ListTrainingStepMetrics.g.cs + +#nullable enable + +namespace G +{ + public partial class FinetuningClient + { + partial void PrepareListTrainingStepMetricsArguments( + global::System.Net.Http.HttpClient httpClient, + ref string finetunedModelId, + ref int pageSize, + ref string? pageToken, + ref string? xClientName); + partial void PrepareListTrainingStepMetricsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string finetunedModelId, + int pageSize, + string? pageToken, + string? xClientName); + partial void ProcessListTrainingStepMetricsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListTrainingStepMetricsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Retrieves metrics measured during the training of a fine-tuned model. + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ListTrainingStepMetricsAsync( + string finetunedModelId, + int pageSize, + string? pageToken, + string? xClientName, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareListTrainingStepMetricsArguments( + httpClient: _httpClient, + finetunedModelId: ref finetunedModelId, + pageSize: ref pageSize, + pageToken: ref pageToken, + xClientName: ref xClientName); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/finetuning/finetuned-models/{finetunedModelId}/training-step-metrics?page_size={pageSize}&page_token={pageToken}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareListTrainingStepMetricsRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + finetunedModelId: finetunedModelId, + pageSize: pageSize, + pageToken: pageToken, + xClientName: xClientName); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessListTrainingStepMetricsResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessListTrainingStepMetricsResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.FinetuningClient.UpdateFinetunedModel.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.FinetuningClient.UpdateFinetunedModel.g.verified.cs new file mode 100644 index 0000000000..f0da2c3a13 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.FinetuningClient.UpdateFinetunedModel.g.verified.cs @@ -0,0 +1,188 @@ +//HintName: G.FinetuningClient.UpdateFinetunedModel.g.cs + +#nullable enable + +namespace G +{ + public partial class FinetuningClient + { + partial void PrepareUpdateFinetunedModelArguments( + global::System.Net.Http.HttpClient httpClient, + ref string id, + ref string? xClientName, + global::G.UpdateFinetunedModelRequest request); + partial void PrepareUpdateFinetunedModelRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string id, + string? xClientName, + global::G.UpdateFinetunedModelRequest request); + partial void ProcessUpdateFinetunedModelResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessUpdateFinetunedModelResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Updates a fine-tuned model. + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UpdateFinetunedModelAsync( + string id, + string? xClientName, + global::G.UpdateFinetunedModelRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareUpdateFinetunedModelArguments( + httpClient: _httpClient, + id: ref id, + xClientName: ref xClientName, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: new global::System.Net.Http.HttpMethod("PATCH"), + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/finetuning/finetuned-models/{id}", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareUpdateFinetunedModelRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + id: id, + xClientName: xClientName, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessUpdateFinetunedModelResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessUpdateFinetunedModelResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Updates a fine-tuned model. + /// + /// + /// + /// + /// FinetunedModel name (e.g. `foobar`). + /// + /// + /// User ID of the creator. + /// + /// + /// Organization ID. + /// + /// + /// The configuration used for fine-tuning. + /// + /// + /// The possible stages of a fine-tuned model life-cycle.
+ /// - STATUS_UNSPECIFIED: Unspecified status.
+ /// - STATUS_FINETUNING: The fine-tuned model is being fine-tuned.
+ /// - STATUS_DEPLOYING_API: The fine-tuned model is being deployed.
+ /// - STATUS_READY: The fine-tuned model is ready to receive requests.
+ /// - STATUS_FAILED: The fine-tuned model failed.
+ /// - STATUS_DELETED: The fine-tuned model was deleted.
+ /// - STATUS_TEMPORARILY_OFFLINE: The fine-tuned model is temporarily unavailable.
+ /// - STATUS_PAUSED: The fine-tuned model is paused (Vanilla only).
+ /// - STATUS_QUEUED: The fine-tuned model is queued for training.
+ /// Default Value: STATUS_UNSPECIFIED + /// + /// + /// Creation timestamp. + /// + /// + /// Latest update timestamp. + /// + /// + /// Timestamp for the completed fine-tuning. + /// + /// + /// Timestamp for the latest request to this fine-tuned model. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UpdateFinetunedModelAsync( + string id, + string name, + global::G.Settings settings, + string? xClientName = default, + string? creatorId = default, + string? organizationId = default, + global::G.Status? status = global::G.Status.STATUSUNSPECIFIED, + global::System.DateTime createdAt = default, + global::System.DateTime updatedAt = default, + global::System.DateTime completedAt = default, + global::System.DateTime lastUsed = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.UpdateFinetunedModelRequest + { + Name = name, + CreatorId = creatorId, + OrganizationId = organizationId, + Settings = settings, + Status = status, + CreatedAt = createdAt, + UpdatedAt = updatedAt, + CompletedAt = completedAt, + LastUsed = lastUsed, + }; + + return await UpdateFinetunedModelAsync( + id: id, + xClientName: xClientName, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.FinetuningClient.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.FinetuningClient.g.verified.cs new file mode 100644 index 0000000000..eac3b9c7b0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.FinetuningClient.g.verified.cs @@ -0,0 +1,61 @@ +//HintName: G.FinetuningClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// Finetuning API (Beta)
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class FinetuningClient : global::System.IDisposable + { + /// + /// production + /// + public const string BaseUrl = "https://api.cohere.com"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::System.Text.Json.JsonSerializerOptions _jsonSerializerOptions; + + + /// + /// Creates a new instance of the FinetuningClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public FinetuningClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::System.Text.Json.JsonSerializerOptions(); + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ApiMeta.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ApiMeta.g.verified.cs new file mode 100644 index 0000000000..781c2c1f02 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ApiMeta.g.verified.cs @@ -0,0 +1,42 @@ +//HintName: G.Models.ApiMeta.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ApiMeta + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("api_version")] + public global::G.ApiMetaApiVersion? ApiVersion { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("billed_units")] + public global::G.ApiMetaBilledUnits? BilledUnits { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tokens")] + public global::G.ApiMetaTokens? Tokens { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("warnings")] + public global::System.Collections.Generic.IList? Warnings { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ApiMetaApiVersion.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ApiMetaApiVersion.g.verified.cs new file mode 100644 index 0000000000..693173edff --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ApiMetaApiVersion.g.verified.cs @@ -0,0 +1,37 @@ +//HintName: G.Models.ApiMetaApiVersion.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ApiMetaApiVersion + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("version")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Version { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("is_deprecated")] + public bool IsDeprecated { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("is_experimental")] + public bool IsExperimental { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ApiMetaBilledUnits.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ApiMetaBilledUnits.g.verified.cs new file mode 100644 index 0000000000..12ed791f3e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ApiMetaBilledUnits.g.verified.cs @@ -0,0 +1,42 @@ +//HintName: G.Models.ApiMetaBilledUnits.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ApiMetaBilledUnits + { + /// + /// The number of billed input tokens. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("input_tokens")] + public double InputTokens { get; set; } + + /// + /// The number of billed output tokens. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("output_tokens")] + public double OutputTokens { get; set; } + + /// + /// The number of billed search units. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("search_units")] + public double SearchUnits { get; set; } + + /// + /// The number of billed classifications units. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("classifications")] + public double Classifications { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ApiMetaTokens.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ApiMetaTokens.g.verified.cs new file mode 100644 index 0000000000..d6598c46b0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ApiMetaTokens.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.ApiMetaTokens.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ApiMetaTokens + { + /// + /// The number of tokens used as input to the model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("input_tokens")] + public double InputTokens { get; set; } + + /// + /// The number of tokens produced by the model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("output_tokens")] + public double OutputTokens { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.AssistantMessage.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.AssistantMessage.g.verified.cs new file mode 100644 index 0000000000..a055d40608 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.AssistantMessage.g.verified.cs @@ -0,0 +1,52 @@ +//HintName: G.Models.AssistantMessage.g.cs + +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// A message from the assistant role can contain text and tool call information. + /// + public sealed partial class AssistantMessage + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("role")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AssistantMessageRoleJsonConverter))] + public global::G.AssistantMessageRole Role { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tool_calls")] + public global::System.Collections.Generic.IList? ToolCalls { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tool_plan")] + public string? ToolPlan { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("content")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.OneOfJsonConverterFactory2))] + public global::System.OneOf>>? Content { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("citations")] + public global::System.Collections.Generic.IList? Citations { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.AssistantMessageResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.AssistantMessageResponse.g.verified.cs new file mode 100644 index 0000000000..f0478465c4 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.AssistantMessageResponse.g.verified.cs @@ -0,0 +1,51 @@ +//HintName: G.Models.AssistantMessageResponse.g.cs + +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// A message from the assistant role can contain text and tool call information. + /// + public sealed partial class AssistantMessageResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("role")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AssistantMessageResponseRoleJsonConverter))] + public global::G.AssistantMessageResponseRole Role { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tool_calls")] + public global::System.Collections.Generic.IList? ToolCalls { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tool_plan")] + public string? ToolPlan { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("content")] + public global::System.Collections.Generic.IList>? Content { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("citations")] + public global::System.Collections.Generic.IList? Citations { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.AssistantMessageResponseRole.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.AssistantMessageResponseRole.g.verified.cs new file mode 100644 index 0000000000..2cfea7e8d7 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.AssistantMessageResponseRole.g.verified.cs @@ -0,0 +1,46 @@ +//HintName: G.Models.AssistantMessageResponseRole.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public enum AssistantMessageResponseRole + { + /// + /// + /// + Assistant, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class AssistantMessageResponseRoleExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this AssistantMessageResponseRole value) + { + return value switch + { + AssistantMessageResponseRole.Assistant => "assistant", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static AssistantMessageResponseRole? ToEnum(string value) + { + return value switch + { + "assistant" => AssistantMessageResponseRole.Assistant, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.AssistantMessageRole.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.AssistantMessageRole.g.verified.cs new file mode 100644 index 0000000000..1599c43aa8 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.AssistantMessageRole.g.verified.cs @@ -0,0 +1,46 @@ +//HintName: G.Models.AssistantMessageRole.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public enum AssistantMessageRole + { + /// + /// + /// + Assistant, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class AssistantMessageRoleExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this AssistantMessageRole value) + { + return value switch + { + AssistantMessageRole.Assistant => "assistant", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static AssistantMessageRole? ToEnum(string value) + { + return value switch + { + "assistant" => AssistantMessageRole.Assistant, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.AuthTokenType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.AuthTokenType.g.verified.cs new file mode 100644 index 0000000000..3a9a86d74b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.AuthTokenType.g.verified.cs @@ -0,0 +1,59 @@ +//HintName: G.Models.AuthTokenType.g.cs + +#nullable enable + +namespace G +{ + /// + /// The token_type specifies the way the token is passed in the Authorization header. Valid values are "bearer", "basic", and "noscheme".
+ /// Default Value: noscheme + ///
+ public enum AuthTokenType + { + /// + /// + /// + Bearer, + /// + /// + /// + Basic, + /// + /// + /// + Noscheme, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class AuthTokenTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this AuthTokenType value) + { + return value switch + { + AuthTokenType.Bearer => "bearer", + AuthTokenType.Basic => "basic", + AuthTokenType.Noscheme => "noscheme", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static AuthTokenType? ToEnum(string value) + { + return value switch + { + "bearer" => AuthTokenType.Bearer, + "basic" => AuthTokenType.Basic, + "noscheme" => AuthTokenType.Noscheme, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.BaseModel.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.BaseModel.g.verified.cs new file mode 100644 index 0000000000..39aa557f44 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.BaseModel.g.verified.cs @@ -0,0 +1,55 @@ +//HintName: G.Models.BaseModel.g.cs + +#nullable enable + +namespace G +{ + /// + /// The base model used for fine-tuning. + /// + public sealed partial class BaseModel + { + /// + /// The name of the base model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } + + /// + /// read-only. The version of the base model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("version")] + public string? Version { get; set; } + + /// + /// The possible types of fine-tuned models.
+ /// - BASE_TYPE_UNSPECIFIED: Unspecified model.
+ /// - BASE_TYPE_GENERATIVE: Generative model.
+ /// - BASE_TYPE_CLASSIFICATION: Classification model.
+ /// - BASE_TYPE_RERANK: Rerank model.
+ /// - BASE_TYPE_CHAT: Chat model.
+ /// Default Value: BASE_TYPE_UNSPECIFIED + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("base_type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.BaseTypeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.BaseType BaseType { get; set; } + + /// + /// The possible strategy used to serve a fine-tuned models.
+ /// - STRATEGY_UNSPECIFIED: Unspecified strategy.
+ /// - STRATEGY_VANILLA: Serve the fine-tuned model on a dedicated GPU.
+ /// - STRATEGY_TFEW: Serve the fine-tuned model on a shared GPU.
+ /// Default Value: STRATEGY_UNSPECIFIED + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("strategy")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.StrategyJsonConverter))] + public global::G.Strategy? Strategy { get; set; } = global::G.Strategy.STRATEGYUNSPECIFIED; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.BaseType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.BaseType.g.verified.cs new file mode 100644 index 0000000000..4a53fc96a7 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.BaseType.g.verified.cs @@ -0,0 +1,76 @@ +//HintName: G.Models.BaseType.g.cs + +#nullable enable + +namespace G +{ + /// + /// The possible types of fine-tuned models.
+ /// - BASE_TYPE_UNSPECIFIED: Unspecified model.
+ /// - BASE_TYPE_GENERATIVE: Generative model.
+ /// - BASE_TYPE_CLASSIFICATION: Classification model.
+ /// - BASE_TYPE_RERANK: Rerank model.
+ /// - BASE_TYPE_CHAT: Chat model.
+ /// Default Value: BASE_TYPE_UNSPECIFIED + ///
+ public enum BaseType + { + /// + /// + /// + BASETYPEUNSPECIFIED, + /// + /// + /// + BASETYPEGENERATIVE, + /// + /// + /// + BASETYPECLASSIFICATION, + /// + /// + /// + BASETYPERERANK, + /// + /// + /// + BASETYPECHAT, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class BaseTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this BaseType value) + { + return value switch + { + BaseType.BASETYPEUNSPECIFIED => "BASE_TYPE_UNSPECIFIED", + BaseType.BASETYPEGENERATIVE => "BASE_TYPE_GENERATIVE", + BaseType.BASETYPECLASSIFICATION => "BASE_TYPE_CLASSIFICATION", + BaseType.BASETYPERERANK => "BASE_TYPE_RERANK", + BaseType.BASETYPECHAT => "BASE_TYPE_CHAT", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static BaseType? ToEnum(string value) + { + return value switch + { + "BASE_TYPE_UNSPECIFIED" => BaseType.BASETYPEUNSPECIFIED, + "BASE_TYPE_GENERATIVE" => BaseType.BASETYPEGENERATIVE, + "BASE_TYPE_CLASSIFICATION" => BaseType.BASETYPECLASSIFICATION, + "BASE_TYPE_RERANK" => BaseType.BASETYPERERANK, + "BASE_TYPE_CHAT" => BaseType.BASETYPECHAT, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse.g.verified.cs new file mode 100644 index 0000000000..4ce9f08806 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CancelEmbedJobResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CancelEmbedJobResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse10.g.verified.cs new file mode 100644 index 0000000000..fdd557cc4e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CancelEmbedJobResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CancelEmbedJobResponse10 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse11.g.verified.cs new file mode 100644 index 0000000000..de283605e2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CancelEmbedJobResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CancelEmbedJobResponse11 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse12.g.verified.cs new file mode 100644 index 0000000000..6528395348 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CancelEmbedJobResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CancelEmbedJobResponse12 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse2.g.verified.cs new file mode 100644 index 0000000000..840864f677 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CancelEmbedJobResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CancelEmbedJobResponse2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse3.g.verified.cs new file mode 100644 index 0000000000..9426946e7d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CancelEmbedJobResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CancelEmbedJobResponse3 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse4.g.verified.cs new file mode 100644 index 0000000000..0eef9d3ee2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CancelEmbedJobResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CancelEmbedJobResponse4 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse5.g.verified.cs new file mode 100644 index 0000000000..2dbd354fdb --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CancelEmbedJobResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CancelEmbedJobResponse5 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse6.g.verified.cs new file mode 100644 index 0000000000..3237d00191 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CancelEmbedJobResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CancelEmbedJobResponse6 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse7.g.verified.cs new file mode 100644 index 0000000000..75f29609d4 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CancelEmbedJobResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CancelEmbedJobResponse7 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse8.g.verified.cs new file mode 100644 index 0000000000..7cdb85c9af --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CancelEmbedJobResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CancelEmbedJobResponse8 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse9.g.verified.cs new file mode 100644 index 0000000000..44bda0f6e9 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CancelEmbedJobResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CancelEmbedJobResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CancelEmbedJobResponse9 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatCitation.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatCitation.g.verified.cs new file mode 100644 index 0000000000..8d349b83e5 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatCitation.g.verified.cs @@ -0,0 +1,46 @@ +//HintName: G.Models.ChatCitation.g.cs + +#nullable enable + +namespace G +{ + /// + /// A section of the generated reply which cites external knowledge. + /// + public sealed partial class ChatCitation + { + /// + /// The index of text that the citation starts at, counting from zero. For example, a generation of `Hello, world!` with a citation on `world` would have a start value of `7`. This is because the citation starts at `w`, which is the seventh character. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("start")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Start { get; set; } + + /// + /// The index of text that the citation ends after, counting from zero. For example, a generation of `Hello, world!` with a citation on `world` would have an end value of `11`. This is because the citation ends after `d`, which is the eleventh character. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("end")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int End { get; set; } + + /// + /// The text of the citation. For example, a generation of `Hello, world!` with a citation of `world` would have a text value of `world`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Text { get; set; } + + /// + /// Identifiers of documents cited by this section of the generated reply. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("document_ids")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList DocumentIds { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatCitationGenerationEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatCitationGenerationEvent.g.verified.cs new file mode 100644 index 0000000000..1f07611ffa --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatCitationGenerationEvent.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.ChatCitationGenerationEvent.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// + /// + public readonly partial struct ChatCitationGenerationEvent : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamEvent? Value1 { get; init; } +#else + public global::G.ChatStreamEvent? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator ChatCitationGenerationEvent(global::G.ChatStreamEvent value) => new ChatCitationGenerationEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamEvent?(ChatCitationGenerationEvent @this) => @this.Value1; + + /// + /// + /// + public ChatCitationGenerationEvent(global::G.ChatStreamEvent? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatCitationGenerationEventVariant2? Value2 { get; init; } +#else + public global::G.ChatCitationGenerationEventVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator ChatCitationGenerationEvent(global::G.ChatCitationGenerationEventVariant2 value) => new ChatCitationGenerationEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatCitationGenerationEventVariant2?(ChatCitationGenerationEvent @this) => @this.Value2; + + /// + /// + /// + public ChatCitationGenerationEvent(global::G.ChatCitationGenerationEventVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public ChatCitationGenerationEvent( + global::G.ChatStreamEvent? value1, + global::G.ChatCitationGenerationEventVariant2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.ChatStreamEvent), + Value2, + typeof(global::G.ChatCitationGenerationEventVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ChatCitationGenerationEvent other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(ChatCitationGenerationEvent obj1, ChatCitationGenerationEvent obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ChatCitationGenerationEvent obj1, ChatCitationGenerationEvent obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ChatCitationGenerationEvent o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatCitationGenerationEventVariant2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatCitationGenerationEventVariant2.g.verified.cs new file mode 100644 index 0000000000..08322a685c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatCitationGenerationEventVariant2.g.verified.cs @@ -0,0 +1,25 @@ +//HintName: G.Models.ChatCitationGenerationEventVariant2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatCitationGenerationEventVariant2 + { + /// + /// Citations for the generated reply. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("citations")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Citations { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatConnector.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatConnector.g.verified.cs new file mode 100644 index 0000000000..5300ac8868 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatConnector.g.verified.cs @@ -0,0 +1,45 @@ +//HintName: G.Models.ChatConnector.g.cs + +#nullable enable + +namespace G +{ + /// + /// The connector used for fetching documents. + /// + public sealed partial class ChatConnector + { + /// + /// The identifier of the connector. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// When specified, this user access token will be passed to the connector in the Authorization header instead of the Cohere generated one. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("user_access_token")] + public string? UserAccessToken { get; set; } + + /// + /// Defaults to `false`.
+ /// When `true`, the request will continue if this connector returned an error. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("continue_on_failure")] + public bool ContinueOnFailure { get; set; } + + /// + /// Provides the connector with different settings at request time. The key/value pairs of this object are specific to each connector.
+ /// For example, the connector `web-search` supports the `site` option, which limits search results to the specified domain. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("options")] + public global::G.ChatConnectorOptions? Options { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatConnectorOptions.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatConnectorOptions.g.verified.cs new file mode 100644 index 0000000000..30c3b6f789 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatConnectorOptions.g.verified.cs @@ -0,0 +1,20 @@ +//HintName: G.Models.ChatConnectorOptions.g.cs + +#nullable enable + +namespace G +{ + /// + /// Provides the connector with different settings at request time. The key/value pairs of this object are specific to each connector.
+ /// For example, the connector `web-search` supports the `site` option, which limits search results to the specified domain. + ///
+ public sealed partial class ChatConnectorOptions + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentDeltaEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentDeltaEvent.g.verified.cs new file mode 100644 index 0000000000..21aab7ee55 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentDeltaEvent.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.ChatContentDeltaEvent.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// A streamed delta event which contains a delta of chat text content. + /// + public readonly partial struct ChatContentDeltaEvent : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamEventType? Value1 { get; init; } +#else + public global::G.ChatStreamEventType? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator ChatContentDeltaEvent(global::G.ChatStreamEventType value) => new ChatContentDeltaEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamEventType?(ChatContentDeltaEvent @this) => @this.Value1; + + /// + /// + /// + public ChatContentDeltaEvent(global::G.ChatStreamEventType? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatContentDeltaEventVariant2? Value2 { get; init; } +#else + public global::G.ChatContentDeltaEventVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator ChatContentDeltaEvent(global::G.ChatContentDeltaEventVariant2 value) => new ChatContentDeltaEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatContentDeltaEventVariant2?(ChatContentDeltaEvent @this) => @this.Value2; + + /// + /// + /// + public ChatContentDeltaEvent(global::G.ChatContentDeltaEventVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public ChatContentDeltaEvent( + global::G.ChatStreamEventType? value1, + global::G.ChatContentDeltaEventVariant2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.ChatStreamEventType), + Value2, + typeof(global::G.ChatContentDeltaEventVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ChatContentDeltaEvent other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(ChatContentDeltaEvent obj1, ChatContentDeltaEvent obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ChatContentDeltaEvent obj1, ChatContentDeltaEvent obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ChatContentDeltaEvent o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentDeltaEventVariant2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentDeltaEventVariant2.g.verified.cs new file mode 100644 index 0000000000..e21a249287 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentDeltaEventVariant2.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.ChatContentDeltaEventVariant2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatContentDeltaEventVariant2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("index")] + public int Index { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("delta")] + public global::G.ChatContentDeltaEventVariant2Delta? Delta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentDeltaEventVariant2Delta.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentDeltaEventVariant2Delta.g.verified.cs new file mode 100644 index 0000000000..d2d1ea7505 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentDeltaEventVariant2Delta.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatContentDeltaEventVariant2Delta.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatContentDeltaEventVariant2Delta + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("message")] + public global::G.ChatContentDeltaEventVariant2DeltaMessage? Message { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentDeltaEventVariant2DeltaMessage.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentDeltaEventVariant2DeltaMessage.g.verified.cs new file mode 100644 index 0000000000..dcffd50b0a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentDeltaEventVariant2DeltaMessage.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatContentDeltaEventVariant2DeltaMessage.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatContentDeltaEventVariant2DeltaMessage + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("content")] + public global::G.ChatContentDeltaEventVariant2DeltaMessageContent? Content { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentDeltaEventVariant2DeltaMessageContent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentDeltaEventVariant2DeltaMessageContent.g.verified.cs new file mode 100644 index 0000000000..272e4d605b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentDeltaEventVariant2DeltaMessageContent.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatContentDeltaEventVariant2DeltaMessageContent.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatContentDeltaEventVariant2DeltaMessageContent + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + public string? Text { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentEndEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentEndEvent.g.verified.cs new file mode 100644 index 0000000000..c2db4582c2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentEndEvent.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.ChatContentEndEvent.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// A streamed delta event which signifies that the content block has ended. + /// + public readonly partial struct ChatContentEndEvent : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamEventType? Value1 { get; init; } +#else + public global::G.ChatStreamEventType? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator ChatContentEndEvent(global::G.ChatStreamEventType value) => new ChatContentEndEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamEventType?(ChatContentEndEvent @this) => @this.Value1; + + /// + /// + /// + public ChatContentEndEvent(global::G.ChatStreamEventType? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatContentEndEventVariant2? Value2 { get; init; } +#else + public global::G.ChatContentEndEventVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator ChatContentEndEvent(global::G.ChatContentEndEventVariant2 value) => new ChatContentEndEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatContentEndEventVariant2?(ChatContentEndEvent @this) => @this.Value2; + + /// + /// + /// + public ChatContentEndEvent(global::G.ChatContentEndEventVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public ChatContentEndEvent( + global::G.ChatStreamEventType? value1, + global::G.ChatContentEndEventVariant2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.ChatStreamEventType), + Value2, + typeof(global::G.ChatContentEndEventVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ChatContentEndEvent other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(ChatContentEndEvent obj1, ChatContentEndEvent obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ChatContentEndEvent obj1, ChatContentEndEvent obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ChatContentEndEvent o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentEndEventVariant2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentEndEventVariant2.g.verified.cs new file mode 100644 index 0000000000..cb18be0136 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentEndEventVariant2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatContentEndEventVariant2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatContentEndEventVariant2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("index")] + public int Index { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentStartEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentStartEvent.g.verified.cs new file mode 100644 index 0000000000..c3e3f5a4b3 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentStartEvent.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.ChatContentStartEvent.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// A streamed delta event which signifies that a new content block has started. + /// + public readonly partial struct ChatContentStartEvent : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamEventType? Value1 { get; init; } +#else + public global::G.ChatStreamEventType? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator ChatContentStartEvent(global::G.ChatStreamEventType value) => new ChatContentStartEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamEventType?(ChatContentStartEvent @this) => @this.Value1; + + /// + /// + /// + public ChatContentStartEvent(global::G.ChatStreamEventType? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatContentStartEventVariant2? Value2 { get; init; } +#else + public global::G.ChatContentStartEventVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator ChatContentStartEvent(global::G.ChatContentStartEventVariant2 value) => new ChatContentStartEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatContentStartEventVariant2?(ChatContentStartEvent @this) => @this.Value2; + + /// + /// + /// + public ChatContentStartEvent(global::G.ChatContentStartEventVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public ChatContentStartEvent( + global::G.ChatStreamEventType? value1, + global::G.ChatContentStartEventVariant2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.ChatStreamEventType), + Value2, + typeof(global::G.ChatContentStartEventVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ChatContentStartEvent other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(ChatContentStartEvent obj1, ChatContentStartEvent obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ChatContentStartEvent obj1, ChatContentStartEvent obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ChatContentStartEvent o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentStartEventVariant2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentStartEventVariant2.g.verified.cs new file mode 100644 index 0000000000..3f7928ca0e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentStartEventVariant2.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.ChatContentStartEventVariant2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatContentStartEventVariant2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("index")] + public int Index { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("delta")] + public global::G.ChatContentStartEventVariant2Delta? Delta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentStartEventVariant2Delta.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentStartEventVariant2Delta.g.verified.cs new file mode 100644 index 0000000000..19b0cb2d43 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentStartEventVariant2Delta.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatContentStartEventVariant2Delta.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatContentStartEventVariant2Delta + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("message")] + public global::G.ChatContentStartEventVariant2DeltaMessage? Message { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentStartEventVariant2DeltaMessage.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentStartEventVariant2DeltaMessage.g.verified.cs new file mode 100644 index 0000000000..fff64b9731 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentStartEventVariant2DeltaMessage.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatContentStartEventVariant2DeltaMessage.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatContentStartEventVariant2DeltaMessage + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("content")] + public global::G.ChatContentStartEventVariant2DeltaMessageContent? Content { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentStartEventVariant2DeltaMessageContent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentStartEventVariant2DeltaMessageContent.g.verified.cs new file mode 100644 index 0000000000..9f5942670d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentStartEventVariant2DeltaMessageContent.g.verified.cs @@ -0,0 +1,31 @@ +//HintName: G.Models.ChatContentStartEventVariant2DeltaMessageContent.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatContentStartEventVariant2DeltaMessageContent + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + public string? Text { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.ChatContentStartEventVariant2DeltaMessageContentTypeJsonConverter))] + public global::G.ChatContentStartEventVariant2DeltaMessageContentType? Type { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentStartEventVariant2DeltaMessageContentType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentStartEventVariant2DeltaMessageContentType.g.verified.cs new file mode 100644 index 0000000000..06e9d08491 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatContentStartEventVariant2DeltaMessageContentType.g.verified.cs @@ -0,0 +1,46 @@ +//HintName: G.Models.ChatContentStartEventVariant2DeltaMessageContentType.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public enum ChatContentStartEventVariant2DeltaMessageContentType + { + /// + /// + /// + Text, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ChatContentStartEventVariant2DeltaMessageContentTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ChatContentStartEventVariant2DeltaMessageContentType value) + { + return value switch + { + ChatContentStartEventVariant2DeltaMessageContentType.Text => "text", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ChatContentStartEventVariant2DeltaMessageContentType? ToEnum(string value) + { + return value switch + { + "text" => ChatContentStartEventVariant2DeltaMessageContentType.Text, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatDataMetrics.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatDataMetrics.g.verified.cs new file mode 100644 index 0000000000..5c3972b67d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatDataMetrics.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.ChatDataMetrics.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatDataMetrics + { + /// + /// The sum of all turns of valid train examples. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("num_train_turns")] + public double NumTrainTurns { get; set; } + + /// + /// The sum of all turns of valid eval examples. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("num_eval_turns")] + public double NumEvalTurns { get; set; } + + /// + /// The preamble of this dataset. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("preamble")] + public string? Preamble { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatDocument.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatDocument.g.verified.cs new file mode 100644 index 0000000000..ef34235262 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatDocument.g.verified.cs @@ -0,0 +1,27 @@ +//HintName: G.Models.ChatDocument.g.cs + +#nullable enable + +namespace G +{ + /// + /// Relevant information that could be used by the model to generate a more accurate reply.
+ /// The contents of each document are generally short (under 300 words), and are passed in the form of a
+ /// dictionary of strings. Some suggested keys are "text", "author", "date". Both the key name and the value will be
+ /// passed to the model. + ///
+ public sealed partial class ChatDocument + { + /// + /// Unique identifier for this document. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public string? Id { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatFinishReason.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatFinishReason.g.verified.cs new file mode 100644 index 0000000000..ceea6a529e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatFinishReason.g.verified.cs @@ -0,0 +1,82 @@ +//HintName: G.Models.ChatFinishReason.g.cs + +#nullable enable + +namespace G +{ + /// + /// The reason a chat request has finished. + /// + public enum ChatFinishReason + { + /// + /// + /// + Complete, + /// + /// + /// + StopSequence, + /// + /// + /// + MaxTokens, + /// + /// + /// + ToolCall, + /// + /// + /// + Error, + /// + /// + /// + ContentBlocked, + /// + /// + /// + ErrorLimit, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ChatFinishReasonExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ChatFinishReason value) + { + return value switch + { + ChatFinishReason.Complete => "complete", + ChatFinishReason.StopSequence => "stop_sequence", + ChatFinishReason.MaxTokens => "max_tokens", + ChatFinishReason.ToolCall => "tool_call", + ChatFinishReason.Error => "error", + ChatFinishReason.ContentBlocked => "content_blocked", + ChatFinishReason.ErrorLimit => "error_limit", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ChatFinishReason? ToEnum(string value) + { + return value switch + { + "complete" => ChatFinishReason.Complete, + "stop_sequence" => ChatFinishReason.StopSequence, + "max_tokens" => ChatFinishReason.MaxTokens, + "tool_call" => ChatFinishReason.ToolCall, + "error" => ChatFinishReason.Error, + "content_blocked" => ChatFinishReason.ContentBlocked, + "error_limit" => ChatFinishReason.ErrorLimit, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatMessage.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatMessage.g.verified.cs new file mode 100644 index 0000000000..fc34f19334 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatMessage.g.verified.cs @@ -0,0 +1,40 @@ +//HintName: G.Models.ChatMessage.g.cs + +#nullable enable + +namespace G +{ + /// + /// Represents a single message in the chat history, excluding the current user turn. It has two properties: `role` and `message`. The `role` identifies the sender (`CHATBOT`, `SYSTEM`, or `USER`), while the `message` contains the text content.
+ /// The chat_history parameter should not be used for `SYSTEM` messages in most cases. Instead, to add a `SYSTEM` role message at the beginning of a conversation, the `preamble` parameter should be used. + ///
+ public sealed partial class ChatMessage + { + /// + /// One of `CHATBOT`, `SYSTEM`, `TOOL` or `USER` to identify who the message is coming from. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("role")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.ChatRoleJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.ChatRole Role { get; set; } + + /// + /// Contents of the chat message. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("message")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Message { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tool_calls")] + public global::System.Collections.Generic.IList? ToolCalls { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatMessage2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatMessage2.g.verified.cs new file mode 100644 index 0000000000..560b13e0bb --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatMessage2.g.verified.cs @@ -0,0 +1,249 @@ +//HintName: G.Models.ChatMessage2.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// Represents a single message in the chat history from a given role. + /// + public readonly partial struct ChatMessage2 : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.UserMessage? UserMessage { get; init; } +#else + public global::G.UserMessage? UserMessage { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(UserMessage))] +#endif + public bool IsUserMessage => UserMessage != null; + + /// + /// + /// + public static implicit operator ChatMessage2(global::G.UserMessage value) => new ChatMessage2(value); + + /// + /// + /// + public static implicit operator global::G.UserMessage?(ChatMessage2 @this) => @this.UserMessage; + + /// + /// + /// + public ChatMessage2(global::G.UserMessage? value) + { + UserMessage = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.AssistantMessage? AssistantMessage { get; init; } +#else + public global::G.AssistantMessage? AssistantMessage { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantMessage))] +#endif + public bool IsAssistantMessage => AssistantMessage != null; + + /// + /// + /// + public static implicit operator ChatMessage2(global::G.AssistantMessage value) => new ChatMessage2(value); + + /// + /// + /// + public static implicit operator global::G.AssistantMessage?(ChatMessage2 @this) => @this.AssistantMessage; + + /// + /// + /// + public ChatMessage2(global::G.AssistantMessage? value) + { + AssistantMessage = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.SystemMessage? SystemMessage { get; init; } +#else + public global::G.SystemMessage? SystemMessage { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SystemMessage))] +#endif + public bool IsSystemMessage => SystemMessage != null; + + /// + /// + /// + public static implicit operator ChatMessage2(global::G.SystemMessage value) => new ChatMessage2(value); + + /// + /// + /// + public static implicit operator global::G.SystemMessage?(ChatMessage2 @this) => @this.SystemMessage; + + /// + /// + /// + public ChatMessage2(global::G.SystemMessage? value) + { + SystemMessage = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ToolMessage2? Tool { get; init; } +#else + public global::G.ToolMessage2? Tool { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Tool))] +#endif + public bool IsTool => Tool != null; + + /// + /// + /// + public static implicit operator ChatMessage2(global::G.ToolMessage2 value) => new ChatMessage2(value); + + /// + /// + /// + public static implicit operator global::G.ToolMessage2?(ChatMessage2 @this) => @this.Tool; + + /// + /// + /// + public ChatMessage2(global::G.ToolMessage2? value) + { + Tool = value; + } + + /// + /// + /// + public ChatMessage2( + global::G.UserMessage? userMessage, + global::G.AssistantMessage? assistantMessage, + global::G.SystemMessage? systemMessage, + global::G.ToolMessage2? tool + ) + { + UserMessage = userMessage; + AssistantMessage = assistantMessage; + SystemMessage = systemMessage; + Tool = tool; + } + + /// + /// + /// + public object? Object => + Tool as object ?? + SystemMessage as object ?? + AssistantMessage as object ?? + UserMessage as object + ; + + /// + /// + /// + public bool Validate() + { + return IsUserMessage && !IsAssistantMessage && !IsSystemMessage && !IsTool || !IsUserMessage && IsAssistantMessage && !IsSystemMessage && !IsTool || !IsUserMessage && !IsAssistantMessage && IsSystemMessage && !IsTool || !IsUserMessage && !IsAssistantMessage && !IsSystemMessage && IsTool; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + UserMessage, + typeof(global::G.UserMessage), + AssistantMessage, + typeof(global::G.AssistantMessage), + SystemMessage, + typeof(global::G.SystemMessage), + Tool, + typeof(global::G.ToolMessage2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ChatMessage2 other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(UserMessage, other.UserMessage) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantMessage, other.AssistantMessage) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(SystemMessage, other.SystemMessage) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Tool, other.Tool) + ; + } + + /// + /// + /// + public static bool operator ==(ChatMessage2 obj1, ChatMessage2 obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ChatMessage2 obj1, ChatMessage2 obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ChatMessage2 o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatMessageEndEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatMessageEndEvent.g.verified.cs new file mode 100644 index 0000000000..79170f455b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatMessageEndEvent.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.ChatMessageEndEvent.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// A streamed event which signifies that the chat message has ended. + /// + public readonly partial struct ChatMessageEndEvent : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamEventType? Value1 { get; init; } +#else + public global::G.ChatStreamEventType? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator ChatMessageEndEvent(global::G.ChatStreamEventType value) => new ChatMessageEndEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamEventType?(ChatMessageEndEvent @this) => @this.Value1; + + /// + /// + /// + public ChatMessageEndEvent(global::G.ChatStreamEventType? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatMessageEndEventVariant2? Value2 { get; init; } +#else + public global::G.ChatMessageEndEventVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator ChatMessageEndEvent(global::G.ChatMessageEndEventVariant2 value) => new ChatMessageEndEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatMessageEndEventVariant2?(ChatMessageEndEvent @this) => @this.Value2; + + /// + /// + /// + public ChatMessageEndEvent(global::G.ChatMessageEndEventVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public ChatMessageEndEvent( + global::G.ChatStreamEventType? value1, + global::G.ChatMessageEndEventVariant2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.ChatStreamEventType), + Value2, + typeof(global::G.ChatMessageEndEventVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ChatMessageEndEvent other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(ChatMessageEndEvent obj1, ChatMessageEndEvent obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ChatMessageEndEvent obj1, ChatMessageEndEvent obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ChatMessageEndEvent o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatMessageEndEventVariant2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatMessageEndEventVariant2.g.verified.cs new file mode 100644 index 0000000000..44e3d0169a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatMessageEndEventVariant2.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.ChatMessageEndEventVariant2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatMessageEndEventVariant2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public string? Id { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("delta")] + public global::G.ChatMessageEndEventVariant2Delta? Delta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatMessageEndEventVariant2Delta.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatMessageEndEventVariant2Delta.g.verified.cs new file mode 100644 index 0000000000..d2187bebe9 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatMessageEndEventVariant2Delta.g.verified.cs @@ -0,0 +1,31 @@ +//HintName: G.Models.ChatMessageEndEventVariant2Delta.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatMessageEndEventVariant2Delta + { + /// + /// The reason a chat request has finished. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("finish_reason")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.ChatFinishReasonJsonConverter))] + public global::G.ChatFinishReason? FinishReason { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("usage")] + public global::G.Usage? Usage { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatMessageStartEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatMessageStartEvent.g.verified.cs new file mode 100644 index 0000000000..03f2f7984c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatMessageStartEvent.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.ChatMessageStartEvent.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// A streamed event which signifies that a stream has started. + /// + public readonly partial struct ChatMessageStartEvent : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamEventType? Value1 { get; init; } +#else + public global::G.ChatStreamEventType? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator ChatMessageStartEvent(global::G.ChatStreamEventType value) => new ChatMessageStartEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamEventType?(ChatMessageStartEvent @this) => @this.Value1; + + /// + /// + /// + public ChatMessageStartEvent(global::G.ChatStreamEventType? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatMessageStartEventVariant2? Value2 { get; init; } +#else + public global::G.ChatMessageStartEventVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator ChatMessageStartEvent(global::G.ChatMessageStartEventVariant2 value) => new ChatMessageStartEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatMessageStartEventVariant2?(ChatMessageStartEvent @this) => @this.Value2; + + /// + /// + /// + public ChatMessageStartEvent(global::G.ChatMessageStartEventVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public ChatMessageStartEvent( + global::G.ChatStreamEventType? value1, + global::G.ChatMessageStartEventVariant2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.ChatStreamEventType), + Value2, + typeof(global::G.ChatMessageStartEventVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ChatMessageStartEvent other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(ChatMessageStartEvent obj1, ChatMessageStartEvent obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ChatMessageStartEvent obj1, ChatMessageStartEvent obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ChatMessageStartEvent o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatMessageStartEventVariant2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatMessageStartEventVariant2.g.verified.cs new file mode 100644 index 0000000000..ecb86b4f3a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatMessageStartEventVariant2.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.ChatMessageStartEventVariant2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatMessageStartEventVariant2 + { + /// + /// Unique identifier for the generated reply. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public string? Id { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("delta")] + public global::G.ChatMessageStartEventVariant2Delta? Delta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatMessageStartEventVariant2Delta.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatMessageStartEventVariant2Delta.g.verified.cs new file mode 100644 index 0000000000..73de8adc0f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatMessageStartEventVariant2Delta.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatMessageStartEventVariant2Delta.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatMessageStartEventVariant2Delta + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("message")] + public global::G.ChatMessageStartEventVariant2DeltaMessage? Message { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatMessageStartEventVariant2DeltaMessage.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatMessageStartEventVariant2DeltaMessage.g.verified.cs new file mode 100644 index 0000000000..16577c229e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatMessageStartEventVariant2DeltaMessage.g.verified.cs @@ -0,0 +1,25 @@ +//HintName: G.Models.ChatMessageStartEventVariant2DeltaMessage.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatMessageStartEventVariant2DeltaMessage + { + /// + /// The role of the message. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("role")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.ChatMessageStartEventVariant2DeltaMessageRoleJsonConverter))] + public global::G.ChatMessageStartEventVariant2DeltaMessageRole? Role { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatMessageStartEventVariant2DeltaMessageRole.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatMessageStartEventVariant2DeltaMessageRole.g.verified.cs new file mode 100644 index 0000000000..6fa65ecb7f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatMessageStartEventVariant2DeltaMessageRole.g.verified.cs @@ -0,0 +1,46 @@ +//HintName: G.Models.ChatMessageStartEventVariant2DeltaMessageRole.g.cs + +#nullable enable + +namespace G +{ + /// + /// The role of the message. + /// + public enum ChatMessageStartEventVariant2DeltaMessageRole + { + /// + /// + /// + Assistant, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ChatMessageStartEventVariant2DeltaMessageRoleExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ChatMessageStartEventVariant2DeltaMessageRole value) + { + return value switch + { + ChatMessageStartEventVariant2DeltaMessageRole.Assistant => "assistant", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ChatMessageStartEventVariant2DeltaMessageRole? ToEnum(string value) + { + return value switch + { + "assistant" => ChatMessageStartEventVariant2DeltaMessageRole.Assistant, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatRequest.g.verified.cs new file mode 100644 index 0000000000..db6f727b7b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatRequest.g.verified.cs @@ -0,0 +1,250 @@ +//HintName: G.Models.ChatRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatRequest + { + /// + /// Text input for the model to respond to.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("message")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Message { get; set; } + + /// + /// Defaults to `command-r-plus`.
+ /// The name of a compatible [Cohere model](https://docs.cohere.com/docs/models) or the ID of a [fine-tuned](https://docs.cohere.com/docs/chat-fine-tuning) model.
+ /// Compatible Deployments: Cohere Platform, Private Deployments + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("model")] + public string? Model { get; set; } + + /// + /// Defaults to `false`.
+ /// When `true`, the response will be a JSON stream of events. The final event will contain the complete response, and will have an `event_type` of `"stream-end"`.
+ /// Streaming is beneficial for user interfaces that render the contents of the response piece by piece, as it gets generated.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("stream")] + public bool Stream { get; set; } + + /// + /// When specified, the default Cohere preamble will be replaced with the provided one. Preambles are a part of the prompt used to adjust the model's overall behavior and conversation style, and use the `SYSTEM` role.
+ /// The `SYSTEM` role is also used for the contents of the optional `chat_history=` parameter. When used with the `chat_history=` parameter it adds content throughout a conversation. Conversely, when used with the `preamble=` parameter it adds content at the start of the conversation only.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("preamble")] + public string? Preamble { get; set; } + + /// + /// A list of previous messages between the user and the model, giving the model conversational context for responding to the user's `message`.
+ /// Each item represents a single message in the chat history, excluding the current user turn. It has two properties: `role` and `message`. The `role` identifies the sender (`CHATBOT`, `SYSTEM`, or `USER`), while the `message` contains the text content.
+ /// The chat_history parameter should not be used for `SYSTEM` messages in most cases. Instead, to add a `SYSTEM` role message at the beginning of a conversation, the `preamble` parameter should be used.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("chat_history")] + public global::System.Collections.Generic.IList? ChatHistory { get; set; } + + /// + /// An alternative to `chat_history`.
+ /// Providing a `conversation_id` creates or resumes a persisted conversation with the specified ID. The ID can be any non empty string.
+ /// Compatible Deployments: Cohere Platform + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("conversation_id")] + public string? ConversationId { get; set; } + + /// + /// Defaults to `AUTO` when `connectors` are specified and `OFF` in all other cases.
+ /// Dictates how the prompt will be constructed.
+ /// With `prompt_truncation` set to "AUTO", some elements from `chat_history` and `documents` will be dropped in an attempt to construct a prompt that fits within the model's context length limit. During this process the order of the documents and chat history will be changed and ranked by relevance.
+ /// With `prompt_truncation` set to "AUTO_PRESERVE_ORDER", some elements from `chat_history` and `documents` will be dropped in an attempt to construct a prompt that fits within the model's context length limit. During this process the order of the documents and chat history will be preserved as they are inputted into the API.
+ /// With `prompt_truncation` set to "OFF", no elements will be dropped. If the sum of the inputs exceeds the model's context length limit, a `TooManyTokens` error will be returned.
+ /// Compatible Deployments: Cohere Platform Only AUTO_PRESERVE_ORDER: Azure, AWS Sagemaker/Bedrock, Private Deployments + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("prompt_truncation")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.ChatRequestPromptTruncationJsonConverter))] + public global::G.ChatRequestPromptTruncation? PromptTruncation { get; set; } + + /// + /// Accepts `{"id": "web-search"}`, and/or the `"id"` for a custom [connector](https://docs.cohere.com/docs/connectors), if you've [created](https://docs.cohere.com/docs/creating-and-deploying-a-connector) one.
+ /// When specified, the model's reply will be enriched with information found by querying each of the connectors (RAG).
+ /// Compatible Deployments: Cohere Platform + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("connectors")] + public global::System.Collections.Generic.IList? Connectors { get; set; } + + /// + /// Defaults to `false`.
+ /// When `true`, the response will only contain a list of generated search queries, but no search will take place, and no reply from the model to the user's `message` will be generated.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("search_queries_only")] + public bool SearchQueriesOnly { get; set; } + + /// + /// A list of relevant documents that the model can cite to generate a more accurate reply. Each document is a string-string dictionary.
+ /// Example:
+ /// ```
+ /// [
+ /// { "title": "Tall penguins", "text": "Emperor penguins are the tallest." },
+ /// { "title": "Penguin habitats", "text": "Emperor penguins only live in Antarctica." },
+ /// ]
+ /// ```
+ /// Keys and values from each document will be serialized to a string and passed to the model. The resulting generation will include citations that reference some of these documents.
+ /// Some suggested keys are "text", "author", and "date". For better generation quality, it is recommended to keep the total word count of the strings in the dictionary to under 300 words.
+ /// An `id` field (string) can be optionally supplied to identify the document in the citations. This field will not be passed to the model.
+ /// An `_excludes` field (array of strings) can be optionally supplied to omit some key-value pairs from being shown to the model. The omitted fields will still show up in the citation object. The "_excludes" field will not be passed to the model.
+ /// See ['Document Mode'](https://docs.cohere.com/docs/retrieval-augmented-generation-rag#document-mode) in the guide for more information.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("documents")] + public global::System.Collections.Generic.IList? Documents { get; set; } + + /// + /// Defaults to `"accurate"`.
+ /// Dictates the approach taken to generating citations as part of the RAG flow by allowing the user to specify whether they want `"accurate"` results, `"fast"` results or no results.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("citation_quality")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.ChatRequestCitationQualityJsonConverter))] + public global::G.ChatRequestCitationQuality? CitationQuality { get; set; } + + /// + /// Defaults to `0.3`.
+ /// A non-negative float that tunes the degree of randomness in generation. Lower temperatures mean less random generations, and higher temperatures mean more random generations.
+ /// Randomness can be further maximized by increasing the value of the `p` parameter.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] + public float Temperature { get; set; } + + /// + /// The maximum number of tokens the model will generate as part of the response. Note: Setting a low value may result in incomplete generations.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("max_tokens")] + public int MaxTokens { get; set; } + + /// + /// The maximum number of input tokens to send to the model. If not specified, `max_input_tokens` is the model's context length limit minus a small buffer.
+ /// Input will be truncated according to the `prompt_truncation` parameter.
+ /// Compatible Deployments: Cohere Platform + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("max_input_tokens")] + public int MaxInputTokens { get; set; } + + /// + /// Ensures only the top `k` most likely tokens are considered for generation at each step.
+ /// Defaults to `0`, min value of `0`, max value of `500`.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments
+ /// Default Value: 0 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("k")] + public int K { get; set; } = 0; + + /// + /// Ensures that only the most likely tokens, with total probability mass of `p`, are considered for generation at each step. If both `k` and `p` are enabled, `p` acts after `k`.
+ /// Defaults to `0.75`. min value of `0.01`, max value of `0.99`.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments
+ /// Default Value: 0.75 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("p")] + public double P { get; set; } = 0.75; + + /// + /// If specified, the backend will make a best effort to sample tokens
+ /// deterministically, such that repeated requests with the same
+ /// seed and parameters should return the same result. However,
+ /// determinism cannot be totally guaranteed.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("seed")] + public int Seed { get; set; } + + /// + /// A list of up to 5 strings that the model will use to stop generation. If the model generates a string that matches any of the strings in the list, it will stop generating tokens and return the generated text up to that point not including the stop sequence.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("stop_sequences")] + public global::System.Collections.Generic.IList? StopSequences { get; set; } + + /// + /// Defaults to `0.0`, min value of `0.0`, max value of `1.0`.
+ /// Used to reduce repetitiveness of generated tokens. The higher the value, the stronger a penalty is applied to previously present tokens, proportional to how many times they have already appeared in the prompt or prior generation.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("frequency_penalty")] + public double FrequencyPenalty { get; set; } + + /// + /// Defaults to `0.0`, min value of `0.0`, max value of `1.0`.
+ /// Used to reduce repetitiveness of generated tokens. Similar to `frequency_penalty`, except that this penalty is applied equally to all tokens that have already appeared, regardless of their exact frequencies.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("presence_penalty")] + public double PresencePenalty { get; set; } + + /// + /// A list of available tools (functions) that the model may suggest invoking before producing a text response.
+ /// When `tools` is passed (without `tool_results`), the `text` field in the response will be `""` and the `tool_calls` field in the response will be populated with a list of tool calls that need to be made. If no calls need to be made, the `tool_calls` array will be empty.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("tools")] + public global::System.Collections.Generic.IList? Tools { get; set; } + + /// + /// A list of results from invoking tools recommended by the model in the previous chat turn. Results are used to produce a text response and will be referenced in citations. When using `tool_results`, `tools` must be passed as well.
+ /// Each tool_result contains information about how it was invoked, as well as a list of outputs in the form of dictionaries.
+ /// **Note**: `outputs` must be a list of objects. If your tool returns a single object (eg `{"status": 200}`), make sure to wrap it in a list.
+ /// ```
+ /// tool_results = [
+ /// {
+ /// "call": {
+ /// "name": <tool name>,
+ /// "parameters": {
+ /// <param name>: <param value>
+ /// }
+ /// },
+ /// "outputs": [{
+ /// <key>: <value>
+ /// }]
+ /// },
+ /// ...
+ /// ]
+ /// ```
+ /// **Note**: Chat calls with `tool_results` should not be included in the Chat history to avoid duplication of the message text.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("tool_results")] + public global::System.Collections.Generic.IList? ToolResults { get; set; } + + /// + /// Forces the chat to be single step. Defaults to `false`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("force_single_step")] + public bool ForceSingleStep { get; set; } + + /// + /// Configuration for forcing the model output to adhere to the specified format. Supported on [Command R](https://docs.cohere.com/docs/command-r), [Command R+](https://docs.cohere.com/docs/command-r-plus) and newer models.
+ /// The model can be forced into outputting JSON objects (with up to 5 levels of nesting) by setting `{ "type": "json_object" }`.
+ /// A [JSON Schema](https://json-schema.org/) can optionally be provided, to ensure a specific structure.
+ /// **Note**: When using `{ "type": "json_object" }` your `message` should always explicitly instruct the model to generate a JSON (eg: _"Generate a JSON ..."_) . Otherwise the model may end up getting stuck generating an infinite stream of characters and eventually run out of context length.
+ /// **Limitation**: The parameter is not supported in RAG mode (when any of `connectors`, `documents`, `tools`, `tool_results` are provided). + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("response_format")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.ResponseFormatJsonConverter))] + public global::G.ResponseFormat? ResponseFormat { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatRequestCitationQuality.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatRequestCitationQuality.g.verified.cs new file mode 100644 index 0000000000..48ba8e47cd --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatRequestCitationQuality.g.verified.cs @@ -0,0 +1,60 @@ +//HintName: G.Models.ChatRequestCitationQuality.g.cs + +#nullable enable + +namespace G +{ + /// + /// Defaults to `"accurate"`.
+ /// Dictates the approach taken to generating citations as part of the RAG flow by allowing the user to specify whether they want `"accurate"` results, `"fast"` results or no results.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + ///
+ public enum ChatRequestCitationQuality + { + /// + /// + /// + Fast, + /// + /// + /// + Accurate, + /// + /// + /// + Off, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ChatRequestCitationQualityExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ChatRequestCitationQuality value) + { + return value switch + { + ChatRequestCitationQuality.Fast => "fast", + ChatRequestCitationQuality.Accurate => "accurate", + ChatRequestCitationQuality.Off => "off", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ChatRequestCitationQuality? ToEnum(string value) + { + return value switch + { + "fast" => ChatRequestCitationQuality.Fast, + "accurate" => ChatRequestCitationQuality.Accurate, + "off" => ChatRequestCitationQuality.Off, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatRequestPromptTruncation.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatRequestPromptTruncation.g.verified.cs new file mode 100644 index 0000000000..c870a9bce9 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatRequestPromptTruncation.g.verified.cs @@ -0,0 +1,63 @@ +//HintName: G.Models.ChatRequestPromptTruncation.g.cs + +#nullable enable + +namespace G +{ + /// + /// Defaults to `AUTO` when `connectors` are specified and `OFF` in all other cases.
+ /// Dictates how the prompt will be constructed.
+ /// With `prompt_truncation` set to "AUTO", some elements from `chat_history` and `documents` will be dropped in an attempt to construct a prompt that fits within the model's context length limit. During this process the order of the documents and chat history will be changed and ranked by relevance.
+ /// With `prompt_truncation` set to "AUTO_PRESERVE_ORDER", some elements from `chat_history` and `documents` will be dropped in an attempt to construct a prompt that fits within the model's context length limit. During this process the order of the documents and chat history will be preserved as they are inputted into the API.
+ /// With `prompt_truncation` set to "OFF", no elements will be dropped. If the sum of the inputs exceeds the model's context length limit, a `TooManyTokens` error will be returned.
+ /// Compatible Deployments: Cohere Platform Only AUTO_PRESERVE_ORDER: Azure, AWS Sagemaker/Bedrock, Private Deployments + ///
+ public enum ChatRequestPromptTruncation + { + /// + /// + /// + OFF, + /// + /// + /// + AUTO, + /// + /// + /// + AUTOPRESERVEORDER, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ChatRequestPromptTruncationExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ChatRequestPromptTruncation value) + { + return value switch + { + ChatRequestPromptTruncation.OFF => "OFF", + ChatRequestPromptTruncation.AUTO => "AUTO", + ChatRequestPromptTruncation.AUTOPRESERVEORDER => "AUTO_PRESERVE_ORDER", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ChatRequestPromptTruncation? ToEnum(string value) + { + return value switch + { + "OFF" => ChatRequestPromptTruncation.OFF, + "AUTO" => ChatRequestPromptTruncation.AUTO, + "AUTO_PRESERVE_ORDER" => ChatRequestPromptTruncation.AUTOPRESERVEORDER, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse10.g.verified.cs new file mode 100644 index 0000000000..febd83f716 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatResponse10 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse11.g.verified.cs new file mode 100644 index 0000000000..86e955fa2d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatResponse11 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse12.g.verified.cs new file mode 100644 index 0000000000..2a4b87a1fb --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatResponse12 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse13.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse13.g.verified.cs new file mode 100644 index 0000000000..dea0194488 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse13.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatResponse13.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatResponse13 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse2.g.verified.cs new file mode 100644 index 0000000000..6a348372cf --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatResponse2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse3.g.verified.cs new file mode 100644 index 0000000000..fe3c812619 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatResponse3 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse4.g.verified.cs new file mode 100644 index 0000000000..bb74dacdbe --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatResponse4 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse5.g.verified.cs new file mode 100644 index 0000000000..2423aae467 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatResponse5 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse6.g.verified.cs new file mode 100644 index 0000000000..1eb9a4dc1d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatResponse6 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse7.g.verified.cs new file mode 100644 index 0000000000..bf96b42866 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatResponse7 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse8.g.verified.cs new file mode 100644 index 0000000000..73e2caf56f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatResponse8 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse9.g.verified.cs new file mode 100644 index 0000000000..9dfa615afb --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatResponse9 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatRole.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatRole.g.verified.cs new file mode 100644 index 0000000000..96a4009cd8 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatRole.g.verified.cs @@ -0,0 +1,64 @@ +//HintName: G.Models.ChatRole.g.cs + +#nullable enable + +namespace G +{ + /// + /// One of `CHATBOT`, `SYSTEM`, `TOOL` or `USER` to identify who the message is coming from. + /// + public enum ChatRole + { + /// + /// + /// + CHATBOT, + /// + /// + /// + SYSTEM, + /// + /// + /// + USER, + /// + /// + /// + TOOL, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ChatRoleExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ChatRole value) + { + return value switch + { + ChatRole.CHATBOT => "CHATBOT", + ChatRole.SYSTEM => "SYSTEM", + ChatRole.USER => "USER", + ChatRole.TOOL => "TOOL", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ChatRole? ToEnum(string value) + { + return value switch + { + "CHATBOT" => ChatRole.CHATBOT, + "SYSTEM" => ChatRole.SYSTEM, + "USER" => ChatRole.USER, + "TOOL" => ChatRole.TOOL, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatSearchQueriesGenerationEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatSearchQueriesGenerationEvent.g.verified.cs new file mode 100644 index 0000000000..e3ffb5341f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatSearchQueriesGenerationEvent.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.ChatSearchQueriesGenerationEvent.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// + /// + public readonly partial struct ChatSearchQueriesGenerationEvent : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamEvent? Value1 { get; init; } +#else + public global::G.ChatStreamEvent? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator ChatSearchQueriesGenerationEvent(global::G.ChatStreamEvent value) => new ChatSearchQueriesGenerationEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamEvent?(ChatSearchQueriesGenerationEvent @this) => @this.Value1; + + /// + /// + /// + public ChatSearchQueriesGenerationEvent(global::G.ChatStreamEvent? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatSearchQueriesGenerationEventVariant2? Value2 { get; init; } +#else + public global::G.ChatSearchQueriesGenerationEventVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator ChatSearchQueriesGenerationEvent(global::G.ChatSearchQueriesGenerationEventVariant2 value) => new ChatSearchQueriesGenerationEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatSearchQueriesGenerationEventVariant2?(ChatSearchQueriesGenerationEvent @this) => @this.Value2; + + /// + /// + /// + public ChatSearchQueriesGenerationEvent(global::G.ChatSearchQueriesGenerationEventVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public ChatSearchQueriesGenerationEvent( + global::G.ChatStreamEvent? value1, + global::G.ChatSearchQueriesGenerationEventVariant2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.ChatStreamEvent), + Value2, + typeof(global::G.ChatSearchQueriesGenerationEventVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ChatSearchQueriesGenerationEvent other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(ChatSearchQueriesGenerationEvent obj1, ChatSearchQueriesGenerationEvent obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ChatSearchQueriesGenerationEvent obj1, ChatSearchQueriesGenerationEvent obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ChatSearchQueriesGenerationEvent o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatSearchQueriesGenerationEventVariant2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatSearchQueriesGenerationEventVariant2.g.verified.cs new file mode 100644 index 0000000000..a7fd41fb10 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatSearchQueriesGenerationEventVariant2.g.verified.cs @@ -0,0 +1,25 @@ +//HintName: G.Models.ChatSearchQueriesGenerationEventVariant2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatSearchQueriesGenerationEventVariant2 + { + /// + /// Generated search queries, meant to be used as part of the RAG flow. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("search_queries")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList SearchQueries { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatSearchQuery.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatSearchQuery.g.verified.cs new file mode 100644 index 0000000000..5d29cef012 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatSearchQuery.g.verified.cs @@ -0,0 +1,32 @@ +//HintName: G.Models.ChatSearchQuery.g.cs + +#nullable enable + +namespace G +{ + /// + /// The generated search query. Contains the text of the query and a unique identifier for the query. + /// + public sealed partial class ChatSearchQuery + { + /// + /// The text of the search query. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Text { get; set; } + + /// + /// Unique identifier for the generated search query. Useful for submitting feedback. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("generation_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string GenerationId { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatSearchResult.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatSearchResult.g.verified.cs new file mode 100644 index 0000000000..c1e8d8d4ad --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatSearchResult.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: G.Models.ChatSearchResult.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatSearchResult + { + /// + /// The generated search query. Contains the text of the query and a unique identifier for the query. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("search_query")] + public global::G.ChatSearchQuery? SearchQuery { get; set; } + + /// + /// The connector used for fetching documents. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("connector")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.ChatSearchResultConnector Connector { get; set; } + + /// + /// Identifiers of documents found by this search query. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("document_ids")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList DocumentIds { get; set; } + + /// + /// An error message if the search failed. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("error_message")] + public string? ErrorMessage { get; set; } + + /// + /// Whether a chat request should continue or not if the request to this connector fails. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("continue_on_failure")] + public bool ContinueOnFailure { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatSearchResultConnector.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatSearchResultConnector.g.verified.cs new file mode 100644 index 0000000000..8eaae260f8 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatSearchResultConnector.g.verified.cs @@ -0,0 +1,25 @@ +//HintName: G.Models.ChatSearchResultConnector.g.cs + +#nullable enable + +namespace G +{ + /// + /// The connector used for fetching documents. + /// + public sealed partial class ChatSearchResultConnector + { + /// + /// The identifier of the connector. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatSearchResultsEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatSearchResultsEvent.g.verified.cs new file mode 100644 index 0000000000..3b27ca9183 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatSearchResultsEvent.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.ChatSearchResultsEvent.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// + /// + public readonly partial struct ChatSearchResultsEvent : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamEvent? Value1 { get; init; } +#else + public global::G.ChatStreamEvent? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator ChatSearchResultsEvent(global::G.ChatStreamEvent value) => new ChatSearchResultsEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamEvent?(ChatSearchResultsEvent @this) => @this.Value1; + + /// + /// + /// + public ChatSearchResultsEvent(global::G.ChatStreamEvent? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatSearchResultsEventVariant2? Value2 { get; init; } +#else + public global::G.ChatSearchResultsEventVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator ChatSearchResultsEvent(global::G.ChatSearchResultsEventVariant2 value) => new ChatSearchResultsEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatSearchResultsEventVariant2?(ChatSearchResultsEvent @this) => @this.Value2; + + /// + /// + /// + public ChatSearchResultsEvent(global::G.ChatSearchResultsEventVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public ChatSearchResultsEvent( + global::G.ChatStreamEvent? value1, + global::G.ChatSearchResultsEventVariant2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.ChatStreamEvent), + Value2, + typeof(global::G.ChatSearchResultsEventVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ChatSearchResultsEvent other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(ChatSearchResultsEvent obj1, ChatSearchResultsEvent obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ChatSearchResultsEvent obj1, ChatSearchResultsEvent obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ChatSearchResultsEvent o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatSearchResultsEventVariant2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatSearchResultsEventVariant2.g.verified.cs new file mode 100644 index 0000000000..8d1eb290af --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatSearchResultsEventVariant2.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.ChatSearchResultsEventVariant2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatSearchResultsEventVariant2 + { + /// + /// Conducted searches and the ids of documents retrieved from each of them. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("search_results")] + public global::System.Collections.Generic.IList? SearchResults { get; set; } + + /// + /// Documents fetched from searches or provided by the user. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("documents")] + public global::System.Collections.Generic.IList? Documents { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatStreamEndEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatStreamEndEvent.g.verified.cs new file mode 100644 index 0000000000..5f2997e5c2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatStreamEndEvent.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.ChatStreamEndEvent.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// + /// + public readonly partial struct ChatStreamEndEvent : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamEvent? Value1 { get; init; } +#else + public global::G.ChatStreamEvent? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator ChatStreamEndEvent(global::G.ChatStreamEvent value) => new ChatStreamEndEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamEvent?(ChatStreamEndEvent @this) => @this.Value1; + + /// + /// + /// + public ChatStreamEndEvent(global::G.ChatStreamEvent? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamEndEventVariant2? Value2 { get; init; } +#else + public global::G.ChatStreamEndEventVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator ChatStreamEndEvent(global::G.ChatStreamEndEventVariant2 value) => new ChatStreamEndEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamEndEventVariant2?(ChatStreamEndEvent @this) => @this.Value2; + + /// + /// + /// + public ChatStreamEndEvent(global::G.ChatStreamEndEventVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public ChatStreamEndEvent( + global::G.ChatStreamEvent? value1, + global::G.ChatStreamEndEventVariant2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.ChatStreamEvent), + Value2, + typeof(global::G.ChatStreamEndEventVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ChatStreamEndEvent other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(ChatStreamEndEvent obj1, ChatStreamEndEvent obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ChatStreamEndEvent obj1, ChatStreamEndEvent obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ChatStreamEndEvent o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatStreamEndEventVariant2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatStreamEndEventVariant2.g.verified.cs new file mode 100644 index 0000000000..a1ac67824d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatStreamEndEventVariant2.g.verified.cs @@ -0,0 +1,37 @@ +//HintName: G.Models.ChatStreamEndEventVariant2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatStreamEndEventVariant2 + { + /// + /// - `COMPLETE` - the model sent back a finished reply
+ /// - `ERROR_LIMIT` - the reply was cut off because the model reached the maximum number of tokens for its context length
+ /// - `MAX_TOKENS` - the reply was cut off because the model reached the maximum number of tokens specified by the max_tokens parameter
+ /// - `ERROR` - something went wrong when generating the reply
+ /// - `ERROR_TOXIC` - the model generated a reply that was deemed toxic + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("finish_reason")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.ChatStreamEndEventVariant2FinishReasonJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.ChatStreamEndEventVariant2FinishReason FinishReason { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("response")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.NonStreamedChatResponse Response { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatStreamEndEventVariant2FinishReason.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatStreamEndEventVariant2FinishReason.g.verified.cs new file mode 100644 index 0000000000..dda8427579 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatStreamEndEventVariant2FinishReason.g.verified.cs @@ -0,0 +1,74 @@ +//HintName: G.Models.ChatStreamEndEventVariant2FinishReason.g.cs + +#nullable enable + +namespace G +{ + /// + /// - `COMPLETE` - the model sent back a finished reply
+ /// - `ERROR_LIMIT` - the reply was cut off because the model reached the maximum number of tokens for its context length
+ /// - `MAX_TOKENS` - the reply was cut off because the model reached the maximum number of tokens specified by the max_tokens parameter
+ /// - `ERROR` - something went wrong when generating the reply
+ /// - `ERROR_TOXIC` - the model generated a reply that was deemed toxic + ///
+ public enum ChatStreamEndEventVariant2FinishReason + { + /// + /// + /// + COMPLETE, + /// + /// + /// + ERRORLIMIT, + /// + /// + /// + MAXTOKENS, + /// + /// + /// + ERROR, + /// + /// + /// + ERRORTOXIC, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ChatStreamEndEventVariant2FinishReasonExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ChatStreamEndEventVariant2FinishReason value) + { + return value switch + { + ChatStreamEndEventVariant2FinishReason.COMPLETE => "COMPLETE", + ChatStreamEndEventVariant2FinishReason.ERRORLIMIT => "ERROR_LIMIT", + ChatStreamEndEventVariant2FinishReason.MAXTOKENS => "MAX_TOKENS", + ChatStreamEndEventVariant2FinishReason.ERROR => "ERROR", + ChatStreamEndEventVariant2FinishReason.ERRORTOXIC => "ERROR_TOXIC", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ChatStreamEndEventVariant2FinishReason? ToEnum(string value) + { + return value switch + { + "COMPLETE" => ChatStreamEndEventVariant2FinishReason.COMPLETE, + "ERROR_LIMIT" => ChatStreamEndEventVariant2FinishReason.ERRORLIMIT, + "MAX_TOKENS" => ChatStreamEndEventVariant2FinishReason.MAXTOKENS, + "ERROR" => ChatStreamEndEventVariant2FinishReason.ERROR, + "ERROR_TOXIC" => ChatStreamEndEventVariant2FinishReason.ERRORTOXIC, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatStreamEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatStreamEvent.g.verified.cs new file mode 100644 index 0000000000..b0aa957c9e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatStreamEvent.g.verified.cs @@ -0,0 +1,26 @@ +//HintName: G.Models.ChatStreamEvent.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatStreamEvent + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("event_type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.ChatStreamEventEventTypeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.ChatStreamEventEventType EventType { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatStreamEventEventType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatStreamEventEventType.g.verified.cs new file mode 100644 index 0000000000..7a7999971a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatStreamEventEventType.g.verified.cs @@ -0,0 +1,76 @@ +//HintName: G.Models.ChatStreamEventEventType.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public enum ChatStreamEventEventType + { + /// + /// + /// + StreamStart, + /// + /// + /// + SearchQueriesGeneration, + /// + /// + /// + SearchResults, + /// + /// + /// + TextGeneration, + /// + /// + /// + CitationGeneration, + /// + /// + /// + StreamEnd, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ChatStreamEventEventTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ChatStreamEventEventType value) + { + return value switch + { + ChatStreamEventEventType.StreamStart => "stream-start", + ChatStreamEventEventType.SearchQueriesGeneration => "search-queries-generation", + ChatStreamEventEventType.SearchResults => "search-results", + ChatStreamEventEventType.TextGeneration => "text-generation", + ChatStreamEventEventType.CitationGeneration => "citation-generation", + ChatStreamEventEventType.StreamEnd => "stream-end", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ChatStreamEventEventType? ToEnum(string value) + { + return value switch + { + "stream-start" => ChatStreamEventEventType.StreamStart, + "search-queries-generation" => ChatStreamEventEventType.SearchQueriesGeneration, + "search-results" => ChatStreamEventEventType.SearchResults, + "text-generation" => ChatStreamEventEventType.TextGeneration, + "citation-generation" => ChatStreamEventEventType.CitationGeneration, + "stream-end" => ChatStreamEventEventType.StreamEnd, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatStreamEventType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatStreamEventType.g.verified.cs new file mode 100644 index 0000000000..824db5ee31 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatStreamEventType.g.verified.cs @@ -0,0 +1,26 @@ +//HintName: G.Models.ChatStreamEventType.g.cs + +#nullable enable + +namespace G +{ + /// + /// The streamed event types + /// + public sealed partial class ChatStreamEventType + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.ChatStreamEventTypeTypeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.ChatStreamEventTypeType Type { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatStreamEventTypeType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatStreamEventTypeType.g.verified.cs new file mode 100644 index 0000000000..90de51e53a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatStreamEventTypeType.g.verified.cs @@ -0,0 +1,106 @@ +//HintName: G.Models.ChatStreamEventTypeType.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public enum ChatStreamEventTypeType + { + /// + /// + /// + MessageStart, + /// + /// + /// + ContentStart, + /// + /// + /// + ContentDelta, + /// + /// + /// + ContentEnd, + /// + /// + /// + ToolCallStart, + /// + /// + /// + ToolCallDelta, + /// + /// + /// + ToolCallEnd, + /// + /// + /// + ToolPlanDelta, + /// + /// + /// + CitationStart, + /// + /// + /// + CitationEnd, + /// + /// + /// + MessageEnd, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ChatStreamEventTypeTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ChatStreamEventTypeType value) + { + return value switch + { + ChatStreamEventTypeType.MessageStart => "message-start", + ChatStreamEventTypeType.ContentStart => "content-start", + ChatStreamEventTypeType.ContentDelta => "content-delta", + ChatStreamEventTypeType.ContentEnd => "content-end", + ChatStreamEventTypeType.ToolCallStart => "tool-call-start", + ChatStreamEventTypeType.ToolCallDelta => "tool-call-delta", + ChatStreamEventTypeType.ToolCallEnd => "tool-call-end", + ChatStreamEventTypeType.ToolPlanDelta => "tool-plan-delta", + ChatStreamEventTypeType.CitationStart => "citation-start", + ChatStreamEventTypeType.CitationEnd => "citation-end", + ChatStreamEventTypeType.MessageEnd => "message-end", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ChatStreamEventTypeType? ToEnum(string value) + { + return value switch + { + "message-start" => ChatStreamEventTypeType.MessageStart, + "content-start" => ChatStreamEventTypeType.ContentStart, + "content-delta" => ChatStreamEventTypeType.ContentDelta, + "content-end" => ChatStreamEventTypeType.ContentEnd, + "tool-call-start" => ChatStreamEventTypeType.ToolCallStart, + "tool-call-delta" => ChatStreamEventTypeType.ToolCallDelta, + "tool-call-end" => ChatStreamEventTypeType.ToolCallEnd, + "tool-plan-delta" => ChatStreamEventTypeType.ToolPlanDelta, + "citation-start" => ChatStreamEventTypeType.CitationStart, + "citation-end" => ChatStreamEventTypeType.CitationEnd, + "message-end" => ChatStreamEventTypeType.MessageEnd, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatStreamStartEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatStreamStartEvent.g.verified.cs new file mode 100644 index 0000000000..5898fe27b6 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatStreamStartEvent.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.ChatStreamStartEvent.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// + /// + public readonly partial struct ChatStreamStartEvent : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamEvent? Value1 { get; init; } +#else + public global::G.ChatStreamEvent? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator ChatStreamStartEvent(global::G.ChatStreamEvent value) => new ChatStreamStartEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamEvent?(ChatStreamStartEvent @this) => @this.Value1; + + /// + /// + /// + public ChatStreamStartEvent(global::G.ChatStreamEvent? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamStartEventVariant2? Value2 { get; init; } +#else + public global::G.ChatStreamStartEventVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator ChatStreamStartEvent(global::G.ChatStreamStartEventVariant2 value) => new ChatStreamStartEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamStartEventVariant2?(ChatStreamStartEvent @this) => @this.Value2; + + /// + /// + /// + public ChatStreamStartEvent(global::G.ChatStreamStartEventVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public ChatStreamStartEvent( + global::G.ChatStreamEvent? value1, + global::G.ChatStreamStartEventVariant2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.ChatStreamEvent), + Value2, + typeof(global::G.ChatStreamStartEventVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ChatStreamStartEvent other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(ChatStreamStartEvent obj1, ChatStreamStartEvent obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ChatStreamStartEvent obj1, ChatStreamStartEvent obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ChatStreamStartEvent o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatStreamStartEventVariant2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatStreamStartEventVariant2.g.verified.cs new file mode 100644 index 0000000000..332340fec1 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatStreamStartEventVariant2.g.verified.cs @@ -0,0 +1,25 @@ +//HintName: G.Models.ChatStreamStartEventVariant2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatStreamStartEventVariant2 + { + /// + /// Unique identifier for the generated reply. Useful for submitting feedback. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("generation_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string GenerationId { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatTextGenerationEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatTextGenerationEvent.g.verified.cs new file mode 100644 index 0000000000..afc019cdfe --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatTextGenerationEvent.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.ChatTextGenerationEvent.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// + /// + public readonly partial struct ChatTextGenerationEvent : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamEvent? Value1 { get; init; } +#else + public global::G.ChatStreamEvent? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator ChatTextGenerationEvent(global::G.ChatStreamEvent value) => new ChatTextGenerationEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamEvent?(ChatTextGenerationEvent @this) => @this.Value1; + + /// + /// + /// + public ChatTextGenerationEvent(global::G.ChatStreamEvent? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatTextGenerationEventVariant2? Value2 { get; init; } +#else + public global::G.ChatTextGenerationEventVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator ChatTextGenerationEvent(global::G.ChatTextGenerationEventVariant2 value) => new ChatTextGenerationEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatTextGenerationEventVariant2?(ChatTextGenerationEvent @this) => @this.Value2; + + /// + /// + /// + public ChatTextGenerationEvent(global::G.ChatTextGenerationEventVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public ChatTextGenerationEvent( + global::G.ChatStreamEvent? value1, + global::G.ChatTextGenerationEventVariant2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.ChatStreamEvent), + Value2, + typeof(global::G.ChatTextGenerationEventVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ChatTextGenerationEvent other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(ChatTextGenerationEvent obj1, ChatTextGenerationEvent obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ChatTextGenerationEvent obj1, ChatTextGenerationEvent obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ChatTextGenerationEvent o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatTextGenerationEventVariant2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatTextGenerationEventVariant2.g.verified.cs new file mode 100644 index 0000000000..07d3597d20 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatTextGenerationEventVariant2.g.verified.cs @@ -0,0 +1,25 @@ +//HintName: G.Models.ChatTextGenerationEventVariant2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatTextGenerationEventVariant2 + { + /// + /// The next batch of text generated by the model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Text { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallDeltaEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallDeltaEvent.g.verified.cs new file mode 100644 index 0000000000..c6563be8ba --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallDeltaEvent.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.ChatToolCallDeltaEvent.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// A streamed event delta which signifies a delta in tool call arguments. + /// + public readonly partial struct ChatToolCallDeltaEvent : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamEventType? Value1 { get; init; } +#else + public global::G.ChatStreamEventType? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator ChatToolCallDeltaEvent(global::G.ChatStreamEventType value) => new ChatToolCallDeltaEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamEventType?(ChatToolCallDeltaEvent @this) => @this.Value1; + + /// + /// + /// + public ChatToolCallDeltaEvent(global::G.ChatStreamEventType? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatToolCallDeltaEventVariant2? Value2 { get; init; } +#else + public global::G.ChatToolCallDeltaEventVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator ChatToolCallDeltaEvent(global::G.ChatToolCallDeltaEventVariant2 value) => new ChatToolCallDeltaEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatToolCallDeltaEventVariant2?(ChatToolCallDeltaEvent @this) => @this.Value2; + + /// + /// + /// + public ChatToolCallDeltaEvent(global::G.ChatToolCallDeltaEventVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public ChatToolCallDeltaEvent( + global::G.ChatStreamEventType? value1, + global::G.ChatToolCallDeltaEventVariant2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.ChatStreamEventType), + Value2, + typeof(global::G.ChatToolCallDeltaEventVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ChatToolCallDeltaEvent other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(ChatToolCallDeltaEvent obj1, ChatToolCallDeltaEvent obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ChatToolCallDeltaEvent obj1, ChatToolCallDeltaEvent obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ChatToolCallDeltaEvent o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallDeltaEventVariant2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallDeltaEventVariant2.g.verified.cs new file mode 100644 index 0000000000..a69d16c7c5 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallDeltaEventVariant2.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.ChatToolCallDeltaEventVariant2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatToolCallDeltaEventVariant2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("index")] + public int Index { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("delta")] + public global::G.ChatToolCallDeltaEventVariant2Delta? Delta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallDeltaEventVariant2Delta.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallDeltaEventVariant2Delta.g.verified.cs new file mode 100644 index 0000000000..ac2008a78a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallDeltaEventVariant2Delta.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatToolCallDeltaEventVariant2Delta.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatToolCallDeltaEventVariant2Delta + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tool_call")] + public global::G.ChatToolCallDeltaEventVariant2DeltaToolCall? ToolCall { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallDeltaEventVariant2DeltaToolCall.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallDeltaEventVariant2DeltaToolCall.g.verified.cs new file mode 100644 index 0000000000..ca9ba29b58 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallDeltaEventVariant2DeltaToolCall.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatToolCallDeltaEventVariant2DeltaToolCall.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatToolCallDeltaEventVariant2DeltaToolCall + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("function")] + public global::G.ChatToolCallDeltaEventVariant2DeltaToolCallFunction? Function { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallDeltaEventVariant2DeltaToolCallFunction.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallDeltaEventVariant2DeltaToolCallFunction.g.verified.cs new file mode 100644 index 0000000000..a25be59615 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallDeltaEventVariant2DeltaToolCallFunction.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatToolCallDeltaEventVariant2DeltaToolCallFunction.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatToolCallDeltaEventVariant2DeltaToolCallFunction + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] + public string? Arguments { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallEndEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallEndEvent.g.verified.cs new file mode 100644 index 0000000000..7edd1d5dba --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallEndEvent.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.ChatToolCallEndEvent.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// A streamed event delta which signifies a tool call has finished streaming. + /// + public readonly partial struct ChatToolCallEndEvent : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamEventType? Value1 { get; init; } +#else + public global::G.ChatStreamEventType? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator ChatToolCallEndEvent(global::G.ChatStreamEventType value) => new ChatToolCallEndEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamEventType?(ChatToolCallEndEvent @this) => @this.Value1; + + /// + /// + /// + public ChatToolCallEndEvent(global::G.ChatStreamEventType? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatToolCallEndEventVariant2? Value2 { get; init; } +#else + public global::G.ChatToolCallEndEventVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator ChatToolCallEndEvent(global::G.ChatToolCallEndEventVariant2 value) => new ChatToolCallEndEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatToolCallEndEventVariant2?(ChatToolCallEndEvent @this) => @this.Value2; + + /// + /// + /// + public ChatToolCallEndEvent(global::G.ChatToolCallEndEventVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public ChatToolCallEndEvent( + global::G.ChatStreamEventType? value1, + global::G.ChatToolCallEndEventVariant2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.ChatStreamEventType), + Value2, + typeof(global::G.ChatToolCallEndEventVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ChatToolCallEndEvent other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(ChatToolCallEndEvent obj1, ChatToolCallEndEvent obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ChatToolCallEndEvent obj1, ChatToolCallEndEvent obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ChatToolCallEndEvent o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallEndEventVariant2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallEndEventVariant2.g.verified.cs new file mode 100644 index 0000000000..205152029c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallEndEventVariant2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatToolCallEndEventVariant2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatToolCallEndEventVariant2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("index")] + public int Index { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallStartEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallStartEvent.g.verified.cs new file mode 100644 index 0000000000..686407d01c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallStartEvent.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.ChatToolCallStartEvent.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// A streamed event delta which signifies a tool call has started streaming. + /// + public readonly partial struct ChatToolCallStartEvent : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamEventType? Value1 { get; init; } +#else + public global::G.ChatStreamEventType? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator ChatToolCallStartEvent(global::G.ChatStreamEventType value) => new ChatToolCallStartEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamEventType?(ChatToolCallStartEvent @this) => @this.Value1; + + /// + /// + /// + public ChatToolCallStartEvent(global::G.ChatStreamEventType? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatToolCallStartEventVariant2? Value2 { get; init; } +#else + public global::G.ChatToolCallStartEventVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator ChatToolCallStartEvent(global::G.ChatToolCallStartEventVariant2 value) => new ChatToolCallStartEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatToolCallStartEventVariant2?(ChatToolCallStartEvent @this) => @this.Value2; + + /// + /// + /// + public ChatToolCallStartEvent(global::G.ChatToolCallStartEventVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public ChatToolCallStartEvent( + global::G.ChatStreamEventType? value1, + global::G.ChatToolCallStartEventVariant2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.ChatStreamEventType), + Value2, + typeof(global::G.ChatToolCallStartEventVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ChatToolCallStartEvent other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(ChatToolCallStartEvent obj1, ChatToolCallStartEvent obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ChatToolCallStartEvent obj1, ChatToolCallStartEvent obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ChatToolCallStartEvent o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallStartEventVariant2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallStartEventVariant2.g.verified.cs new file mode 100644 index 0000000000..c1a21039ea --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallStartEventVariant2.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.ChatToolCallStartEventVariant2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatToolCallStartEventVariant2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("index")] + public int Index { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("delta")] + public global::G.ChatToolCallStartEventVariant2Delta? Delta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallStartEventVariant2Delta.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallStartEventVariant2Delta.g.verified.cs new file mode 100644 index 0000000000..bb6b43ae21 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallStartEventVariant2Delta.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatToolCallStartEventVariant2Delta.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatToolCallStartEventVariant2Delta + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tool_call")] + public global::G.ChatToolCallStartEventVariant2DeltaToolCall? ToolCall { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallStartEventVariant2DeltaToolCall.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallStartEventVariant2DeltaToolCall.g.verified.cs new file mode 100644 index 0000000000..168a935c67 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallStartEventVariant2DeltaToolCall.g.verified.cs @@ -0,0 +1,37 @@ +//HintName: G.Models.ChatToolCallStartEventVariant2DeltaToolCall.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatToolCallStartEventVariant2DeltaToolCall + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public string? Id { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.ChatToolCallStartEventVariant2DeltaToolCallTypeJsonConverter))] + public global::G.ChatToolCallStartEventVariant2DeltaToolCallType? Type { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("function")] + public global::G.ChatToolCallStartEventVariant2DeltaToolCallFunction? Function { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallStartEventVariant2DeltaToolCallFunction.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallStartEventVariant2DeltaToolCallFunction.g.verified.cs new file mode 100644 index 0000000000..b3f6446d52 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallStartEventVariant2DeltaToolCallFunction.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.ChatToolCallStartEventVariant2DeltaToolCallFunction.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatToolCallStartEventVariant2DeltaToolCallFunction + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] + public string? Arguments { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallStartEventVariant2DeltaToolCallType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallStartEventVariant2DeltaToolCallType.g.verified.cs new file mode 100644 index 0000000000..ecb564e2fd --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallStartEventVariant2DeltaToolCallType.g.verified.cs @@ -0,0 +1,46 @@ +//HintName: G.Models.ChatToolCallStartEventVariant2DeltaToolCallType.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public enum ChatToolCallStartEventVariant2DeltaToolCallType + { + /// + /// + /// + Function, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ChatToolCallStartEventVariant2DeltaToolCallTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ChatToolCallStartEventVariant2DeltaToolCallType value) + { + return value switch + { + ChatToolCallStartEventVariant2DeltaToolCallType.Function => "function", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ChatToolCallStartEventVariant2DeltaToolCallType? ToEnum(string value) + { + return value switch + { + "function" => ChatToolCallStartEventVariant2DeltaToolCallType.Function, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallsChunkEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallsChunkEvent.g.verified.cs new file mode 100644 index 0000000000..e8ac2aa325 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallsChunkEvent.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.ChatToolCallsChunkEvent.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// + /// + public readonly partial struct ChatToolCallsChunkEvent : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamEvent? Value1 { get; init; } +#else + public global::G.ChatStreamEvent? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator ChatToolCallsChunkEvent(global::G.ChatStreamEvent value) => new ChatToolCallsChunkEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamEvent?(ChatToolCallsChunkEvent @this) => @this.Value1; + + /// + /// + /// + public ChatToolCallsChunkEvent(global::G.ChatStreamEvent? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatToolCallsChunkEventVariant2? Value2 { get; init; } +#else + public global::G.ChatToolCallsChunkEventVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator ChatToolCallsChunkEvent(global::G.ChatToolCallsChunkEventVariant2 value) => new ChatToolCallsChunkEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatToolCallsChunkEventVariant2?(ChatToolCallsChunkEvent @this) => @this.Value2; + + /// + /// + /// + public ChatToolCallsChunkEvent(global::G.ChatToolCallsChunkEventVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public ChatToolCallsChunkEvent( + global::G.ChatStreamEvent? value1, + global::G.ChatToolCallsChunkEventVariant2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.ChatStreamEvent), + Value2, + typeof(global::G.ChatToolCallsChunkEventVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ChatToolCallsChunkEvent other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(ChatToolCallsChunkEvent obj1, ChatToolCallsChunkEvent obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ChatToolCallsChunkEvent obj1, ChatToolCallsChunkEvent obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ChatToolCallsChunkEvent o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallsChunkEventVariant2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallsChunkEventVariant2.g.verified.cs new file mode 100644 index 0000000000..04cf3c106c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallsChunkEventVariant2.g.verified.cs @@ -0,0 +1,25 @@ +//HintName: G.Models.ChatToolCallsChunkEventVariant2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatToolCallsChunkEventVariant2 + { + /// + /// Contains the chunk of the tool call generation in the stream. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tool_call_delta")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.ToolCallDelta ToolCallDelta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallsGenerationEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallsGenerationEvent.g.verified.cs new file mode 100644 index 0000000000..08a99f1ad9 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallsGenerationEvent.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.ChatToolCallsGenerationEvent.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// + /// + public readonly partial struct ChatToolCallsGenerationEvent : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamEvent? Value1 { get; init; } +#else + public global::G.ChatStreamEvent? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator ChatToolCallsGenerationEvent(global::G.ChatStreamEvent value) => new ChatToolCallsGenerationEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamEvent?(ChatToolCallsGenerationEvent @this) => @this.Value1; + + /// + /// + /// + public ChatToolCallsGenerationEvent(global::G.ChatStreamEvent? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatToolCallsGenerationEventVariant2? Value2 { get; init; } +#else + public global::G.ChatToolCallsGenerationEventVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator ChatToolCallsGenerationEvent(global::G.ChatToolCallsGenerationEventVariant2 value) => new ChatToolCallsGenerationEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatToolCallsGenerationEventVariant2?(ChatToolCallsGenerationEvent @this) => @this.Value2; + + /// + /// + /// + public ChatToolCallsGenerationEvent(global::G.ChatToolCallsGenerationEventVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public ChatToolCallsGenerationEvent( + global::G.ChatStreamEvent? value1, + global::G.ChatToolCallsGenerationEventVariant2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.ChatStreamEvent), + Value2, + typeof(global::G.ChatToolCallsGenerationEventVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ChatToolCallsGenerationEvent other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(ChatToolCallsGenerationEvent obj1, ChatToolCallsGenerationEvent obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ChatToolCallsGenerationEvent obj1, ChatToolCallsGenerationEvent obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ChatToolCallsGenerationEvent o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallsGenerationEventVariant2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallsGenerationEventVariant2.g.verified.cs new file mode 100644 index 0000000000..4171b18094 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolCallsGenerationEventVariant2.g.verified.cs @@ -0,0 +1,31 @@ +//HintName: G.Models.ChatToolCallsGenerationEventVariant2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatToolCallsGenerationEventVariant2 + { + /// + /// The text generated related to the tool calls generated + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + public string? Text { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tool_calls")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList ToolCalls { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolPlanDeltaEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolPlanDeltaEvent.g.verified.cs new file mode 100644 index 0000000000..e097582f41 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolPlanDeltaEvent.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.ChatToolPlanDeltaEvent.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// A streamed event which contains a delta of tool plan text. + /// + public readonly partial struct ChatToolPlanDeltaEvent : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamEventType? Value1 { get; init; } +#else + public global::G.ChatStreamEventType? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator ChatToolPlanDeltaEvent(global::G.ChatStreamEventType value) => new ChatToolPlanDeltaEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamEventType?(ChatToolPlanDeltaEvent @this) => @this.Value1; + + /// + /// + /// + public ChatToolPlanDeltaEvent(global::G.ChatStreamEventType? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatToolPlanDeltaEventVariant2? Value2 { get; init; } +#else + public global::G.ChatToolPlanDeltaEventVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator ChatToolPlanDeltaEvent(global::G.ChatToolPlanDeltaEventVariant2 value) => new ChatToolPlanDeltaEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatToolPlanDeltaEventVariant2?(ChatToolPlanDeltaEvent @this) => @this.Value2; + + /// + /// + /// + public ChatToolPlanDeltaEvent(global::G.ChatToolPlanDeltaEventVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public ChatToolPlanDeltaEvent( + global::G.ChatStreamEventType? value1, + global::G.ChatToolPlanDeltaEventVariant2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.ChatStreamEventType), + Value2, + typeof(global::G.ChatToolPlanDeltaEventVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ChatToolPlanDeltaEvent other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(ChatToolPlanDeltaEvent obj1, ChatToolPlanDeltaEvent obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ChatToolPlanDeltaEvent obj1, ChatToolPlanDeltaEvent obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ChatToolPlanDeltaEvent o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolPlanDeltaEventVariant2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolPlanDeltaEventVariant2.g.verified.cs new file mode 100644 index 0000000000..9b7632820d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolPlanDeltaEventVariant2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatToolPlanDeltaEventVariant2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatToolPlanDeltaEventVariant2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("delta")] + public global::G.ChatToolPlanDeltaEventVariant2Delta? Delta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolPlanDeltaEventVariant2Delta.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolPlanDeltaEventVariant2Delta.g.verified.cs new file mode 100644 index 0000000000..42fa275cae --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ChatToolPlanDeltaEventVariant2Delta.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ChatToolPlanDeltaEventVariant2Delta.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ChatToolPlanDeltaEventVariant2Delta + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tool_plan")] + public string? ToolPlan { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Request.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Request.g.verified.cs new file mode 100644 index 0000000000..e56d9deaf2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Request.g.verified.cs @@ -0,0 +1,118 @@ +//HintName: G.Models.Chatv2Request.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Chatv2Request + { + /// + /// The name of a compatible [Cohere model](https://docs.cohere.com/docs/models) (such as command-r or command-r-plus) or the ID of a [fine-tuned](https://docs.cohere.com/docs/chat-fine-tuning) model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Model { get; set; } + + /// + /// A list of chat messages in chronological order, representing a conversation between the user and the model.
+ /// Messages can be from `User`, `Assistant`, `Tool` and `System` roles. Learn more about messages and roles in [the Chat API guide](https://docs.cohere.com/docs/chat-api). + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("messages")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Messages { get; set; } + + /// + /// A list of available tools (functions) that the model may suggest invoking before producing a text response.
+ /// When `tools` is passed (without `tool_results`), the `text` content in the response will be empty and the `tool_calls` field in the response will be populated with a list of tool calls that need to be made. If no calls need to be made, the `tool_calls` array will be empty. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("tools")] + public global::System.Collections.Generic.IList? Tools { get; set; } + + /// + /// Defaults to `"accurate"`.
+ /// Dictates the approach taken to generating citations as part of the RAG flow by allowing the user to specify whether they want `"accurate"` results, `"fast"` results or no results. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("citation_mode")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.Chatv2RequestCitationModeJsonConverter))] + public global::G.Chatv2RequestCitationMode? CitationMode { get; set; } + + /// + /// Configuration for forcing the model output to adhere to the specified format. Supported on [Command R](https://docs.cohere.com/docs/command-r), [Command R+](https://docs.cohere.com/docs/command-r-plus) and newer models.
+ /// The model can be forced into outputting JSON objects (with up to 5 levels of nesting) by setting `{ "type": "json_object" }`.
+ /// A [JSON Schema](https://json-schema.org/) can optionally be provided, to ensure a specific structure.
+ /// **Note**: When using `{ "type": "json_object" }` your `message` should always explicitly instruct the model to generate a JSON (eg: _"Generate a JSON ..."_) . Otherwise the model may end up getting stuck generating an infinite stream of characters and eventually run out of context length.
+ /// **Limitation**: The parameter is not supported in RAG mode (when any of `connectors`, `documents`, `tools`, `tool_results` are provided). + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("response_format")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.ResponseFormat2JsonConverter))] + public global::G.ResponseFormat2? ResponseFormat { get; set; } + + /// + /// The maximum number of tokens the model will generate as part of the response. Note: Setting a low value may result in incomplete generations. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("max_tokens")] + public int MaxTokens { get; set; } + + /// + /// A list of up to 5 strings that the model will use to stop generation. If the model generates a string that matches any of the strings in the list, it will stop generating tokens and return the generated text up to that point not including the stop sequence. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("stop_sequences")] + public global::System.Collections.Generic.IList? StopSequences { get; set; } + + /// + /// Defaults to `0.3`.
+ /// A non-negative float that tunes the degree of randomness in generation. Lower temperatures mean less random generations, and higher temperatures mean more random generations.
+ /// Randomness can be further maximized by increasing the value of the `p` parameter. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] + public float Temperature { get; set; } + + /// + /// If specified, the backend will make a best effort to sample tokens
+ /// deterministically, such that repeated requests with the same
+ /// seed and parameters should return the same result. However,
+ /// determinism cannot be totally guaranteed. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("seed")] + public int Seed { get; set; } + + /// + /// Defaults to `0.0`, min value of `0.0`, max value of `1.0`.
+ /// Used to reduce repetitiveness of generated tokens. The higher the value, the stronger a penalty is applied to previously present tokens, proportional to how many times they have already appeared in the prompt or prior generation. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("frequency_penalty")] + public float FrequencyPenalty { get; set; } + + /// + /// Defaults to `0.0`, min value of `0.0`, max value of `1.0`.
+ /// Used to reduce repetitiveness of generated tokens. Similar to `frequency_penalty`, except that this penalty is applied equally to all tokens that have already appeared, regardless of their exact frequencies. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("presence_penalty")] + public float PresencePenalty { get; set; } + + /// + /// Ensures only the top `k` most likely tokens are considered for generation at each step.
+ /// Defaults to `0`, min value of `0`, max value of `500`.
+ /// Default Value: 0F + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("k")] + public float K { get; set; } = 0F; + + /// + /// Ensures that only the most likely tokens, with total probability mass of `p`, are considered for generation at each step. If both `k` and `p` are enabled, `p` acts after `k`.
+ /// Defaults to `0.75`. min value of `0.01`, max value of `0.99`.
+ /// Default Value: 0.75F + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("p")] + public float P { get; set; } = 0.75F; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2RequestCitationMode.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2RequestCitationMode.g.verified.cs new file mode 100644 index 0000000000..f474889f61 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2RequestCitationMode.g.verified.cs @@ -0,0 +1,59 @@ +//HintName: G.Models.Chatv2RequestCitationMode.g.cs + +#nullable enable + +namespace G +{ + /// + /// Defaults to `"accurate"`.
+ /// Dictates the approach taken to generating citations as part of the RAG flow by allowing the user to specify whether they want `"accurate"` results, `"fast"` results or no results. + ///
+ public enum Chatv2RequestCitationMode + { + /// + /// + /// + FAST, + /// + /// + /// + ACCURATE, + /// + /// + /// + OFF, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class Chatv2RequestCitationModeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this Chatv2RequestCitationMode value) + { + return value switch + { + Chatv2RequestCitationMode.FAST => "FAST", + Chatv2RequestCitationMode.ACCURATE => "ACCURATE", + Chatv2RequestCitationMode.OFF => "OFF", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static Chatv2RequestCitationMode? ToEnum(string value) + { + return value switch + { + "FAST" => Chatv2RequestCitationMode.FAST, + "ACCURATE" => Chatv2RequestCitationMode.ACCURATE, + "OFF" => Chatv2RequestCitationMode.OFF, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response10.g.verified.cs new file mode 100644 index 0000000000..41a7c99998 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.Chatv2Response10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Chatv2Response10 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response11.g.verified.cs new file mode 100644 index 0000000000..4b6dae4e45 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.Chatv2Response11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Chatv2Response11 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response12.g.verified.cs new file mode 100644 index 0000000000..a1fdf6d13d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.Chatv2Response12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Chatv2Response12 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response13.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response13.g.verified.cs new file mode 100644 index 0000000000..f0961b9902 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response13.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.Chatv2Response13.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Chatv2Response13 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response2.g.verified.cs new file mode 100644 index 0000000000..4043a4240c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.Chatv2Response2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Chatv2Response2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response3.g.verified.cs new file mode 100644 index 0000000000..db3dd25130 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.Chatv2Response3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Chatv2Response3 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response4.g.verified.cs new file mode 100644 index 0000000000..0049a9c9c7 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.Chatv2Response4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Chatv2Response4 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response5.g.verified.cs new file mode 100644 index 0000000000..8d83266f80 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.Chatv2Response5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Chatv2Response5 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response6.g.verified.cs new file mode 100644 index 0000000000..54c6eb4c4a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.Chatv2Response6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Chatv2Response6 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response7.g.verified.cs new file mode 100644 index 0000000000..5a50b23c6a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.Chatv2Response7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Chatv2Response7 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response8.g.verified.cs new file mode 100644 index 0000000000..869b5ff143 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.Chatv2Response8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Chatv2Response8 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response9.g.verified.cs new file mode 100644 index 0000000000..5a1aa4c4c0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Chatv2Response9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.Chatv2Response9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Chatv2Response9 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse.g.verified.cs new file mode 100644 index 0000000000..4942a433e7 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse.g.verified.cs @@ -0,0 +1,37 @@ +//HintName: G.Models.CheckAPIKeyResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CheckAPIKeyResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("valid")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool Valid { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("organization_id")] + public string? OrganizationId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("owner_id")] + public string? OwnerId { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse10.g.verified.cs new file mode 100644 index 0000000000..d3ec55ed98 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CheckAPIKeyResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CheckAPIKeyResponse10 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse11.g.verified.cs new file mode 100644 index 0000000000..05422290dc --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CheckAPIKeyResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CheckAPIKeyResponse11 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse12.g.verified.cs new file mode 100644 index 0000000000..061f1d63b9 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CheckAPIKeyResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CheckAPIKeyResponse12 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse13.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse13.g.verified.cs new file mode 100644 index 0000000000..15781e439c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse13.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CheckAPIKeyResponse13.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CheckAPIKeyResponse13 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse2.g.verified.cs new file mode 100644 index 0000000000..e1fb94b6aa --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CheckAPIKeyResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CheckAPIKeyResponse2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse3.g.verified.cs new file mode 100644 index 0000000000..aaff73e454 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CheckAPIKeyResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CheckAPIKeyResponse3 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse4.g.verified.cs new file mode 100644 index 0000000000..6560a8f27d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CheckAPIKeyResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CheckAPIKeyResponse4 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse5.g.verified.cs new file mode 100644 index 0000000000..03ed082963 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CheckAPIKeyResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CheckAPIKeyResponse5 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse6.g.verified.cs new file mode 100644 index 0000000000..e0f46fe59f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CheckAPIKeyResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CheckAPIKeyResponse6 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse7.g.verified.cs new file mode 100644 index 0000000000..ba543ac61c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CheckAPIKeyResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CheckAPIKeyResponse7 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse8.g.verified.cs new file mode 100644 index 0000000000..86b2911759 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CheckAPIKeyResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CheckAPIKeyResponse8 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse9.g.verified.cs new file mode 100644 index 0000000000..c1fde6d855 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CheckAPIKeyResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CheckAPIKeyResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CheckAPIKeyResponse9 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Citation.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Citation.g.verified.cs new file mode 100644 index 0000000000..c3e1b3e13f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Citation.g.verified.cs @@ -0,0 +1,42 @@ +//HintName: G.Models.Citation.g.cs + +#nullable enable + +namespace G +{ + /// + /// Citation information containing sources and the text cited. + /// + public sealed partial class Citation + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("start")] + public int Start { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("end")] + public int End { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + public string? Text { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("sources")] + public global::System.Collections.Generic.IList? Sources { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CitationEndEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CitationEndEvent.g.verified.cs new file mode 100644 index 0000000000..f133fd6621 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CitationEndEvent.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.CitationEndEvent.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// A streamed event which signifies a citation has finished streaming. + /// + public readonly partial struct CitationEndEvent : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamEventType? Value1 { get; init; } +#else + public global::G.ChatStreamEventType? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator CitationEndEvent(global::G.ChatStreamEventType value) => new CitationEndEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamEventType?(CitationEndEvent @this) => @this.Value1; + + /// + /// + /// + public CitationEndEvent(global::G.ChatStreamEventType? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.CitationEndEventVariant2? Value2 { get; init; } +#else + public global::G.CitationEndEventVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator CitationEndEvent(global::G.CitationEndEventVariant2 value) => new CitationEndEvent(value); + + /// + /// + /// + public static implicit operator global::G.CitationEndEventVariant2?(CitationEndEvent @this) => @this.Value2; + + /// + /// + /// + public CitationEndEvent(global::G.CitationEndEventVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public CitationEndEvent( + global::G.ChatStreamEventType? value1, + global::G.CitationEndEventVariant2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.ChatStreamEventType), + Value2, + typeof(global::G.CitationEndEventVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(CitationEndEvent other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(CitationEndEvent obj1, CitationEndEvent obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(CitationEndEvent obj1, CitationEndEvent obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is CitationEndEvent o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CitationEndEventVariant2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CitationEndEventVariant2.g.verified.cs new file mode 100644 index 0000000000..6bf70ea8f4 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CitationEndEventVariant2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CitationEndEventVariant2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CitationEndEventVariant2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("index")] + public int Index { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CitationStartEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CitationStartEvent.g.verified.cs new file mode 100644 index 0000000000..8bb0843aed --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CitationStartEvent.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.CitationStartEvent.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// A streamed event which signifies a citation has been created. + /// + public readonly partial struct CitationStartEvent : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamEventType? Value1 { get; init; } +#else + public global::G.ChatStreamEventType? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator CitationStartEvent(global::G.ChatStreamEventType value) => new CitationStartEvent(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamEventType?(CitationStartEvent @this) => @this.Value1; + + /// + /// + /// + public CitationStartEvent(global::G.ChatStreamEventType? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.CitationStartEventVariant2? Value2 { get; init; } +#else + public global::G.CitationStartEventVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator CitationStartEvent(global::G.CitationStartEventVariant2 value) => new CitationStartEvent(value); + + /// + /// + /// + public static implicit operator global::G.CitationStartEventVariant2?(CitationStartEvent @this) => @this.Value2; + + /// + /// + /// + public CitationStartEvent(global::G.CitationStartEventVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public CitationStartEvent( + global::G.ChatStreamEventType? value1, + global::G.CitationStartEventVariant2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.ChatStreamEventType), + Value2, + typeof(global::G.CitationStartEventVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(CitationStartEvent other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(CitationStartEvent obj1, CitationStartEvent obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(CitationStartEvent obj1, CitationStartEvent obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is CitationStartEvent o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CitationStartEventVariant2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CitationStartEventVariant2.g.verified.cs new file mode 100644 index 0000000000..d600371fde --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CitationStartEventVariant2.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.CitationStartEventVariant2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CitationStartEventVariant2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("index")] + public int Index { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("delta")] + public global::G.CitationStartEventVariant2Delta? Delta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CitationStartEventVariant2Delta.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CitationStartEventVariant2Delta.g.verified.cs new file mode 100644 index 0000000000..bf200354e4 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CitationStartEventVariant2Delta.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CitationStartEventVariant2Delta.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CitationStartEventVariant2Delta + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("message")] + public global::G.CitationStartEventVariant2DeltaMessage? Message { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CitationStartEventVariant2DeltaMessage.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CitationStartEventVariant2DeltaMessage.g.verified.cs new file mode 100644 index 0000000000..acef2e2baf --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CitationStartEventVariant2DeltaMessage.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CitationStartEventVariant2DeltaMessage.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CitationStartEventVariant2DeltaMessage + { + /// + /// Citation information containing sources and the text cited. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("citations")] + public global::G.Citation? Citations { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyDataMetrics.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyDataMetrics.g.verified.cs new file mode 100644 index 0000000000..1ac8f643ab --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyDataMetrics.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ClassifyDataMetrics.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ClassifyDataMetrics + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("label_metrics")] + public global::System.Collections.Generic.IList? LabelMetrics { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyExample.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyExample.g.verified.cs new file mode 100644 index 0000000000..8360b53134 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyExample.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.ClassifyExample.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ClassifyExample + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + public string? Text { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("label")] + public string? Label { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyRequest.g.verified.cs new file mode 100644 index 0000000000..a62b7a932e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyRequest.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: G.Models.ClassifyRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ClassifyRequest + { + /// + /// A list of up to 96 texts to be classified. Each one must be a non-empty string.
+ /// There is, however, no consistent, universal limit to the length a particular input can be. We perform classification on the first `x` tokens of each input, and `x` varies depending on which underlying model is powering classification. The maximum token length for each model is listed in the "max tokens" column [here](https://docs.cohere.com/docs/models).
+ /// Note: by default the `truncate` parameter is set to `END`, so tokens exceeding the limit will be automatically dropped. This behavior can be disabled by setting `truncate` to `NONE`, which will result in validation errors for longer texts. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("inputs")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Inputs { get; set; } + + /// + /// An array of examples to provide context to the model. Each example is a text string and its associated label/class. Each unique label requires at least 2 examples associated with it; the maximum number of examples is 2500, and each example has a maximum length of 512 tokens. The values should be structured as `{text: "...",label: "..."}`.
+ /// Note: [Fine-tuned Models](https://docs.cohere.com/docs/classify-fine-tuning) trained on classification examples don't require the `examples` parameter to be passed in explicitly. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("examples")] + public global::System.Collections.Generic.IList? Examples { get; set; } + + /// + /// The identifier of the model. Currently available models are `embed-multilingual-v2.0`, `embed-english-light-v2.0`, and `embed-english-v2.0` (default). Smaller "light" models are faster, while larger models will perform better. [Fine-tuned models](https://docs.cohere.com/docs/fine-tuning) can also be supplied with their full ID. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + public string? Model { get; set; } + + /// + /// The ID of a custom playground preset. You can create presets in the [playground](https://dashboard.cohere.com/playground/classify?model=large). If you use a preset, all other parameters become optional, and any included parameters will override the preset's parameters.
+ /// Example: my-preset-a58sbd + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("preset")] + public string? Preset { get; set; } + + /// + /// One of `NONE|START|END` to specify how the API will handle inputs longer than the maximum token length.
+ /// Passing `START` will discard the start of the input. `END` will discard the end of the input. In both cases, input is discarded until the remaining input is exactly the maximum input token length for the model.
+ /// If `NONE` is selected, when the input exceeds the maximum input token length an error will be returned.
+ /// Default Value: END + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("truncate")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.ClassifyRequestTruncateJsonConverter))] + public global::G.ClassifyRequestTruncate? Truncate { get; set; } = global::G.ClassifyRequestTruncate.END; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyRequestTruncate.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyRequestTruncate.g.verified.cs new file mode 100644 index 0000000000..faba2c68f7 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyRequestTruncate.g.verified.cs @@ -0,0 +1,61 @@ +//HintName: G.Models.ClassifyRequestTruncate.g.cs + +#nullable enable + +namespace G +{ + /// + /// One of `NONE|START|END` to specify how the API will handle inputs longer than the maximum token length.
+ /// Passing `START` will discard the start of the input. `END` will discard the end of the input. In both cases, input is discarded until the remaining input is exactly the maximum input token length for the model.
+ /// If `NONE` is selected, when the input exceeds the maximum input token length an error will be returned.
+ /// Default Value: END + ///
+ public enum ClassifyRequestTruncate + { + /// + /// + /// + NONE, + /// + /// + /// + START, + /// + /// + /// + END, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ClassifyRequestTruncateExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ClassifyRequestTruncate value) + { + return value switch + { + ClassifyRequestTruncate.NONE => "NONE", + ClassifyRequestTruncate.START => "START", + ClassifyRequestTruncate.END => "END", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ClassifyRequestTruncate? ToEnum(string value) + { + return value switch + { + "NONE" => ClassifyRequestTruncate.NONE, + "START" => ClassifyRequestTruncate.START, + "END" => ClassifyRequestTruncate.END, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse.g.verified.cs new file mode 100644 index 0000000000..b2ea32ce27 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse.g.verified.cs @@ -0,0 +1,38 @@ +//HintName: G.Models.ClassifyResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ClassifyResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("classifications")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Classifications { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("meta")] + public global::G.ApiMeta? Meta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse10.g.verified.cs new file mode 100644 index 0000000000..5a5d375a53 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ClassifyResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ClassifyResponse10 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse11.g.verified.cs new file mode 100644 index 0000000000..9c659bb135 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ClassifyResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ClassifyResponse11 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse12.g.verified.cs new file mode 100644 index 0000000000..674934fd8f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ClassifyResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ClassifyResponse12 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse13.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse13.g.verified.cs new file mode 100644 index 0000000000..fb4bcf4384 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse13.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ClassifyResponse13.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ClassifyResponse13 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse2.g.verified.cs new file mode 100644 index 0000000000..82cdf6c6b1 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ClassifyResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ClassifyResponse2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse3.g.verified.cs new file mode 100644 index 0000000000..5bf6bf9cb5 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ClassifyResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ClassifyResponse3 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse4.g.verified.cs new file mode 100644 index 0000000000..0c6f7457ee --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ClassifyResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ClassifyResponse4 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse5.g.verified.cs new file mode 100644 index 0000000000..e82fab016d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ClassifyResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ClassifyResponse5 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse6.g.verified.cs new file mode 100644 index 0000000000..c2c0533f75 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ClassifyResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ClassifyResponse6 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse7.g.verified.cs new file mode 100644 index 0000000000..24d5cdbd76 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ClassifyResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ClassifyResponse7 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse8.g.verified.cs new file mode 100644 index 0000000000..dca1602e52 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ClassifyResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ClassifyResponse8 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse9.g.verified.cs new file mode 100644 index 0000000000..308540338e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ClassifyResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ClassifyResponse9 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponseClassification.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponseClassification.g.verified.cs new file mode 100644 index 0000000000..5e145d2e19 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponseClassification.g.verified.cs @@ -0,0 +1,74 @@ +//HintName: G.Models.ClassifyResponseClassification.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ClassifyResponseClassification + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// The input text that was classified + /// + [global::System.Text.Json.Serialization.JsonPropertyName("input")] + public string? Input { get; set; } + + /// + /// The predicted label for the associated query (only filled for single-label models) + /// + [global::System.Text.Json.Serialization.JsonPropertyName("prediction")] + [global::System.Obsolete("This property marked as deprecated.")] + public string? Prediction { get; set; } + + /// + /// An array containing the predicted labels for the associated query (only filled for single-label classification) + /// + [global::System.Text.Json.Serialization.JsonPropertyName("predictions")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Predictions { get; set; } + + /// + /// The confidence score for the top predicted class (only filled for single-label classification) + /// + [global::System.Text.Json.Serialization.JsonPropertyName("confidence")] + [global::System.Obsolete("This property marked as deprecated.")] + public float Confidence { get; set; } + + /// + /// An array containing the confidence scores of all the predictions in the same order + /// + [global::System.Text.Json.Serialization.JsonPropertyName("confidences")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Confidences { get; set; } + + /// + /// A map containing each label and its confidence score according to the classifier. All the confidence scores add up to 1 for single-label classification. For multi-label classification the label confidences are independent of each other, so they don't have to sum up to 1. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("labels")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.ClassifyResponseClassificationLabels Labels { get; set; } + + /// + /// The type of classification performed + /// + [global::System.Text.Json.Serialization.JsonPropertyName("classification_type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.ClassifyResponseClassificationClassificationTypeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.ClassifyResponseClassificationClassificationType ClassificationType { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponseClassificationClassificationType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponseClassificationClassificationType.g.verified.cs new file mode 100644 index 0000000000..7dadbf081c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponseClassificationClassificationType.g.verified.cs @@ -0,0 +1,52 @@ +//HintName: G.Models.ClassifyResponseClassificationClassificationType.g.cs + +#nullable enable + +namespace G +{ + /// + /// The type of classification performed + /// + public enum ClassifyResponseClassificationClassificationType + { + /// + /// + /// + SingleLabel, + /// + /// + /// + MultiLabel, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ClassifyResponseClassificationClassificationTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ClassifyResponseClassificationClassificationType value) + { + return value switch + { + ClassifyResponseClassificationClassificationType.SingleLabel => "single-label", + ClassifyResponseClassificationClassificationType.MultiLabel => "multi-label", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ClassifyResponseClassificationClassificationType? ToEnum(string value) + { + return value switch + { + "single-label" => ClassifyResponseClassificationClassificationType.SingleLabel, + "multi-label" => ClassifyResponseClassificationClassificationType.MultiLabel, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponseClassificationLabels.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponseClassificationLabels.g.verified.cs new file mode 100644 index 0000000000..1a11c12dd7 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ClassifyResponseClassificationLabels.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.ClassifyResponseClassificationLabels.g.cs + +#nullable enable + +namespace G +{ + /// + /// A map containing each label and its confidence score according to the classifier. All the confidence scores add up to 1 for single-label classification. For multi-label classification the label confidences are independent of each other, so they don't have to sum up to 1. + /// + public sealed partial class ClassifyResponseClassificationLabels + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Cluster.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Cluster.g.verified.cs new file mode 100644 index 0000000000..d26c68f2b0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Cluster.g.verified.cs @@ -0,0 +1,48 @@ +//HintName: G.Models.Cluster.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Cluster + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public string? Id { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("keywords")] + public global::System.Collections.Generic.IList? Keywords { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + public string? Description { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("size")] + public int Size { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("sample_elements")] + public global::System.Collections.Generic.IList? SampleElements { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CompatibleEndpoint.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CompatibleEndpoint.g.verified.cs new file mode 100644 index 0000000000..378202af54 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CompatibleEndpoint.g.verified.cs @@ -0,0 +1,82 @@ +//HintName: G.Models.CompatibleEndpoint.g.cs + +#nullable enable + +namespace G +{ + /// + /// One of the Cohere API endpoints that the model can be used with. + /// + public enum CompatibleEndpoint + { + /// + /// + /// + Chat, + /// + /// + /// + Embed, + /// + /// + /// + Classify, + /// + /// + /// + Summarize, + /// + /// + /// + Rerank, + /// + /// + /// + Rate, + /// + /// + /// + Generate, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CompatibleEndpointExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CompatibleEndpoint value) + { + return value switch + { + CompatibleEndpoint.Chat => "chat", + CompatibleEndpoint.Embed => "embed", + CompatibleEndpoint.Classify => "classify", + CompatibleEndpoint.Summarize => "summarize", + CompatibleEndpoint.Rerank => "rerank", + CompatibleEndpoint.Rate => "rate", + CompatibleEndpoint.Generate => "generate", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CompatibleEndpoint? ToEnum(string value) + { + return value switch + { + "chat" => CompatibleEndpoint.Chat, + "embed" => CompatibleEndpoint.Embed, + "classify" => CompatibleEndpoint.Classify, + "summarize" => CompatibleEndpoint.Summarize, + "rerank" => CompatibleEndpoint.Rerank, + "rate" => CompatibleEndpoint.Rate, + "generate" => CompatibleEndpoint.Generate, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Connector.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Connector.g.verified.cs new file mode 100644 index 0000000000..132d7cacd1 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Connector.g.verified.cs @@ -0,0 +1,104 @@ +//HintName: G.Models.Connector.g.cs + +#nullable enable + +namespace G +{ + /// + /// A connector allows you to integrate data sources with the '/chat' endpoint to create grounded generations with citations to the data source.
+ /// documents to help answer users. + ///
+ public sealed partial class Connector + { + /// + /// The unique identifier of the connector (used in both `/connectors` & `/chat` endpoints).
+ /// This is automatically created from the name of the connector upon registration. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// The organization to which this connector belongs. This is automatically set to
+ /// the organization of the user who created the connector. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("organization_id")] + public string? OrganizationId { get; set; } + + /// + /// A human-readable name for the connector. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// A description of the connector. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + public string? Description { get; set; } + + /// + /// The URL of the connector that will be used to search for documents. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("url")] + public string? Url { get; set; } + + /// + /// The UTC time at which the connector was created. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime CreatedAt { get; set; } + + /// + /// The UTC time at which the connector was last updated. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("updated_at")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime UpdatedAt { get; set; } + + /// + /// A list of fields to exclude from the prompt (fields remain in the document). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("excludes")] + public global::System.Collections.Generic.IList? Excludes { get; set; } + + /// + /// The type of authentication/authorization used by the connector. Possible values: [oauth, service_auth] + /// + [global::System.Text.Json.Serialization.JsonPropertyName("auth_type")] + public string? AuthType { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("oauth")] + public global::G.ConnectorOAuth? Oauth { get; set; } + + /// + /// The OAuth status for the user making the request. One of ["valid", "expired", ""]. Empty string (field is omitted) means the user has not authorized the connector yet. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("auth_status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.ConnectorAuthStatusJsonConverter))] + public global::G.ConnectorAuthStatus? AuthStatus { get; set; } + + /// + /// Whether the connector is active or not. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("active")] + public bool Active { get; set; } + + /// + /// Whether a chat request should continue or not if the request to this connector fails. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("continue_on_failure")] + public bool ContinueOnFailure { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ConnectorAuthStatus.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ConnectorAuthStatus.g.verified.cs new file mode 100644 index 0000000000..a2faad9bdd --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ConnectorAuthStatus.g.verified.cs @@ -0,0 +1,52 @@ +//HintName: G.Models.ConnectorAuthStatus.g.cs + +#nullable enable + +namespace G +{ + /// + /// The OAuth status for the user making the request. One of ["valid", "expired", ""]. Empty string (field is omitted) means the user has not authorized the connector yet. + /// + public enum ConnectorAuthStatus + { + /// + /// + /// + Valid, + /// + /// + /// + Expired, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ConnectorAuthStatusExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ConnectorAuthStatus value) + { + return value switch + { + ConnectorAuthStatus.Valid => "valid", + ConnectorAuthStatus.Expired => "expired", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ConnectorAuthStatus? ToEnum(string value) + { + return value switch + { + "valid" => ConnectorAuthStatus.Valid, + "expired" => ConnectorAuthStatus.Expired, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ConnectorLog.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ConnectorLog.g.verified.cs new file mode 100644 index 0000000000..fe0ffaede8 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ConnectorLog.g.verified.cs @@ -0,0 +1,80 @@ +//HintName: G.Models.ConnectorLog.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ConnectorLog + { + /// + /// Unique identifier for the connector log + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// Unique identifier for the connector + /// + [global::System.Text.Json.Serialization.JsonPropertyName("connector_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ConnectorId { get; set; } + + /// + /// Unique identifier for the request + /// + [global::System.Text.Json.Serialization.JsonPropertyName("request_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string RequestId { get; set; } + + /// + /// Unique identifier for the user + /// + [global::System.Text.Json.Serialization.JsonPropertyName("user_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string UserId { get; set; } + + /// + /// Unique identifier for the organization + /// + [global::System.Text.Json.Serialization.JsonPropertyName("organization_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string OrganizationId { get; set; } + + /// + /// Time of connector log creation in RFC3339 format + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime CreatedAt { get; set; } + + /// + /// HTTP status code of the request + /// + [global::System.Text.Json.Serialization.JsonPropertyName("status_code")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int StatusCode { get; set; } + + /// + /// Duration of the request in milliseconds + /// + [global::System.Text.Json.Serialization.JsonPropertyName("duration_millis")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int DurationMillis { get; set; } + + /// + /// Error message of the request + /// + [global::System.Text.Json.Serialization.JsonPropertyName("error_message")] + public string? ErrorMessage { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ConnectorOAuth.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ConnectorOAuth.g.verified.cs new file mode 100644 index 0000000000..e580e5c5f1 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ConnectorOAuth.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: G.Models.ConnectorOAuth.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ConnectorOAuth + { + /// + /// The OAuth 2.0 client ID. This field is encrypted at rest. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("client_id")] + public string? ClientId { get; set; } + + /// + /// The OAuth 2.0 client Secret. This field is encrypted at rest and never returned in a response. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("client_secret")] + public string? ClientSecret { get; set; } + + /// + /// The OAuth 2.0 /authorize endpoint to use when users authorize the connector. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("authorize_url")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string AuthorizeUrl { get; set; } + + /// + /// The OAuth 2.0 /token endpoint to use when users authorize the connector. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("token_url")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string TokenUrl { get; set; } + + /// + /// The OAuth scopes to request when users authorize the connector. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("scope")] + public string? Scope { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Content.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Content.g.verified.cs new file mode 100644 index 0000000000..e57d29485e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Content.g.verified.cs @@ -0,0 +1,116 @@ +//HintName: G.Models.Content.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// A Content block which contains information about the content type and the content itself. + /// + public readonly partial struct Content : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.TextContent? Text { get; init; } +#else + public global::G.TextContent? Text { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Text))] +#endif + public bool IsText => Text != null; + + /// + /// + /// + public static implicit operator Content(global::G.TextContent value) => new Content(value); + + /// + /// + /// + public static implicit operator global::G.TextContent?(Content @this) => @this.Text; + + /// + /// + /// + public Content(global::G.TextContent? value) + { + Text = value; + } + + /// + /// + /// + public object? Object => + Text as object + ; + + /// + /// + /// + public bool Validate() + { + return IsText; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Text, + typeof(global::G.TextContent), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(Content other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Text, other.Text) + ; + } + + /// + /// + /// + public static bool operator ==(Content obj1, Content obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(Content obj1, Content obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is Content o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateClusterJobRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateClusterJobRequest.g.verified.cs new file mode 100644 index 0000000000..81f118583a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateClusterJobRequest.g.verified.cs @@ -0,0 +1,58 @@ +//HintName: G.Models.CreateClusterJobRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateClusterJobRequest + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("embeddings_url")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string EmbeddingsUrl { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("input_dataset_id")] + public string? InputDatasetId { get; set; } + + /// + /// Defaults to `10`. Parameter for HDBSCAN. Only clusters with this number of elements will be returned with a positive cluster number.
+ /// Default Value: 10 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("min_cluster_size")] + public int MinClusterSize { get; set; } = 10; + + /// + /// Parameter for UMAP. A scalar governing how to balance global vs local structure in the data.
+ /// Default Value: 15 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("n_neighbors")] + public int NNeighbors { get; set; } = 15; + + /// + /// Parameter for UMAP. A boolean governing whether the embeddings from UMAP (that will be clustered with HDBSCAN) are deterministic.
+ /// Default Value: true + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("is_deterministic")] + public bool IsDeterministic { get; set; } = true; + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("generate_descriptions")] + public bool GenerateDescriptions { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateClusterJobResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateClusterJobResponse.g.verified.cs new file mode 100644 index 0000000000..cd0c197d52 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateClusterJobResponse.g.verified.cs @@ -0,0 +1,25 @@ +//HintName: G.Models.CreateClusterJobResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// Response for creating a cluster job. + /// + public sealed partial class CreateClusterJobResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("job_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string JobId { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorOAuth.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorOAuth.g.verified.cs new file mode 100644 index 0000000000..298ec374e5 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorOAuth.g.verified.cs @@ -0,0 +1,48 @@ +//HintName: G.Models.CreateConnectorOAuth.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateConnectorOAuth + { + /// + /// The OAuth 2.0 client ID. This fields is encrypted at rest. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("client_id")] + public string? ClientId { get; set; } + + /// + /// The OAuth 2.0 client Secret. This field is encrypted at rest and never returned in a response. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("client_secret")] + public string? ClientSecret { get; set; } + + /// + /// The OAuth 2.0 /authorize endpoint to use when users authorize the connector. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("authorize_url")] + public string? AuthorizeUrl { get; set; } + + /// + /// The OAuth 2.0 /token endpoint to use when users authorize the connector. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("token_url")] + public string? TokenUrl { get; set; } + + /// + /// The OAuth scopes to request when users authorize the connector. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("scope")] + public string? Scope { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorRequest.g.verified.cs new file mode 100644 index 0000000000..796a889935 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorRequest.g.verified.cs @@ -0,0 +1,70 @@ +//HintName: G.Models.CreateConnectorRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateConnectorRequest + { + /// + /// A human-readable name for the connector. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// A description of the connector. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + public string? Description { get; set; } + + /// + /// The URL of the connector that will be used to search for documents. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("url")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Url { get; set; } + + /// + /// A list of fields to exclude from the prompt (fields remain in the document). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("excludes")] + public global::System.Collections.Generic.IList? Excludes { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("oauth")] + public global::G.CreateConnectorOAuth? Oauth { get; set; } + + /// + /// Whether the connector is active or not.
+ /// Default Value: true + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("active")] + public bool Active { get; set; } = true; + + /// + /// Whether a chat request should continue or not if the request to this connector fails.
+ /// Default Value: false + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("continue_on_failure")] + public bool ContinueOnFailure { get; set; } = false; + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("service_auth")] + public global::G.CreateConnectorServiceAuth? ServiceAuth { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse.g.verified.cs new file mode 100644 index 0000000000..9ecbfdcbc0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse.g.verified.cs @@ -0,0 +1,26 @@ +//HintName: G.Models.CreateConnectorResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateConnectorResponse + { + /// + /// A connector allows you to integrate data sources with the '/chat' endpoint to create grounded generations with citations to the data source.
+ /// documents to help answer users. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("connector")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.Connector Connector { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse10.g.verified.cs new file mode 100644 index 0000000000..a0a4333519 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateConnectorResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateConnectorResponse10 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse11.g.verified.cs new file mode 100644 index 0000000000..62a6fead60 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateConnectorResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateConnectorResponse11 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse12.g.verified.cs new file mode 100644 index 0000000000..7ea65df54c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateConnectorResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateConnectorResponse12 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse13.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse13.g.verified.cs new file mode 100644 index 0000000000..23f34f62cf --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse13.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateConnectorResponse13.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateConnectorResponse13 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse2.g.verified.cs new file mode 100644 index 0000000000..c73bc2079d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateConnectorResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateConnectorResponse2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse3.g.verified.cs new file mode 100644 index 0000000000..2adefd50cf --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateConnectorResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateConnectorResponse3 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse4.g.verified.cs new file mode 100644 index 0000000000..bfa190e288 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateConnectorResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateConnectorResponse4 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse5.g.verified.cs new file mode 100644 index 0000000000..0aebbfd285 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateConnectorResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateConnectorResponse5 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse6.g.verified.cs new file mode 100644 index 0000000000..a1ac629acf --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateConnectorResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateConnectorResponse6 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse7.g.verified.cs new file mode 100644 index 0000000000..5590ab2587 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateConnectorResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateConnectorResponse7 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse8.g.verified.cs new file mode 100644 index 0000000000..61fb427c74 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateConnectorResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateConnectorResponse8 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse9.g.verified.cs new file mode 100644 index 0000000000..27fbf5716a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateConnectorResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateConnectorResponse9 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorServiceAuth.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorServiceAuth.g.verified.cs new file mode 100644 index 0000000000..fb3f6f4e14 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateConnectorServiceAuth.g.verified.cs @@ -0,0 +1,34 @@ +//HintName: G.Models.CreateConnectorServiceAuth.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateConnectorServiceAuth + { + /// + /// The token_type specifies the way the token is passed in the Authorization header. Valid values are "bearer", "basic", and "noscheme".
+ /// Default Value: noscheme + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AuthTokenTypeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.AuthTokenType Type { get; set; } + + /// + /// The token that will be used in the HTTP Authorization header when making requests to the connector. This field is encrypted at rest and never returned in a response. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("token")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Token { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetRequest.g.verified.cs new file mode 100644 index 0000000000..6621449ab4 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetRequest.g.verified.cs @@ -0,0 +1,44 @@ +//HintName: G.Models.CreateDatasetRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateDatasetRequest + { + /// + /// The file to upload + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonRequired] + public required byte[] Data { get; set; } + + /// + /// The file to upload + /// + [global::System.Text.Json.Serialization.JsonPropertyName("dataname")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Dataname { get; set; } + + /// + /// An optional evaluation file to upload + /// + [global::System.Text.Json.Serialization.JsonPropertyName("eval_data")] + public byte[]? EvalData { get; set; } + + /// + /// An optional evaluation file to upload + /// + [global::System.Text.Json.Serialization.JsonPropertyName("eval_dataname")] + public string? EvalDataname { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse.g.verified.cs new file mode 100644 index 0000000000..03c9fdd7cf --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateDatasetResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateDatasetResponse + { + /// + /// The dataset ID + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public string? Id { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse10.g.verified.cs new file mode 100644 index 0000000000..df45ab055a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateDatasetResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateDatasetResponse10 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse11.g.verified.cs new file mode 100644 index 0000000000..4bf9d7eb3e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateDatasetResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateDatasetResponse11 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse12.g.verified.cs new file mode 100644 index 0000000000..d37bb2e230 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateDatasetResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateDatasetResponse12 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse13.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse13.g.verified.cs new file mode 100644 index 0000000000..e346447f8e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse13.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateDatasetResponse13.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateDatasetResponse13 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse2.g.verified.cs new file mode 100644 index 0000000000..6d693546ea --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateDatasetResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateDatasetResponse2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse3.g.verified.cs new file mode 100644 index 0000000000..5bb61ef181 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateDatasetResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateDatasetResponse3 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse4.g.verified.cs new file mode 100644 index 0000000000..f904957172 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateDatasetResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateDatasetResponse4 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse5.g.verified.cs new file mode 100644 index 0000000000..8e44c8873d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateDatasetResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateDatasetResponse5 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse6.g.verified.cs new file mode 100644 index 0000000000..7dd7af5411 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateDatasetResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateDatasetResponse6 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse7.g.verified.cs new file mode 100644 index 0000000000..617e15271b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateDatasetResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateDatasetResponse7 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse8.g.verified.cs new file mode 100644 index 0000000000..873784329e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateDatasetResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateDatasetResponse8 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse9.g.verified.cs new file mode 100644 index 0000000000..bf5fbd56a9 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateDatasetResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateDatasetResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateDatasetResponse9 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobRequest.g.verified.cs new file mode 100644 index 0000000000..e606f1cab1 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobRequest.g.verified.cs @@ -0,0 +1,75 @@ +//HintName: G.Models.CreateEmbedJobRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateEmbedJobRequest + { + /// + /// ID of the embedding model.
+ /// Available models and corresponding embedding dimensions:
+ /// - `embed-english-v3.0` : 1024
+ /// - `embed-multilingual-v3.0` : 1024
+ /// - `embed-english-light-v3.0` : 384
+ /// - `embed-multilingual-light-v3.0` : 384 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("model")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Model { get; set; } + + /// + /// ID of a [Dataset](https://docs.cohere.com/docs/datasets). The Dataset must be of type `embed-input` and must have a validation status `Validated` + /// + [global::System.Text.Json.Serialization.JsonPropertyName("dataset_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string DatasetId { get; set; } + + /// + /// Specifies the type of input passed to the model. Required for embedding models v3 and higher.
+ /// - `"search_document"`: Used for embeddings stored in a vector database for search use-cases.
+ /// - `"search_query"`: Used for embeddings of search queries run against a vector DB to find relevant documents.
+ /// - `"classification"`: Used for embeddings passed through a text classifier.
+ /// - `"clustering"`: Used for the embeddings run through a clustering algorithm. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("input_type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.EmbedInputTypeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.EmbedInputType InputType { get; set; } + + /// + /// The name of the embed job. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } + + /// + /// Specifies the types of embeddings you want to get back. Not required and default is None, which returns the Embed Floats response type. Can be one or more of the following types.
+ /// * `"float"`: Use this when you want to get back the default float embeddings. Valid for all models.
+ /// * `"int8"`: Use this when you want to get back signed int8 embeddings. Valid for only v3 models.
+ /// * `"uint8"`: Use this when you want to get back unsigned int8 embeddings. Valid for only v3 models.
+ /// * `"binary"`: Use this when you want to get back signed binary embeddings. Valid for only v3 models.
+ /// * `"ubinary"`: Use this when you want to get back unsigned binary embeddings. Valid for only v3 models. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("embedding_types")] + public global::System.Collections.Generic.IList? EmbeddingTypes { get; set; } + + /// + /// One of `START|END` to specify how the API will handle inputs longer than the maximum token length.
+ /// Passing `START` will discard the start of the input. `END` will discard the end of the input. In both cases, input is discarded until the remaining input is exactly the maximum input token length for the model.
+ /// Default Value: END + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("truncate")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.CreateEmbedJobRequestTruncateJsonConverter))] + public global::G.CreateEmbedJobRequestTruncate? Truncate { get; set; } = global::G.CreateEmbedJobRequestTruncate.END; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobRequestTruncate.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobRequestTruncate.g.verified.cs new file mode 100644 index 0000000000..72f046f289 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobRequestTruncate.g.verified.cs @@ -0,0 +1,54 @@ +//HintName: G.Models.CreateEmbedJobRequestTruncate.g.cs + +#nullable enable + +namespace G +{ + /// + /// One of `START|END` to specify how the API will handle inputs longer than the maximum token length.
+ /// Passing `START` will discard the start of the input. `END` will discard the end of the input. In both cases, input is discarded until the remaining input is exactly the maximum input token length for the model.
+ /// Default Value: END + ///
+ public enum CreateEmbedJobRequestTruncate + { + /// + /// + /// + START, + /// + /// + /// + END, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CreateEmbedJobRequestTruncateExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CreateEmbedJobRequestTruncate value) + { + return value switch + { + CreateEmbedJobRequestTruncate.START => "START", + CreateEmbedJobRequestTruncate.END => "END", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CreateEmbedJobRequestTruncate? ToEnum(string value) + { + return value switch + { + "START" => CreateEmbedJobRequestTruncate.START, + "END" => CreateEmbedJobRequestTruncate.END, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse.g.verified.cs new file mode 100644 index 0000000000..4d5ed23e2c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse.g.verified.cs @@ -0,0 +1,31 @@ +//HintName: G.Models.CreateEmbedJobResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// Response from creating an embed job. + /// + public sealed partial class CreateEmbedJobResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("job_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string JobId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("meta")] + public global::G.ApiMeta? Meta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse10.g.verified.cs new file mode 100644 index 0000000000..fc789d490e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateEmbedJobResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateEmbedJobResponse10 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse11.g.verified.cs new file mode 100644 index 0000000000..2b71941bed --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateEmbedJobResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateEmbedJobResponse11 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse12.g.verified.cs new file mode 100644 index 0000000000..5217bf0355 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateEmbedJobResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateEmbedJobResponse12 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse13.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse13.g.verified.cs new file mode 100644 index 0000000000..5a4f7c1948 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse13.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateEmbedJobResponse13.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateEmbedJobResponse13 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse2.g.verified.cs new file mode 100644 index 0000000000..f960dd2570 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateEmbedJobResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateEmbedJobResponse2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse3.g.verified.cs new file mode 100644 index 0000000000..da3021ebf6 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateEmbedJobResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateEmbedJobResponse3 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse4.g.verified.cs new file mode 100644 index 0000000000..249bb30fa1 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateEmbedJobResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateEmbedJobResponse4 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse5.g.verified.cs new file mode 100644 index 0000000000..8a604448d0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateEmbedJobResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateEmbedJobResponse5 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse6.g.verified.cs new file mode 100644 index 0000000000..59e1548415 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateEmbedJobResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateEmbedJobResponse6 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse7.g.verified.cs new file mode 100644 index 0000000000..356c27178e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateEmbedJobResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateEmbedJobResponse7 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse8.g.verified.cs new file mode 100644 index 0000000000..70671d9321 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateEmbedJobResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateEmbedJobResponse8 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse9.g.verified.cs new file mode 100644 index 0000000000..e61cc1d421 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateEmbedJobResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateEmbedJobResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class CreateEmbedJobResponse9 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateFinetunedModelResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateFinetunedModelResponse.g.verified.cs new file mode 100644 index 0000000000..7bdcaf3d0e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.CreateFinetunedModelResponse.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.CreateFinetunedModelResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// Response to request to create a fine-tuned model. + /// + public sealed partial class CreateFinetunedModelResponse + { + /// + /// This resource represents a fine-tuned model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("finetuned_model")] + public global::G.FinetunedModel? FinetunedModel { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Dataset.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Dataset.g.verified.cs new file mode 100644 index 0000000000..ad56ebb788 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Dataset.g.verified.cs @@ -0,0 +1,110 @@ +//HintName: G.Models.Dataset.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Dataset + { + /// + /// The dataset ID + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// The name of the dataset + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// The creation date + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime CreatedAt { get; set; } + + /// + /// The last update date + /// + [global::System.Text.Json.Serialization.JsonPropertyName("updated_at")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime UpdatedAt { get; set; } + + /// + /// The type of the dataset + /// + [global::System.Text.Json.Serialization.JsonPropertyName("dataset_type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.DatasetTypeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.DatasetType DatasetType { get; set; } + + /// + /// The validation status of the dataset + /// + [global::System.Text.Json.Serialization.JsonPropertyName("validation_status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.DatasetValidationStatusJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.DatasetValidationStatus ValidationStatus { get; set; } + + /// + /// Errors found during validation + /// + [global::System.Text.Json.Serialization.JsonPropertyName("validation_error")] + public string? ValidationError { get; set; } + + /// + /// the avro schema of the dataset + /// + [global::System.Text.Json.Serialization.JsonPropertyName("schema")] + public string? Schema { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("required_fields")] + public global::System.Collections.Generic.IList? RequiredFields { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("preserve_fields")] + public global::System.Collections.Generic.IList? PreserveFields { get; set; } + + /// + /// the underlying files that make up the dataset + /// + [global::System.Text.Json.Serialization.JsonPropertyName("dataset_parts")] + public global::System.Collections.Generic.IList? DatasetParts { get; set; } + + /// + /// warnings found during validation + /// + [global::System.Text.Json.Serialization.JsonPropertyName("validation_warnings")] + public global::System.Collections.Generic.IList? ValidationWarnings { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("parse_info")] + public global::G.ParseInfo? ParseInfo { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("metrics")] + public global::G.Metrics? Metrics { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DatasetPart.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DatasetPart.g.verified.cs new file mode 100644 index 0000000000..7c9299934e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DatasetPart.g.verified.cs @@ -0,0 +1,68 @@ +//HintName: G.Models.DatasetPart.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DatasetPart + { + /// + /// The dataset part ID + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// The name of the dataset part + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// The download url of the file + /// + [global::System.Text.Json.Serialization.JsonPropertyName("url")] + public string? Url { get; set; } + + /// + /// The index of the file + /// + [global::System.Text.Json.Serialization.JsonPropertyName("index")] + public int Index { get; set; } + + /// + /// The size of the file in bytes + /// + [global::System.Text.Json.Serialization.JsonPropertyName("size_bytes")] + public int SizeBytes { get; set; } + + /// + /// The number of rows in the file + /// + [global::System.Text.Json.Serialization.JsonPropertyName("num_rows")] + public int NumRows { get; set; } + + /// + /// The download url of the original file + /// + [global::System.Text.Json.Serialization.JsonPropertyName("original_url")] + public string? OriginalUrl { get; set; } + + /// + /// The first few rows of the parsed file + /// + [global::System.Text.Json.Serialization.JsonPropertyName("samples")] + public global::System.Collections.Generic.IList? Samples { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DatasetType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DatasetType.g.verified.cs new file mode 100644 index 0000000000..67dcd28758 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DatasetType.g.verified.cs @@ -0,0 +1,88 @@ +//HintName: G.Models.DatasetType.g.cs + +#nullable enable + +namespace G +{ + /// + /// The type of the dataset + /// + public enum DatasetType + { + /// + /// + /// + EmbedInput, + /// + /// + /// + EmbedResult, + /// + /// + /// + ClusterResult, + /// + /// + /// + ClusterOutliers, + /// + /// + /// + RerankerFinetuneInput, + /// + /// + /// + SingleLabelClassificationFinetuneInput, + /// + /// + /// + ChatFinetuneInput, + /// + /// + /// + MultiLabelClassificationFinetuneInput, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class DatasetTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this DatasetType value) + { + return value switch + { + DatasetType.EmbedInput => "embed-input", + DatasetType.EmbedResult => "embed-result", + DatasetType.ClusterResult => "cluster-result", + DatasetType.ClusterOutliers => "cluster-outliers", + DatasetType.RerankerFinetuneInput => "reranker-finetune-input", + DatasetType.SingleLabelClassificationFinetuneInput => "single-label-classification-finetune-input", + DatasetType.ChatFinetuneInput => "chat-finetune-input", + DatasetType.MultiLabelClassificationFinetuneInput => "multi-label-classification-finetune-input", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static DatasetType? ToEnum(string value) + { + return value switch + { + "embed-input" => DatasetType.EmbedInput, + "embed-result" => DatasetType.EmbedResult, + "cluster-result" => DatasetType.ClusterResult, + "cluster-outliers" => DatasetType.ClusterOutliers, + "reranker-finetune-input" => DatasetType.RerankerFinetuneInput, + "single-label-classification-finetune-input" => DatasetType.SingleLabelClassificationFinetuneInput, + "chat-finetune-input" => DatasetType.ChatFinetuneInput, + "multi-label-classification-finetune-input" => DatasetType.MultiLabelClassificationFinetuneInput, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DatasetValidationStatus.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DatasetValidationStatus.g.verified.cs new file mode 100644 index 0000000000..a3a2161724 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DatasetValidationStatus.g.verified.cs @@ -0,0 +1,76 @@ +//HintName: G.Models.DatasetValidationStatus.g.cs + +#nullable enable + +namespace G +{ + /// + /// The validation status of the dataset + /// + public enum DatasetValidationStatus + { + /// + /// + /// + Unknown, + /// + /// + /// + Queued, + /// + /// + /// + Processing, + /// + /// + /// + Failed, + /// + /// + /// + Validated, + /// + /// + /// + Skipped, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class DatasetValidationStatusExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this DatasetValidationStatus value) + { + return value switch + { + DatasetValidationStatus.Unknown => "unknown", + DatasetValidationStatus.Queued => "queued", + DatasetValidationStatus.Processing => "processing", + DatasetValidationStatus.Failed => "failed", + DatasetValidationStatus.Validated => "validated", + DatasetValidationStatus.Skipped => "skipped", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static DatasetValidationStatus? ToEnum(string value) + { + return value switch + { + "unknown" => DatasetValidationStatus.Unknown, + "queued" => DatasetValidationStatus.Queued, + "processing" => DatasetValidationStatus.Processing, + "failed" => DatasetValidationStatus.Failed, + "validated" => DatasetValidationStatus.Validated, + "skipped" => DatasetValidationStatus.Skipped, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse.g.verified.cs new file mode 100644 index 0000000000..58594d076d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.DeleteConnectorResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteConnectorResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse10.g.verified.cs new file mode 100644 index 0000000000..9e9bdbf5f0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteConnectorResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteConnectorResponse10 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse11.g.verified.cs new file mode 100644 index 0000000000..fe9ee357fd --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteConnectorResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteConnectorResponse11 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse12.g.verified.cs new file mode 100644 index 0000000000..600718fc8d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteConnectorResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteConnectorResponse12 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse13.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse13.g.verified.cs new file mode 100644 index 0000000000..9b09ca766c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse13.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteConnectorResponse13.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteConnectorResponse13 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse2.g.verified.cs new file mode 100644 index 0000000000..2793447a36 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteConnectorResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteConnectorResponse2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse3.g.verified.cs new file mode 100644 index 0000000000..4035769a25 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteConnectorResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteConnectorResponse3 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse4.g.verified.cs new file mode 100644 index 0000000000..bb36912d42 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteConnectorResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteConnectorResponse4 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse5.g.verified.cs new file mode 100644 index 0000000000..be33d16ad8 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteConnectorResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteConnectorResponse5 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse6.g.verified.cs new file mode 100644 index 0000000000..43f77270a8 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteConnectorResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteConnectorResponse6 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse7.g.verified.cs new file mode 100644 index 0000000000..51ff6b97bc --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteConnectorResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteConnectorResponse7 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse8.g.verified.cs new file mode 100644 index 0000000000..7917ba91ed --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteConnectorResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteConnectorResponse8 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse9.g.verified.cs new file mode 100644 index 0000000000..a802e0cd5f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteConnectorResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteConnectorResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteConnectorResponse9 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse.g.verified.cs new file mode 100644 index 0000000000..ea5e93161e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.DeleteDatasetResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteDatasetResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse10.g.verified.cs new file mode 100644 index 0000000000..42c1662fad --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteDatasetResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteDatasetResponse10 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse11.g.verified.cs new file mode 100644 index 0000000000..76eb88f4c6 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteDatasetResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteDatasetResponse11 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse12.g.verified.cs new file mode 100644 index 0000000000..9f9623221d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteDatasetResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteDatasetResponse12 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse13.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse13.g.verified.cs new file mode 100644 index 0000000000..8ef318dbe1 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse13.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteDatasetResponse13.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteDatasetResponse13 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse2.g.verified.cs new file mode 100644 index 0000000000..2034c398ad --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteDatasetResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteDatasetResponse2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse3.g.verified.cs new file mode 100644 index 0000000000..3c3ec18719 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteDatasetResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteDatasetResponse3 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse4.g.verified.cs new file mode 100644 index 0000000000..57f3a9293e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteDatasetResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteDatasetResponse4 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse5.g.verified.cs new file mode 100644 index 0000000000..5c6147c1cf --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteDatasetResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteDatasetResponse5 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse6.g.verified.cs new file mode 100644 index 0000000000..001920d3f3 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteDatasetResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteDatasetResponse6 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse7.g.verified.cs new file mode 100644 index 0000000000..705973f775 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteDatasetResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteDatasetResponse7 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse8.g.verified.cs new file mode 100644 index 0000000000..bd3e4cadb4 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteDatasetResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteDatasetResponse8 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse9.g.verified.cs new file mode 100644 index 0000000000..7deefd5055 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteDatasetResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DeleteDatasetResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DeleteDatasetResponse9 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteFinetunedModelResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteFinetunedModelResponse.g.verified.cs new file mode 100644 index 0000000000..a0d85aabee --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DeleteFinetunedModelResponse.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.DeleteFinetunedModelResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// Response to request to delete a fine-tuned model. + /// + public sealed partial class DeleteFinetunedModelResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeRequest.g.verified.cs new file mode 100644 index 0000000000..d64e38c628 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeRequest.g.verified.cs @@ -0,0 +1,32 @@ +//HintName: G.Models.DetokenizeRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DetokenizeRequest + { + /// + /// The list of tokens to be detokenized. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tokens")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Tokens { get; set; } + + /// + /// An optional parameter to provide the model name. This will ensure that the detokenization is done by the tokenizer used by that model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Model { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse.g.verified.cs new file mode 100644 index 0000000000..c2b6d936a8 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse.g.verified.cs @@ -0,0 +1,31 @@ +//HintName: G.Models.DetokenizeResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DetokenizeResponse + { + /// + /// A string representing the list of tokens. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Text { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("meta")] + public global::G.ApiMeta? Meta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse10.g.verified.cs new file mode 100644 index 0000000000..ca559cf9fe --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DetokenizeResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DetokenizeResponse10 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse11.g.verified.cs new file mode 100644 index 0000000000..0aa3b16b0d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DetokenizeResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DetokenizeResponse11 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse12.g.verified.cs new file mode 100644 index 0000000000..2b2fddb15c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DetokenizeResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DetokenizeResponse12 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse13.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse13.g.verified.cs new file mode 100644 index 0000000000..57f6287c52 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse13.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DetokenizeResponse13.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DetokenizeResponse13 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse2.g.verified.cs new file mode 100644 index 0000000000..0d9b80a3d4 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DetokenizeResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DetokenizeResponse2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse3.g.verified.cs new file mode 100644 index 0000000000..8304d7f5ad --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DetokenizeResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DetokenizeResponse3 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse4.g.verified.cs new file mode 100644 index 0000000000..4a5a66e238 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DetokenizeResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DetokenizeResponse4 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse5.g.verified.cs new file mode 100644 index 0000000000..a8af39e980 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DetokenizeResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DetokenizeResponse5 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse6.g.verified.cs new file mode 100644 index 0000000000..52c82746e2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DetokenizeResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DetokenizeResponse6 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse7.g.verified.cs new file mode 100644 index 0000000000..5b465da491 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DetokenizeResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DetokenizeResponse7 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse8.g.verified.cs new file mode 100644 index 0000000000..cf0cbb7dfb --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DetokenizeResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DetokenizeResponse8 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse9.g.verified.cs new file mode 100644 index 0000000000..eee86b4947 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DetokenizeResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.DetokenizeResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DetokenizeResponse9 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DocumentSource.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DocumentSource.g.verified.cs new file mode 100644 index 0000000000..65671b41e3 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DocumentSource.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.DocumentSource.g.cs + +#nullable enable + +namespace G +{ + /// + /// A document source object containing the unique identifier of the document and the document itself. + /// + public sealed partial class DocumentSource + { + /// + /// The unique identifier of the document + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public string? Id { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("document")] + public global::G.DocumentSourceDocument? Document { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DocumentSourceDocument.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DocumentSourceDocument.g.verified.cs new file mode 100644 index 0000000000..0e0a84216a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.DocumentSourceDocument.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.DocumentSourceDocument.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class DocumentSourceDocument + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedByTypeResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedByTypeResponse.g.verified.cs new file mode 100644 index 0000000000..233181af11 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedByTypeResponse.g.verified.cs @@ -0,0 +1,52 @@ +//HintName: G.Models.EmbedByTypeResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class EmbedByTypeResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("response_type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.EmbedByTypeResponseResponseTypeJsonConverter))] + public global::G.EmbedByTypeResponseResponseType? ResponseType { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// An object with different embedding types. The length of each embedding type array will be the same as the length of the original `texts` array. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("embeddings")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.EmbedByTypeResponseEmbeddings Embeddings { get; set; } + + /// + /// The text entries for which embeddings were returned. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("texts")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Texts { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("meta")] + public global::G.ApiMeta? Meta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedByTypeResponseEmbeddings.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedByTypeResponseEmbeddings.g.verified.cs new file mode 100644 index 0000000000..b23d74e6b0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedByTypeResponseEmbeddings.g.verified.cs @@ -0,0 +1,48 @@ +//HintName: G.Models.EmbedByTypeResponseEmbeddings.g.cs + +#nullable enable + +namespace G +{ + /// + /// An object with different embedding types. The length of each embedding type array will be the same as the length of the original `texts` array. + /// + public sealed partial class EmbedByTypeResponseEmbeddings + { + /// + /// An array of float embeddings. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("float")] + public global::System.Collections.Generic.IList>? Float { get; set; } + + /// + /// An array of signed int8 embeddings. Each value is between -128 and 127. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("int8")] + public global::System.Collections.Generic.IList>? Int8 { get; set; } + + /// + /// An array of unsigned int8 embeddings. Each value is between 0 and 255. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("uint8")] + public global::System.Collections.Generic.IList>? Uint8 { get; set; } + + /// + /// An array of packed signed binary embeddings. The length of each binary embedding is 1/8 the length of the float embeddings of the provided model. Each value is between -128 and 127. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("binary")] + public global::System.Collections.Generic.IList>? Binary { get; set; } + + /// + /// An array of packed unsigned binary embeddings. The length of each binary embedding is 1/8 the length of the float embeddings of the provided model. Each value is between 0 and 255. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("ubinary")] + public global::System.Collections.Generic.IList>? Ubinary { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedByTypeResponseResponseType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedByTypeResponseResponseType.g.verified.cs new file mode 100644 index 0000000000..1f34b37cc6 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedByTypeResponseResponseType.g.verified.cs @@ -0,0 +1,52 @@ +//HintName: G.Models.EmbedByTypeResponseResponseType.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public enum EmbedByTypeResponseResponseType + { + /// + /// + /// + EmbeddingsFloats, + /// + /// + /// + EmbeddingsByType, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class EmbedByTypeResponseResponseTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this EmbedByTypeResponseResponseType value) + { + return value switch + { + EmbedByTypeResponseResponseType.EmbeddingsFloats => "embeddings_floats", + EmbedByTypeResponseResponseType.EmbeddingsByType => "embeddings_by_type", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static EmbedByTypeResponseResponseType? ToEnum(string value) + { + return value switch + { + "embeddings_floats" => EmbedByTypeResponseResponseType.EmbeddingsFloats, + "embeddings_by_type" => EmbedByTypeResponseResponseType.EmbeddingsByType, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedFloatsResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedFloatsResponse.g.verified.cs new file mode 100644 index 0000000000..15854c6263 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedFloatsResponse.g.verified.cs @@ -0,0 +1,52 @@ +//HintName: G.Models.EmbedFloatsResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class EmbedFloatsResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("response_type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.EmbedFloatsResponseResponseTypeJsonConverter))] + public global::G.EmbedFloatsResponseResponseType? ResponseType { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// An array of embeddings, where each embedding is an array of floats. The length of the `embeddings` array will be the same as the length of the original `texts` array. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("embeddings")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList> Embeddings { get; set; } + + /// + /// The text entries for which embeddings were returned. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("texts")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Texts { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("meta")] + public global::G.ApiMeta? Meta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedFloatsResponseResponseType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedFloatsResponseResponseType.g.verified.cs new file mode 100644 index 0000000000..5dbc7de27b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedFloatsResponseResponseType.g.verified.cs @@ -0,0 +1,52 @@ +//HintName: G.Models.EmbedFloatsResponseResponseType.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public enum EmbedFloatsResponseResponseType + { + /// + /// + /// + EmbeddingsFloats, + /// + /// + /// + EmbeddingsByType, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class EmbedFloatsResponseResponseTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this EmbedFloatsResponseResponseType value) + { + return value switch + { + EmbedFloatsResponseResponseType.EmbeddingsFloats => "embeddings_floats", + EmbedFloatsResponseResponseType.EmbeddingsByType => "embeddings_by_type", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static EmbedFloatsResponseResponseType? ToEnum(string value) + { + return value switch + { + "embeddings_floats" => EmbedFloatsResponseResponseType.EmbeddingsFloats, + "embeddings_by_type" => EmbedFloatsResponseResponseType.EmbeddingsByType, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedInputType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedInputType.g.verified.cs new file mode 100644 index 0000000000..afe573bcd2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedInputType.g.verified.cs @@ -0,0 +1,68 @@ +//HintName: G.Models.EmbedInputType.g.cs + +#nullable enable + +namespace G +{ + /// + /// Specifies the type of input passed to the model. Required for embedding models v3 and higher.
+ /// - `"search_document"`: Used for embeddings stored in a vector database for search use-cases.
+ /// - `"search_query"`: Used for embeddings of search queries run against a vector DB to find relevant documents.
+ /// - `"classification"`: Used for embeddings passed through a text classifier.
+ /// - `"clustering"`: Used for the embeddings run through a clustering algorithm. + ///
+ public enum EmbedInputType + { + /// + /// + /// + SearchDocument, + /// + /// + /// + SearchQuery, + /// + /// + /// + Classification, + /// + /// + /// + Clustering, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class EmbedInputTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this EmbedInputType value) + { + return value switch + { + EmbedInputType.SearchDocument => "search_document", + EmbedInputType.SearchQuery => "search_query", + EmbedInputType.Classification => "classification", + EmbedInputType.Clustering => "clustering", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static EmbedInputType? ToEnum(string value) + { + return value switch + { + "search_document" => EmbedInputType.SearchDocument, + "search_query" => EmbedInputType.SearchQuery, + "classification" => EmbedInputType.Classification, + "clustering" => EmbedInputType.Clustering, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedJob.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedJob.g.verified.cs new file mode 100644 index 0000000000..dda238043b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedJob.g.verified.cs @@ -0,0 +1,80 @@ +//HintName: G.Models.EmbedJob.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class EmbedJob + { + /// + /// ID of the embed job + /// + [global::System.Text.Json.Serialization.JsonPropertyName("job_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string JobId { get; set; } + + /// + /// The name of the embed job + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } + + /// + /// The status of the embed job + /// + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.EmbedJobStatusJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.EmbedJobStatus Status { get; set; } + + /// + /// The creation date of the embed job + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime CreatedAt { get; set; } + + /// + /// ID of the input dataset + /// + [global::System.Text.Json.Serialization.JsonPropertyName("input_dataset_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string InputDatasetId { get; set; } + + /// + /// ID of the resulting output dataset + /// + [global::System.Text.Json.Serialization.JsonPropertyName("output_dataset_id")] + public string? OutputDatasetId { get; set; } + + /// + /// ID of the model used to embed + /// + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Model { get; set; } + + /// + /// The truncation option used + /// + [global::System.Text.Json.Serialization.JsonPropertyName("truncate")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.EmbedJobTruncateJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.EmbedJobTruncate Truncate { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("meta")] + public global::G.ApiMeta? Meta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedJobStatus.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedJobStatus.g.verified.cs new file mode 100644 index 0000000000..0fce193cbc --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedJobStatus.g.verified.cs @@ -0,0 +1,70 @@ +//HintName: G.Models.EmbedJobStatus.g.cs + +#nullable enable + +namespace G +{ + /// + /// The status of the embed job + /// + public enum EmbedJobStatus + { + /// + /// + /// + Processing, + /// + /// + /// + Complete, + /// + /// + /// + Cancelling, + /// + /// + /// + Cancelled, + /// + /// + /// + Failed, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class EmbedJobStatusExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this EmbedJobStatus value) + { + return value switch + { + EmbedJobStatus.Processing => "processing", + EmbedJobStatus.Complete => "complete", + EmbedJobStatus.Cancelling => "cancelling", + EmbedJobStatus.Cancelled => "cancelled", + EmbedJobStatus.Failed => "failed", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static EmbedJobStatus? ToEnum(string value) + { + return value switch + { + "processing" => EmbedJobStatus.Processing, + "complete" => EmbedJobStatus.Complete, + "cancelling" => EmbedJobStatus.Cancelling, + "cancelled" => EmbedJobStatus.Cancelled, + "failed" => EmbedJobStatus.Failed, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedJobTruncate.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedJobTruncate.g.verified.cs new file mode 100644 index 0000000000..df1cb9a02f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedJobTruncate.g.verified.cs @@ -0,0 +1,52 @@ +//HintName: G.Models.EmbedJobTruncate.g.cs + +#nullable enable + +namespace G +{ + /// + /// The truncation option used + /// + public enum EmbedJobTruncate + { + /// + /// + /// + START, + /// + /// + /// + END, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class EmbedJobTruncateExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this EmbedJobTruncate value) + { + return value switch + { + EmbedJobTruncate.START => "START", + EmbedJobTruncate.END => "END", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static EmbedJobTruncate? ToEnum(string value) + { + return value switch + { + "START" => EmbedJobTruncate.START, + "END" => EmbedJobTruncate.END, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedRequest.g.verified.cs new file mode 100644 index 0000000000..411955f5df --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedRequest.g.verified.cs @@ -0,0 +1,72 @@ +//HintName: G.Models.EmbedRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class EmbedRequest + { + /// + /// An array of strings for the model to embed. Maximum number of texts per call is `96`. We recommend reducing the length of each text to be under `512` tokens for optimal quality. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("texts")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Texts { get; set; } + + /// + /// Defaults to embed-english-v2.0
+ /// The identifier of the model. Smaller "light" models are faster, while larger models will perform better. [Custom models](/docs/training-custom-models) can also be supplied with their full ID.
+ /// Available models and corresponding embedding dimensions:
+ /// * `embed-english-v3.0` 1024
+ /// * `embed-multilingual-v3.0` 1024
+ /// * `embed-english-light-v3.0` 384
+ /// * `embed-multilingual-light-v3.0` 384
+ /// * `embed-english-v2.0` 4096
+ /// * `embed-english-light-v2.0` 1024
+ /// * `embed-multilingual-v2.0` 768 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("model")] + public string? Model { get; set; } + + /// + /// Specifies the type of input passed to the model. Required for embedding models v3 and higher.
+ /// - `"search_document"`: Used for embeddings stored in a vector database for search use-cases.
+ /// - `"search_query"`: Used for embeddings of search queries run against a vector DB to find relevant documents.
+ /// - `"classification"`: Used for embeddings passed through a text classifier.
+ /// - `"clustering"`: Used for the embeddings run through a clustering algorithm. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("input_type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.EmbedInputTypeJsonConverter))] + public global::G.EmbedInputType? InputType { get; set; } + + /// + /// Specifies the types of embeddings you want to get back. Not required and default is None, which returns the Embed Floats response type. Can be one or more of the following types.
+ /// * `"float"`: Use this when you want to get back the default float embeddings. Valid for all models.
+ /// * `"int8"`: Use this when you want to get back signed int8 embeddings. Valid for only v3 models.
+ /// * `"uint8"`: Use this when you want to get back unsigned int8 embeddings. Valid for only v3 models.
+ /// * `"binary"`: Use this when you want to get back signed binary embeddings. Valid for only v3 models.
+ /// * `"ubinary"`: Use this when you want to get back unsigned binary embeddings. Valid for only v3 models. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("embedding_types")] + public global::System.Collections.Generic.IList? EmbeddingTypes { get; set; } + + /// + /// One of `NONE|START|END` to specify how the API will handle inputs longer than the maximum token length.
+ /// Passing `START` will discard the start of the input. `END` will discard the end of the input. In both cases, input is discarded until the remaining input is exactly the maximum input token length for the model.
+ /// If `NONE` is selected, when the input exceeds the maximum input token length an error will be returned.
+ /// Default Value: END + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("truncate")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.EmbedRequestTruncateJsonConverter))] + public global::G.EmbedRequestTruncate? Truncate { get; set; } = global::G.EmbedRequestTruncate.END; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedRequestTruncate.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedRequestTruncate.g.verified.cs new file mode 100644 index 0000000000..4b3e875be8 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedRequestTruncate.g.verified.cs @@ -0,0 +1,61 @@ +//HintName: G.Models.EmbedRequestTruncate.g.cs + +#nullable enable + +namespace G +{ + /// + /// One of `NONE|START|END` to specify how the API will handle inputs longer than the maximum token length.
+ /// Passing `START` will discard the start of the input. `END` will discard the end of the input. In both cases, input is discarded until the remaining input is exactly the maximum input token length for the model.
+ /// If `NONE` is selected, when the input exceeds the maximum input token length an error will be returned.
+ /// Default Value: END + ///
+ public enum EmbedRequestTruncate + { + /// + /// + /// + NONE, + /// + /// + /// + START, + /// + /// + /// + END, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class EmbedRequestTruncateExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this EmbedRequestTruncate value) + { + return value switch + { + EmbedRequestTruncate.NONE => "NONE", + EmbedRequestTruncate.START => "START", + EmbedRequestTruncate.END => "END", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static EmbedRequestTruncate? ToEnum(string value) + { + return value switch + { + "NONE" => EmbedRequestTruncate.NONE, + "START" => EmbedRequestTruncate.START, + "END" => EmbedRequestTruncate.END, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse10.g.verified.cs new file mode 100644 index 0000000000..cbe2e19ccb --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.EmbedResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class EmbedResponse10 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse11.g.verified.cs new file mode 100644 index 0000000000..aa85195cec --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.EmbedResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class EmbedResponse11 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse12.g.verified.cs new file mode 100644 index 0000000000..d6cded2d34 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.EmbedResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class EmbedResponse12 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse13.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse13.g.verified.cs new file mode 100644 index 0000000000..52da053954 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse13.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.EmbedResponse13.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class EmbedResponse13 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse2.g.verified.cs new file mode 100644 index 0000000000..403805087c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.EmbedResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class EmbedResponse2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse3.g.verified.cs new file mode 100644 index 0000000000..37d32a896e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.EmbedResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class EmbedResponse3 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse4.g.verified.cs new file mode 100644 index 0000000000..2507d13c83 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.EmbedResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class EmbedResponse4 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse5.g.verified.cs new file mode 100644 index 0000000000..973731aa27 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.EmbedResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class EmbedResponse5 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse6.g.verified.cs new file mode 100644 index 0000000000..aea6bf0409 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.EmbedResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class EmbedResponse6 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse7.g.verified.cs new file mode 100644 index 0000000000..4c07b04bf2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.EmbedResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class EmbedResponse7 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse8.g.verified.cs new file mode 100644 index 0000000000..739c9b66ef --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.EmbedResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class EmbedResponse8 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse9.g.verified.cs new file mode 100644 index 0000000000..df8edc7a27 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbedResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.EmbedResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class EmbedResponse9 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbeddingType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbeddingType.g.verified.cs new file mode 100644 index 0000000000..50d5f7bf4b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.EmbeddingType.g.verified.cs @@ -0,0 +1,70 @@ +//HintName: G.Models.EmbeddingType.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public enum EmbeddingType + { + /// + /// + /// + Float, + /// + /// + /// + Int8, + /// + /// + /// + Uint8, + /// + /// + /// + Binary, + /// + /// + /// + Ubinary, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class EmbeddingTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this EmbeddingType value) + { + return value switch + { + EmbeddingType.Float => "float", + EmbeddingType.Int8 => "int8", + EmbeddingType.Uint8 => "uint8", + EmbeddingType.Binary => "binary", + EmbeddingType.Ubinary => "ubinary", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static EmbeddingType? ToEnum(string value) + { + return value switch + { + "float" => EmbeddingType.Float, + "int8" => EmbeddingType.Int8, + "uint8" => EmbeddingType.Uint8, + "binary" => EmbeddingType.Binary, + "ubinary" => EmbeddingType.Ubinary, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Error.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Error.g.verified.cs new file mode 100644 index 0000000000..c57ada76cc --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Error.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.Error.g.cs + +#nullable enable + +namespace G +{ + /// + /// Error is the response for any unsuccessful event. + /// + public sealed partial class Error + { + /// + /// A developer-facing error message. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("message")] + public string? Message { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Event.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Event.g.verified.cs new file mode 100644 index 0000000000..6849b5dbe5 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Event.g.verified.cs @@ -0,0 +1,47 @@ +//HintName: G.Models.Event.g.cs + +#nullable enable + +namespace G +{ + /// + /// A change in status of a fine-tuned model. + /// + public sealed partial class Event + { + /// + /// ID of the user who initiated the event. Empty if initiated by the system. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("user_id")] + public string? UserId { get; set; } + + /// + /// The possible stages of a fine-tuned model life-cycle.
+ /// - STATUS_UNSPECIFIED: Unspecified status.
+ /// - STATUS_FINETUNING: The fine-tuned model is being fine-tuned.
+ /// - STATUS_DEPLOYING_API: The fine-tuned model is being deployed.
+ /// - STATUS_READY: The fine-tuned model is ready to receive requests.
+ /// - STATUS_FAILED: The fine-tuned model failed.
+ /// - STATUS_DELETED: The fine-tuned model was deleted.
+ /// - STATUS_TEMPORARILY_OFFLINE: The fine-tuned model is temporarily unavailable.
+ /// - STATUS_PAUSED: The fine-tuned model is paused (Vanilla only).
+ /// - STATUS_QUEUED: The fine-tuned model is queued for training.
+ /// Default Value: STATUS_UNSPECIFIED + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.StatusJsonConverter))] + public global::G.Status? Status { get; set; } = global::G.Status.STATUSUNSPECIFIED; + + /// + /// Timestamp when the event happened. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + public global::System.DateTime CreatedAt { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.FinetuneDatasetMetrics.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.FinetuneDatasetMetrics.g.verified.cs new file mode 100644 index 0000000000..88160a9282 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.FinetuneDatasetMetrics.g.verified.cs @@ -0,0 +1,72 @@ +//HintName: G.Models.FinetuneDatasetMetrics.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class FinetuneDatasetMetrics + { + /// + /// The number of tokens of valid examples that can be used for training. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("trainable_token_count")] + public double TrainableTokenCount { get; set; } + + /// + /// The overall number of examples. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("total_examples")] + public double TotalExamples { get; set; } + + /// + /// The number of training examples. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("train_examples")] + public double TrainExamples { get; set; } + + /// + /// The size in bytes of all training examples. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("train_size_bytes")] + public double TrainSizeBytes { get; set; } + + /// + /// Number of evaluation examples. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("eval_examples")] + public double EvalExamples { get; set; } + + /// + /// The size in bytes of all eval examples. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("eval_size_bytes")] + public double EvalSizeBytes { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("reranker_data_metrics")] + public global::G.RerankerDataMetrics? RerankerDataMetrics { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("chat_data_metrics")] + public global::G.ChatDataMetrics? ChatDataMetrics { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("classify_data_metrics")] + public global::G.ClassifyDataMetrics? ClassifyDataMetrics { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.FinetunedModel.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.FinetunedModel.g.verified.cs new file mode 100644 index 0000000000..317917dd82 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.FinetunedModel.g.verified.cs @@ -0,0 +1,91 @@ +//HintName: G.Models.FinetunedModel.g.cs + +#nullable enable + +namespace G +{ + /// + /// This resource represents a fine-tuned model. + /// + public sealed partial class FinetunedModel + { + /// + /// read-only. FinetunedModel ID. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public string? Id { get; set; } + + /// + /// FinetunedModel name (e.g. `foobar`). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// read-only. User ID of the creator. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("creator_id")] + public string? CreatorId { get; set; } + + /// + /// read-only. Organization ID. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("organization_id")] + public string? OrganizationId { get; set; } + + /// + /// The configuration used for fine-tuning. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("settings")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.Settings Settings { get; set; } + + /// + /// The possible stages of a fine-tuned model life-cycle.
+ /// - STATUS_UNSPECIFIED: Unspecified status.
+ /// - STATUS_FINETUNING: The fine-tuned model is being fine-tuned.
+ /// - STATUS_DEPLOYING_API: The fine-tuned model is being deployed.
+ /// - STATUS_READY: The fine-tuned model is ready to receive requests.
+ /// - STATUS_FAILED: The fine-tuned model failed.
+ /// - STATUS_DELETED: The fine-tuned model was deleted.
+ /// - STATUS_TEMPORARILY_OFFLINE: The fine-tuned model is temporarily unavailable.
+ /// - STATUS_PAUSED: The fine-tuned model is paused (Vanilla only).
+ /// - STATUS_QUEUED: The fine-tuned model is queued for training.
+ /// Default Value: STATUS_UNSPECIFIED + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.StatusJsonConverter))] + public global::G.Status? Status { get; set; } = global::G.Status.STATUSUNSPECIFIED; + + /// + /// read-only. Creation timestamp. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + public global::System.DateTime CreatedAt { get; set; } + + /// + /// read-only. Latest update timestamp. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("updated_at")] + public global::System.DateTime UpdatedAt { get; set; } + + /// + /// read-only. Timestamp for the completed fine-tuning. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("completed_at")] + public global::System.DateTime CompletedAt { get; set; } + + /// + /// read-only. Timestamp for the latest request to this fine-tuned model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("last_used")] + public global::System.DateTime LastUsed { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.FinishReason.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.FinishReason.g.verified.cs new file mode 100644 index 0000000000..6c2c103b3f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.FinishReason.g.verified.cs @@ -0,0 +1,82 @@ +//HintName: G.Models.FinishReason.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public enum FinishReason + { + /// + /// + /// + COMPLETE, + /// + /// + /// + STOPSEQUENCE, + /// + /// + /// + ERROR, + /// + /// + /// + ERRORTOXIC, + /// + /// + /// + ERRORLIMIT, + /// + /// + /// + USERCANCEL, + /// + /// + /// + MAXTOKENS, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class FinishReasonExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this FinishReason value) + { + return value switch + { + FinishReason.COMPLETE => "COMPLETE", + FinishReason.STOPSEQUENCE => "STOP_SEQUENCE", + FinishReason.ERROR => "ERROR", + FinishReason.ERRORTOXIC => "ERROR_TOXIC", + FinishReason.ERRORLIMIT => "ERROR_LIMIT", + FinishReason.USERCANCEL => "USER_CANCEL", + FinishReason.MAXTOKENS => "MAX_TOKENS", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static FinishReason? ToEnum(string value) + { + return value switch + { + "COMPLETE" => FinishReason.COMPLETE, + "STOP_SEQUENCE" => FinishReason.STOPSEQUENCE, + "ERROR" => FinishReason.ERROR, + "ERROR_TOXIC" => FinishReason.ERRORTOXIC, + "ERROR_LIMIT" => FinishReason.ERRORLIMIT, + "USER_CANCEL" => FinishReason.USERCANCEL, + "MAX_TOKENS" => FinishReason.MAXTOKENS, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateRequest.g.verified.cs new file mode 100644 index 0000000000..94a00b6652 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateRequest.g.verified.cs @@ -0,0 +1,151 @@ +//HintName: G.Models.GenerateRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateRequest + { + /// + /// The input text that serves as the starting point for generating the response.
+ /// Note: The prompt will be pre-processed and modified before reaching the model.
+ /// Example: Please explain to me how LLMs work + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("prompt")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Prompt { get; set; } + + /// + /// The identifier of the model to generate with. Currently available models are `command` (default), `command-nightly` (experimental), `command-light`, and `command-light-nightly` (experimental).
+ /// Smaller, "light" models are faster, while larger models will perform better. [Custom models](/docs/training-custom-models) can also be supplied with their full ID. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("model")] + public string? Model { get; set; } + + /// + /// The maximum number of generations that will be returned. Defaults to `1`, min value of `1`, max value of `5`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("num_generations")] + public int NumGenerations { get; set; } + + /// + /// When `true`, the response will be a JSON stream of events. Streaming is beneficial for user interfaces that render the contents of the response piece by piece, as it gets generated.
+ /// The final event will contain the complete response, and will contain an `is_finished` field set to `true`. The event will also contain a `finish_reason`, which can be one of the following:
+ /// - `COMPLETE` - the model sent back a finished reply
+ /// - `MAX_TOKENS` - the reply was cut off because the model reached the maximum number of tokens for its context length
+ /// - `ERROR` - something went wrong when generating the reply
+ /// - `ERROR_TOXIC` - the model generated a reply that was deemed toxic + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("stream")] + public bool Stream { get; set; } + + /// + /// The maximum number of tokens the model will generate as part of the response. Note: Setting a low value may result in incomplete generations.
+ /// This parameter is off by default, and if it's not specified, the model will continue generating until it emits an EOS completion token. See [BPE Tokens](/bpe-tokens-wiki) for more details.
+ /// Can only be set to `0` if `return_likelihoods` is set to `ALL` to get the likelihood of the prompt. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("max_tokens")] + public int MaxTokens { get; set; } + + /// + /// One of `NONE|START|END` to specify how the API will handle inputs longer than the maximum token length.
+ /// Passing `START` will discard the start of the input. `END` will discard the end of the input. In both cases, input is discarded until the remaining input is exactly the maximum input token length for the model.
+ /// If `NONE` is selected, when the input exceeds the maximum input token length an error will be returned.
+ /// Default Value: END + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("truncate")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.GenerateRequestTruncateJsonConverter))] + public global::G.GenerateRequestTruncate? Truncate { get; set; } = global::G.GenerateRequestTruncate.END; + + /// + /// A non-negative float that tunes the degree of randomness in generation. Lower temperatures mean less random generations. See [Temperature](/temperature-wiki) for more details.
+ /// Defaults to `0.75`, min value of `0.0`, max value of `5.0`. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] + public double Temperature { get; set; } + + /// + /// If specified, the backend will make a best effort to sample tokens
+ /// deterministically, such that repeated requests with the same
+ /// seed and parameters should return the same result. However,
+ /// determinism cannot be totally guaranteed.
+ /// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("seed")] + public int Seed { get; set; } + + /// + /// Identifier of a custom preset. A preset is a combination of parameters, such as prompt, temperature etc. You can create presets in the [playground](https://dashboard.cohere.com/playground/generate).
+ /// When a preset is specified, the `prompt` parameter becomes optional, and any included parameters will override the preset's parameters.
+ /// Example: my-preset-a58sbd + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("preset")] + public string? Preset { get; set; } + + /// + /// The generated text will be cut at the beginning of the earliest occurrence of an end sequence. The sequence will be excluded from the text. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("end_sequences")] + public global::System.Collections.Generic.IList? EndSequences { get; set; } + + /// + /// The generated text will be cut at the end of the earliest occurrence of a stop sequence. The sequence will be included the text. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("stop_sequences")] + public global::System.Collections.Generic.IList? StopSequences { get; set; } + + /// + /// Ensures only the top `k` most likely tokens are considered for generation at each step.
+ /// Defaults to `0`, min value of `0`, max value of `500`. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("k")] + public int K { get; set; } + + /// + /// Ensures that only the most likely tokens, with total probability mass of `p`, are considered for generation at each step. If both `k` and `p` are enabled, `p` acts after `k`.
+ /// Defaults to `0.75`. min value of `0.01`, max value of `0.99`. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("p")] + public double P { get; set; } + + /// + /// Used to reduce repetitiveness of generated tokens. The higher the value, the stronger a penalty is applied to previously present tokens, proportional to how many times they have already appeared in the prompt or prior generation.
+ /// Using `frequency_penalty` in combination with `presence_penalty` is not supported on newer models. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("frequency_penalty")] + public double FrequencyPenalty { get; set; } + + /// + /// Defaults to `0.0`, min value of `0.0`, max value of `1.0`.
+ /// Can be used to reduce repetitiveness of generated tokens. Similar to `frequency_penalty`, except that this penalty is applied equally to all tokens that have already appeared, regardless of their exact frequencies.
+ /// Using `frequency_penalty` in combination with `presence_penalty` is not supported on newer models. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("presence_penalty")] + public double PresencePenalty { get; set; } + + /// + /// One of `GENERATION|ALL|NONE` to specify how and if the token likelihoods are returned with the response. Defaults to `NONE`.
+ /// If `GENERATION` is selected, the token likelihoods will only be provided for generated text.
+ /// If `ALL` is selected, the token likelihoods will be provided both for the prompt and the generated text.
+ /// Default Value: NONE + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("return_likelihoods")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.GenerateRequestReturnLikelihoodsJsonConverter))] + public global::G.GenerateRequestReturnLikelihoods? ReturnLikelihoods { get; set; } = global::G.GenerateRequestReturnLikelihoods.NONE; + + /// + /// When enabled, the user's prompt will be sent to the model without any pre-processing. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("raw_prompting")] + public bool RawPrompting { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateRequestReturnLikelihoods.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateRequestReturnLikelihoods.g.verified.cs new file mode 100644 index 0000000000..1d2475076e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateRequestReturnLikelihoods.g.verified.cs @@ -0,0 +1,61 @@ +//HintName: G.Models.GenerateRequestReturnLikelihoods.g.cs + +#nullable enable + +namespace G +{ + /// + /// One of `GENERATION|ALL|NONE` to specify how and if the token likelihoods are returned with the response. Defaults to `NONE`.
+ /// If `GENERATION` is selected, the token likelihoods will only be provided for generated text.
+ /// If `ALL` is selected, the token likelihoods will be provided both for the prompt and the generated text.
+ /// Default Value: NONE + ///
+ public enum GenerateRequestReturnLikelihoods + { + /// + /// + /// + GENERATION, + /// + /// + /// + ALL, + /// + /// + /// + NONE, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class GenerateRequestReturnLikelihoodsExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this GenerateRequestReturnLikelihoods value) + { + return value switch + { + GenerateRequestReturnLikelihoods.GENERATION => "GENERATION", + GenerateRequestReturnLikelihoods.ALL => "ALL", + GenerateRequestReturnLikelihoods.NONE => "NONE", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static GenerateRequestReturnLikelihoods? ToEnum(string value) + { + return value switch + { + "GENERATION" => GenerateRequestReturnLikelihoods.GENERATION, + "ALL" => GenerateRequestReturnLikelihoods.ALL, + "NONE" => GenerateRequestReturnLikelihoods.NONE, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateRequestTruncate.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateRequestTruncate.g.verified.cs new file mode 100644 index 0000000000..e35a3d351c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateRequestTruncate.g.verified.cs @@ -0,0 +1,61 @@ +//HintName: G.Models.GenerateRequestTruncate.g.cs + +#nullable enable + +namespace G +{ + /// + /// One of `NONE|START|END` to specify how the API will handle inputs longer than the maximum token length.
+ /// Passing `START` will discard the start of the input. `END` will discard the end of the input. In both cases, input is discarded until the remaining input is exactly the maximum input token length for the model.
+ /// If `NONE` is selected, when the input exceeds the maximum input token length an error will be returned.
+ /// Default Value: END + ///
+ public enum GenerateRequestTruncate + { + /// + /// + /// + NONE, + /// + /// + /// + START, + /// + /// + /// + END, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class GenerateRequestTruncateExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this GenerateRequestTruncate value) + { + return value switch + { + GenerateRequestTruncate.NONE => "NONE", + GenerateRequestTruncate.START => "START", + GenerateRequestTruncate.END => "END", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static GenerateRequestTruncate? ToEnum(string value) + { + return value switch + { + "NONE" => GenerateRequestTruncate.NONE, + "START" => GenerateRequestTruncate.START, + "END" => GenerateRequestTruncate.END, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse.g.verified.cs new file mode 100644 index 0000000000..e6f472f45e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GenerateResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse10.g.verified.cs new file mode 100644 index 0000000000..6f178d9839 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GenerateResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateResponse10 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse11.g.verified.cs new file mode 100644 index 0000000000..48ab0f610f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GenerateResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateResponse11 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse12.g.verified.cs new file mode 100644 index 0000000000..b81931eb4a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GenerateResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateResponse12 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse2.g.verified.cs new file mode 100644 index 0000000000..df9dd21612 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GenerateResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateResponse2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse3.g.verified.cs new file mode 100644 index 0000000000..425e1fef5a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GenerateResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateResponse3 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse4.g.verified.cs new file mode 100644 index 0000000000..1789dbf925 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GenerateResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateResponse4 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse5.g.verified.cs new file mode 100644 index 0000000000..b3969df53d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GenerateResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateResponse5 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse6.g.verified.cs new file mode 100644 index 0000000000..0736c97208 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GenerateResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateResponse6 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse7.g.verified.cs new file mode 100644 index 0000000000..9a1e3ced78 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GenerateResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateResponse7 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse8.g.verified.cs new file mode 100644 index 0000000000..efdf58653f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GenerateResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateResponse8 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse9.g.verified.cs new file mode 100644 index 0000000000..055252b4bc --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GenerateResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateResponse9 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateStreamEnd.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateStreamEnd.g.verified.cs new file mode 100644 index 0000000000..1b02abd149 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateStreamEnd.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.GenerateStreamEnd.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// + /// + public readonly partial struct GenerateStreamEnd : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.GenerateStreamEvent? Value1 { get; init; } +#else + public global::G.GenerateStreamEvent? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator GenerateStreamEnd(global::G.GenerateStreamEvent value) => new GenerateStreamEnd(value); + + /// + /// + /// + public static implicit operator global::G.GenerateStreamEvent?(GenerateStreamEnd @this) => @this.Value1; + + /// + /// + /// + public GenerateStreamEnd(global::G.GenerateStreamEvent? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.GenerateStreamEndVariant2? Value2 { get; init; } +#else + public global::G.GenerateStreamEndVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator GenerateStreamEnd(global::G.GenerateStreamEndVariant2 value) => new GenerateStreamEnd(value); + + /// + /// + /// + public static implicit operator global::G.GenerateStreamEndVariant2?(GenerateStreamEnd @this) => @this.Value2; + + /// + /// + /// + public GenerateStreamEnd(global::G.GenerateStreamEndVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public GenerateStreamEnd( + global::G.GenerateStreamEvent? value1, + global::G.GenerateStreamEndVariant2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.GenerateStreamEvent), + Value2, + typeof(global::G.GenerateStreamEndVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(GenerateStreamEnd other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(GenerateStreamEnd obj1, GenerateStreamEnd obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(GenerateStreamEnd obj1, GenerateStreamEnd obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is GenerateStreamEnd o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateStreamEndVariant2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateStreamEndVariant2.g.verified.cs new file mode 100644 index 0000000000..cc29a70805 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateStreamEndVariant2.g.verified.cs @@ -0,0 +1,39 @@ +//HintName: G.Models.GenerateStreamEndVariant2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateStreamEndVariant2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("is_finished")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool IsFinished { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("finish_reason")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.FinishReasonJsonConverter))] + public global::G.FinishReason? FinishReason { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("response")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.GenerateStreamEndVariant2Response Response { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateStreamEndVariant2Response.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateStreamEndVariant2Response.g.verified.cs new file mode 100644 index 0000000000..f1c5e59136 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateStreamEndVariant2Response.g.verified.cs @@ -0,0 +1,37 @@ +//HintName: G.Models.GenerateStreamEndVariant2Response.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateStreamEndVariant2Response + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("prompt")] + public string? Prompt { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("generations")] + public global::System.Collections.Generic.IList? Generations { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateStreamError.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateStreamError.g.verified.cs new file mode 100644 index 0000000000..271faf6f04 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateStreamError.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.GenerateStreamError.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// + /// + public readonly partial struct GenerateStreamError : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.GenerateStreamEvent? Value1 { get; init; } +#else + public global::G.GenerateStreamEvent? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator GenerateStreamError(global::G.GenerateStreamEvent value) => new GenerateStreamError(value); + + /// + /// + /// + public static implicit operator global::G.GenerateStreamEvent?(GenerateStreamError @this) => @this.Value1; + + /// + /// + /// + public GenerateStreamError(global::G.GenerateStreamEvent? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.GenerateStreamErrorVariant2? Value2 { get; init; } +#else + public global::G.GenerateStreamErrorVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator GenerateStreamError(global::G.GenerateStreamErrorVariant2 value) => new GenerateStreamError(value); + + /// + /// + /// + public static implicit operator global::G.GenerateStreamErrorVariant2?(GenerateStreamError @this) => @this.Value2; + + /// + /// + /// + public GenerateStreamError(global::G.GenerateStreamErrorVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public GenerateStreamError( + global::G.GenerateStreamEvent? value1, + global::G.GenerateStreamErrorVariant2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.GenerateStreamEvent), + Value2, + typeof(global::G.GenerateStreamErrorVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(GenerateStreamError other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(GenerateStreamError obj1, GenerateStreamError obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(GenerateStreamError obj1, GenerateStreamError obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is GenerateStreamError o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateStreamErrorVariant2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateStreamErrorVariant2.g.verified.cs new file mode 100644 index 0000000000..3741c68add --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateStreamErrorVariant2.g.verified.cs @@ -0,0 +1,46 @@ +//HintName: G.Models.GenerateStreamErrorVariant2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateStreamErrorVariant2 + { + /// + /// Refers to the nth generation. Only present when `num_generations` is greater than zero. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("index")] + public int Index { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("is_finished")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool IsFinished { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("finish_reason")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.FinishReasonJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.FinishReason FinishReason { get; set; } + + /// + /// Error message + /// + [global::System.Text.Json.Serialization.JsonPropertyName("err")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Err { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateStreamEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateStreamEvent.g.verified.cs new file mode 100644 index 0000000000..407b2bafc0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateStreamEvent.g.verified.cs @@ -0,0 +1,26 @@ +//HintName: G.Models.GenerateStreamEvent.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateStreamEvent + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("event_type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.GenerateStreamEventEventTypeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.GenerateStreamEventEventType EventType { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateStreamEventEventType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateStreamEventEventType.g.verified.cs new file mode 100644 index 0000000000..6d94e78166 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateStreamEventEventType.g.verified.cs @@ -0,0 +1,58 @@ +//HintName: G.Models.GenerateStreamEventEventType.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public enum GenerateStreamEventEventType + { + /// + /// + /// + TextGeneration, + /// + /// + /// + StreamEnd, + /// + /// + /// + StreamError, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class GenerateStreamEventEventTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this GenerateStreamEventEventType value) + { + return value switch + { + GenerateStreamEventEventType.TextGeneration => "text-generation", + GenerateStreamEventEventType.StreamEnd => "stream-end", + GenerateStreamEventEventType.StreamError => "stream-error", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static GenerateStreamEventEventType? ToEnum(string value) + { + return value switch + { + "text-generation" => GenerateStreamEventEventType.TextGeneration, + "stream-end" => GenerateStreamEventEventType.StreamEnd, + "stream-error" => GenerateStreamEventEventType.StreamError, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateStreamText.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateStreamText.g.verified.cs new file mode 100644 index 0000000000..e6e8bb6b3f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateStreamText.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.GenerateStreamText.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// + /// + public readonly partial struct GenerateStreamText : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.GenerateStreamEvent? Value1 { get; init; } +#else + public global::G.GenerateStreamEvent? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator GenerateStreamText(global::G.GenerateStreamEvent value) => new GenerateStreamText(value); + + /// + /// + /// + public static implicit operator global::G.GenerateStreamEvent?(GenerateStreamText @this) => @this.Value1; + + /// + /// + /// + public GenerateStreamText(global::G.GenerateStreamEvent? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.GenerateStreamTextVariant2? Value2 { get; init; } +#else + public global::G.GenerateStreamTextVariant2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator GenerateStreamText(global::G.GenerateStreamTextVariant2 value) => new GenerateStreamText(value); + + /// + /// + /// + public static implicit operator global::G.GenerateStreamTextVariant2?(GenerateStreamText @this) => @this.Value2; + + /// + /// + /// + public GenerateStreamText(global::G.GenerateStreamTextVariant2? value) + { + Value2 = value; + } + + /// + /// + /// + public GenerateStreamText( + global::G.GenerateStreamEvent? value1, + global::G.GenerateStreamTextVariant2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(global::G.GenerateStreamEvent), + Value2, + typeof(global::G.GenerateStreamTextVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(GenerateStreamText other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(GenerateStreamText obj1, GenerateStreamText obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(GenerateStreamText obj1, GenerateStreamText obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is GenerateStreamText o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateStreamTextVariant2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateStreamTextVariant2.g.verified.cs new file mode 100644 index 0000000000..55c79081ff --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateStreamTextVariant2.g.verified.cs @@ -0,0 +1,38 @@ +//HintName: G.Models.GenerateStreamTextVariant2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateStreamTextVariant2 + { + /// + /// A segment of text of the generation. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Text { get; set; } + + /// + /// Refers to the nth generation. Only present when `num_generations` is greater than zero, and only when text responses are being streamed. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("index")] + public int Index { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("is_finished")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool IsFinished { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateStreamedResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateStreamedResponse.g.verified.cs new file mode 100644 index 0000000000..0d47968447 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GenerateStreamedResponse.g.verified.cs @@ -0,0 +1,208 @@ +//HintName: G.Models.GenerateStreamedResponse.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// Response in content type stream when `stream` is `true` in the request parameters. Generation tokens are streamed with the GenerationStream response. The final response is of type GenerationFinalResponse. + /// + public readonly partial struct GenerateStreamedResponse : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.GenerateStreamText? StreamText { get; init; } +#else + public global::G.GenerateStreamText? StreamText { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StreamText))] +#endif + public bool IsStreamText => StreamText != null; + + /// + /// + /// + public static implicit operator GenerateStreamedResponse(global::G.GenerateStreamText value) => new GenerateStreamedResponse(value); + + /// + /// + /// + public static implicit operator global::G.GenerateStreamText?(GenerateStreamedResponse @this) => @this.StreamText; + + /// + /// + /// + public GenerateStreamedResponse(global::G.GenerateStreamText? value) + { + StreamText = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.GenerateStreamEnd? StreamEnd { get; init; } +#else + public global::G.GenerateStreamEnd? StreamEnd { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StreamEnd))] +#endif + public bool IsStreamEnd => StreamEnd != null; + + /// + /// + /// + public static implicit operator GenerateStreamedResponse(global::G.GenerateStreamEnd value) => new GenerateStreamedResponse(value); + + /// + /// + /// + public static implicit operator global::G.GenerateStreamEnd?(GenerateStreamedResponse @this) => @this.StreamEnd; + + /// + /// + /// + public GenerateStreamedResponse(global::G.GenerateStreamEnd? value) + { + StreamEnd = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.GenerateStreamError? StreamError { get; init; } +#else + public global::G.GenerateStreamError? StreamError { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StreamError))] +#endif + public bool IsStreamError => StreamError != null; + + /// + /// + /// + public static implicit operator GenerateStreamedResponse(global::G.GenerateStreamError value) => new GenerateStreamedResponse(value); + + /// + /// + /// + public static implicit operator global::G.GenerateStreamError?(GenerateStreamedResponse @this) => @this.StreamError; + + /// + /// + /// + public GenerateStreamedResponse(global::G.GenerateStreamError? value) + { + StreamError = value; + } + + /// + /// + /// + public GenerateStreamedResponse( + global::G.GenerateStreamText? streamText, + global::G.GenerateStreamEnd? streamEnd, + global::G.GenerateStreamError? streamError + ) + { + StreamText = streamText; + StreamEnd = streamEnd; + StreamError = streamError; + } + + /// + /// + /// + public object? Object => + StreamError as object ?? + StreamEnd as object ?? + StreamText as object + ; + + /// + /// + /// + public bool Validate() + { + return IsStreamText && !IsStreamEnd && !IsStreamError || !IsStreamText && IsStreamEnd && !IsStreamError || !IsStreamText && !IsStreamEnd && IsStreamError; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + StreamText, + typeof(global::G.GenerateStreamText), + StreamEnd, + typeof(global::G.GenerateStreamEnd), + StreamError, + typeof(global::G.GenerateStreamError), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(GenerateStreamedResponse other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(StreamText, other.StreamText) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(StreamEnd, other.StreamEnd) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(StreamError, other.StreamError) + ; + } + + /// + /// + /// + public static bool operator ==(GenerateStreamedResponse obj1, GenerateStreamedResponse obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(GenerateStreamedResponse obj1, GenerateStreamedResponse obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is GenerateStreamedResponse o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Generation.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Generation.g.verified.cs new file mode 100644 index 0000000000..15d52b6c62 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Generation.g.verified.cs @@ -0,0 +1,44 @@ +//HintName: G.Models.Generation.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Generation + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// Prompt used for generations. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("prompt")] + public string? Prompt { get; set; } + + /// + /// List of generated results + /// + [global::System.Text.Json.Serialization.JsonPropertyName("generations")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Generations { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("meta")] + public global::G.ApiMeta? Meta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetClusterJobResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetClusterJobResponse.g.verified.cs new file mode 100644 index 0000000000..47c846fa7d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetClusterJobResponse.g.verified.cs @@ -0,0 +1,104 @@ +//HintName: G.Models.GetClusterJobResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// Response for getting a cluster job. + /// + public sealed partial class GetClusterJobResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("job_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string JobId { get; set; } + + /// + /// Time of job creation in RFC3339 format + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + public global::System.DateTime CreatedAt { get; set; } + + /// + /// The input file URL used for the job + /// + [global::System.Text.Json.Serialization.JsonPropertyName("embeddings_url")] + public string? EmbeddingsUrl { get; set; } + + /// + /// The input dataset ID used for the job + /// + [global::System.Text.Json.Serialization.JsonPropertyName("input_dataset_id")] + public string? InputDatasetId { get; set; } + + /// + /// The parameter used in the job creation. Please refer to the job creation endpoint for more details + /// + [global::System.Text.Json.Serialization.JsonPropertyName("min_cluster_size")] + public int MinClusterSize { get; set; } + + /// + /// The parameter used in the job creation. Please refer to the job creation endpoint for more details + /// + [global::System.Text.Json.Serialization.JsonPropertyName("n_neighbors")] + public int NNeighbors { get; set; } + + /// + /// The parameter used in the job creation. Please refer to the job creation endpoint for more details + /// + [global::System.Text.Json.Serialization.JsonPropertyName("is_deterministic")] + public bool IsDeterministic { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.GetClusterJobResponseStatusJsonConverter))] + public global::G.GetClusterJobResponseStatus? Status { get; set; } + + /// + /// A boolean indicating whether the job is in a final state, whether completed or failed + /// + [global::System.Text.Json.Serialization.JsonPropertyName("is_final_state")] + public bool IsFinalState { get; set; } + + /// + /// The output file URL for the clusters (signed url that expires) + /// + [global::System.Text.Json.Serialization.JsonPropertyName("output_clusters_url")] + public string? OutputClustersUrl { get; set; } + + /// + /// The output file URL for the outliers (signed url that expires) + /// + [global::System.Text.Json.Serialization.JsonPropertyName("output_outliers_url")] + public string? OutputOutliersUrl { get; set; } + + /// + /// The list of cluster summaries for the job + /// + [global::System.Text.Json.Serialization.JsonPropertyName("clusters")] + public global::System.Collections.Generic.IList? Clusters { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("error")] + public string? Error { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("meta")] + public global::G.ApiMeta? Meta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetClusterJobResponseStatus.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetClusterJobResponseStatus.g.verified.cs new file mode 100644 index 0000000000..760a2de648 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetClusterJobResponseStatus.g.verified.cs @@ -0,0 +1,70 @@ +//HintName: G.Models.GetClusterJobResponseStatus.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public enum GetClusterJobResponseStatus + { + /// + /// + /// + Unknown, + /// + /// + /// + Processing, + /// + /// + /// + Failed, + /// + /// + /// + Complete, + /// + /// + /// + Queued, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class GetClusterJobResponseStatusExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this GetClusterJobResponseStatus value) + { + return value switch + { + GetClusterJobResponseStatus.Unknown => "unknown", + GetClusterJobResponseStatus.Processing => "processing", + GetClusterJobResponseStatus.Failed => "failed", + GetClusterJobResponseStatus.Complete => "complete", + GetClusterJobResponseStatus.Queued => "queued", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static GetClusterJobResponseStatus? ToEnum(string value) + { + return value switch + { + "unknown" => GetClusterJobResponseStatus.Unknown, + "processing" => GetClusterJobResponseStatus.Processing, + "failed" => GetClusterJobResponseStatus.Failed, + "complete" => GetClusterJobResponseStatus.Complete, + "queued" => GetClusterJobResponseStatus.Queued, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse.g.verified.cs new file mode 100644 index 0000000000..dd09aebb85 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse.g.verified.cs @@ -0,0 +1,26 @@ +//HintName: G.Models.GetConnectorResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetConnectorResponse + { + /// + /// A connector allows you to integrate data sources with the '/chat' endpoint to create grounded generations with citations to the data source.
+ /// documents to help answer users. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("connector")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.Connector Connector { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse10.g.verified.cs new file mode 100644 index 0000000000..1791036743 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetConnectorResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetConnectorResponse10 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse11.g.verified.cs new file mode 100644 index 0000000000..cd94158f31 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetConnectorResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetConnectorResponse11 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse12.g.verified.cs new file mode 100644 index 0000000000..cf26bab48f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetConnectorResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetConnectorResponse12 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse13.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse13.g.verified.cs new file mode 100644 index 0000000000..c7c16238a0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse13.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetConnectorResponse13.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetConnectorResponse13 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse2.g.verified.cs new file mode 100644 index 0000000000..03ddae9fe6 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetConnectorResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetConnectorResponse2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse3.g.verified.cs new file mode 100644 index 0000000000..f18817431a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetConnectorResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetConnectorResponse3 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse4.g.verified.cs new file mode 100644 index 0000000000..873927cff4 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetConnectorResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetConnectorResponse4 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse5.g.verified.cs new file mode 100644 index 0000000000..5675cf6e5e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetConnectorResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetConnectorResponse5 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse6.g.verified.cs new file mode 100644 index 0000000000..d3e95b7fbc --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetConnectorResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetConnectorResponse6 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse7.g.verified.cs new file mode 100644 index 0000000000..c98d8a6042 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetConnectorResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetConnectorResponse7 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse8.g.verified.cs new file mode 100644 index 0000000000..1f398d216e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetConnectorResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetConnectorResponse8 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse9.g.verified.cs new file mode 100644 index 0000000000..a67a992974 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetConnectorResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetConnectorResponse9 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorsLogsResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorsLogsResponse.g.verified.cs new file mode 100644 index 0000000000..8325dfc334 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetConnectorsLogsResponse.g.verified.cs @@ -0,0 +1,32 @@ +//HintName: G.Models.GetConnectorsLogsResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetConnectorsLogsResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("connector_logs")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList ConnectorLogs { get; set; } + + /// + /// Total number of connector logs + /// + [global::System.Text.Json.Serialization.JsonPropertyName("total")] + [global::System.Text.Json.Serialization.JsonRequired] + public required double Total { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse.g.verified.cs new file mode 100644 index 0000000000..d1a52dcaef --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse.g.verified.cs @@ -0,0 +1,25 @@ +//HintName: G.Models.GetDatasetResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("dataset")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.Dataset Dataset { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse10.g.verified.cs new file mode 100644 index 0000000000..ce7c63fc3a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetResponse10 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse11.g.verified.cs new file mode 100644 index 0000000000..d7fa77da42 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetResponse11 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse12.g.verified.cs new file mode 100644 index 0000000000..8fcd95415e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetResponse12 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse13.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse13.g.verified.cs new file mode 100644 index 0000000000..17dd12c14f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse13.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetResponse13.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetResponse13 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse2.g.verified.cs new file mode 100644 index 0000000000..53e1ee0691 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetResponse2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse3.g.verified.cs new file mode 100644 index 0000000000..6b3ed63ceb --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetResponse3 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse4.g.verified.cs new file mode 100644 index 0000000000..b47d7dd4bb --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetResponse4 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse5.g.verified.cs new file mode 100644 index 0000000000..85a3703b61 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetResponse5 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse6.g.verified.cs new file mode 100644 index 0000000000..47c6bbd8ab --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetResponse6 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse7.g.verified.cs new file mode 100644 index 0000000000..0fb66556e5 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetResponse7 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse8.g.verified.cs new file mode 100644 index 0000000000..b1af38a89c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetResponse8 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse9.g.verified.cs new file mode 100644 index 0000000000..cae1edea60 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetResponse9 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse.g.verified.cs new file mode 100644 index 0000000000..ec33f1f3f6 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetUsageResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetUsageResponse + { + /// + /// The total number of bytes used by the organization. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("organization_usage")] + public double OrganizationUsage { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse10.g.verified.cs new file mode 100644 index 0000000000..18ce2d1709 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetUsageResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetUsageResponse10 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse11.g.verified.cs new file mode 100644 index 0000000000..1c85b48696 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetUsageResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetUsageResponse11 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse12.g.verified.cs new file mode 100644 index 0000000000..cc4e316648 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetUsageResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetUsageResponse12 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse13.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse13.g.verified.cs new file mode 100644 index 0000000000..ef39b5b1e5 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse13.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetUsageResponse13.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetUsageResponse13 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse2.g.verified.cs new file mode 100644 index 0000000000..cb4623116d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetUsageResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetUsageResponse2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse3.g.verified.cs new file mode 100644 index 0000000000..e3f375ef31 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetUsageResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetUsageResponse3 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse4.g.verified.cs new file mode 100644 index 0000000000..317689472d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetUsageResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetUsageResponse4 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse5.g.verified.cs new file mode 100644 index 0000000000..3d52765d1e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetUsageResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetUsageResponse5 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse6.g.verified.cs new file mode 100644 index 0000000000..a3240bbb04 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetUsageResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetUsageResponse6 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse7.g.verified.cs new file mode 100644 index 0000000000..777d249921 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetUsageResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetUsageResponse7 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse8.g.verified.cs new file mode 100644 index 0000000000..fc518266a2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetUsageResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetUsageResponse8 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse9.g.verified.cs new file mode 100644 index 0000000000..9f54cc4bbc --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetDatasetUsageResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetDatasetUsageResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetDatasetUsageResponse9 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse.g.verified.cs new file mode 100644 index 0000000000..e1539d2ca5 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetEmbedJobResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetEmbedJobResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse10.g.verified.cs new file mode 100644 index 0000000000..5502eaeb28 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetEmbedJobResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetEmbedJobResponse10 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse11.g.verified.cs new file mode 100644 index 0000000000..a679768cef --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetEmbedJobResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetEmbedJobResponse11 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse12.g.verified.cs new file mode 100644 index 0000000000..e555a020cd --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetEmbedJobResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetEmbedJobResponse12 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse2.g.verified.cs new file mode 100644 index 0000000000..b3223cbf9c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetEmbedJobResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetEmbedJobResponse2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse3.g.verified.cs new file mode 100644 index 0000000000..03eb1a4b12 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetEmbedJobResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetEmbedJobResponse3 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse4.g.verified.cs new file mode 100644 index 0000000000..3358b1f285 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetEmbedJobResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetEmbedJobResponse4 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse5.g.verified.cs new file mode 100644 index 0000000000..4d3196c5de --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetEmbedJobResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetEmbedJobResponse5 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse6.g.verified.cs new file mode 100644 index 0000000000..8110a03c67 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetEmbedJobResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetEmbedJobResponse6 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse7.g.verified.cs new file mode 100644 index 0000000000..be62932ffa --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetEmbedJobResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetEmbedJobResponse7 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse8.g.verified.cs new file mode 100644 index 0000000000..16130158bd --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetEmbedJobResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetEmbedJobResponse8 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse9.g.verified.cs new file mode 100644 index 0000000000..7241e920a1 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetEmbedJobResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetEmbedJobResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetEmbedJobResponse9 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetFinetunedModelResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetFinetunedModelResponse.g.verified.cs new file mode 100644 index 0000000000..8c4c030412 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetFinetunedModelResponse.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetFinetunedModelResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// Response to a request to get a fine-tuned model. + /// + public sealed partial class GetFinetunedModelResponse + { + /// + /// This resource represents a fine-tuned model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("finetuned_model")] + public global::G.FinetunedModel? FinetunedModel { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse.g.verified.cs new file mode 100644 index 0000000000..680edf74b6 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse.g.verified.cs @@ -0,0 +1,54 @@ +//HintName: G.Models.GetModelResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// Contains information about the model and which API endpoints it can be used with. + /// + public sealed partial class GetModelResponse + { + /// + /// Specify this name in the `model` parameter of API requests to use your chosen model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } + + /// + /// The API endpoints that the model is compatible with. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("endpoints")] + public global::System.Collections.Generic.IList? Endpoints { get; set; } + + /// + /// Whether the model has been fine-tuned or not. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("finetuned")] + public bool Finetuned { get; set; } + + /// + /// The maximum number of tokens that the model can process in a single request. Note that not all of these tokens are always available due to special tokens and preambles that Cohere has added by default. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("context_length")] + public double ContextLength { get; set; } + + /// + /// Public URL to the tokenizer's configuration file. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tokenizer_url")] + public string? TokenizerUrl { get; set; } + + /// + /// The API endpoints that the model is default to. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("default_endpoints")] + public global::System.Collections.Generic.IList? DefaultEndpoints { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse10.g.verified.cs new file mode 100644 index 0000000000..45f371826c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetModelResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetModelResponse10 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse11.g.verified.cs new file mode 100644 index 0000000000..4b8da8e78d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetModelResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetModelResponse11 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse12.g.verified.cs new file mode 100644 index 0000000000..862b7184e4 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetModelResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetModelResponse12 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse13.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse13.g.verified.cs new file mode 100644 index 0000000000..0705fc4c2f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse13.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetModelResponse13.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetModelResponse13 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse2.g.verified.cs new file mode 100644 index 0000000000..8e3efb1542 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetModelResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetModelResponse2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse3.g.verified.cs new file mode 100644 index 0000000000..3574551e9b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetModelResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetModelResponse3 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse4.g.verified.cs new file mode 100644 index 0000000000..09a7a230ac --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetModelResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetModelResponse4 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse5.g.verified.cs new file mode 100644 index 0000000000..6eff4ed830 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetModelResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetModelResponse5 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse6.g.verified.cs new file mode 100644 index 0000000000..4080d95927 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetModelResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetModelResponse6 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse7.g.verified.cs new file mode 100644 index 0000000000..4ed395b408 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetModelResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetModelResponse7 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse8.g.verified.cs new file mode 100644 index 0000000000..daf7d56a29 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetModelResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetModelResponse8 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse9.g.verified.cs new file mode 100644 index 0000000000..966ddaa08e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.GetModelResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GetModelResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GetModelResponse9 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Hyperparameters.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Hyperparameters.g.verified.cs new file mode 100644 index 0000000000..398b691d24 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Hyperparameters.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: G.Models.Hyperparameters.g.cs + +#nullable enable + +namespace G +{ + /// + /// The fine-tuning hyperparameters. + /// + public sealed partial class Hyperparameters + { + /// + /// Stops training if the loss metric does not improve beyond the value of
+ /// `early_stopping_threshold` after this many times of evaluation. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("early_stopping_patience")] + public int EarlyStoppingPatience { get; set; } + + /// + /// How much the loss must improve to prevent early stopping. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("early_stopping_threshold")] + public double EarlyStoppingThreshold { get; set; } + + /// + /// The batch size is the number of training examples included in a single
+ /// training pass. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("train_batch_size")] + public int TrainBatchSize { get; set; } + + /// + /// The number of epochs to train for. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("train_epochs")] + public int TrainEpochs { get; set; } + + /// + /// The learning rate to be used during training. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("learning_rate")] + public double LearningRate { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.JSONResponseFormat.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.JSONResponseFormat.g.verified.cs new file mode 100644 index 0000000000..36adce6e9f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.JSONResponseFormat.g.verified.cs @@ -0,0 +1,45 @@ +//HintName: G.Models.JSONResponseFormat.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class JSONResponseFormat + { + /// + /// Defaults to `"text"`.
+ /// When set to `"json_object"`, the model's output will be a valid JSON Object. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.ResponseFormatTypeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.ResponseFormatType Type { get; set; } + + /// + /// A JSON schema object that the output will adhere to. There are some restrictions we have on the schema, refer to [our guide](/docs/structured-outputs-json#schema-constraints) for more information.
+ /// Example (required name and age object):
+ /// ```json
+ /// {
+ /// "type": "object",
+ /// "properties": {
+ /// "name": {"type": "string"},
+ /// "age": {"type": "integer"}
+ /// },
+ /// "required": ["name", "age"]
+ /// }
+ /// ```
+ /// **Note**: This field must not be specified when the `type` is set to `"text"`. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("schema")] + public global::G.JSONResponseFormatSchema? Schema { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.JSONResponseFormat2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.JSONResponseFormat2.g.verified.cs new file mode 100644 index 0000000000..64b9ad73c7 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.JSONResponseFormat2.g.verified.cs @@ -0,0 +1,45 @@ +//HintName: G.Models.JSONResponseFormat2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class JSONResponseFormat2 + { + /// + /// Defaults to `"text"`.
+ /// When set to `"json_object"`, the model's output will be a valid JSON Object. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.ResponseFormatTypeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.ResponseFormatType Type { get; set; } + + /// + /// [BETA] A JSON schema object that the output will adhere to. There are some restrictions we have on the schema, refer to [our guide](/docs/structured-outputs-json#schema-constraints) for more information.
+ /// Example (required name and age object):
+ /// ```json
+ /// {
+ /// "type": "object",
+ /// "properties": {
+ /// "name": {"type": "string"},
+ /// "age": {"type": "integer"}
+ /// },
+ /// "required": ["name", "age"]
+ /// }
+ /// ```
+ /// **Note**: This field must not be specified when the `type` is set to `"text"`. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("json_schema")] + public global::G.JSONResponseFormat2JsonSchema? JsonSchema { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.JSONResponseFormat2JsonSchema.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.JSONResponseFormat2JsonSchema.g.verified.cs new file mode 100644 index 0000000000..71681dcd0a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.JSONResponseFormat2JsonSchema.g.verified.cs @@ -0,0 +1,31 @@ +//HintName: G.Models.JSONResponseFormat2JsonSchema.g.cs + +#nullable enable + +namespace G +{ + /// + /// [BETA] A JSON schema object that the output will adhere to. There are some restrictions we have on the schema, refer to [our guide](/docs/structured-outputs-json#schema-constraints) for more information.
+ /// Example (required name and age object):
+ /// ```json
+ /// {
+ /// "type": "object",
+ /// "properties": {
+ /// "name": {"type": "string"},
+ /// "age": {"type": "integer"}
+ /// },
+ /// "required": ["name", "age"]
+ /// }
+ /// ```
+ /// **Note**: This field must not be specified when the `type` is set to `"text"`. + ///
+ public sealed partial class JSONResponseFormat2JsonSchema + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.JSONResponseFormatSchema.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.JSONResponseFormatSchema.g.verified.cs new file mode 100644 index 0000000000..41e6706a68 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.JSONResponseFormatSchema.g.verified.cs @@ -0,0 +1,31 @@ +//HintName: G.Models.JSONResponseFormatSchema.g.cs + +#nullable enable + +namespace G +{ + /// + /// A JSON schema object that the output will adhere to. There are some restrictions we have on the schema, refer to [our guide](/docs/structured-outputs-json#schema-constraints) for more information.
+ /// Example (required name and age object):
+ /// ```json
+ /// {
+ /// "type": "object",
+ /// "properties": {
+ /// "name": {"type": "string"},
+ /// "age": {"type": "integer"}
+ /// },
+ /// "required": ["name", "age"]
+ /// }
+ /// ```
+ /// **Note**: This field must not be specified when the `type` is set to `"text"`. + ///
+ public sealed partial class JSONResponseFormatSchema + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.LabelMetric.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.LabelMetric.g.verified.cs new file mode 100644 index 0000000000..f5d0ca1662 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.LabelMetric.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.LabelMetric.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class LabelMetric + { + /// + /// Total number of examples for this label + /// + [global::System.Text.Json.Serialization.JsonPropertyName("total_examples")] + public double TotalExamples { get; set; } + + /// + /// value of the label + /// + [global::System.Text.Json.Serialization.JsonPropertyName("label")] + public string? Label { get; set; } + + /// + /// samples for this label + /// + [global::System.Text.Json.Serialization.JsonPropertyName("samples")] + public global::System.Collections.Generic.IList? Samples { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListClusterJobsResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListClusterJobsResponse.g.verified.cs new file mode 100644 index 0000000000..e9968de780 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListClusterJobsResponse.g.verified.cs @@ -0,0 +1,37 @@ +//HintName: G.Models.ListClusterJobsResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListClusterJobsResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("jobs")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Jobs { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("total_count")] + public int TotalCount { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("meta")] + public global::G.ApiMeta? Meta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse.g.verified.cs new file mode 100644 index 0000000000..8369825538 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse.g.verified.cs @@ -0,0 +1,31 @@ +//HintName: G.Models.ListConnectorsResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListConnectorsResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("connectors")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Connectors { get; set; } + + /// + /// Total number of connectors. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("total_count")] + public double TotalCount { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse10.g.verified.cs new file mode 100644 index 0000000000..e0c0947ade --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListConnectorsResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListConnectorsResponse10 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse11.g.verified.cs new file mode 100644 index 0000000000..147cdc057d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListConnectorsResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListConnectorsResponse11 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse12.g.verified.cs new file mode 100644 index 0000000000..b2132729f6 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListConnectorsResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListConnectorsResponse12 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse13.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse13.g.verified.cs new file mode 100644 index 0000000000..46a4e08dc5 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse13.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListConnectorsResponse13.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListConnectorsResponse13 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse2.g.verified.cs new file mode 100644 index 0000000000..42cedafeb8 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListConnectorsResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListConnectorsResponse2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse3.g.verified.cs new file mode 100644 index 0000000000..12e54c8828 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListConnectorsResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListConnectorsResponse3 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse4.g.verified.cs new file mode 100644 index 0000000000..ca2aaad680 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListConnectorsResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListConnectorsResponse4 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse5.g.verified.cs new file mode 100644 index 0000000000..04c1a2ff7a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListConnectorsResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListConnectorsResponse5 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse6.g.verified.cs new file mode 100644 index 0000000000..180684ad14 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListConnectorsResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListConnectorsResponse6 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse7.g.verified.cs new file mode 100644 index 0000000000..3e32deed0d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListConnectorsResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListConnectorsResponse7 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse8.g.verified.cs new file mode 100644 index 0000000000..44f86dab44 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListConnectorsResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListConnectorsResponse8 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse9.g.verified.cs new file mode 100644 index 0000000000..18ad40fe04 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListConnectorsResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListConnectorsResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListConnectorsResponse9 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse.g.verified.cs new file mode 100644 index 0000000000..35a47804a9 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListDatasetsResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListDatasetsResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("datasets")] + public global::System.Collections.Generic.IList? Datasets { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse10.g.verified.cs new file mode 100644 index 0000000000..bfe5c74449 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListDatasetsResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListDatasetsResponse10 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse11.g.verified.cs new file mode 100644 index 0000000000..6459653d65 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListDatasetsResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListDatasetsResponse11 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse12.g.verified.cs new file mode 100644 index 0000000000..0820dfa690 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListDatasetsResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListDatasetsResponse12 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse13.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse13.g.verified.cs new file mode 100644 index 0000000000..18e777ede9 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse13.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListDatasetsResponse13.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListDatasetsResponse13 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse2.g.verified.cs new file mode 100644 index 0000000000..87936de3d9 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListDatasetsResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListDatasetsResponse2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse3.g.verified.cs new file mode 100644 index 0000000000..c32bdb2127 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListDatasetsResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListDatasetsResponse3 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse4.g.verified.cs new file mode 100644 index 0000000000..e9d16cc67d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListDatasetsResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListDatasetsResponse4 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse5.g.verified.cs new file mode 100644 index 0000000000..75ee181ccd --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListDatasetsResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListDatasetsResponse5 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse6.g.verified.cs new file mode 100644 index 0000000000..4c568d1138 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListDatasetsResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListDatasetsResponse6 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse7.g.verified.cs new file mode 100644 index 0000000000..de4a3fbae4 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListDatasetsResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListDatasetsResponse7 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse8.g.verified.cs new file mode 100644 index 0000000000..cb845b28f3 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListDatasetsResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListDatasetsResponse8 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse9.g.verified.cs new file mode 100644 index 0000000000..ad78c04d7f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListDatasetsResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListDatasetsResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListDatasetsResponse9 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobResponse.g.verified.cs new file mode 100644 index 0000000000..c672347bb5 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobResponse.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListEmbedJobResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListEmbedJobResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("embed_jobs")] + public global::System.Collections.Generic.IList? EmbedJobs { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse.g.verified.cs new file mode 100644 index 0000000000..fbbb7d52eb --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListEmbedJobsResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListEmbedJobsResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse10.g.verified.cs new file mode 100644 index 0000000000..21f91cb82a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListEmbedJobsResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListEmbedJobsResponse10 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse11.g.verified.cs new file mode 100644 index 0000000000..c42cf80f17 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListEmbedJobsResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListEmbedJobsResponse11 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse12.g.verified.cs new file mode 100644 index 0000000000..d4e6917638 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListEmbedJobsResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListEmbedJobsResponse12 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse2.g.verified.cs new file mode 100644 index 0000000000..08c4570ab6 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListEmbedJobsResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListEmbedJobsResponse2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse3.g.verified.cs new file mode 100644 index 0000000000..fcf19ec64b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListEmbedJobsResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListEmbedJobsResponse3 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse4.g.verified.cs new file mode 100644 index 0000000000..0a924e1d82 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListEmbedJobsResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListEmbedJobsResponse4 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse5.g.verified.cs new file mode 100644 index 0000000000..db0f1667b8 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListEmbedJobsResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListEmbedJobsResponse5 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse6.g.verified.cs new file mode 100644 index 0000000000..bf027ed780 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListEmbedJobsResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListEmbedJobsResponse6 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse7.g.verified.cs new file mode 100644 index 0000000000..28c5345d58 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListEmbedJobsResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListEmbedJobsResponse7 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse8.g.verified.cs new file mode 100644 index 0000000000..97a9ca2e8b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListEmbedJobsResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListEmbedJobsResponse8 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse9.g.verified.cs new file mode 100644 index 0000000000..5ea676143b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEmbedJobsResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListEmbedJobsResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListEmbedJobsResponse9 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEventsResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEventsResponse.g.verified.cs new file mode 100644 index 0000000000..88ab7b9e8b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListEventsResponse.g.verified.cs @@ -0,0 +1,37 @@ +//HintName: G.Models.ListEventsResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// Response to a request to list events of a fine-tuned model. + /// + public sealed partial class ListEventsResponse + { + /// + /// List of events for the fine-tuned model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("events")] + public global::System.Collections.Generic.IList? Events { get; set; } + + /// + /// Pagination token to retrieve the next page of results. If the value is "",
+ /// it means no further results for the request. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("next_page_token")] + public string? NextPageToken { get; set; } + + /// + /// Total count of results. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("total_size")] + public int TotalSize { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListFinetunedModelsResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListFinetunedModelsResponse.g.verified.cs new file mode 100644 index 0000000000..3140da908e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListFinetunedModelsResponse.g.verified.cs @@ -0,0 +1,37 @@ +//HintName: G.Models.ListFinetunedModelsResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// Response to a request to list fine-tuned models. + /// + public sealed partial class ListFinetunedModelsResponse + { + /// + /// List of fine-tuned models matching the request. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("finetuned_models")] + public global::System.Collections.Generic.IList? FinetunedModels { get; set; } + + /// + /// Pagination token to retrieve the next page of results. If the value is "",
+ /// it means no further results for the request. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("next_page_token")] + public string? NextPageToken { get; set; } + + /// + /// Total count of results. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("total_size")] + public int TotalSize { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse.g.verified.cs new file mode 100644 index 0000000000..f592d27425 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse.g.verified.cs @@ -0,0 +1,31 @@ +//HintName: G.Models.ListModelsResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListModelsResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("models")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Models { get; set; } + + /// + /// A token to retrieve the next page of results. Provide in the page_token parameter of the next request. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("next_page_token")] + public string? NextPageToken { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse10.g.verified.cs new file mode 100644 index 0000000000..f37738c0d5 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListModelsResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListModelsResponse10 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse11.g.verified.cs new file mode 100644 index 0000000000..1c00485783 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListModelsResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListModelsResponse11 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse12.g.verified.cs new file mode 100644 index 0000000000..9976675c7f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListModelsResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListModelsResponse12 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse13.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse13.g.verified.cs new file mode 100644 index 0000000000..f25c9c9dff --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse13.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListModelsResponse13.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListModelsResponse13 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse2.g.verified.cs new file mode 100644 index 0000000000..36b1b1257f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListModelsResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListModelsResponse2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse3.g.verified.cs new file mode 100644 index 0000000000..0951cbf2b8 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListModelsResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListModelsResponse3 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse4.g.verified.cs new file mode 100644 index 0000000000..a74b53877b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListModelsResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListModelsResponse4 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse5.g.verified.cs new file mode 100644 index 0000000000..0ac27e3f21 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListModelsResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListModelsResponse5 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse6.g.verified.cs new file mode 100644 index 0000000000..eda2372b1b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListModelsResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListModelsResponse6 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse7.g.verified.cs new file mode 100644 index 0000000000..248874e0d5 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListModelsResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListModelsResponse7 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse8.g.verified.cs new file mode 100644 index 0000000000..c5824ef661 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListModelsResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListModelsResponse8 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse9.g.verified.cs new file mode 100644 index 0000000000..774fb18bf9 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListModelsResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.ListModelsResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ListModelsResponse9 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListTrainingStepMetricsResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListTrainingStepMetricsResponse.g.verified.cs new file mode 100644 index 0000000000..3aef892d76 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ListTrainingStepMetricsResponse.g.verified.cs @@ -0,0 +1,31 @@ +//HintName: G.Models.ListTrainingStepMetricsResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// Response to a request to list training-step metrics of a fine-tuned model. + /// + public sealed partial class ListTrainingStepMetricsResponse + { + /// + /// The metrics for each step the evaluation was run on. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("step_metrics")] + public global::System.Collections.Generic.IList? StepMetrics { get; set; } + + /// + /// Pagination token to retrieve the next page of results. If the value is "",
+ /// it means no further results for the request. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("next_page_token")] + public string? NextPageToken { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.LogLikelihoodResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.LogLikelihoodResponse.g.verified.cs new file mode 100644 index 0000000000..22929ed116 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.LogLikelihoodResponse.g.verified.cs @@ -0,0 +1,52 @@ +//HintName: G.Models.LogLikelihoodResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class LogLikelihoodResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// Probabilities for tokens in the request prompt + /// + [global::System.Text.Json.Serialization.JsonPropertyName("prompt_tokens")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList PromptTokens { get; set; } + + /// + /// Probabilities for tokens in the request completion + /// + [global::System.Text.Json.Serialization.JsonPropertyName("completion_tokens")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList CompletionTokens { get; set; } + + /// + /// Probabilities for tokens in the request raw_prompt + /// + [global::System.Text.Json.Serialization.JsonPropertyName("raw_prompt_tokens")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList RawPromptTokens { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("meta")] + public global::G.ApiMeta? Meta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Message.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Message.g.verified.cs new file mode 100644 index 0000000000..4a8901b745 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Message.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.Message.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// + /// + public readonly partial struct Message : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatMessage? Chat { get; init; } +#else + public global::G.ChatMessage? Chat { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Chat))] +#endif + public bool IsChat => Chat != null; + + /// + /// + /// + public static implicit operator Message(global::G.ChatMessage value) => new Message(value); + + /// + /// + /// + public static implicit operator global::G.ChatMessage?(Message @this) => @this.Chat; + + /// + /// + /// + public Message(global::G.ChatMessage? value) + { + Chat = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ToolMessage? Tool { get; init; } +#else + public global::G.ToolMessage? Tool { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Tool))] +#endif + public bool IsTool => Tool != null; + + /// + /// + /// + public static implicit operator Message(global::G.ToolMessage value) => new Message(value); + + /// + /// + /// + public static implicit operator global::G.ToolMessage?(Message @this) => @this.Tool; + + /// + /// + /// + public Message(global::G.ToolMessage? value) + { + Tool = value; + } + + /// + /// + /// + public Message( + global::G.ChatMessage? chat, + global::G.ToolMessage? tool + ) + { + Chat = chat; + Tool = tool; + } + + /// + /// + /// + public object? Object => + Tool as object ?? + Chat as object + ; + + /// + /// + /// + public bool Validate() + { + return IsChat && !IsTool || !IsChat && IsTool; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Chat, + typeof(global::G.ChatMessage), + Tool, + typeof(global::G.ToolMessage), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(Message other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Chat, other.Chat) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Tool, other.Tool) + ; + } + + /// + /// + /// + public static bool operator ==(Message obj1, Message obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(Message obj1, Message obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is Message o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Metrics.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Metrics.g.verified.cs new file mode 100644 index 0000000000..be4717738d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Metrics.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.Metrics.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Metrics + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("finetune_dataset_metrics")] + public global::G.FinetuneDatasetMetrics? FinetuneDatasetMetrics { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.NonStreamedChatResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.NonStreamedChatResponse.g.verified.cs new file mode 100644 index 0000000000..1a06b0fc2c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.NonStreamedChatResponse.g.verified.cs @@ -0,0 +1,86 @@ +//HintName: G.Models.NonStreamedChatResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class NonStreamedChatResponse + { + /// + /// Contents of the reply generated by the model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Text { get; set; } + + /// + /// Unique identifier for the generated reply. Useful for submitting feedback. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("generation_id")] + public string? GenerationId { get; set; } + + /// + /// Inline citations for the generated reply. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("citations")] + public global::System.Collections.Generic.IList? Citations { get; set; } + + /// + /// Documents seen by the model when generating the reply. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("documents")] + public global::System.Collections.Generic.IList? Documents { get; set; } + + /// + /// Denotes that a search for documents is required during the RAG flow. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("is_search_required")] + public bool IsSearchRequired { get; set; } + + /// + /// Generated search queries, meant to be used as part of the RAG flow. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("search_queries")] + public global::System.Collections.Generic.IList? SearchQueries { get; set; } + + /// + /// Documents retrieved from each of the conducted searches. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("search_results")] + public global::System.Collections.Generic.IList? SearchResults { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("finish_reason")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.FinishReasonJsonConverter))] + public global::G.FinishReason? FinishReason { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tool_calls")] + public global::System.Collections.Generic.IList? ToolCalls { get; set; } + + /// + /// A list of previous messages between the user and the model, meant to give the model conversational context for responding to the user's `message`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("chat_history")] + public global::System.Collections.Generic.IList? ChatHistory { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("meta")] + public global::G.ApiMeta? Meta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.NonStreamedChatResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.NonStreamedChatResponse2.g.verified.cs new file mode 100644 index 0000000000..19315de635 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.NonStreamedChatResponse2.g.verified.cs @@ -0,0 +1,45 @@ +//HintName: G.Models.NonStreamedChatResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class NonStreamedChatResponse2 + { + /// + /// Unique identifier for the generated reply. Useful for submitting feedback. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// The reason a chat request has finished. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("finish_reason")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.ChatFinishReasonJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.ChatFinishReason FinishReason { get; set; } + + /// + /// A message from the assistant role can contain text and tool call information. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("message")] + public global::G.AssistantMessageResponse? Message { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("usage")] + public global::G.Usage? Usage { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse.g.verified.cs new file mode 100644 index 0000000000..0a0a43030e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.OAuthAuthorizeConnectorResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class OAuthAuthorizeConnectorResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse10.g.verified.cs new file mode 100644 index 0000000000..f5129d8536 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.OAuthAuthorizeConnectorResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class OAuthAuthorizeConnectorResponse10 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse11.g.verified.cs new file mode 100644 index 0000000000..9ee60603f6 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.OAuthAuthorizeConnectorResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class OAuthAuthorizeConnectorResponse11 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse12.g.verified.cs new file mode 100644 index 0000000000..2461ab794a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.OAuthAuthorizeConnectorResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class OAuthAuthorizeConnectorResponse12 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse2.g.verified.cs new file mode 100644 index 0000000000..1366fa4d03 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.OAuthAuthorizeConnectorResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class OAuthAuthorizeConnectorResponse2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse3.g.verified.cs new file mode 100644 index 0000000000..2e775f4b5f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.OAuthAuthorizeConnectorResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class OAuthAuthorizeConnectorResponse3 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse4.g.verified.cs new file mode 100644 index 0000000000..9d6ed30b09 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.OAuthAuthorizeConnectorResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class OAuthAuthorizeConnectorResponse4 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse5.g.verified.cs new file mode 100644 index 0000000000..e40080371d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.OAuthAuthorizeConnectorResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class OAuthAuthorizeConnectorResponse5 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse6.g.verified.cs new file mode 100644 index 0000000000..b63d2b096d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.OAuthAuthorizeConnectorResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class OAuthAuthorizeConnectorResponse6 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse7.g.verified.cs new file mode 100644 index 0000000000..cde9320afc --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.OAuthAuthorizeConnectorResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class OAuthAuthorizeConnectorResponse7 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse8.g.verified.cs new file mode 100644 index 0000000000..2db4186b0a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.OAuthAuthorizeConnectorResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class OAuthAuthorizeConnectorResponse8 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse9.g.verified.cs new file mode 100644 index 0000000000..cc6663fabe --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeConnectorResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.OAuthAuthorizeConnectorResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class OAuthAuthorizeConnectorResponse9 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeResponse.g.verified.cs new file mode 100644 index 0000000000..1e36211f6b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.OAuthAuthorizeResponse.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.OAuthAuthorizeResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class OAuthAuthorizeResponse + { + /// + /// The OAuth 2.0 redirect url. Redirect the user to this url to authorize the connector. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("redirect_url")] + public string? RedirectUrl { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ParseInfo.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ParseInfo.g.verified.cs new file mode 100644 index 0000000000..c2bb026251 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ParseInfo.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.ParseInfo.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ParseInfo + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("separator")] + public string? Separator { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("delimiter")] + public string? Delimiter { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankDocument.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankDocument.g.verified.cs new file mode 100644 index 0000000000..efeca9bd9d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankDocument.g.verified.cs @@ -0,0 +1,25 @@ +//HintName: G.Models.RerankDocument.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class RerankDocument + { + /// + /// The text of the document to rerank. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Text { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankRequest.g.verified.cs new file mode 100644 index 0000000000..97b375e2a9 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankRequest.g.verified.cs @@ -0,0 +1,70 @@ +//HintName: G.Models.RerankRequest.g.cs + +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class RerankRequest + { + /// + /// The identifier of the model to use, one of : `rerank-english-v3.0`, `rerank-multilingual-v3.0`, `rerank-english-v2.0`, `rerank-multilingual-v2.0` + /// + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + public string? Model { get; set; } + + /// + /// The search query + /// + [global::System.Text.Json.Serialization.JsonPropertyName("query")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Query { get; set; } + + /// + /// A list of document objects or strings to rerank.
+ /// If a document is provided the text fields is required and all other fields will be preserved in the response.
+ /// The total max chunks (length of documents * max_chunks_per_doc) must be less than 10000.
+ /// We recommend a maximum of 1,000 documents for optimal endpoint performance. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("documents")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList> Documents { get; set; } + + /// + /// The number of most relevant documents or indices to return, defaults to the length of the documents + /// + [global::System.Text.Json.Serialization.JsonPropertyName("top_n")] + public int TopN { get; set; } + + /// + /// If a JSON object is provided, you can specify which keys you would like to have considered for reranking. The model will rerank based on order of the fields passed in (i.e. rank_fields=['title','author','text'] will rerank using the values in title, author, text sequentially. If the length of title, author, and text exceeds the context length of the model, the chunking will not re-consider earlier fields). If not provided, the model will use the default text field for ranking. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("rank_fields")] + public global::System.Collections.Generic.IList? RankFields { get; set; } + + /// + /// - If false, returns results without the doc text - the api will return a list of {index, relevance score} where index is inferred from the list passed into the request.
+ /// - If true, returns results with the doc text passed in - the api will return an ordered list of {index, text, relevance score} where index + text refers to the list passed into the request.
+ /// Default Value: false + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("return_documents")] + public bool ReturnDocuments { get; set; } = false; + + /// + /// The maximum number of chunks to produce internally from a document
+ /// Default Value: 10 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("max_chunks_per_doc")] + public int MaxChunksPerDoc { get; set; } = 10; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse.g.verified.cs new file mode 100644 index 0000000000..09c27b2869 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse.g.verified.cs @@ -0,0 +1,37 @@ +//HintName: G.Models.RerankResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class RerankResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public string? Id { get; set; } + + /// + /// An ordered list of ranked documents + /// + [global::System.Text.Json.Serialization.JsonPropertyName("results")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Results { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("meta")] + public global::G.ApiMeta? Meta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse10.g.verified.cs new file mode 100644 index 0000000000..7a50d161ff --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.RerankResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class RerankResponse10 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse11.g.verified.cs new file mode 100644 index 0000000000..0976b7e3e7 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.RerankResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class RerankResponse11 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse12.g.verified.cs new file mode 100644 index 0000000000..e5954db42c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.RerankResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class RerankResponse12 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse13.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse13.g.verified.cs new file mode 100644 index 0000000000..f3cc73dab2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse13.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.RerankResponse13.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class RerankResponse13 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse2.g.verified.cs new file mode 100644 index 0000000000..e336612214 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.RerankResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class RerankResponse2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse3.g.verified.cs new file mode 100644 index 0000000000..da27ccb12b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.RerankResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class RerankResponse3 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse4.g.verified.cs new file mode 100644 index 0000000000..695b3cbbd7 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.RerankResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class RerankResponse4 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse5.g.verified.cs new file mode 100644 index 0000000000..ee1d35d9b6 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.RerankResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class RerankResponse5 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse6.g.verified.cs new file mode 100644 index 0000000000..4c40f87060 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.RerankResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class RerankResponse6 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse7.g.verified.cs new file mode 100644 index 0000000000..37aecd9939 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.RerankResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class RerankResponse7 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse8.g.verified.cs new file mode 100644 index 0000000000..2889db95f7 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.RerankResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class RerankResponse8 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse9.g.verified.cs new file mode 100644 index 0000000000..c8e20c255a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.RerankResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class RerankResponse9 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponseResult.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponseResult.g.verified.cs new file mode 100644 index 0000000000..da3e79c584 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponseResult.g.verified.cs @@ -0,0 +1,38 @@ +//HintName: G.Models.RerankResponseResult.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class RerankResponseResult + { + /// + /// If `return_documents` is set as `false` this will return none, if `true` it will return the documents passed in + /// + [global::System.Text.Json.Serialization.JsonPropertyName("document")] + public global::G.RerankResponseResultDocument? Document { get; set; } + + /// + /// Corresponds to the index in the original list of documents to which the ranked document belongs. (i.e. if the first value in the `results` object has an `index` value of 3, it means in the list of documents passed in, the document at `index=3` had the highest relevance) + /// + [global::System.Text.Json.Serialization.JsonPropertyName("index")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Index { get; set; } + + /// + /// Relevance scores are normalized to be in the range `[0, 1]`. Scores close to `1` indicate a high relevance to the query, and scores closer to `0` indicate low relevance. It is not accurate to assume a score of 0.9 means the document is 2x more relevant than a document with a score of 0.45 + /// + [global::System.Text.Json.Serialization.JsonPropertyName("relevance_score")] + [global::System.Text.Json.Serialization.JsonRequired] + public required float RelevanceScore { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponseResultDocument.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponseResultDocument.g.verified.cs new file mode 100644 index 0000000000..b25dd2182e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankResponseResultDocument.g.verified.cs @@ -0,0 +1,25 @@ +//HintName: G.Models.RerankResponseResultDocument.g.cs + +#nullable enable + +namespace G +{ + /// + /// If `return_documents` is set as `false` this will return none, if `true` it will return the documents passed in + /// + public sealed partial class RerankResponseResultDocument + { + /// + /// The text of the document to rerank + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Text { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankerDataMetrics.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankerDataMetrics.g.verified.cs new file mode 100644 index 0000000000..ed15b58f3e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.RerankerDataMetrics.g.verified.cs @@ -0,0 +1,54 @@ +//HintName: G.Models.RerankerDataMetrics.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class RerankerDataMetrics + { + /// + /// The number of training queries. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("num_train_queries")] + public double NumTrainQueries { get; set; } + + /// + /// The sum of all relevant passages of valid training examples. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("num_train_relevant_passages")] + public double NumTrainRelevantPassages { get; set; } + + /// + /// The sum of all hard negatives of valid training examples. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("num_train_hard_negatives")] + public double NumTrainHardNegatives { get; set; } + + /// + /// The number of evaluation queries. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("num_eval_queries")] + public double NumEvalQueries { get; set; } + + /// + /// The sum of all relevant passages of valid eval examples. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("num_eval_relevant_passages")] + public double NumEvalRelevantPassages { get; set; } + + /// + /// The sum of all hard negatives of valid eval examples. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("num_eval_hard_negatives")] + public double NumEvalHardNegatives { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ResponseFormat.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ResponseFormat.g.verified.cs new file mode 100644 index 0000000000..a6ebfb5ab1 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ResponseFormat.g.verified.cs @@ -0,0 +1,171 @@ +//HintName: G.Models.ResponseFormat.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// Configuration for forcing the model output to adhere to the specified format. Supported on [Command R](https://docs.cohere.com/docs/command-r), [Command R+](https://docs.cohere.com/docs/command-r-plus) and newer models.
+ /// The model can be forced into outputting JSON objects (with up to 5 levels of nesting) by setting `{ "type": "json_object" }`.
+ /// A [JSON Schema](https://json-schema.org/) can optionally be provided, to ensure a specific structure.
+ /// **Note**: When using `{ "type": "json_object" }` your `message` should always explicitly instruct the model to generate a JSON (eg: _"Generate a JSON ..."_) . Otherwise the model may end up getting stuck generating an infinite stream of characters and eventually run out of context length.
+ /// **Limitation**: The parameter is not supported in RAG mode (when any of `connectors`, `documents`, `tools`, `tool_results` are provided). + ///
+ public readonly partial struct ResponseFormat : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.TextResponseFormat? Text { get; init; } +#else + public global::G.TextResponseFormat? Text { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Text))] +#endif + public bool IsText => Text != null; + + /// + /// + /// + public static implicit operator ResponseFormat(global::G.TextResponseFormat value) => new ResponseFormat(value); + + /// + /// + /// + public static implicit operator global::G.TextResponseFormat?(ResponseFormat @this) => @this.Text; + + /// + /// + /// + public ResponseFormat(global::G.TextResponseFormat? value) + { + Text = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.JSONResponseFormat? JSON { get; init; } +#else + public global::G.JSONResponseFormat? JSON { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(JSON))] +#endif + public bool IsJSON => JSON != null; + + /// + /// + /// + public static implicit operator ResponseFormat(global::G.JSONResponseFormat value) => new ResponseFormat(value); + + /// + /// + /// + public static implicit operator global::G.JSONResponseFormat?(ResponseFormat @this) => @this.JSON; + + /// + /// + /// + public ResponseFormat(global::G.JSONResponseFormat? value) + { + JSON = value; + } + + /// + /// + /// + public ResponseFormat( + global::G.TextResponseFormat? text, + global::G.JSONResponseFormat? jSON + ) + { + Text = text; + JSON = jSON; + } + + /// + /// + /// + public object? Object => + JSON as object ?? + Text as object + ; + + /// + /// + /// + public bool Validate() + { + return IsText && !IsJSON || !IsText && IsJSON; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Text, + typeof(global::G.TextResponseFormat), + JSON, + typeof(global::G.JSONResponseFormat), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ResponseFormat other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Text, other.Text) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(JSON, other.JSON) + ; + } + + /// + /// + /// + public static bool operator ==(ResponseFormat obj1, ResponseFormat obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ResponseFormat obj1, ResponseFormat obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ResponseFormat o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ResponseFormat2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ResponseFormat2.g.verified.cs new file mode 100644 index 0000000000..b91c596f44 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ResponseFormat2.g.verified.cs @@ -0,0 +1,171 @@ +//HintName: G.Models.ResponseFormat2.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// Configuration for forcing the model output to adhere to the specified format. Supported on [Command R](https://docs.cohere.com/docs/command-r), [Command R+](https://docs.cohere.com/docs/command-r-plus) and newer models.
+ /// The model can be forced into outputting JSON objects (with up to 5 levels of nesting) by setting `{ "type": "json_object" }`.
+ /// A [JSON Schema](https://json-schema.org/) can optionally be provided, to ensure a specific structure.
+ /// **Note**: When using `{ "type": "json_object" }` your `message` should always explicitly instruct the model to generate a JSON (eg: _"Generate a JSON ..."_) . Otherwise the model may end up getting stuck generating an infinite stream of characters and eventually run out of context length.
+ /// **Limitation**: The parameter is not supported in RAG mode (when any of `connectors`, `documents`, `tools`, `tool_results` are provided). + ///
+ public readonly partial struct ResponseFormat2 : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.TextResponseFormat? TextFormat { get; init; } +#else + public global::G.TextResponseFormat? TextFormat { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(TextFormat))] +#endif + public bool IsTextFormat => TextFormat != null; + + /// + /// + /// + public static implicit operator ResponseFormat2(global::G.TextResponseFormat value) => new ResponseFormat2(value); + + /// + /// + /// + public static implicit operator global::G.TextResponseFormat?(ResponseFormat2 @this) => @this.TextFormat; + + /// + /// + /// + public ResponseFormat2(global::G.TextResponseFormat? value) + { + TextFormat = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.JSONResponseFormat2? JSON { get; init; } +#else + public global::G.JSONResponseFormat2? JSON { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(JSON))] +#endif + public bool IsJSON => JSON != null; + + /// + /// + /// + public static implicit operator ResponseFormat2(global::G.JSONResponseFormat2 value) => new ResponseFormat2(value); + + /// + /// + /// + public static implicit operator global::G.JSONResponseFormat2?(ResponseFormat2 @this) => @this.JSON; + + /// + /// + /// + public ResponseFormat2(global::G.JSONResponseFormat2? value) + { + JSON = value; + } + + /// + /// + /// + public ResponseFormat2( + global::G.TextResponseFormat? textFormat, + global::G.JSONResponseFormat2? jSON + ) + { + TextFormat = textFormat; + JSON = jSON; + } + + /// + /// + /// + public object? Object => + JSON as object ?? + TextFormat as object + ; + + /// + /// + /// + public bool Validate() + { + return IsTextFormat && !IsJSON || !IsTextFormat && IsJSON; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + TextFormat, + typeof(global::G.TextResponseFormat), + JSON, + typeof(global::G.JSONResponseFormat2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ResponseFormat2 other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(TextFormat, other.TextFormat) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(JSON, other.JSON) + ; + } + + /// + /// + /// + public static bool operator ==(ResponseFormat2 obj1, ResponseFormat2 obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ResponseFormat2 obj1, ResponseFormat2 obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ResponseFormat2 o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ResponseFormatType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ResponseFormatType.g.verified.cs new file mode 100644 index 0000000000..25fe796446 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ResponseFormatType.g.verified.cs @@ -0,0 +1,53 @@ +//HintName: G.Models.ResponseFormatType.g.cs + +#nullable enable + +namespace G +{ + /// + /// Defaults to `"text"`.
+ /// When set to `"json_object"`, the model's output will be a valid JSON Object. + ///
+ public enum ResponseFormatType + { + /// + /// + /// + Text, + /// + /// + /// + JsonObject, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ResponseFormatTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ResponseFormatType value) + { + return value switch + { + ResponseFormatType.Text => "text", + ResponseFormatType.JsonObject => "json_object", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ResponseFormatType? ToEnum(string value) + { + return value switch + { + "text" => ResponseFormatType.Text, + "json_object" => ResponseFormatType.JsonObject, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Settings.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Settings.g.verified.cs new file mode 100644 index 0000000000..42c9b2d7f9 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Settings.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: G.Models.Settings.g.cs + +#nullable enable + +namespace G +{ + /// + /// The configuration used for fine-tuning. + /// + public sealed partial class Settings + { + /// + /// The base model used for fine-tuning. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("base_model")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.BaseModel BaseModel { get; set; } + + /// + /// The data used for training and evaluating the fine-tuned model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("dataset_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string DatasetId { get; set; } + + /// + /// The fine-tuning hyperparameters. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("hyperparameters")] + public global::G.Hyperparameters? Hyperparameters { get; set; } + + /// + /// read-only. Whether the model is single-label or multi-label (only for classification). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("multi_label")] + public bool MultiLabel { get; set; } + + /// + /// The Weights & Biases configuration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("wandb")] + public global::G.WandbConfig? Wandb { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SingleGeneration.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SingleGeneration.g.verified.cs new file mode 100644 index 0000000000..86bd279137 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SingleGeneration.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: G.Models.SingleGeneration.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SingleGeneration + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Text { get; set; } + + /// + /// Refers to the nth generation. Only present when `num_generations` is greater than zero. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("index")] + public int Index { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("likelihood")] + public double Likelihood { get; set; } + + /// + /// Only returned if `return_likelihoods` is set to `GENERATION` or `ALL`. The likelihood refers to the average log-likelihood of the entire specified string, which is useful for [evaluating the performance of your model](likelihood-eval), especially if you've created a [custom model](/docs/training-custom-models). Individual token likelihoods provide the log-likelihood of each token. The first token will not have a likelihood. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("token_likelihoods")] + public global::System.Collections.Generic.IList? TokenLikelihoods { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SingleGenerationInStream.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SingleGenerationInStream.g.verified.cs new file mode 100644 index 0000000000..c0ab09bb0b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SingleGenerationInStream.g.verified.cs @@ -0,0 +1,46 @@ +//HintName: G.Models.SingleGenerationInStream.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SingleGenerationInStream + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// Full text of the generation. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Text { get; set; } + + /// + /// Refers to the nth generation. Only present when `num_generations` is greater than zero. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("index")] + public int Index { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("finish_reason")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.FinishReasonJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.FinishReason FinishReason { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SingleGenerationTokenLikelihood.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SingleGenerationTokenLikelihood.g.verified.cs new file mode 100644 index 0000000000..ecbb8391f3 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SingleGenerationTokenLikelihood.g.verified.cs @@ -0,0 +1,32 @@ +//HintName: G.Models.SingleGenerationTokenLikelihood.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SingleGenerationTokenLikelihood + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("token")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Token { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("likelihood")] + [global::System.Text.Json.Serialization.JsonRequired] + public required double Likelihood { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Source.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Source.g.verified.cs new file mode 100644 index 0000000000..41fb2e7807 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Source.g.verified.cs @@ -0,0 +1,167 @@ +//HintName: G.Models.Source.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// A source object containing information about the source of the data cited. + /// + public readonly partial struct Source : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ToolSource? Tool { get; init; } +#else + public global::G.ToolSource? Tool { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Tool))] +#endif + public bool IsTool => Tool != null; + + /// + /// + /// + public static implicit operator Source(global::G.ToolSource value) => new Source(value); + + /// + /// + /// + public static implicit operator global::G.ToolSource?(Source @this) => @this.Tool; + + /// + /// + /// + public Source(global::G.ToolSource? value) + { + Tool = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.DocumentSource? Document { get; init; } +#else + public global::G.DocumentSource? Document { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Document))] +#endif + public bool IsDocument => Document != null; + + /// + /// + /// + public static implicit operator Source(global::G.DocumentSource value) => new Source(value); + + /// + /// + /// + public static implicit operator global::G.DocumentSource?(Source @this) => @this.Document; + + /// + /// + /// + public Source(global::G.DocumentSource? value) + { + Document = value; + } + + /// + /// + /// + public Source( + global::G.ToolSource? tool, + global::G.DocumentSource? document + ) + { + Tool = tool; + Document = document; + } + + /// + /// + /// + public object? Object => + Document as object ?? + Tool as object + ; + + /// + /// + /// + public bool Validate() + { + return IsTool && !IsDocument || !IsTool && IsDocument; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Tool, + typeof(global::G.ToolSource), + Document, + typeof(global::G.DocumentSource), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(Source other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Tool, other.Tool) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Document, other.Document) + ; + } + + /// + /// + /// + public static bool operator ==(Source obj1, Source obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(Source obj1, Source obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is Source o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Status.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Status.g.verified.cs new file mode 100644 index 0000000000..c0f559a18b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Status.g.verified.cs @@ -0,0 +1,104 @@ +//HintName: G.Models.Status.g.cs + +#nullable enable + +namespace G +{ + /// + /// The possible stages of a fine-tuned model life-cycle.
+ /// - STATUS_UNSPECIFIED: Unspecified status.
+ /// - STATUS_FINETUNING: The fine-tuned model is being fine-tuned.
+ /// - STATUS_DEPLOYING_API: The fine-tuned model is being deployed.
+ /// - STATUS_READY: The fine-tuned model is ready to receive requests.
+ /// - STATUS_FAILED: The fine-tuned model failed.
+ /// - STATUS_DELETED: The fine-tuned model was deleted.
+ /// - STATUS_TEMPORARILY_OFFLINE: The fine-tuned model is temporarily unavailable.
+ /// - STATUS_PAUSED: The fine-tuned model is paused (Vanilla only).
+ /// - STATUS_QUEUED: The fine-tuned model is queued for training.
+ /// Default Value: STATUS_UNSPECIFIED + ///
+ public enum Status + { + /// + /// + /// + STATUSUNSPECIFIED, + /// + /// + /// + STATUSFINETUNING, + /// + /// + /// + STATUSDEPLOYINGAPI, + /// + /// + /// + STATUSREADY, + /// + /// + /// + STATUSFAILED, + /// + /// + /// + STATUSDELETED, + /// + /// + /// + STATUSTEMPORARILYOFFLINE, + /// + /// + /// + STATUSPAUSED, + /// + /// + /// + STATUSQUEUED, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class StatusExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this Status value) + { + return value switch + { + Status.STATUSUNSPECIFIED => "STATUS_UNSPECIFIED", + Status.STATUSFINETUNING => "STATUS_FINETUNING", + Status.STATUSDEPLOYINGAPI => "STATUS_DEPLOYING_API", + Status.STATUSREADY => "STATUS_READY", + Status.STATUSFAILED => "STATUS_FAILED", + Status.STATUSDELETED => "STATUS_DELETED", + Status.STATUSTEMPORARILYOFFLINE => "STATUS_TEMPORARILY_OFFLINE", + Status.STATUSPAUSED => "STATUS_PAUSED", + Status.STATUSQUEUED => "STATUS_QUEUED", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static Status? ToEnum(string value) + { + return value switch + { + "STATUS_UNSPECIFIED" => Status.STATUSUNSPECIFIED, + "STATUS_FINETUNING" => Status.STATUSFINETUNING, + "STATUS_DEPLOYING_API" => Status.STATUSDEPLOYINGAPI, + "STATUS_READY" => Status.STATUSREADY, + "STATUS_FAILED" => Status.STATUSFAILED, + "STATUS_DELETED" => Status.STATUSDELETED, + "STATUS_TEMPORARILY_OFFLINE" => Status.STATUSTEMPORARILYOFFLINE, + "STATUS_PAUSED" => Status.STATUSPAUSED, + "STATUS_QUEUED" => Status.STATUSQUEUED, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Strategy.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Strategy.g.verified.cs new file mode 100644 index 0000000000..a64063b7a3 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Strategy.g.verified.cs @@ -0,0 +1,62 @@ +//HintName: G.Models.Strategy.g.cs + +#nullable enable + +namespace G +{ + /// + /// The possible strategy used to serve a fine-tuned models.
+ /// - STRATEGY_UNSPECIFIED: Unspecified strategy.
+ /// - STRATEGY_VANILLA: Serve the fine-tuned model on a dedicated GPU.
+ /// - STRATEGY_TFEW: Serve the fine-tuned model on a shared GPU.
+ /// Default Value: STRATEGY_UNSPECIFIED + ///
+ public enum Strategy + { + /// + /// + /// + STRATEGYUNSPECIFIED, + /// + /// + /// + STRATEGYVANILLA, + /// + /// + /// + STRATEGYTFEW, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class StrategyExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this Strategy value) + { + return value switch + { + Strategy.STRATEGYUNSPECIFIED => "STRATEGY_UNSPECIFIED", + Strategy.STRATEGYVANILLA => "STRATEGY_VANILLA", + Strategy.STRATEGYTFEW => "STRATEGY_TFEW", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static Strategy? ToEnum(string value) + { + return value switch + { + "STRATEGY_UNSPECIFIED" => Strategy.STRATEGYUNSPECIFIED, + "STRATEGY_VANILLA" => Strategy.STRATEGYVANILLA, + "STRATEGY_TFEW" => Strategy.STRATEGYTFEW, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.StreamedChatResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.StreamedChatResponse.g.verified.cs new file mode 100644 index 0000000000..73ede4f959 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.StreamedChatResponse.g.verified.cs @@ -0,0 +1,413 @@ +//HintName: G.Models.StreamedChatResponse.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// StreamedChatResponse is returned in streaming mode (specified with `stream=True` in the request). + /// + public readonly partial struct StreamedChatResponse : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamStartEvent? StreamStartEvent { get; init; } +#else + public global::G.ChatStreamStartEvent? StreamStartEvent { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StreamStartEvent))] +#endif + public bool IsStreamStartEvent => StreamStartEvent != null; + + /// + /// + /// + public static implicit operator StreamedChatResponse(global::G.ChatStreamStartEvent value) => new StreamedChatResponse(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamStartEvent?(StreamedChatResponse @this) => @this.StreamStartEvent; + + /// + /// + /// + public StreamedChatResponse(global::G.ChatStreamStartEvent? value) + { + StreamStartEvent = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatSearchQueriesGenerationEvent? SearchQueriesGenerationEvent { get; init; } +#else + public global::G.ChatSearchQueriesGenerationEvent? SearchQueriesGenerationEvent { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SearchQueriesGenerationEvent))] +#endif + public bool IsSearchQueriesGenerationEvent => SearchQueriesGenerationEvent != null; + + /// + /// + /// + public static implicit operator StreamedChatResponse(global::G.ChatSearchQueriesGenerationEvent value) => new StreamedChatResponse(value); + + /// + /// + /// + public static implicit operator global::G.ChatSearchQueriesGenerationEvent?(StreamedChatResponse @this) => @this.SearchQueriesGenerationEvent; + + /// + /// + /// + public StreamedChatResponse(global::G.ChatSearchQueriesGenerationEvent? value) + { + SearchQueriesGenerationEvent = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatSearchResultsEvent? SearchResultsEvent { get; init; } +#else + public global::G.ChatSearchResultsEvent? SearchResultsEvent { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SearchResultsEvent))] +#endif + public bool IsSearchResultsEvent => SearchResultsEvent != null; + + /// + /// + /// + public static implicit operator StreamedChatResponse(global::G.ChatSearchResultsEvent value) => new StreamedChatResponse(value); + + /// + /// + /// + public static implicit operator global::G.ChatSearchResultsEvent?(StreamedChatResponse @this) => @this.SearchResultsEvent; + + /// + /// + /// + public StreamedChatResponse(global::G.ChatSearchResultsEvent? value) + { + SearchResultsEvent = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatTextGenerationEvent? TextGenerationEvent { get; init; } +#else + public global::G.ChatTextGenerationEvent? TextGenerationEvent { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(TextGenerationEvent))] +#endif + public bool IsTextGenerationEvent => TextGenerationEvent != null; + + /// + /// + /// + public static implicit operator StreamedChatResponse(global::G.ChatTextGenerationEvent value) => new StreamedChatResponse(value); + + /// + /// + /// + public static implicit operator global::G.ChatTextGenerationEvent?(StreamedChatResponse @this) => @this.TextGenerationEvent; + + /// + /// + /// + public StreamedChatResponse(global::G.ChatTextGenerationEvent? value) + { + TextGenerationEvent = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatCitationGenerationEvent? CitationGenerationEvent { get; init; } +#else + public global::G.ChatCitationGenerationEvent? CitationGenerationEvent { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CitationGenerationEvent))] +#endif + public bool IsCitationGenerationEvent => CitationGenerationEvent != null; + + /// + /// + /// + public static implicit operator StreamedChatResponse(global::G.ChatCitationGenerationEvent value) => new StreamedChatResponse(value); + + /// + /// + /// + public static implicit operator global::G.ChatCitationGenerationEvent?(StreamedChatResponse @this) => @this.CitationGenerationEvent; + + /// + /// + /// + public StreamedChatResponse(global::G.ChatCitationGenerationEvent? value) + { + CitationGenerationEvent = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatToolCallsGenerationEvent? ToolCallsGenerationEvent { get; init; } +#else + public global::G.ChatToolCallsGenerationEvent? ToolCallsGenerationEvent { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ToolCallsGenerationEvent))] +#endif + public bool IsToolCallsGenerationEvent => ToolCallsGenerationEvent != null; + + /// + /// + /// + public static implicit operator StreamedChatResponse(global::G.ChatToolCallsGenerationEvent value) => new StreamedChatResponse(value); + + /// + /// + /// + public static implicit operator global::G.ChatToolCallsGenerationEvent?(StreamedChatResponse @this) => @this.ToolCallsGenerationEvent; + + /// + /// + /// + public StreamedChatResponse(global::G.ChatToolCallsGenerationEvent? value) + { + ToolCallsGenerationEvent = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatStreamEndEvent? StreamEndEvent { get; init; } +#else + public global::G.ChatStreamEndEvent? StreamEndEvent { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StreamEndEvent))] +#endif + public bool IsStreamEndEvent => StreamEndEvent != null; + + /// + /// + /// + public static implicit operator StreamedChatResponse(global::G.ChatStreamEndEvent value) => new StreamedChatResponse(value); + + /// + /// + /// + public static implicit operator global::G.ChatStreamEndEvent?(StreamedChatResponse @this) => @this.StreamEndEvent; + + /// + /// + /// + public StreamedChatResponse(global::G.ChatStreamEndEvent? value) + { + StreamEndEvent = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatToolCallsChunkEvent? ToolCallsChunkEvent { get; init; } +#else + public global::G.ChatToolCallsChunkEvent? ToolCallsChunkEvent { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ToolCallsChunkEvent))] +#endif + public bool IsToolCallsChunkEvent => ToolCallsChunkEvent != null; + + /// + /// + /// + public static implicit operator StreamedChatResponse(global::G.ChatToolCallsChunkEvent value) => new StreamedChatResponse(value); + + /// + /// + /// + public static implicit operator global::G.ChatToolCallsChunkEvent?(StreamedChatResponse @this) => @this.ToolCallsChunkEvent; + + /// + /// + /// + public StreamedChatResponse(global::G.ChatToolCallsChunkEvent? value) + { + ToolCallsChunkEvent = value; + } + + /// + /// + /// + public StreamedChatResponse( + global::G.ChatStreamStartEvent? streamStartEvent, + global::G.ChatSearchQueriesGenerationEvent? searchQueriesGenerationEvent, + global::G.ChatSearchResultsEvent? searchResultsEvent, + global::G.ChatTextGenerationEvent? textGenerationEvent, + global::G.ChatCitationGenerationEvent? citationGenerationEvent, + global::G.ChatToolCallsGenerationEvent? toolCallsGenerationEvent, + global::G.ChatStreamEndEvent? streamEndEvent, + global::G.ChatToolCallsChunkEvent? toolCallsChunkEvent + ) + { + StreamStartEvent = streamStartEvent; + SearchQueriesGenerationEvent = searchQueriesGenerationEvent; + SearchResultsEvent = searchResultsEvent; + TextGenerationEvent = textGenerationEvent; + CitationGenerationEvent = citationGenerationEvent; + ToolCallsGenerationEvent = toolCallsGenerationEvent; + StreamEndEvent = streamEndEvent; + ToolCallsChunkEvent = toolCallsChunkEvent; + } + + /// + /// + /// + public object? Object => + ToolCallsChunkEvent as object ?? + StreamEndEvent as object ?? + ToolCallsGenerationEvent as object ?? + CitationGenerationEvent as object ?? + TextGenerationEvent as object ?? + SearchResultsEvent as object ?? + SearchQueriesGenerationEvent as object ?? + StreamStartEvent as object + ; + + /// + /// + /// + public bool Validate() + { + return IsStreamStartEvent && !IsSearchQueriesGenerationEvent && !IsSearchResultsEvent && !IsTextGenerationEvent && !IsCitationGenerationEvent && !IsToolCallsGenerationEvent && !IsStreamEndEvent && !IsToolCallsChunkEvent || !IsStreamStartEvent && IsSearchQueriesGenerationEvent && !IsSearchResultsEvent && !IsTextGenerationEvent && !IsCitationGenerationEvent && !IsToolCallsGenerationEvent && !IsStreamEndEvent && !IsToolCallsChunkEvent || !IsStreamStartEvent && !IsSearchQueriesGenerationEvent && IsSearchResultsEvent && !IsTextGenerationEvent && !IsCitationGenerationEvent && !IsToolCallsGenerationEvent && !IsStreamEndEvent && !IsToolCallsChunkEvent || !IsStreamStartEvent && !IsSearchQueriesGenerationEvent && !IsSearchResultsEvent && IsTextGenerationEvent && !IsCitationGenerationEvent && !IsToolCallsGenerationEvent && !IsStreamEndEvent && !IsToolCallsChunkEvent || !IsStreamStartEvent && !IsSearchQueriesGenerationEvent && !IsSearchResultsEvent && !IsTextGenerationEvent && IsCitationGenerationEvent && !IsToolCallsGenerationEvent && !IsStreamEndEvent && !IsToolCallsChunkEvent || !IsStreamStartEvent && !IsSearchQueriesGenerationEvent && !IsSearchResultsEvent && !IsTextGenerationEvent && !IsCitationGenerationEvent && IsToolCallsGenerationEvent && !IsStreamEndEvent && !IsToolCallsChunkEvent || !IsStreamStartEvent && !IsSearchQueriesGenerationEvent && !IsSearchResultsEvent && !IsTextGenerationEvent && !IsCitationGenerationEvent && !IsToolCallsGenerationEvent && IsStreamEndEvent && !IsToolCallsChunkEvent || !IsStreamStartEvent && !IsSearchQueriesGenerationEvent && !IsSearchResultsEvent && !IsTextGenerationEvent && !IsCitationGenerationEvent && !IsToolCallsGenerationEvent && !IsStreamEndEvent && IsToolCallsChunkEvent; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + StreamStartEvent, + typeof(global::G.ChatStreamStartEvent), + SearchQueriesGenerationEvent, + typeof(global::G.ChatSearchQueriesGenerationEvent), + SearchResultsEvent, + typeof(global::G.ChatSearchResultsEvent), + TextGenerationEvent, + typeof(global::G.ChatTextGenerationEvent), + CitationGenerationEvent, + typeof(global::G.ChatCitationGenerationEvent), + ToolCallsGenerationEvent, + typeof(global::G.ChatToolCallsGenerationEvent), + StreamEndEvent, + typeof(global::G.ChatStreamEndEvent), + ToolCallsChunkEvent, + typeof(global::G.ChatToolCallsChunkEvent), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(StreamedChatResponse other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(StreamStartEvent, other.StreamStartEvent) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(SearchQueriesGenerationEvent, other.SearchQueriesGenerationEvent) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(SearchResultsEvent, other.SearchResultsEvent) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(TextGenerationEvent, other.TextGenerationEvent) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(CitationGenerationEvent, other.CitationGenerationEvent) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ToolCallsGenerationEvent, other.ToolCallsGenerationEvent) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(StreamEndEvent, other.StreamEndEvent) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ToolCallsChunkEvent, other.ToolCallsChunkEvent) + ; + } + + /// + /// + /// + public static bool operator ==(StreamedChatResponse obj1, StreamedChatResponse obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(StreamedChatResponse obj1, StreamedChatResponse obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is StreamedChatResponse o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.StreamedChatResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.StreamedChatResponse2.g.verified.cs new file mode 100644 index 0000000000..bcda57ac97 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.StreamedChatResponse2.g.verified.cs @@ -0,0 +1,454 @@ +//HintName: G.Models.StreamedChatResponse2.g.cs +using System.Linq; +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// StreamedChatResponse is returned in streaming mode (specified with `stream=True` in the request). + /// + public readonly partial struct StreamedChatResponse2 : global::System.IEquatable + { + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatMessageStartEvent? MessageStartEvent { get; init; } +#else + public global::G.ChatMessageStartEvent? MessageStartEvent { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageStartEvent))] +#endif + public bool IsMessageStartEvent => MessageStartEvent != null; + + /// + /// + /// + public static implicit operator StreamedChatResponse2(global::G.ChatMessageStartEvent value) => new StreamedChatResponse2(value); + + /// + /// + /// + public static implicit operator global::G.ChatMessageStartEvent?(StreamedChatResponse2 @this) => @this.MessageStartEvent; + + /// + /// + /// + public StreamedChatResponse2(global::G.ChatMessageStartEvent? value) + { + MessageStartEvent = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatContentStartEvent? ContentStartEvent { get; init; } +#else + public global::G.ChatContentStartEvent? ContentStartEvent { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ContentStartEvent))] +#endif + public bool IsContentStartEvent => ContentStartEvent != null; + + /// + /// + /// + public static implicit operator StreamedChatResponse2(global::G.ChatContentStartEvent value) => new StreamedChatResponse2(value); + + /// + /// + /// + public static implicit operator global::G.ChatContentStartEvent?(StreamedChatResponse2 @this) => @this.ContentStartEvent; + + /// + /// + /// + public StreamedChatResponse2(global::G.ChatContentStartEvent? value) + { + ContentStartEvent = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatContentDeltaEvent? ContentDeltaEvent { get; init; } +#else + public global::G.ChatContentDeltaEvent? ContentDeltaEvent { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ContentDeltaEvent))] +#endif + public bool IsContentDeltaEvent => ContentDeltaEvent != null; + + /// + /// + /// + public static implicit operator StreamedChatResponse2(global::G.ChatContentDeltaEvent value) => new StreamedChatResponse2(value); + + /// + /// + /// + public static implicit operator global::G.ChatContentDeltaEvent?(StreamedChatResponse2 @this) => @this.ContentDeltaEvent; + + /// + /// + /// + public StreamedChatResponse2(global::G.ChatContentDeltaEvent? value) + { + ContentDeltaEvent = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatContentEndEvent? ContentEndEvent { get; init; } +#else + public global::G.ChatContentEndEvent? ContentEndEvent { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ContentEndEvent))] +#endif + public bool IsContentEndEvent => ContentEndEvent != null; + + /// + /// + /// + public static implicit operator StreamedChatResponse2(global::G.ChatContentEndEvent value) => new StreamedChatResponse2(value); + + /// + /// + /// + public static implicit operator global::G.ChatContentEndEvent?(StreamedChatResponse2 @this) => @this.ContentEndEvent; + + /// + /// + /// + public StreamedChatResponse2(global::G.ChatContentEndEvent? value) + { + ContentEndEvent = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatToolPlanDeltaEvent? ToolPlanDeltaEvent { get; init; } +#else + public global::G.ChatToolPlanDeltaEvent? ToolPlanDeltaEvent { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ToolPlanDeltaEvent))] +#endif + public bool IsToolPlanDeltaEvent => ToolPlanDeltaEvent != null; + + /// + /// + /// + public static implicit operator StreamedChatResponse2(global::G.ChatToolPlanDeltaEvent value) => new StreamedChatResponse2(value); + + /// + /// + /// + public static implicit operator global::G.ChatToolPlanDeltaEvent?(StreamedChatResponse2 @this) => @this.ToolPlanDeltaEvent; + + /// + /// + /// + public StreamedChatResponse2(global::G.ChatToolPlanDeltaEvent? value) + { + ToolPlanDeltaEvent = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatToolCallStartEvent? ToolCallStartEvent { get; init; } +#else + public global::G.ChatToolCallStartEvent? ToolCallStartEvent { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ToolCallStartEvent))] +#endif + public bool IsToolCallStartEvent => ToolCallStartEvent != null; + + /// + /// + /// + public static implicit operator StreamedChatResponse2(global::G.ChatToolCallStartEvent value) => new StreamedChatResponse2(value); + + /// + /// + /// + public static implicit operator global::G.ChatToolCallStartEvent?(StreamedChatResponse2 @this) => @this.ToolCallStartEvent; + + /// + /// + /// + public StreamedChatResponse2(global::G.ChatToolCallStartEvent? value) + { + ToolCallStartEvent = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatToolCallDeltaEvent? ToolCallDeltaEvent { get; init; } +#else + public global::G.ChatToolCallDeltaEvent? ToolCallDeltaEvent { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ToolCallDeltaEvent))] +#endif + public bool IsToolCallDeltaEvent => ToolCallDeltaEvent != null; + + /// + /// + /// + public static implicit operator StreamedChatResponse2(global::G.ChatToolCallDeltaEvent value) => new StreamedChatResponse2(value); + + /// + /// + /// + public static implicit operator global::G.ChatToolCallDeltaEvent?(StreamedChatResponse2 @this) => @this.ToolCallDeltaEvent; + + /// + /// + /// + public StreamedChatResponse2(global::G.ChatToolCallDeltaEvent? value) + { + ToolCallDeltaEvent = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatToolCallEndEvent? ToolCallEndEvent { get; init; } +#else + public global::G.ChatToolCallEndEvent? ToolCallEndEvent { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ToolCallEndEvent))] +#endif + public bool IsToolCallEndEvent => ToolCallEndEvent != null; + + /// + /// + /// + public static implicit operator StreamedChatResponse2(global::G.ChatToolCallEndEvent value) => new StreamedChatResponse2(value); + + /// + /// + /// + public static implicit operator global::G.ChatToolCallEndEvent?(StreamedChatResponse2 @this) => @this.ToolCallEndEvent; + + /// + /// + /// + public StreamedChatResponse2(global::G.ChatToolCallEndEvent? value) + { + ToolCallEndEvent = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::G.ChatMessageEndEvent? MessageEndEvent { get; init; } +#else + public global::G.ChatMessageEndEvent? MessageEndEvent { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageEndEvent))] +#endif + public bool IsMessageEndEvent => MessageEndEvent != null; + + /// + /// + /// + public static implicit operator StreamedChatResponse2(global::G.ChatMessageEndEvent value) => new StreamedChatResponse2(value); + + /// + /// + /// + public static implicit operator global::G.ChatMessageEndEvent?(StreamedChatResponse2 @this) => @this.MessageEndEvent; + + /// + /// + /// + public StreamedChatResponse2(global::G.ChatMessageEndEvent? value) + { + MessageEndEvent = value; + } + + /// + /// + /// + public StreamedChatResponse2( + global::G.ChatMessageStartEvent? messageStartEvent, + global::G.ChatContentStartEvent? contentStartEvent, + global::G.ChatContentDeltaEvent? contentDeltaEvent, + global::G.ChatContentEndEvent? contentEndEvent, + global::G.ChatToolPlanDeltaEvent? toolPlanDeltaEvent, + global::G.ChatToolCallStartEvent? toolCallStartEvent, + global::G.ChatToolCallDeltaEvent? toolCallDeltaEvent, + global::G.ChatToolCallEndEvent? toolCallEndEvent, + global::G.ChatMessageEndEvent? messageEndEvent + ) + { + MessageStartEvent = messageStartEvent; + ContentStartEvent = contentStartEvent; + ContentDeltaEvent = contentDeltaEvent; + ContentEndEvent = contentEndEvent; + ToolPlanDeltaEvent = toolPlanDeltaEvent; + ToolCallStartEvent = toolCallStartEvent; + ToolCallDeltaEvent = toolCallDeltaEvent; + ToolCallEndEvent = toolCallEndEvent; + MessageEndEvent = messageEndEvent; + } + + /// + /// + /// + public object? Object => + MessageEndEvent as object ?? + ToolCallEndEvent as object ?? + ToolCallDeltaEvent as object ?? + ToolCallStartEvent as object ?? + ToolPlanDeltaEvent as object ?? + ContentEndEvent as object ?? + ContentDeltaEvent as object ?? + ContentStartEvent as object ?? + MessageStartEvent as object + ; + + /// + /// + /// + public bool Validate() + { + return IsMessageStartEvent && !IsContentStartEvent && !IsContentDeltaEvent && !IsContentEndEvent && !IsToolPlanDeltaEvent && !IsToolCallStartEvent && !IsToolCallDeltaEvent && !IsToolCallEndEvent && !IsMessageEndEvent || !IsMessageStartEvent && IsContentStartEvent && !IsContentDeltaEvent && !IsContentEndEvent && !IsToolPlanDeltaEvent && !IsToolCallStartEvent && !IsToolCallDeltaEvent && !IsToolCallEndEvent && !IsMessageEndEvent || !IsMessageStartEvent && !IsContentStartEvent && IsContentDeltaEvent && !IsContentEndEvent && !IsToolPlanDeltaEvent && !IsToolCallStartEvent && !IsToolCallDeltaEvent && !IsToolCallEndEvent && !IsMessageEndEvent || !IsMessageStartEvent && !IsContentStartEvent && !IsContentDeltaEvent && IsContentEndEvent && !IsToolPlanDeltaEvent && !IsToolCallStartEvent && !IsToolCallDeltaEvent && !IsToolCallEndEvent && !IsMessageEndEvent || !IsMessageStartEvent && !IsContentStartEvent && !IsContentDeltaEvent && !IsContentEndEvent && IsToolPlanDeltaEvent && !IsToolCallStartEvent && !IsToolCallDeltaEvent && !IsToolCallEndEvent && !IsMessageEndEvent || !IsMessageStartEvent && !IsContentStartEvent && !IsContentDeltaEvent && !IsContentEndEvent && !IsToolPlanDeltaEvent && IsToolCallStartEvent && !IsToolCallDeltaEvent && !IsToolCallEndEvent && !IsMessageEndEvent || !IsMessageStartEvent && !IsContentStartEvent && !IsContentDeltaEvent && !IsContentEndEvent && !IsToolPlanDeltaEvent && !IsToolCallStartEvent && IsToolCallDeltaEvent && !IsToolCallEndEvent && !IsMessageEndEvent || !IsMessageStartEvent && !IsContentStartEvent && !IsContentDeltaEvent && !IsContentEndEvent && !IsToolPlanDeltaEvent && !IsToolCallStartEvent && !IsToolCallDeltaEvent && IsToolCallEndEvent && !IsMessageEndEvent || !IsMessageStartEvent && !IsContentStartEvent && !IsContentDeltaEvent && !IsContentEndEvent && !IsToolPlanDeltaEvent && !IsToolCallStartEvent && !IsToolCallDeltaEvent && !IsToolCallEndEvent && IsMessageEndEvent; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + MessageStartEvent, + typeof(global::G.ChatMessageStartEvent), + ContentStartEvent, + typeof(global::G.ChatContentStartEvent), + ContentDeltaEvent, + typeof(global::G.ChatContentDeltaEvent), + ContentEndEvent, + typeof(global::G.ChatContentEndEvent), + ToolPlanDeltaEvent, + typeof(global::G.ChatToolPlanDeltaEvent), + ToolCallStartEvent, + typeof(global::G.ChatToolCallStartEvent), + ToolCallDeltaEvent, + typeof(global::G.ChatToolCallDeltaEvent), + ToolCallEndEvent, + typeof(global::G.ChatToolCallEndEvent), + MessageEndEvent, + typeof(global::G.ChatMessageEndEvent), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(StreamedChatResponse2 other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageStartEvent, other.MessageStartEvent) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ContentStartEvent, other.ContentStartEvent) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ContentDeltaEvent, other.ContentDeltaEvent) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ContentEndEvent, other.ContentEndEvent) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ToolPlanDeltaEvent, other.ToolPlanDeltaEvent) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ToolCallStartEvent, other.ToolCallStartEvent) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ToolCallDeltaEvent, other.ToolCallDeltaEvent) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ToolCallEndEvent, other.ToolCallEndEvent) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageEndEvent, other.MessageEndEvent) + ; + } + + /// + /// + /// + public static bool operator ==(StreamedChatResponse2 obj1, StreamedChatResponse2 obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(StreamedChatResponse2 obj1, StreamedChatResponse2 obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is StreamedChatResponse2 o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeRequest.g.verified.cs new file mode 100644 index 0000000000..07374e9a97 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeRequest.g.verified.cs @@ -0,0 +1,68 @@ +//HintName: G.Models.SummarizeRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SummarizeRequest + { + /// + /// The text to generate a summary for. Can be up to 100,000 characters long. Currently the only supported language is English. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Text { get; set; } + + /// + /// One of `short`, `medium`, `long`, or `auto` defaults to `auto`. Indicates the approximate length of the summary. If `auto` is selected, the best option will be picked based on the input text.
+ /// Default Value: medium + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("length")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.SummarizeRequestLengthJsonConverter))] + public global::G.SummarizeRequestLength? Length { get; set; } = global::G.SummarizeRequestLength.Medium; + + /// + /// One of `paragraph`, `bullets`, or `auto`, defaults to `auto`. Indicates the style in which the summary will be delivered - in a free form paragraph or in bullet points. If `auto` is selected, the best option will be picked based on the input text.
+ /// Default Value: paragraph + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("format")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.SummarizeRequestFormatJsonConverter))] + public global::G.SummarizeRequestFormat? Format { get; set; } = global::G.SummarizeRequestFormat.Paragraph; + + /// + /// The identifier of the model to generate the summary with. Currently available models are `command` (default), `command-nightly` (experimental), `command-light`, and `command-light-nightly` (experimental). Smaller, "light" models are faster, while larger models will perform better. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + public string? Model { get; set; } + + /// + /// One of `low`, `medium`, `high`, or `auto`, defaults to `auto`. Controls how close to the original text the summary is. `high` extractiveness summaries will lean towards reusing sentences verbatim, while `low` extractiveness summaries will tend to paraphrase more. If `auto` is selected, the best option will be picked based on the input text.
+ /// Default Value: low + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("extractiveness")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.SummarizeRequestExtractivenessJsonConverter))] + public global::G.SummarizeRequestExtractiveness? Extractiveness { get; set; } = global::G.SummarizeRequestExtractiveness.Low; + + /// + /// Ranges from 0 to 5. Controls the randomness of the output. Lower values tend to generate more “predictable” output, while higher values tend to generate more “creative” output. The sweet spot is typically between 0 and 1.
+ /// Default Value: 0.3 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] + public double Temperature { get; set; } = 0.3; + + /// + /// A free-form instruction for modifying how the summaries get generated. Should complete the sentence "Generate a summary _". Eg. "focusing on the next steps" or "written by Yoda" + /// + [global::System.Text.Json.Serialization.JsonPropertyName("additional_command")] + public string? AdditionalCommand { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeRequestExtractiveness.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeRequestExtractiveness.g.verified.cs new file mode 100644 index 0000000000..1c6bb66924 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeRequestExtractiveness.g.verified.cs @@ -0,0 +1,59 @@ +//HintName: G.Models.SummarizeRequestExtractiveness.g.cs + +#nullable enable + +namespace G +{ + /// + /// One of `low`, `medium`, `high`, or `auto`, defaults to `auto`. Controls how close to the original text the summary is. `high` extractiveness summaries will lean towards reusing sentences verbatim, while `low` extractiveness summaries will tend to paraphrase more. If `auto` is selected, the best option will be picked based on the input text.
+ /// Default Value: low + ///
+ public enum SummarizeRequestExtractiveness + { + /// + /// + /// + Low, + /// + /// + /// + Medium, + /// + /// + /// + High, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class SummarizeRequestExtractivenessExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this SummarizeRequestExtractiveness value) + { + return value switch + { + SummarizeRequestExtractiveness.Low => "low", + SummarizeRequestExtractiveness.Medium => "medium", + SummarizeRequestExtractiveness.High => "high", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static SummarizeRequestExtractiveness? ToEnum(string value) + { + return value switch + { + "low" => SummarizeRequestExtractiveness.Low, + "medium" => SummarizeRequestExtractiveness.Medium, + "high" => SummarizeRequestExtractiveness.High, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeRequestFormat.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeRequestFormat.g.verified.cs new file mode 100644 index 0000000000..276c0a931b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeRequestFormat.g.verified.cs @@ -0,0 +1,53 @@ +//HintName: G.Models.SummarizeRequestFormat.g.cs + +#nullable enable + +namespace G +{ + /// + /// One of `paragraph`, `bullets`, or `auto`, defaults to `auto`. Indicates the style in which the summary will be delivered - in a free form paragraph or in bullet points. If `auto` is selected, the best option will be picked based on the input text.
+ /// Default Value: paragraph + ///
+ public enum SummarizeRequestFormat + { + /// + /// + /// + Paragraph, + /// + /// + /// + Bullets, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class SummarizeRequestFormatExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this SummarizeRequestFormat value) + { + return value switch + { + SummarizeRequestFormat.Paragraph => "paragraph", + SummarizeRequestFormat.Bullets => "bullets", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static SummarizeRequestFormat? ToEnum(string value) + { + return value switch + { + "paragraph" => SummarizeRequestFormat.Paragraph, + "bullets" => SummarizeRequestFormat.Bullets, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeRequestLength.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeRequestLength.g.verified.cs new file mode 100644 index 0000000000..114657a629 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeRequestLength.g.verified.cs @@ -0,0 +1,59 @@ +//HintName: G.Models.SummarizeRequestLength.g.cs + +#nullable enable + +namespace G +{ + /// + /// One of `short`, `medium`, `long`, or `auto` defaults to `auto`. Indicates the approximate length of the summary. If `auto` is selected, the best option will be picked based on the input text.
+ /// Default Value: medium + ///
+ public enum SummarizeRequestLength + { + /// + /// + /// + Short, + /// + /// + /// + Medium, + /// + /// + /// + Long, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class SummarizeRequestLengthExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this SummarizeRequestLength value) + { + return value switch + { + SummarizeRequestLength.Short => "short", + SummarizeRequestLength.Medium => "medium", + SummarizeRequestLength.Long => "long", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static SummarizeRequestLength? ToEnum(string value) + { + return value switch + { + "short" => SummarizeRequestLength.Short, + "medium" => SummarizeRequestLength.Medium, + "long" => SummarizeRequestLength.Long, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse.g.verified.cs new file mode 100644 index 0000000000..8a9b6cc8ec --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.SummarizeResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SummarizeResponse + { + /// + /// Generated ID for the summary + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public string? Id { get; set; } + + /// + /// Generated summary for the text + /// + [global::System.Text.Json.Serialization.JsonPropertyName("summary")] + public string? Summary { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("meta")] + public global::G.ApiMeta? Meta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse10.g.verified.cs new file mode 100644 index 0000000000..ea9f1fdf16 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.SummarizeResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SummarizeResponse10 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse11.g.verified.cs new file mode 100644 index 0000000000..8afb02a3ec --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.SummarizeResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SummarizeResponse11 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse12.g.verified.cs new file mode 100644 index 0000000000..a1b8243b11 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.SummarizeResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SummarizeResponse12 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse13.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse13.g.verified.cs new file mode 100644 index 0000000000..91b4cb6877 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse13.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.SummarizeResponse13.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SummarizeResponse13 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse2.g.verified.cs new file mode 100644 index 0000000000..9300543f2b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.SummarizeResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SummarizeResponse2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse3.g.verified.cs new file mode 100644 index 0000000000..838b7d2f05 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.SummarizeResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SummarizeResponse3 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse4.g.verified.cs new file mode 100644 index 0000000000..f3f7008b26 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.SummarizeResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SummarizeResponse4 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse5.g.verified.cs new file mode 100644 index 0000000000..96ca848f27 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.SummarizeResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SummarizeResponse5 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse6.g.verified.cs new file mode 100644 index 0000000000..35c9190d4d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.SummarizeResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SummarizeResponse6 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse7.g.verified.cs new file mode 100644 index 0000000000..d05aca6250 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.SummarizeResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SummarizeResponse7 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse8.g.verified.cs new file mode 100644 index 0000000000..841b8a5b2c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.SummarizeResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SummarizeResponse8 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse9.g.verified.cs new file mode 100644 index 0000000000..e45c581181 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SummarizeResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.SummarizeResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class SummarizeResponse9 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SystemMessage.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SystemMessage.g.verified.cs new file mode 100644 index 0000000000..0340462bb7 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SystemMessage.g.verified.cs @@ -0,0 +1,35 @@ +//HintName: G.Models.SystemMessage.g.cs + +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// A message from the system. + /// + public sealed partial class SystemMessage + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("role")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.SystemMessageRoleJsonConverter))] + public global::G.SystemMessageRole Role { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("content")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.OneOfJsonConverterFactory2))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.OneOf>> Content { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SystemMessageRole.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SystemMessageRole.g.verified.cs new file mode 100644 index 0000000000..7eb56c85be --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.SystemMessageRole.g.verified.cs @@ -0,0 +1,46 @@ +//HintName: G.Models.SystemMessageRole.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public enum SystemMessageRole + { + /// + /// + /// + System, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class SystemMessageRoleExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this SystemMessageRole value) + { + return value switch + { + SystemMessageRole.System => "system", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static SystemMessageRole? ToEnum(string value) + { + return value switch + { + "system" => SystemMessageRole.System, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TextContent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TextContent.g.verified.cs new file mode 100644 index 0000000000..6391cf9fdb --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TextContent.g.verified.cs @@ -0,0 +1,32 @@ +//HintName: G.Models.TextContent.g.cs + +#nullable enable + +namespace G +{ + /// + /// Text content of the message. + /// + public sealed partial class TextContent + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.TextContentTypeJsonConverter))] + public global::G.TextContentType Type { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Text { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TextContentType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TextContentType.g.verified.cs new file mode 100644 index 0000000000..f533149dfa --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TextContentType.g.verified.cs @@ -0,0 +1,46 @@ +//HintName: G.Models.TextContentType.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public enum TextContentType + { + /// + /// + /// + Text, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class TextContentTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this TextContentType value) + { + return value switch + { + TextContentType.Text => "text", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static TextContentType? ToEnum(string value) + { + return value switch + { + "text" => TextContentType.Text, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TextResponseFormat.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TextResponseFormat.g.verified.cs new file mode 100644 index 0000000000..34a0bfc6d0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TextResponseFormat.g.verified.cs @@ -0,0 +1,27 @@ +//HintName: G.Models.TextResponseFormat.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class TextResponseFormat + { + /// + /// Defaults to `"text"`.
+ /// When set to `"json_object"`, the model's output will be a valid JSON Object. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.ResponseFormatTypeJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.ResponseFormatType Type { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenLikelihood.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenLikelihood.g.verified.cs new file mode 100644 index 0000000000..ec7a89610c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenLikelihood.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.TokenLikelihood.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class TokenLikelihood + { + /// + /// Tokenized text + /// + [global::System.Text.Json.Serialization.JsonPropertyName("encoded")] + public int Encoded { get; set; } + + /// + /// Detokenized text + /// + [global::System.Text.Json.Serialization.JsonPropertyName("decoded")] + public string? Decoded { get; set; } + + /// + /// Non normalized probability of the token + /// + [global::System.Text.Json.Serialization.JsonPropertyName("log_likelihood")] + public double LogLikelihood { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeRequest.g.verified.cs new file mode 100644 index 0000000000..322af4363f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeRequest.g.verified.cs @@ -0,0 +1,32 @@ +//HintName: G.Models.TokenizeRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class TokenizeRequest + { + /// + /// The string to be tokenized, the minimum text length is 1 character, and the maximum text length is 65536 characters. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Text { get; set; } + + /// + /// An optional parameter to provide the model name. This will ensure that the tokenization uses the tokenizer used by that model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Model { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse.g.verified.cs new file mode 100644 index 0000000000..9a3098266c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse.g.verified.cs @@ -0,0 +1,38 @@ +//HintName: G.Models.TokenizeResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class TokenizeResponse + { + /// + /// An array of tokens, where each token is an integer. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tokens")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Tokens { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("token_strings")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList TokenStrings { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("meta")] + public global::G.ApiMeta? Meta { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse10.g.verified.cs new file mode 100644 index 0000000000..ddeca9eeb2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.TokenizeResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class TokenizeResponse10 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse11.g.verified.cs new file mode 100644 index 0000000000..b6ec57ccf0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.TokenizeResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class TokenizeResponse11 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse12.g.verified.cs new file mode 100644 index 0000000000..6ad9b25c46 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.TokenizeResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class TokenizeResponse12 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse13.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse13.g.verified.cs new file mode 100644 index 0000000000..1553331a7c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse13.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.TokenizeResponse13.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class TokenizeResponse13 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse2.g.verified.cs new file mode 100644 index 0000000000..e99b856f1c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.TokenizeResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class TokenizeResponse2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse3.g.verified.cs new file mode 100644 index 0000000000..cfdd8e3a29 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.TokenizeResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class TokenizeResponse3 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse4.g.verified.cs new file mode 100644 index 0000000000..f52d02a87b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.TokenizeResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class TokenizeResponse4 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse5.g.verified.cs new file mode 100644 index 0000000000..7c0a2264e5 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.TokenizeResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class TokenizeResponse5 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse6.g.verified.cs new file mode 100644 index 0000000000..9547e4a6dc --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.TokenizeResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class TokenizeResponse6 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse7.g.verified.cs new file mode 100644 index 0000000000..086fd560f7 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.TokenizeResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class TokenizeResponse7 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse8.g.verified.cs new file mode 100644 index 0000000000..fb5ccbdf57 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.TokenizeResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class TokenizeResponse8 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse9.g.verified.cs new file mode 100644 index 0000000000..c9b65a48a2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TokenizeResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.TokenizeResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class TokenizeResponse9 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Tool.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Tool.g.verified.cs new file mode 100644 index 0000000000..1ed50d8b81 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Tool.g.verified.cs @@ -0,0 +1,47 @@ +//HintName: G.Models.Tool.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Tool + { + /// + /// The name of the tool to be called. Valid names contain only the characters `a-z`, `A-Z`, `0-9`, `_` and must not begin with a digit. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// The description of what the tool does, the model uses the description to choose when and how to call the function. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Description { get; set; } + + /// + /// The input parameters of the tool. Accepts a dictionary where the key is the name of the parameter and the value is the parameter spec. Valid parameter names contain only the characters `a-z`, `A-Z`, `0-9`, `_` and must not begin with a digit.
+ /// ```
+ /// {
+ /// "my_param": {
+ /// "description": <string>,
+ /// "type": <string>, // any python data type, such as 'str', 'bool'
+ /// "required": <boolean>
+ /// }
+ /// }
+ /// ``` + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("parameter_definitions")] + public global::G.ToolParameterDefinitions? ParameterDefinitions { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Tool2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Tool2.g.verified.cs new file mode 100644 index 0000000000..956b34e8ea --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Tool2.g.verified.cs @@ -0,0 +1,31 @@ +//HintName: G.Models.Tool2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Tool2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.Tool2TypeJsonConverter))] + public global::G.Tool2Type? Type { get; set; } + + /// + /// The function to be executed. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("function")] + public global::G.Tool2Function? Function { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Tool2Function.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Tool2Function.g.verified.cs new file mode 100644 index 0000000000..154e50afdd --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Tool2Function.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.Tool2Function.g.cs + +#nullable enable + +namespace G +{ + /// + /// The function to be executed. + /// + public sealed partial class Tool2Function + { + /// + /// The name of the function. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } + + /// + /// The description of the function. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + public string? Description { get; set; } + + /// + /// The parameters of the function as a JSON schema. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("parameters")] + public global::G.Tool2FunctionParameters? Parameters { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Tool2FunctionParameters.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Tool2FunctionParameters.g.verified.cs new file mode 100644 index 0000000000..34ce950377 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Tool2FunctionParameters.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.Tool2FunctionParameters.g.cs + +#nullable enable + +namespace G +{ + /// + /// The parameters of the function as a JSON schema. + /// + public sealed partial class Tool2FunctionParameters + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Tool2Type.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Tool2Type.g.verified.cs new file mode 100644 index 0000000000..719a9611f9 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Tool2Type.g.verified.cs @@ -0,0 +1,46 @@ +//HintName: G.Models.Tool2Type.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public enum Tool2Type + { + /// + /// + /// + Function, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class Tool2TypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this Tool2Type value) + { + return value switch + { + Tool2Type.Function => "function", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static Tool2Type? ToEnum(string value) + { + return value switch + { + "function" => Tool2Type.Function, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolCall.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolCall.g.verified.cs new file mode 100644 index 0000000000..2ac0d9b224 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolCall.g.verified.cs @@ -0,0 +1,32 @@ +//HintName: G.Models.ToolCall.g.cs + +#nullable enable + +namespace G +{ + /// + /// Contains the tool calls generated by the model. Use it to invoke your tools. + /// + public sealed partial class ToolCall + { + /// + /// Name of the tool to call. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// The name and value of the parameters to use when invoking a tool. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("parameters")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.ToolCallParameters Parameters { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolCall2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolCall2.g.verified.cs new file mode 100644 index 0000000000..a3c5ee2428 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolCall2.g.verified.cs @@ -0,0 +1,37 @@ +//HintName: G.Models.ToolCall2.g.cs + +#nullable enable + +namespace G +{ + /// + /// A array of tool calls to be made. + /// + public sealed partial class ToolCall2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public string? Id { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.ToolCall2TypeJsonConverter))] + public global::G.ToolCall2Type? Type { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("function")] + public global::G.ToolCall2Function? Function { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolCall2Function.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolCall2Function.g.verified.cs new file mode 100644 index 0000000000..fa8f5f4c1a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolCall2Function.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.ToolCall2Function.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ToolCall2Function + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("arguments")] + public string? Arguments { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolCall2Type.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolCall2Type.g.verified.cs new file mode 100644 index 0000000000..46204d21f2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolCall2Type.g.verified.cs @@ -0,0 +1,46 @@ +//HintName: G.Models.ToolCall2Type.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public enum ToolCall2Type + { + /// + /// + /// + Function, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ToolCall2TypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ToolCall2Type value) + { + return value switch + { + ToolCall2Type.Function => "function", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ToolCall2Type? ToEnum(string value) + { + return value switch + { + "function" => ToolCall2Type.Function, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolCallDelta.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolCallDelta.g.verified.cs new file mode 100644 index 0000000000..3285a92033 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolCallDelta.g.verified.cs @@ -0,0 +1,42 @@ +//HintName: G.Models.ToolCallDelta.g.cs + +#nullable enable + +namespace G +{ + /// + /// Contains the chunk of the tool call generation in the stream. + /// + public sealed partial class ToolCallDelta + { + /// + /// Name of the tool call + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } + + /// + /// Index of the tool call generated + /// + [global::System.Text.Json.Serialization.JsonPropertyName("index")] + public double Index { get; set; } + + /// + /// Chunk of the tool parameters + /// + [global::System.Text.Json.Serialization.JsonPropertyName("parameters")] + public string? Parameters { get; set; } + + /// + /// Chunk of the tool plan text + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + public string? Text { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolCallParameters.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolCallParameters.g.verified.cs new file mode 100644 index 0000000000..54ada1993f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolCallParameters.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.ToolCallParameters.g.cs + +#nullable enable + +namespace G +{ + /// + /// The name and value of the parameters to use when invoking a tool. + /// + public sealed partial class ToolCallParameters + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolContent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolContent.g.verified.cs new file mode 100644 index 0000000000..645495305f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolContent.g.verified.cs @@ -0,0 +1,32 @@ +//HintName: G.Models.ToolContent.g.cs + +#nullable enable + +namespace G +{ + /// + /// Tool content result object + /// + public sealed partial class ToolContent + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.ToolContentTypeJsonConverter))] + public global::G.ToolContentType Type { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("output")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.ToolContentOutput Output { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolContentOutput.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolContentOutput.g.verified.cs new file mode 100644 index 0000000000..18e8cd4c57 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolContentOutput.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.ToolContentOutput.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ToolContentOutput + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolContentType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolContentType.g.verified.cs new file mode 100644 index 0000000000..9f359a762c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolContentType.g.verified.cs @@ -0,0 +1,46 @@ +//HintName: G.Models.ToolContentType.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public enum ToolContentType + { + /// + /// + /// + ToolResultObject, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ToolContentTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ToolContentType value) + { + return value switch + { + ToolContentType.ToolResultObject => "tool_result_object", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ToolContentType? ToEnum(string value) + { + return value switch + { + "tool_result_object" => ToolContentType.ToolResultObject, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolMessage.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolMessage.g.verified.cs new file mode 100644 index 0000000000..600c2f897a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolMessage.g.verified.cs @@ -0,0 +1,32 @@ +//HintName: G.Models.ToolMessage.g.cs + +#nullable enable + +namespace G +{ + /// + /// Represents tool result in the chat history. + /// + public sealed partial class ToolMessage + { + /// + /// One of `CHATBOT`, `SYSTEM`, `TOOL` or `USER` to identify who the message is coming from. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("role")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.ChatRoleJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.ChatRole Role { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tool_results")] + public global::System.Collections.Generic.IList? ToolResults { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolMessage2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolMessage2.g.verified.cs new file mode 100644 index 0000000000..aae6af41ce --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolMessage2.g.verified.cs @@ -0,0 +1,41 @@ +//HintName: G.Models.ToolMessage2.g.cs + +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// A message from the system. + /// + public sealed partial class ToolMessage2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("role")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.ToolMessage2RoleJsonConverter))] + public global::G.ToolMessage2Role Role { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tool_call_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ToolCallId { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tool_content")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList> ToolContent { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolMessage2Role.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolMessage2Role.g.verified.cs new file mode 100644 index 0000000000..3560ea8e29 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolMessage2Role.g.verified.cs @@ -0,0 +1,46 @@ +//HintName: G.Models.ToolMessage2Role.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public enum ToolMessage2Role + { + /// + /// + /// + Tool, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ToolMessage2RoleExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ToolMessage2Role value) + { + return value switch + { + ToolMessage2Role.Tool => "tool", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ToolMessage2Role? ToEnum(string value) + { + return value switch + { + "tool" => ToolMessage2Role.Tool, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolParameterDefinitions.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolParameterDefinitions.g.verified.cs new file mode 100644 index 0000000000..deba9df776 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolParameterDefinitions.g.verified.cs @@ -0,0 +1,28 @@ +//HintName: G.Models.ToolParameterDefinitions.g.cs + +#nullable enable + +namespace G +{ + /// + /// The input parameters of the tool. Accepts a dictionary where the key is the name of the parameter and the value is the parameter spec. Valid parameter names contain only the characters `a-z`, `A-Z`, `0-9`, `_` and must not begin with a digit.
+ /// ```
+ /// {
+ /// "my_param": {
+ /// "description": <string>,
+ /// "type": <string>, // any python data type, such as 'str', 'bool'
+ /// "required": <boolean>
+ /// }
+ /// }
+ /// ``` + ///
+ public sealed partial class ToolParameterDefinitions + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolResult.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolResult.g.verified.cs new file mode 100644 index 0000000000..64f973a64c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolResult.g.verified.cs @@ -0,0 +1,32 @@ +//HintName: G.Models.ToolResult.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ToolResult + { + /// + /// Contains the tool calls generated by the model. Use it to invoke your tools. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("call")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.ToolCall Call { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("outputs")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Outputs { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolResultOutput.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolResultOutput.g.verified.cs new file mode 100644 index 0000000000..da4b362484 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolResultOutput.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.ToolResultOutput.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ToolResultOutput + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolSource.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolSource.g.verified.cs new file mode 100644 index 0000000000..d30fa83191 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolSource.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.ToolSource.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ToolSource + { + /// + /// The unique identifier of the document + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public string? Id { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tool_output")] + public global::G.ToolSourceToolOutput? ToolOutput { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolSourceToolOutput.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolSourceToolOutput.g.verified.cs new file mode 100644 index 0000000000..f9cd692105 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ToolSourceToolOutput.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.ToolSourceToolOutput.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ToolSourceToolOutput + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TrainingStepMetrics.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TrainingStepMetrics.g.verified.cs new file mode 100644 index 0000000000..82a1920fac --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TrainingStepMetrics.g.verified.cs @@ -0,0 +1,36 @@ +//HintName: G.Models.TrainingStepMetrics.g.cs + +#nullable enable + +namespace G +{ + /// + /// The evaluation metrics at a given step of the training of a fine-tuned model. + /// + public sealed partial class TrainingStepMetrics + { + /// + /// Creation timestamp. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + public global::System.DateTime CreatedAt { get; set; } + + /// + /// Step number. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("step_number")] + public int StepNumber { get; set; } + + /// + /// Map of names and values for each evaluation metrics. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("metrics")] + public global::G.TrainingStepMetricsMetrics? Metrics { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TrainingStepMetricsMetrics.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TrainingStepMetricsMetrics.g.verified.cs new file mode 100644 index 0000000000..8e790292bd --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.TrainingStepMetricsMetrics.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.TrainingStepMetricsMetrics.g.cs + +#nullable enable + +namespace G +{ + /// + /// Map of names and values for each evaluation metrics. + /// + public sealed partial class TrainingStepMetricsMetrics + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateClusterJobRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateClusterJobRequest.g.verified.cs new file mode 100644 index 0000000000..58ad452d2b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateClusterJobRequest.g.verified.cs @@ -0,0 +1,61 @@ +//HintName: G.Models.UpdateClusterJobRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UpdateClusterJobRequest + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.UpdateClusterJobRequestStatusJsonConverter))] + public global::G.UpdateClusterJobRequestStatus? Status { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("clusters")] + public global::System.Collections.Generic.IList? Clusters { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("output_clusters_gs_path")] + public string? OutputClustersGsPath { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("output_outliers_gs_path")] + public string? OutputOutliersGsPath { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("error")] + public string? Error { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("input_tracking_metrics")] + public global::G.UpdateClusterJobRequestInputTrackingMetrics? InputTrackingMetrics { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("output_tracking_metrics")] + public global::G.UpdateClusterJobRequestOutputTrackingMetrics? OutputTrackingMetrics { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateClusterJobRequestInputTrackingMetrics.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateClusterJobRequestInputTrackingMetrics.g.verified.cs new file mode 100644 index 0000000000..828455ef39 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateClusterJobRequestInputTrackingMetrics.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.UpdateClusterJobRequestInputTrackingMetrics.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UpdateClusterJobRequestInputTrackingMetrics + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateClusterJobRequestOutputTrackingMetrics.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateClusterJobRequestOutputTrackingMetrics.g.verified.cs new file mode 100644 index 0000000000..f490b050ce --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateClusterJobRequestOutputTrackingMetrics.g.verified.cs @@ -0,0 +1,19 @@ +//HintName: G.Models.UpdateClusterJobRequestOutputTrackingMetrics.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UpdateClusterJobRequestOutputTrackingMetrics + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateClusterJobRequestStatus.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateClusterJobRequestStatus.g.verified.cs new file mode 100644 index 0000000000..3594b4253c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateClusterJobRequestStatus.g.verified.cs @@ -0,0 +1,70 @@ +//HintName: G.Models.UpdateClusterJobRequestStatus.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public enum UpdateClusterJobRequestStatus + { + /// + /// + /// + Unknown, + /// + /// + /// + Processing, + /// + /// + /// + Failed, + /// + /// + /// + Complete, + /// + /// + /// + Queued, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UpdateClusterJobRequestStatusExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UpdateClusterJobRequestStatus value) + { + return value switch + { + UpdateClusterJobRequestStatus.Unknown => "unknown", + UpdateClusterJobRequestStatus.Processing => "processing", + UpdateClusterJobRequestStatus.Failed => "failed", + UpdateClusterJobRequestStatus.Complete => "complete", + UpdateClusterJobRequestStatus.Queued => "queued", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UpdateClusterJobRequestStatus? ToEnum(string value) + { + return value switch + { + "unknown" => UpdateClusterJobRequestStatus.Unknown, + "processing" => UpdateClusterJobRequestStatus.Processing, + "failed" => UpdateClusterJobRequestStatus.Failed, + "complete" => UpdateClusterJobRequestStatus.Complete, + "queued" => UpdateClusterJobRequestStatus.Queued, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateClusterJobResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateClusterJobResponse.g.verified.cs new file mode 100644 index 0000000000..c09ffd76af --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateClusterJobResponse.g.verified.cs @@ -0,0 +1,25 @@ +//HintName: G.Models.UpdateClusterJobResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// Response for updating a cluster job. + /// + public sealed partial class UpdateClusterJobResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("job_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string JobId { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorRequest.g.verified.cs new file mode 100644 index 0000000000..ca3e638f59 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorRequest.g.verified.cs @@ -0,0 +1,60 @@ +//HintName: G.Models.UpdateConnectorRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UpdateConnectorRequest + { + /// + /// A human-readable name for the connector. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } + + /// + /// The URL of the connector that will be used to search for documents. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("url")] + public string? Url { get; set; } + + /// + /// A list of fields to exclude from the prompt (fields remain in the document). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("excludes")] + public global::System.Collections.Generic.IList? Excludes { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("oauth")] + public global::G.CreateConnectorOAuth? Oauth { get; set; } + + /// + /// Default Value: true + /// + [global::System.Text.Json.Serialization.JsonPropertyName("active")] + public bool Active { get; set; } = true; + + /// + /// Default Value: false + /// + [global::System.Text.Json.Serialization.JsonPropertyName("continue_on_failure")] + public bool ContinueOnFailure { get; set; } = false; + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("service_auth")] + public global::G.CreateConnectorServiceAuth? ServiceAuth { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse.g.verified.cs new file mode 100644 index 0000000000..e014b1950d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse.g.verified.cs @@ -0,0 +1,26 @@ +//HintName: G.Models.UpdateConnectorResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UpdateConnectorResponse + { + /// + /// A connector allows you to integrate data sources with the '/chat' endpoint to create grounded generations with citations to the data source.
+ /// documents to help answer users. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("connector")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.Connector Connector { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse10.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse10.g.verified.cs new file mode 100644 index 0000000000..2f91d7396b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse10.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.UpdateConnectorResponse10.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UpdateConnectorResponse10 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse11.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse11.g.verified.cs new file mode 100644 index 0000000000..1ce5194289 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse11.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.UpdateConnectorResponse11.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UpdateConnectorResponse11 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse12.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse12.g.verified.cs new file mode 100644 index 0000000000..6a6059437f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse12.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.UpdateConnectorResponse12.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UpdateConnectorResponse12 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse13.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse13.g.verified.cs new file mode 100644 index 0000000000..38d6ce60ce --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse13.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.UpdateConnectorResponse13.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UpdateConnectorResponse13 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse2.g.verified.cs new file mode 100644 index 0000000000..ea170c8c0e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse2.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.UpdateConnectorResponse2.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UpdateConnectorResponse2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse3.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse3.g.verified.cs new file mode 100644 index 0000000000..4a5248d3f5 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse3.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.UpdateConnectorResponse3.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UpdateConnectorResponse3 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse4.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse4.g.verified.cs new file mode 100644 index 0000000000..1a863000ab --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse4.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.UpdateConnectorResponse4.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UpdateConnectorResponse4 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse5.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse5.g.verified.cs new file mode 100644 index 0000000000..35c1bcd822 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse5.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.UpdateConnectorResponse5.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UpdateConnectorResponse5 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse6.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse6.g.verified.cs new file mode 100644 index 0000000000..0561fe5a5a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse6.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.UpdateConnectorResponse6.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UpdateConnectorResponse6 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse7.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse7.g.verified.cs new file mode 100644 index 0000000000..fc83526831 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse7.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.UpdateConnectorResponse7.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UpdateConnectorResponse7 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse8.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse8.g.verified.cs new file mode 100644 index 0000000000..7586c93532 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse8.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.UpdateConnectorResponse8.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UpdateConnectorResponse8 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse9.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse9.g.verified.cs new file mode 100644 index 0000000000..e82e8dcee5 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateConnectorResponse9.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.UpdateConnectorResponse9.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UpdateConnectorResponse9 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateFinetunedModelRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateFinetunedModelRequest.g.verified.cs new file mode 100644 index 0000000000..6a540d2a3a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateFinetunedModelRequest.g.verified.cs @@ -0,0 +1,85 @@ +//HintName: G.Models.UpdateFinetunedModelRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UpdateFinetunedModelRequest + { + /// + /// FinetunedModel name (e.g. `foobar`). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// User ID of the creator. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("creator_id")] + public string? CreatorId { get; set; } + + /// + /// Organization ID. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("organization_id")] + public string? OrganizationId { get; set; } + + /// + /// The configuration used for fine-tuning. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("settings")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::G.Settings Settings { get; set; } + + /// + /// The possible stages of a fine-tuned model life-cycle.
+ /// - STATUS_UNSPECIFIED: Unspecified status.
+ /// - STATUS_FINETUNING: The fine-tuned model is being fine-tuned.
+ /// - STATUS_DEPLOYING_API: The fine-tuned model is being deployed.
+ /// - STATUS_READY: The fine-tuned model is ready to receive requests.
+ /// - STATUS_FAILED: The fine-tuned model failed.
+ /// - STATUS_DELETED: The fine-tuned model was deleted.
+ /// - STATUS_TEMPORARILY_OFFLINE: The fine-tuned model is temporarily unavailable.
+ /// - STATUS_PAUSED: The fine-tuned model is paused (Vanilla only).
+ /// - STATUS_QUEUED: The fine-tuned model is queued for training.
+ /// Default Value: STATUS_UNSPECIFIED + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.StatusJsonConverter))] + public global::G.Status? Status { get; set; } = global::G.Status.STATUSUNSPECIFIED; + + /// + /// Creation timestamp. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + public global::System.DateTime CreatedAt { get; set; } + + /// + /// Latest update timestamp. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("updated_at")] + public global::System.DateTime UpdatedAt { get; set; } + + /// + /// Timestamp for the completed fine-tuning. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("completed_at")] + public global::System.DateTime CompletedAt { get; set; } + + /// + /// Timestamp for the latest request to this fine-tuned model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("last_used")] + public global::System.DateTime LastUsed { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateFinetunedModelResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateFinetunedModelResponse.g.verified.cs new file mode 100644 index 0000000000..f3cfeb325d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UpdateFinetunedModelResponse.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.UpdateFinetunedModelResponse.g.cs + +#nullable enable + +namespace G +{ + /// + /// Response to a request to update a fine-tuned model. + /// + public sealed partial class UpdateFinetunedModelResponse + { + /// + /// This resource represents a fine-tuned model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("finetuned_model")] + public global::G.FinetunedModel? FinetunedModel { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Usage.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Usage.g.verified.cs new file mode 100644 index 0000000000..0d2041b9cb --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.Usage.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.Usage.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class Usage + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("billed_units")] + public global::G.UsageBilledUnits? BilledUnits { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tokens")] + public global::G.UsageTokens? Tokens { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UsageBilledUnits.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UsageBilledUnits.g.verified.cs new file mode 100644 index 0000000000..0d80b0e2d2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UsageBilledUnits.g.verified.cs @@ -0,0 +1,42 @@ +//HintName: G.Models.UsageBilledUnits.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UsageBilledUnits + { + /// + /// The number of billed input tokens. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("input_tokens")] + public double InputTokens { get; set; } + + /// + /// The number of billed output tokens. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("output_tokens")] + public double OutputTokens { get; set; } + + /// + /// The number of billed search units. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("search_units")] + public double SearchUnits { get; set; } + + /// + /// The number of billed classifications units. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("classifications")] + public double Classifications { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UsageTokens.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UsageTokens.g.verified.cs new file mode 100644 index 0000000000..f0c961823f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UsageTokens.g.verified.cs @@ -0,0 +1,30 @@ +//HintName: G.Models.UsageTokens.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class UsageTokens + { + /// + /// The number of tokens used as input to the model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("input_tokens")] + public double InputTokens { get; set; } + + /// + /// The number of tokens produced by the model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("output_tokens")] + public double OutputTokens { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UserMessage.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UserMessage.g.verified.cs new file mode 100644 index 0000000000..7a864fa35c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UserMessage.g.verified.cs @@ -0,0 +1,42 @@ +//HintName: G.Models.UserMessage.g.cs + +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// A message from the user. + /// + public sealed partial class UserMessage + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("role")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.UserMessageRoleJsonConverter))] + public global::G.UserMessageRole Role { get; set; } + + /// + /// The content of the message. This can be a string or a list of content blocks.
+ /// If a string is provided, it will be treated as a text content block. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("content")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.OneOfJsonConverterFactory2))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.OneOf> Content { get; set; } + + /// + /// Documents seen by the model when generating the reply. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("documents")] + public global::System.Collections.Generic.IList? Documents { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UserMessageRole.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UserMessageRole.g.verified.cs new file mode 100644 index 0000000000..3e6711f27f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.UserMessageRole.g.verified.cs @@ -0,0 +1,46 @@ +//HintName: G.Models.UserMessageRole.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public enum UserMessageRole + { + /// + /// + /// + User, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UserMessageRoleExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UserMessageRole value) + { + return value switch + { + UserMessageRole.User => "user", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UserMessageRole? ToEnum(string value) + { + return value switch + { + "user" => UserMessageRole.User, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.WandbConfig.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.WandbConfig.g.verified.cs new file mode 100644 index 0000000000..00b4750740 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.WandbConfig.g.verified.cs @@ -0,0 +1,38 @@ +//HintName: G.Models.WandbConfig.g.cs + +#nullable enable + +namespace G +{ + /// + /// The Weights & Biases configuration. + /// + public sealed partial class WandbConfig + { + /// + /// The WandB project name to be used during training. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("project")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Project { get; set; } + + /// + /// The WandB API key to be used during training. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("api_key")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ApiKey { get; set; } + + /// + /// The WandB entity name to be used during training. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("entity")] + public string? Entity { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.ModelsClient.GetModel.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.ModelsClient.GetModel.g.verified.cs new file mode 100644 index 0000000000..638fb9f022 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.ModelsClient.GetModel.g.verified.cs @@ -0,0 +1,99 @@ +//HintName: G.ModelsClient.GetModel.g.cs + +#nullable enable + +namespace G +{ + public partial class ModelsClient + { + partial void PrepareGetModelArguments( + global::System.Net.Http.HttpClient httpClient, + ref string model, + ref string? xClientName); + partial void PrepareGetModelRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string model, + string? xClientName); + partial void ProcessGetModelResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetModelResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get a Model
+ /// Returns the details of a model, provided its name. + ///
+ /// + /// Example: command-r + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GetModelAsync( + string model, + string? xClientName, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareGetModelArguments( + httpClient: _httpClient, + model: ref model, + xClientName: ref xClientName); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/models/{model}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareGetModelRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + model: model, + xClientName: xClientName); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessGetModelResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessGetModelResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.ModelsClient.ListModels.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.ModelsClient.ListModels.g.verified.cs new file mode 100644 index 0000000000..b4847d7820 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.ModelsClient.ListModels.g.verified.cs @@ -0,0 +1,111 @@ +//HintName: G.ModelsClient.ListModels.g.cs + +#nullable enable + +namespace G +{ + public partial class ModelsClient + { + partial void PrepareListModelsArguments( + global::System.Net.Http.HttpClient httpClient, + ref double pageSize, + ref string? pageToken, + ref global::G.CompatibleEndpoint? endpoint, + ref bool defaultOnly); + partial void PrepareListModelsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + double pageSize, + string? pageToken, + global::G.CompatibleEndpoint? endpoint, + bool defaultOnly); + partial void ProcessListModelsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListModelsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// List Models
+ /// Returns a list of models available for use. The list contains models from Cohere as well as your fine-tuned models. + ///
+ /// + /// + /// + /// One of the Cohere API endpoints that the model can be used with. + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ListModelsAsync( + double pageSize, + string? pageToken, + global::G.CompatibleEndpoint? endpoint, + bool defaultOnly, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: _httpClient); + PrepareListModelsArguments( + httpClient: _httpClient, + pageSize: ref pageSize, + pageToken: ref pageToken, + endpoint: ref endpoint, + defaultOnly: ref defaultOnly); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/models?page_size={pageSize}&page_token={pageToken}&endpoint={endpoint}&default_only={defaultOnly}", global::System.UriKind.RelativeOrAbsolute)); + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareListModelsRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + pageSize: pageSize, + pageToken: pageToken, + endpoint: endpoint, + defaultOnly: defaultOnly); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessListModelsResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessListModelsResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.ModelsClient.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.ModelsClient.g.verified.cs new file mode 100644 index 0000000000..721b5ec593 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.ModelsClient.g.verified.cs @@ -0,0 +1,60 @@ +//HintName: G.ModelsClient.g.cs + +#nullable enable + +namespace G +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class ModelsClient : global::System.IDisposable + { + /// + /// production + /// + public const string BaseUrl = "https://api.cohere.com"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::System.Text.Json.JsonSerializerOptions _jsonSerializerOptions; + + + /// + /// Creates a new instance of the ModelsClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public ModelsClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::System.Text.Json.JsonSerializerOptions(); + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Polyfills.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Polyfills.g.verified.cs new file mode 100644 index 0000000000..241c8bfd80 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Polyfills.g.verified.cs @@ -0,0 +1,54 @@ +//HintName: G.Polyfills.g.cs + +#if !NET6_0_OR_GREATER +#nullable enable + +namespace G +{ + /// + /// + /// + public static partial class OpenApiGeneratorPolyfills + { + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsStringAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsStringAsync(); + } + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsStreamAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsStreamAsync(); + } + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsByteArrayAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsByteArrayAsync(); + } + } +} +#endif \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.AssistantMessageResponseRole.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.AssistantMessageResponseRole.g.verified.cs new file mode 100644 index 0000000000..65cecc8bb0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.AssistantMessageResponseRole.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.AssistantMessageResponseRole.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class AssistantMessageResponseRoleJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.AssistantMessageResponseRole Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.AssistantMessageResponseRoleExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.AssistantMessageResponseRole)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.AssistantMessageResponseRole value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.AssistantMessageResponseRoleExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.AssistantMessageResponseRoleNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.AssistantMessageResponseRoleNullable.g.verified.cs new file mode 100644 index 0000000000..04a2bcbbbb --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.AssistantMessageResponseRoleNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.AssistantMessageResponseRoleNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class AssistantMessageResponseRoleNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.AssistantMessageResponseRole? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.AssistantMessageResponseRoleExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.AssistantMessageResponseRole)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.AssistantMessageResponseRole? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.AssistantMessageResponseRoleExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.AssistantMessageRole.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.AssistantMessageRole.g.verified.cs new file mode 100644 index 0000000000..49977e65b2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.AssistantMessageRole.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.AssistantMessageRole.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class AssistantMessageRoleJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.AssistantMessageRole Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.AssistantMessageRoleExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.AssistantMessageRole)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.AssistantMessageRole value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.AssistantMessageRoleExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.AssistantMessageRoleNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.AssistantMessageRoleNullable.g.verified.cs new file mode 100644 index 0000000000..c273b8d01c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.AssistantMessageRoleNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.AssistantMessageRoleNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class AssistantMessageRoleNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.AssistantMessageRole? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.AssistantMessageRoleExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.AssistantMessageRole)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.AssistantMessageRole? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.AssistantMessageRoleExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.AuthTokenType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.AuthTokenType.g.verified.cs new file mode 100644 index 0000000000..f4455b0920 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.AuthTokenType.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.AuthTokenType.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class AuthTokenTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.AuthTokenType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.AuthTokenTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.AuthTokenType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.AuthTokenType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.AuthTokenTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.AuthTokenTypeNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.AuthTokenTypeNullable.g.verified.cs new file mode 100644 index 0000000000..7af8f7aa26 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.AuthTokenTypeNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.AuthTokenTypeNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class AuthTokenTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.AuthTokenType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.AuthTokenTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.AuthTokenType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.AuthTokenType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.AuthTokenTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.BaseType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.BaseType.g.verified.cs new file mode 100644 index 0000000000..7ba1e62c5a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.BaseType.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.BaseType.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class BaseTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.BaseType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.BaseTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.BaseType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.BaseType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.BaseTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.BaseTypeNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.BaseTypeNullable.g.verified.cs new file mode 100644 index 0000000000..ffcb9a35aa --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.BaseTypeNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.BaseTypeNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class BaseTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.BaseType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.BaseTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.BaseType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.BaseType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.BaseTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatCitationGenerationEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatCitationGenerationEvent.g.verified.cs new file mode 100644 index 0000000000..98e2a63739 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatCitationGenerationEvent.g.verified.cs @@ -0,0 +1,74 @@ +//HintName: JsonConverters.ChatCitationGenerationEvent.g.cs +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenApiGenerator.JsonConverters +{ + /// + public class ChatCitationGenerationEventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ChatCitationGenerationEvent Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + var + readerCopy = reader; + global::G.ChatStreamEvent? value1 = default; + try + { + value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.ChatCitationGenerationEventVariant2? value2 = default; + try + { + value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::G.ChatCitationGenerationEvent( + value1, + value2 + ); + + if (value1 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (value2 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ChatCitationGenerationEvent value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + if (value.IsValue1) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeof(global::G.ChatStreamEvent), options); + } + else if (value.IsValue2) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeof(global::G.ChatCitationGenerationEventVariant2), options); + } + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatContentDeltaEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatContentDeltaEvent.g.verified.cs new file mode 100644 index 0000000000..01e2544bf4 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatContentDeltaEvent.g.verified.cs @@ -0,0 +1,74 @@ +//HintName: JsonConverters.ChatContentDeltaEvent.g.cs +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenApiGenerator.JsonConverters +{ + /// + public class ChatContentDeltaEventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ChatContentDeltaEvent Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + var + readerCopy = reader; + global::G.ChatStreamEventType? value1 = default; + try + { + value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.ChatContentDeltaEventVariant2? value2 = default; + try + { + value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::G.ChatContentDeltaEvent( + value1, + value2 + ); + + if (value1 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (value2 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ChatContentDeltaEvent value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + if (value.IsValue1) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeof(global::G.ChatStreamEventType), options); + } + else if (value.IsValue2) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeof(global::G.ChatContentDeltaEventVariant2), options); + } + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatContentEndEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatContentEndEvent.g.verified.cs new file mode 100644 index 0000000000..f4599d5788 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatContentEndEvent.g.verified.cs @@ -0,0 +1,74 @@ +//HintName: JsonConverters.ChatContentEndEvent.g.cs +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenApiGenerator.JsonConverters +{ + /// + public class ChatContentEndEventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ChatContentEndEvent Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + var + readerCopy = reader; + global::G.ChatStreamEventType? value1 = default; + try + { + value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.ChatContentEndEventVariant2? value2 = default; + try + { + value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::G.ChatContentEndEvent( + value1, + value2 + ); + + if (value1 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (value2 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ChatContentEndEvent value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + if (value.IsValue1) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeof(global::G.ChatStreamEventType), options); + } + else if (value.IsValue2) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeof(global::G.ChatContentEndEventVariant2), options); + } + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatContentStartEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatContentStartEvent.g.verified.cs new file mode 100644 index 0000000000..d951fe6aa0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatContentStartEvent.g.verified.cs @@ -0,0 +1,74 @@ +//HintName: JsonConverters.ChatContentStartEvent.g.cs +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenApiGenerator.JsonConverters +{ + /// + public class ChatContentStartEventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ChatContentStartEvent Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + var + readerCopy = reader; + global::G.ChatStreamEventType? value1 = default; + try + { + value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.ChatContentStartEventVariant2? value2 = default; + try + { + value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::G.ChatContentStartEvent( + value1, + value2 + ); + + if (value1 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (value2 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ChatContentStartEvent value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + if (value.IsValue1) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeof(global::G.ChatStreamEventType), options); + } + else if (value.IsValue2) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeof(global::G.ChatContentStartEventVariant2), options); + } + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatContentStartEventVariant2DeltaMessageContentType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatContentStartEventVariant2DeltaMessageContentType.g.verified.cs new file mode 100644 index 0000000000..55f0b02414 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatContentStartEventVariant2DeltaMessageContentType.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.ChatContentStartEventVariant2DeltaMessageContentType.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ChatContentStartEventVariant2DeltaMessageContentTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ChatContentStartEventVariant2DeltaMessageContentType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ChatContentStartEventVariant2DeltaMessageContentTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ChatContentStartEventVariant2DeltaMessageContentType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ChatContentStartEventVariant2DeltaMessageContentType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.ChatContentStartEventVariant2DeltaMessageContentTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatContentStartEventVariant2DeltaMessageContentTypeNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatContentStartEventVariant2DeltaMessageContentTypeNullable.g.verified.cs new file mode 100644 index 0000000000..4219fa2306 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatContentStartEventVariant2DeltaMessageContentTypeNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.ChatContentStartEventVariant2DeltaMessageContentTypeNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ChatContentStartEventVariant2DeltaMessageContentTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ChatContentStartEventVariant2DeltaMessageContentType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ChatContentStartEventVariant2DeltaMessageContentTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ChatContentStartEventVariant2DeltaMessageContentType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ChatContentStartEventVariant2DeltaMessageContentType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.ChatContentStartEventVariant2DeltaMessageContentTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatFinishReason.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatFinishReason.g.verified.cs new file mode 100644 index 0000000000..d0c2a2b035 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatFinishReason.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.ChatFinishReason.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ChatFinishReasonJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ChatFinishReason Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ChatFinishReasonExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ChatFinishReason)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ChatFinishReason value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.ChatFinishReasonExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatFinishReasonNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatFinishReasonNullable.g.verified.cs new file mode 100644 index 0000000000..2aad6cd544 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatFinishReasonNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.ChatFinishReasonNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ChatFinishReasonNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ChatFinishReason? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ChatFinishReasonExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ChatFinishReason)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ChatFinishReason? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.ChatFinishReasonExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatMessage2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatMessage2.g.verified.cs new file mode 100644 index 0000000000..acc4ad1c82 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatMessage2.g.verified.cs @@ -0,0 +1,112 @@ +//HintName: JsonConverters.ChatMessage2.g.cs +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenApiGenerator.JsonConverters +{ + /// + public class ChatMessage2JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ChatMessage2 Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + var + readerCopy = reader; + global::G.UserMessage? userMessage = default; + try + { + userMessage = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.AssistantMessage? assistantMessage = default; + try + { + assistantMessage = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.SystemMessage? systemMessage = default; + try + { + systemMessage = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.ToolMessage2? tool = default; + try + { + tool = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::G.ChatMessage2( + userMessage, + assistantMessage, + systemMessage, + tool + ); + + if (userMessage != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (assistantMessage != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (systemMessage != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (tool != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ChatMessage2 value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + if (value.IsUserMessage) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.UserMessage, typeof(global::G.UserMessage), options); + } + else if (value.IsAssistantMessage) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantMessage, typeof(global::G.AssistantMessage), options); + } + else if (value.IsSystemMessage) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.SystemMessage, typeof(global::G.SystemMessage), options); + } + else if (value.IsTool) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Tool, typeof(global::G.ToolMessage2), options); + } + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatMessageEndEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatMessageEndEvent.g.verified.cs new file mode 100644 index 0000000000..66109f1435 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatMessageEndEvent.g.verified.cs @@ -0,0 +1,74 @@ +//HintName: JsonConverters.ChatMessageEndEvent.g.cs +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenApiGenerator.JsonConverters +{ + /// + public class ChatMessageEndEventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ChatMessageEndEvent Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + var + readerCopy = reader; + global::G.ChatStreamEventType? value1 = default; + try + { + value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.ChatMessageEndEventVariant2? value2 = default; + try + { + value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::G.ChatMessageEndEvent( + value1, + value2 + ); + + if (value1 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (value2 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ChatMessageEndEvent value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + if (value.IsValue1) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeof(global::G.ChatStreamEventType), options); + } + else if (value.IsValue2) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeof(global::G.ChatMessageEndEventVariant2), options); + } + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatMessageStartEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatMessageStartEvent.g.verified.cs new file mode 100644 index 0000000000..4574dc0f64 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatMessageStartEvent.g.verified.cs @@ -0,0 +1,74 @@ +//HintName: JsonConverters.ChatMessageStartEvent.g.cs +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenApiGenerator.JsonConverters +{ + /// + public class ChatMessageStartEventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ChatMessageStartEvent Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + var + readerCopy = reader; + global::G.ChatStreamEventType? value1 = default; + try + { + value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.ChatMessageStartEventVariant2? value2 = default; + try + { + value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::G.ChatMessageStartEvent( + value1, + value2 + ); + + if (value1 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (value2 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ChatMessageStartEvent value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + if (value.IsValue1) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeof(global::G.ChatStreamEventType), options); + } + else if (value.IsValue2) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeof(global::G.ChatMessageStartEventVariant2), options); + } + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatMessageStartEventVariant2DeltaMessageRole.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatMessageStartEventVariant2DeltaMessageRole.g.verified.cs new file mode 100644 index 0000000000..ba23e02373 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatMessageStartEventVariant2DeltaMessageRole.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.ChatMessageStartEventVariant2DeltaMessageRole.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ChatMessageStartEventVariant2DeltaMessageRoleJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ChatMessageStartEventVariant2DeltaMessageRole Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ChatMessageStartEventVariant2DeltaMessageRoleExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ChatMessageStartEventVariant2DeltaMessageRole)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ChatMessageStartEventVariant2DeltaMessageRole value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.ChatMessageStartEventVariant2DeltaMessageRoleExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatMessageStartEventVariant2DeltaMessageRoleNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatMessageStartEventVariant2DeltaMessageRoleNullable.g.verified.cs new file mode 100644 index 0000000000..b5261b14fa --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatMessageStartEventVariant2DeltaMessageRoleNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.ChatMessageStartEventVariant2DeltaMessageRoleNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ChatMessageStartEventVariant2DeltaMessageRoleNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ChatMessageStartEventVariant2DeltaMessageRole? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ChatMessageStartEventVariant2DeltaMessageRoleExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ChatMessageStartEventVariant2DeltaMessageRole)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ChatMessageStartEventVariant2DeltaMessageRole? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.ChatMessageStartEventVariant2DeltaMessageRoleExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatRequestCitationQuality.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatRequestCitationQuality.g.verified.cs new file mode 100644 index 0000000000..5207b89352 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatRequestCitationQuality.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.ChatRequestCitationQuality.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ChatRequestCitationQualityJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ChatRequestCitationQuality Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ChatRequestCitationQualityExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ChatRequestCitationQuality)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ChatRequestCitationQuality value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.ChatRequestCitationQualityExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatRequestCitationQualityNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatRequestCitationQualityNullable.g.verified.cs new file mode 100644 index 0000000000..f0098649af --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatRequestCitationQualityNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.ChatRequestCitationQualityNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ChatRequestCitationQualityNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ChatRequestCitationQuality? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ChatRequestCitationQualityExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ChatRequestCitationQuality)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ChatRequestCitationQuality? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.ChatRequestCitationQualityExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatRequestPromptTruncation.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatRequestPromptTruncation.g.verified.cs new file mode 100644 index 0000000000..46dfa647ab --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatRequestPromptTruncation.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.ChatRequestPromptTruncation.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ChatRequestPromptTruncationJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ChatRequestPromptTruncation Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ChatRequestPromptTruncationExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ChatRequestPromptTruncation)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ChatRequestPromptTruncation value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.ChatRequestPromptTruncationExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatRequestPromptTruncationNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatRequestPromptTruncationNullable.g.verified.cs new file mode 100644 index 0000000000..2ae3d84397 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatRequestPromptTruncationNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.ChatRequestPromptTruncationNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ChatRequestPromptTruncationNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ChatRequestPromptTruncation? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ChatRequestPromptTruncationExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ChatRequestPromptTruncation)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ChatRequestPromptTruncation? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.ChatRequestPromptTruncationExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatRole.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatRole.g.verified.cs new file mode 100644 index 0000000000..8ce392950e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatRole.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.ChatRole.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ChatRoleJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ChatRole Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ChatRoleExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ChatRole)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ChatRole value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.ChatRoleExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatRoleNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatRoleNullable.g.verified.cs new file mode 100644 index 0000000000..c17455a584 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatRoleNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.ChatRoleNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ChatRoleNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ChatRole? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ChatRoleExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ChatRole)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ChatRole? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.ChatRoleExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatSearchQueriesGenerationEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatSearchQueriesGenerationEvent.g.verified.cs new file mode 100644 index 0000000000..680669b7f5 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatSearchQueriesGenerationEvent.g.verified.cs @@ -0,0 +1,74 @@ +//HintName: JsonConverters.ChatSearchQueriesGenerationEvent.g.cs +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenApiGenerator.JsonConverters +{ + /// + public class ChatSearchQueriesGenerationEventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ChatSearchQueriesGenerationEvent Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + var + readerCopy = reader; + global::G.ChatStreamEvent? value1 = default; + try + { + value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.ChatSearchQueriesGenerationEventVariant2? value2 = default; + try + { + value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::G.ChatSearchQueriesGenerationEvent( + value1, + value2 + ); + + if (value1 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (value2 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ChatSearchQueriesGenerationEvent value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + if (value.IsValue1) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeof(global::G.ChatStreamEvent), options); + } + else if (value.IsValue2) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeof(global::G.ChatSearchQueriesGenerationEventVariant2), options); + } + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatSearchResultsEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatSearchResultsEvent.g.verified.cs new file mode 100644 index 0000000000..9fffd91214 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatSearchResultsEvent.g.verified.cs @@ -0,0 +1,74 @@ +//HintName: JsonConverters.ChatSearchResultsEvent.g.cs +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenApiGenerator.JsonConverters +{ + /// + public class ChatSearchResultsEventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ChatSearchResultsEvent Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + var + readerCopy = reader; + global::G.ChatStreamEvent? value1 = default; + try + { + value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.ChatSearchResultsEventVariant2? value2 = default; + try + { + value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::G.ChatSearchResultsEvent( + value1, + value2 + ); + + if (value1 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (value2 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ChatSearchResultsEvent value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + if (value.IsValue1) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeof(global::G.ChatStreamEvent), options); + } + else if (value.IsValue2) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeof(global::G.ChatSearchResultsEventVariant2), options); + } + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatStreamEndEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatStreamEndEvent.g.verified.cs new file mode 100644 index 0000000000..b34364d4e1 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatStreamEndEvent.g.verified.cs @@ -0,0 +1,74 @@ +//HintName: JsonConverters.ChatStreamEndEvent.g.cs +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenApiGenerator.JsonConverters +{ + /// + public class ChatStreamEndEventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ChatStreamEndEvent Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + var + readerCopy = reader; + global::G.ChatStreamEvent? value1 = default; + try + { + value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.ChatStreamEndEventVariant2? value2 = default; + try + { + value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::G.ChatStreamEndEvent( + value1, + value2 + ); + + if (value1 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (value2 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ChatStreamEndEvent value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + if (value.IsValue1) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeof(global::G.ChatStreamEvent), options); + } + else if (value.IsValue2) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeof(global::G.ChatStreamEndEventVariant2), options); + } + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatStreamEndEventVariant2FinishReason.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatStreamEndEventVariant2FinishReason.g.verified.cs new file mode 100644 index 0000000000..17b350e050 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatStreamEndEventVariant2FinishReason.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.ChatStreamEndEventVariant2FinishReason.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ChatStreamEndEventVariant2FinishReasonJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ChatStreamEndEventVariant2FinishReason Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ChatStreamEndEventVariant2FinishReasonExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ChatStreamEndEventVariant2FinishReason)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ChatStreamEndEventVariant2FinishReason value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.ChatStreamEndEventVariant2FinishReasonExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatStreamEndEventVariant2FinishReasonNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatStreamEndEventVariant2FinishReasonNullable.g.verified.cs new file mode 100644 index 0000000000..ae7cf991df --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatStreamEndEventVariant2FinishReasonNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.ChatStreamEndEventVariant2FinishReasonNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ChatStreamEndEventVariant2FinishReasonNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ChatStreamEndEventVariant2FinishReason? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ChatStreamEndEventVariant2FinishReasonExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ChatStreamEndEventVariant2FinishReason)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ChatStreamEndEventVariant2FinishReason? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.ChatStreamEndEventVariant2FinishReasonExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatStreamEventEventType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatStreamEventEventType.g.verified.cs new file mode 100644 index 0000000000..1661d6c79c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatStreamEventEventType.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.ChatStreamEventEventType.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ChatStreamEventEventTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ChatStreamEventEventType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ChatStreamEventEventTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ChatStreamEventEventType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ChatStreamEventEventType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.ChatStreamEventEventTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatStreamEventEventTypeNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatStreamEventEventTypeNullable.g.verified.cs new file mode 100644 index 0000000000..c4201a4ed8 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatStreamEventEventTypeNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.ChatStreamEventEventTypeNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ChatStreamEventEventTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ChatStreamEventEventType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ChatStreamEventEventTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ChatStreamEventEventType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ChatStreamEventEventType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.ChatStreamEventEventTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatStreamEventTypeType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatStreamEventTypeType.g.verified.cs new file mode 100644 index 0000000000..25b2a261f0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatStreamEventTypeType.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.ChatStreamEventTypeType.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ChatStreamEventTypeTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ChatStreamEventTypeType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ChatStreamEventTypeTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ChatStreamEventTypeType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ChatStreamEventTypeType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.ChatStreamEventTypeTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatStreamEventTypeTypeNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatStreamEventTypeTypeNullable.g.verified.cs new file mode 100644 index 0000000000..cb421d19d0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatStreamEventTypeTypeNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.ChatStreamEventTypeTypeNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ChatStreamEventTypeTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ChatStreamEventTypeType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ChatStreamEventTypeTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ChatStreamEventTypeType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ChatStreamEventTypeType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.ChatStreamEventTypeTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatStreamStartEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatStreamStartEvent.g.verified.cs new file mode 100644 index 0000000000..57929a8625 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatStreamStartEvent.g.verified.cs @@ -0,0 +1,74 @@ +//HintName: JsonConverters.ChatStreamStartEvent.g.cs +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenApiGenerator.JsonConverters +{ + /// + public class ChatStreamStartEventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ChatStreamStartEvent Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + var + readerCopy = reader; + global::G.ChatStreamEvent? value1 = default; + try + { + value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.ChatStreamStartEventVariant2? value2 = default; + try + { + value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::G.ChatStreamStartEvent( + value1, + value2 + ); + + if (value1 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (value2 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ChatStreamStartEvent value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + if (value.IsValue1) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeof(global::G.ChatStreamEvent), options); + } + else if (value.IsValue2) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeof(global::G.ChatStreamStartEventVariant2), options); + } + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatTextGenerationEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatTextGenerationEvent.g.verified.cs new file mode 100644 index 0000000000..39fd71ad99 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatTextGenerationEvent.g.verified.cs @@ -0,0 +1,74 @@ +//HintName: JsonConverters.ChatTextGenerationEvent.g.cs +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenApiGenerator.JsonConverters +{ + /// + public class ChatTextGenerationEventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ChatTextGenerationEvent Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + var + readerCopy = reader; + global::G.ChatStreamEvent? value1 = default; + try + { + value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.ChatTextGenerationEventVariant2? value2 = default; + try + { + value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::G.ChatTextGenerationEvent( + value1, + value2 + ); + + if (value1 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (value2 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ChatTextGenerationEvent value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + if (value.IsValue1) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeof(global::G.ChatStreamEvent), options); + } + else if (value.IsValue2) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeof(global::G.ChatTextGenerationEventVariant2), options); + } + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatToolCallDeltaEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatToolCallDeltaEvent.g.verified.cs new file mode 100644 index 0000000000..3a40527ff6 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatToolCallDeltaEvent.g.verified.cs @@ -0,0 +1,74 @@ +//HintName: JsonConverters.ChatToolCallDeltaEvent.g.cs +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenApiGenerator.JsonConverters +{ + /// + public class ChatToolCallDeltaEventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ChatToolCallDeltaEvent Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + var + readerCopy = reader; + global::G.ChatStreamEventType? value1 = default; + try + { + value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.ChatToolCallDeltaEventVariant2? value2 = default; + try + { + value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::G.ChatToolCallDeltaEvent( + value1, + value2 + ); + + if (value1 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (value2 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ChatToolCallDeltaEvent value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + if (value.IsValue1) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeof(global::G.ChatStreamEventType), options); + } + else if (value.IsValue2) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeof(global::G.ChatToolCallDeltaEventVariant2), options); + } + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatToolCallEndEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatToolCallEndEvent.g.verified.cs new file mode 100644 index 0000000000..f45730dd68 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatToolCallEndEvent.g.verified.cs @@ -0,0 +1,74 @@ +//HintName: JsonConverters.ChatToolCallEndEvent.g.cs +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenApiGenerator.JsonConverters +{ + /// + public class ChatToolCallEndEventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ChatToolCallEndEvent Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + var + readerCopy = reader; + global::G.ChatStreamEventType? value1 = default; + try + { + value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.ChatToolCallEndEventVariant2? value2 = default; + try + { + value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::G.ChatToolCallEndEvent( + value1, + value2 + ); + + if (value1 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (value2 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ChatToolCallEndEvent value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + if (value.IsValue1) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeof(global::G.ChatStreamEventType), options); + } + else if (value.IsValue2) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeof(global::G.ChatToolCallEndEventVariant2), options); + } + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatToolCallStartEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatToolCallStartEvent.g.verified.cs new file mode 100644 index 0000000000..12b18080ad --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatToolCallStartEvent.g.verified.cs @@ -0,0 +1,74 @@ +//HintName: JsonConverters.ChatToolCallStartEvent.g.cs +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenApiGenerator.JsonConverters +{ + /// + public class ChatToolCallStartEventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ChatToolCallStartEvent Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + var + readerCopy = reader; + global::G.ChatStreamEventType? value1 = default; + try + { + value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.ChatToolCallStartEventVariant2? value2 = default; + try + { + value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::G.ChatToolCallStartEvent( + value1, + value2 + ); + + if (value1 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (value2 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ChatToolCallStartEvent value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + if (value.IsValue1) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeof(global::G.ChatStreamEventType), options); + } + else if (value.IsValue2) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeof(global::G.ChatToolCallStartEventVariant2), options); + } + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatToolCallStartEventVariant2DeltaToolCallType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatToolCallStartEventVariant2DeltaToolCallType.g.verified.cs new file mode 100644 index 0000000000..3899b2cd70 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatToolCallStartEventVariant2DeltaToolCallType.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.ChatToolCallStartEventVariant2DeltaToolCallType.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ChatToolCallStartEventVariant2DeltaToolCallTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ChatToolCallStartEventVariant2DeltaToolCallType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ChatToolCallStartEventVariant2DeltaToolCallTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ChatToolCallStartEventVariant2DeltaToolCallType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ChatToolCallStartEventVariant2DeltaToolCallType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.ChatToolCallStartEventVariant2DeltaToolCallTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatToolCallStartEventVariant2DeltaToolCallTypeNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatToolCallStartEventVariant2DeltaToolCallTypeNullable.g.verified.cs new file mode 100644 index 0000000000..2a4036189d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatToolCallStartEventVariant2DeltaToolCallTypeNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.ChatToolCallStartEventVariant2DeltaToolCallTypeNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ChatToolCallStartEventVariant2DeltaToolCallTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ChatToolCallStartEventVariant2DeltaToolCallType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ChatToolCallStartEventVariant2DeltaToolCallTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ChatToolCallStartEventVariant2DeltaToolCallType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ChatToolCallStartEventVariant2DeltaToolCallType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.ChatToolCallStartEventVariant2DeltaToolCallTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatToolCallsChunkEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatToolCallsChunkEvent.g.verified.cs new file mode 100644 index 0000000000..1e49057ed3 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatToolCallsChunkEvent.g.verified.cs @@ -0,0 +1,74 @@ +//HintName: JsonConverters.ChatToolCallsChunkEvent.g.cs +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenApiGenerator.JsonConverters +{ + /// + public class ChatToolCallsChunkEventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ChatToolCallsChunkEvent Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + var + readerCopy = reader; + global::G.ChatStreamEvent? value1 = default; + try + { + value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.ChatToolCallsChunkEventVariant2? value2 = default; + try + { + value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::G.ChatToolCallsChunkEvent( + value1, + value2 + ); + + if (value1 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (value2 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ChatToolCallsChunkEvent value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + if (value.IsValue1) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeof(global::G.ChatStreamEvent), options); + } + else if (value.IsValue2) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeof(global::G.ChatToolCallsChunkEventVariant2), options); + } + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatToolCallsGenerationEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatToolCallsGenerationEvent.g.verified.cs new file mode 100644 index 0000000000..ac562eb8de --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatToolCallsGenerationEvent.g.verified.cs @@ -0,0 +1,74 @@ +//HintName: JsonConverters.ChatToolCallsGenerationEvent.g.cs +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenApiGenerator.JsonConverters +{ + /// + public class ChatToolCallsGenerationEventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ChatToolCallsGenerationEvent Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + var + readerCopy = reader; + global::G.ChatStreamEvent? value1 = default; + try + { + value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.ChatToolCallsGenerationEventVariant2? value2 = default; + try + { + value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::G.ChatToolCallsGenerationEvent( + value1, + value2 + ); + + if (value1 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (value2 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ChatToolCallsGenerationEvent value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + if (value.IsValue1) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeof(global::G.ChatStreamEvent), options); + } + else if (value.IsValue2) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeof(global::G.ChatToolCallsGenerationEventVariant2), options); + } + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatToolPlanDeltaEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatToolPlanDeltaEvent.g.verified.cs new file mode 100644 index 0000000000..e0d76f3deb --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ChatToolPlanDeltaEvent.g.verified.cs @@ -0,0 +1,74 @@ +//HintName: JsonConverters.ChatToolPlanDeltaEvent.g.cs +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenApiGenerator.JsonConverters +{ + /// + public class ChatToolPlanDeltaEventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ChatToolPlanDeltaEvent Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + var + readerCopy = reader; + global::G.ChatStreamEventType? value1 = default; + try + { + value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.ChatToolPlanDeltaEventVariant2? value2 = default; + try + { + value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::G.ChatToolPlanDeltaEvent( + value1, + value2 + ); + + if (value1 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (value2 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ChatToolPlanDeltaEvent value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + if (value.IsValue1) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeof(global::G.ChatStreamEventType), options); + } + else if (value.IsValue2) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeof(global::G.ChatToolPlanDeltaEventVariant2), options); + } + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.Chatv2RequestCitationMode.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.Chatv2RequestCitationMode.g.verified.cs new file mode 100644 index 0000000000..c34e55b030 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.Chatv2RequestCitationMode.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.Chatv2RequestCitationMode.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class Chatv2RequestCitationModeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.Chatv2RequestCitationMode Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.Chatv2RequestCitationModeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.Chatv2RequestCitationMode)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.Chatv2RequestCitationMode value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.Chatv2RequestCitationModeExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.Chatv2RequestCitationModeNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.Chatv2RequestCitationModeNullable.g.verified.cs new file mode 100644 index 0000000000..4daeecd98b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.Chatv2RequestCitationModeNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.Chatv2RequestCitationModeNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class Chatv2RequestCitationModeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.Chatv2RequestCitationMode? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.Chatv2RequestCitationModeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.Chatv2RequestCitationMode)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.Chatv2RequestCitationMode? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.Chatv2RequestCitationModeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.CitationEndEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.CitationEndEvent.g.verified.cs new file mode 100644 index 0000000000..4060dabf06 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.CitationEndEvent.g.verified.cs @@ -0,0 +1,74 @@ +//HintName: JsonConverters.CitationEndEvent.g.cs +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenApiGenerator.JsonConverters +{ + /// + public class CitationEndEventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.CitationEndEvent Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + var + readerCopy = reader; + global::G.ChatStreamEventType? value1 = default; + try + { + value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.CitationEndEventVariant2? value2 = default; + try + { + value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::G.CitationEndEvent( + value1, + value2 + ); + + if (value1 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (value2 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.CitationEndEvent value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + if (value.IsValue1) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeof(global::G.ChatStreamEventType), options); + } + else if (value.IsValue2) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeof(global::G.CitationEndEventVariant2), options); + } + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.CitationStartEvent.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.CitationStartEvent.g.verified.cs new file mode 100644 index 0000000000..a88f643a9b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.CitationStartEvent.g.verified.cs @@ -0,0 +1,74 @@ +//HintName: JsonConverters.CitationStartEvent.g.cs +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenApiGenerator.JsonConverters +{ + /// + public class CitationStartEventJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.CitationStartEvent Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + var + readerCopy = reader; + global::G.ChatStreamEventType? value1 = default; + try + { + value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.CitationStartEventVariant2? value2 = default; + try + { + value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::G.CitationStartEvent( + value1, + value2 + ); + + if (value1 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (value2 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.CitationStartEvent value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + if (value.IsValue1) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeof(global::G.ChatStreamEventType), options); + } + else if (value.IsValue2) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeof(global::G.CitationStartEventVariant2), options); + } + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ClassifyRequestTruncate.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ClassifyRequestTruncate.g.verified.cs new file mode 100644 index 0000000000..d708ab0a51 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ClassifyRequestTruncate.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.ClassifyRequestTruncate.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ClassifyRequestTruncateJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ClassifyRequestTruncate Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ClassifyRequestTruncateExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ClassifyRequestTruncate)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ClassifyRequestTruncate value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.ClassifyRequestTruncateExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ClassifyRequestTruncateNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ClassifyRequestTruncateNullable.g.verified.cs new file mode 100644 index 0000000000..73bd065c92 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ClassifyRequestTruncateNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.ClassifyRequestTruncateNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ClassifyRequestTruncateNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ClassifyRequestTruncate? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ClassifyRequestTruncateExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ClassifyRequestTruncate)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ClassifyRequestTruncate? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.ClassifyRequestTruncateExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ClassifyResponseClassificationClassificationType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ClassifyResponseClassificationClassificationType.g.verified.cs new file mode 100644 index 0000000000..e6468546c8 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ClassifyResponseClassificationClassificationType.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.ClassifyResponseClassificationClassificationType.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ClassifyResponseClassificationClassificationTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ClassifyResponseClassificationClassificationType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ClassifyResponseClassificationClassificationTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ClassifyResponseClassificationClassificationType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ClassifyResponseClassificationClassificationType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.ClassifyResponseClassificationClassificationTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ClassifyResponseClassificationClassificationTypeNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ClassifyResponseClassificationClassificationTypeNullable.g.verified.cs new file mode 100644 index 0000000000..6f672dad80 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ClassifyResponseClassificationClassificationTypeNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.ClassifyResponseClassificationClassificationTypeNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ClassifyResponseClassificationClassificationTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ClassifyResponseClassificationClassificationType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ClassifyResponseClassificationClassificationTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ClassifyResponseClassificationClassificationType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ClassifyResponseClassificationClassificationType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.ClassifyResponseClassificationClassificationTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.CompatibleEndpoint.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.CompatibleEndpoint.g.verified.cs new file mode 100644 index 0000000000..d5f943b437 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.CompatibleEndpoint.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.CompatibleEndpoint.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class CompatibleEndpointJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.CompatibleEndpoint Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.CompatibleEndpointExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.CompatibleEndpoint)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.CompatibleEndpoint value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.CompatibleEndpointExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.CompatibleEndpointNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.CompatibleEndpointNullable.g.verified.cs new file mode 100644 index 0000000000..8b5165f724 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.CompatibleEndpointNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.CompatibleEndpointNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class CompatibleEndpointNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.CompatibleEndpoint? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.CompatibleEndpointExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.CompatibleEndpoint)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.CompatibleEndpoint? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.CompatibleEndpointExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ConnectorAuthStatus.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ConnectorAuthStatus.g.verified.cs new file mode 100644 index 0000000000..496b242682 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ConnectorAuthStatus.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.ConnectorAuthStatus.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ConnectorAuthStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ConnectorAuthStatus Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ConnectorAuthStatusExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ConnectorAuthStatus)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ConnectorAuthStatus value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.ConnectorAuthStatusExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ConnectorAuthStatusNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ConnectorAuthStatusNullable.g.verified.cs new file mode 100644 index 0000000000..c855729d46 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ConnectorAuthStatusNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.ConnectorAuthStatusNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ConnectorAuthStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ConnectorAuthStatus? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ConnectorAuthStatusExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ConnectorAuthStatus)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ConnectorAuthStatus? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.ConnectorAuthStatusExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.Content.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.Content.g.verified.cs new file mode 100644 index 0000000000..602744422a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.Content.g.verified.cs @@ -0,0 +1,55 @@ +//HintName: JsonConverters.Content.g.cs +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenApiGenerator.JsonConverters +{ + /// + public class ContentJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.Content Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + var + readerCopy = reader; + global::G.TextContent? text = default; + try + { + text = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::G.Content( + text + ); + + if (text != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.Content value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + if (value.IsText) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeof(global::G.TextContent), options); + } + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.CreateEmbedJobRequestTruncate.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.CreateEmbedJobRequestTruncate.g.verified.cs new file mode 100644 index 0000000000..ebf557b388 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.CreateEmbedJobRequestTruncate.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.CreateEmbedJobRequestTruncate.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class CreateEmbedJobRequestTruncateJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.CreateEmbedJobRequestTruncate Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.CreateEmbedJobRequestTruncateExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.CreateEmbedJobRequestTruncate)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.CreateEmbedJobRequestTruncate value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.CreateEmbedJobRequestTruncateExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.CreateEmbedJobRequestTruncateNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.CreateEmbedJobRequestTruncateNullable.g.verified.cs new file mode 100644 index 0000000000..d616fb2f4d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.CreateEmbedJobRequestTruncateNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.CreateEmbedJobRequestTruncateNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class CreateEmbedJobRequestTruncateNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.CreateEmbedJobRequestTruncate? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.CreateEmbedJobRequestTruncateExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.CreateEmbedJobRequestTruncate)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.CreateEmbedJobRequestTruncate? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.CreateEmbedJobRequestTruncateExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.DatasetType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.DatasetType.g.verified.cs new file mode 100644 index 0000000000..9ced19f98d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.DatasetType.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.DatasetType.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class DatasetTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.DatasetType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.DatasetTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.DatasetType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.DatasetType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.DatasetTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.DatasetTypeNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.DatasetTypeNullable.g.verified.cs new file mode 100644 index 0000000000..e30d3514a1 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.DatasetTypeNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.DatasetTypeNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class DatasetTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.DatasetType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.DatasetTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.DatasetType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.DatasetType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.DatasetTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.DatasetValidationStatus.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.DatasetValidationStatus.g.verified.cs new file mode 100644 index 0000000000..802f6099dc --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.DatasetValidationStatus.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.DatasetValidationStatus.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class DatasetValidationStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.DatasetValidationStatus Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.DatasetValidationStatusExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.DatasetValidationStatus)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.DatasetValidationStatus value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.DatasetValidationStatusExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.DatasetValidationStatusNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.DatasetValidationStatusNullable.g.verified.cs new file mode 100644 index 0000000000..d4384d9ca2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.DatasetValidationStatusNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.DatasetValidationStatusNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class DatasetValidationStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.DatasetValidationStatus? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.DatasetValidationStatusExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.DatasetValidationStatus)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.DatasetValidationStatus? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.DatasetValidationStatusExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedByTypeResponseResponseType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedByTypeResponseResponseType.g.verified.cs new file mode 100644 index 0000000000..3ad6564f05 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedByTypeResponseResponseType.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.EmbedByTypeResponseResponseType.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class EmbedByTypeResponseResponseTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.EmbedByTypeResponseResponseType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.EmbedByTypeResponseResponseTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.EmbedByTypeResponseResponseType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.EmbedByTypeResponseResponseType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.EmbedByTypeResponseResponseTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedByTypeResponseResponseTypeNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedByTypeResponseResponseTypeNullable.g.verified.cs new file mode 100644 index 0000000000..55dc4babf7 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedByTypeResponseResponseTypeNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.EmbedByTypeResponseResponseTypeNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class EmbedByTypeResponseResponseTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.EmbedByTypeResponseResponseType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.EmbedByTypeResponseResponseTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.EmbedByTypeResponseResponseType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.EmbedByTypeResponseResponseType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.EmbedByTypeResponseResponseTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedFloatsResponseResponseType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedFloatsResponseResponseType.g.verified.cs new file mode 100644 index 0000000000..c7679ac172 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedFloatsResponseResponseType.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.EmbedFloatsResponseResponseType.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class EmbedFloatsResponseResponseTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.EmbedFloatsResponseResponseType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.EmbedFloatsResponseResponseTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.EmbedFloatsResponseResponseType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.EmbedFloatsResponseResponseType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.EmbedFloatsResponseResponseTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedFloatsResponseResponseTypeNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedFloatsResponseResponseTypeNullable.g.verified.cs new file mode 100644 index 0000000000..27621ba551 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedFloatsResponseResponseTypeNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.EmbedFloatsResponseResponseTypeNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class EmbedFloatsResponseResponseTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.EmbedFloatsResponseResponseType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.EmbedFloatsResponseResponseTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.EmbedFloatsResponseResponseType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.EmbedFloatsResponseResponseType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.EmbedFloatsResponseResponseTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedInputType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedInputType.g.verified.cs new file mode 100644 index 0000000000..49606c4d64 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedInputType.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.EmbedInputType.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class EmbedInputTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.EmbedInputType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.EmbedInputTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.EmbedInputType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.EmbedInputType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.EmbedInputTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedInputTypeNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedInputTypeNullable.g.verified.cs new file mode 100644 index 0000000000..a55a7649ab --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedInputTypeNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.EmbedInputTypeNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class EmbedInputTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.EmbedInputType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.EmbedInputTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.EmbedInputType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.EmbedInputType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.EmbedInputTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedJobStatus.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedJobStatus.g.verified.cs new file mode 100644 index 0000000000..64c603c5d2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedJobStatus.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.EmbedJobStatus.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class EmbedJobStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.EmbedJobStatus Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.EmbedJobStatusExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.EmbedJobStatus)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.EmbedJobStatus value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.EmbedJobStatusExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedJobStatusNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedJobStatusNullable.g.verified.cs new file mode 100644 index 0000000000..31c3122114 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedJobStatusNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.EmbedJobStatusNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class EmbedJobStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.EmbedJobStatus? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.EmbedJobStatusExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.EmbedJobStatus)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.EmbedJobStatus? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.EmbedJobStatusExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedJobTruncate.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedJobTruncate.g.verified.cs new file mode 100644 index 0000000000..5e90422504 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedJobTruncate.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.EmbedJobTruncate.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class EmbedJobTruncateJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.EmbedJobTruncate Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.EmbedJobTruncateExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.EmbedJobTruncate)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.EmbedJobTruncate value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.EmbedJobTruncateExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedJobTruncateNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedJobTruncateNullable.g.verified.cs new file mode 100644 index 0000000000..97794bad75 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedJobTruncateNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.EmbedJobTruncateNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class EmbedJobTruncateNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.EmbedJobTruncate? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.EmbedJobTruncateExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.EmbedJobTruncate)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.EmbedJobTruncate? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.EmbedJobTruncateExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedRequestTruncate.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedRequestTruncate.g.verified.cs new file mode 100644 index 0000000000..4093ecf79c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedRequestTruncate.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.EmbedRequestTruncate.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class EmbedRequestTruncateJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.EmbedRequestTruncate Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.EmbedRequestTruncateExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.EmbedRequestTruncate)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.EmbedRequestTruncate value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.EmbedRequestTruncateExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedRequestTruncateNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedRequestTruncateNullable.g.verified.cs new file mode 100644 index 0000000000..4091ed0d2f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbedRequestTruncateNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.EmbedRequestTruncateNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class EmbedRequestTruncateNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.EmbedRequestTruncate? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.EmbedRequestTruncateExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.EmbedRequestTruncate)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.EmbedRequestTruncate? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.EmbedRequestTruncateExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbeddingType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbeddingType.g.verified.cs new file mode 100644 index 0000000000..c05357b629 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbeddingType.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.EmbeddingType.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class EmbeddingTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.EmbeddingType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.EmbeddingTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.EmbeddingType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.EmbeddingType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.EmbeddingTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbeddingTypeNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbeddingTypeNullable.g.verified.cs new file mode 100644 index 0000000000..0d8bc2c8f9 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.EmbeddingTypeNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.EmbeddingTypeNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class EmbeddingTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.EmbeddingType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.EmbeddingTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.EmbeddingType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.EmbeddingType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.EmbeddingTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.FinishReason.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.FinishReason.g.verified.cs new file mode 100644 index 0000000000..ad803a5dfa --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.FinishReason.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.FinishReason.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class FinishReasonJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.FinishReason Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.FinishReasonExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.FinishReason)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.FinishReason value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.FinishReasonExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.FinishReasonNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.FinishReasonNullable.g.verified.cs new file mode 100644 index 0000000000..2f018a3e8f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.FinishReasonNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.FinishReasonNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class FinishReasonNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.FinishReason? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.FinishReasonExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.FinishReason)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.FinishReason? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.FinishReasonExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GenerateRequestReturnLikelihoods.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GenerateRequestReturnLikelihoods.g.verified.cs new file mode 100644 index 0000000000..05cf077318 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GenerateRequestReturnLikelihoods.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.GenerateRequestReturnLikelihoods.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class GenerateRequestReturnLikelihoodsJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.GenerateRequestReturnLikelihoods Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.GenerateRequestReturnLikelihoodsExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.GenerateRequestReturnLikelihoods)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.GenerateRequestReturnLikelihoods value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.GenerateRequestReturnLikelihoodsExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GenerateRequestReturnLikelihoodsNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GenerateRequestReturnLikelihoodsNullable.g.verified.cs new file mode 100644 index 0000000000..5c67652203 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GenerateRequestReturnLikelihoodsNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.GenerateRequestReturnLikelihoodsNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class GenerateRequestReturnLikelihoodsNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.GenerateRequestReturnLikelihoods? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.GenerateRequestReturnLikelihoodsExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.GenerateRequestReturnLikelihoods)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.GenerateRequestReturnLikelihoods? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.GenerateRequestReturnLikelihoodsExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GenerateRequestTruncate.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GenerateRequestTruncate.g.verified.cs new file mode 100644 index 0000000000..7934305050 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GenerateRequestTruncate.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.GenerateRequestTruncate.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class GenerateRequestTruncateJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.GenerateRequestTruncate Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.GenerateRequestTruncateExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.GenerateRequestTruncate)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.GenerateRequestTruncate value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.GenerateRequestTruncateExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GenerateRequestTruncateNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GenerateRequestTruncateNullable.g.verified.cs new file mode 100644 index 0000000000..b7baaab5a0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GenerateRequestTruncateNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.GenerateRequestTruncateNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class GenerateRequestTruncateNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.GenerateRequestTruncate? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.GenerateRequestTruncateExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.GenerateRequestTruncate)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.GenerateRequestTruncate? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.GenerateRequestTruncateExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GenerateStreamEnd.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GenerateStreamEnd.g.verified.cs new file mode 100644 index 0000000000..d0f1c78ada --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GenerateStreamEnd.g.verified.cs @@ -0,0 +1,74 @@ +//HintName: JsonConverters.GenerateStreamEnd.g.cs +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenApiGenerator.JsonConverters +{ + /// + public class GenerateStreamEndJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.GenerateStreamEnd Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + var + readerCopy = reader; + global::G.GenerateStreamEvent? value1 = default; + try + { + value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.GenerateStreamEndVariant2? value2 = default; + try + { + value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::G.GenerateStreamEnd( + value1, + value2 + ); + + if (value1 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (value2 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.GenerateStreamEnd value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + if (value.IsValue1) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeof(global::G.GenerateStreamEvent), options); + } + else if (value.IsValue2) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeof(global::G.GenerateStreamEndVariant2), options); + } + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GenerateStreamError.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GenerateStreamError.g.verified.cs new file mode 100644 index 0000000000..d3caf8f9f7 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GenerateStreamError.g.verified.cs @@ -0,0 +1,74 @@ +//HintName: JsonConverters.GenerateStreamError.g.cs +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenApiGenerator.JsonConverters +{ + /// + public class GenerateStreamErrorJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.GenerateStreamError Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + var + readerCopy = reader; + global::G.GenerateStreamEvent? value1 = default; + try + { + value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.GenerateStreamErrorVariant2? value2 = default; + try + { + value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::G.GenerateStreamError( + value1, + value2 + ); + + if (value1 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (value2 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.GenerateStreamError value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + if (value.IsValue1) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeof(global::G.GenerateStreamEvent), options); + } + else if (value.IsValue2) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeof(global::G.GenerateStreamErrorVariant2), options); + } + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GenerateStreamEventEventType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GenerateStreamEventEventType.g.verified.cs new file mode 100644 index 0000000000..6453a49d42 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GenerateStreamEventEventType.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.GenerateStreamEventEventType.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class GenerateStreamEventEventTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.GenerateStreamEventEventType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.GenerateStreamEventEventTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.GenerateStreamEventEventType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.GenerateStreamEventEventType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.GenerateStreamEventEventTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GenerateStreamEventEventTypeNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GenerateStreamEventEventTypeNullable.g.verified.cs new file mode 100644 index 0000000000..4a6a63fc8c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GenerateStreamEventEventTypeNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.GenerateStreamEventEventTypeNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class GenerateStreamEventEventTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.GenerateStreamEventEventType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.GenerateStreamEventEventTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.GenerateStreamEventEventType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.GenerateStreamEventEventType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.GenerateStreamEventEventTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GenerateStreamText.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GenerateStreamText.g.verified.cs new file mode 100644 index 0000000000..f6a031e4b8 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GenerateStreamText.g.verified.cs @@ -0,0 +1,74 @@ +//HintName: JsonConverters.GenerateStreamText.g.cs +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenApiGenerator.JsonConverters +{ + /// + public class GenerateStreamTextJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.GenerateStreamText Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + var + readerCopy = reader; + global::G.GenerateStreamEvent? value1 = default; + try + { + value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.GenerateStreamTextVariant2? value2 = default; + try + { + value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::G.GenerateStreamText( + value1, + value2 + ); + + if (value1 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (value2 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.GenerateStreamText value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + if (value.IsValue1) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeof(global::G.GenerateStreamEvent), options); + } + else if (value.IsValue2) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeof(global::G.GenerateStreamTextVariant2), options); + } + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GenerateStreamedResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GenerateStreamedResponse.g.verified.cs new file mode 100644 index 0000000000..8eeaf114ca --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GenerateStreamedResponse.g.verified.cs @@ -0,0 +1,93 @@ +//HintName: JsonConverters.GenerateStreamedResponse.g.cs +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenApiGenerator.JsonConverters +{ + /// + public class GenerateStreamedResponseJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.GenerateStreamedResponse Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + var + readerCopy = reader; + global::G.GenerateStreamText? streamText = default; + try + { + streamText = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.GenerateStreamEnd? streamEnd = default; + try + { + streamEnd = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.GenerateStreamError? streamError = default; + try + { + streamError = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::G.GenerateStreamedResponse( + streamText, + streamEnd, + streamError + ); + + if (streamText != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (streamEnd != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (streamError != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.GenerateStreamedResponse value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + if (value.IsStreamText) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.StreamText, typeof(global::G.GenerateStreamText), options); + } + else if (value.IsStreamEnd) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.StreamEnd, typeof(global::G.GenerateStreamEnd), options); + } + else if (value.IsStreamError) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.StreamError, typeof(global::G.GenerateStreamError), options); + } + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GetClusterJobResponseStatus.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GetClusterJobResponseStatus.g.verified.cs new file mode 100644 index 0000000000..491c33dd62 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GetClusterJobResponseStatus.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.GetClusterJobResponseStatus.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class GetClusterJobResponseStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.GetClusterJobResponseStatus Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.GetClusterJobResponseStatusExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.GetClusterJobResponseStatus)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.GetClusterJobResponseStatus value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.GetClusterJobResponseStatusExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GetClusterJobResponseStatusNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GetClusterJobResponseStatusNullable.g.verified.cs new file mode 100644 index 0000000000..4f981c1f1e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.GetClusterJobResponseStatusNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.GetClusterJobResponseStatusNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class GetClusterJobResponseStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.GetClusterJobResponseStatus? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.GetClusterJobResponseStatusExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.GetClusterJobResponseStatus)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.GetClusterJobResponseStatus? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.GetClusterJobResponseStatusExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.Message.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.Message.g.verified.cs new file mode 100644 index 0000000000..0dbdb7339f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.Message.g.verified.cs @@ -0,0 +1,74 @@ +//HintName: JsonConverters.Message.g.cs +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenApiGenerator.JsonConverters +{ + /// + public class MessageJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.Message Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + var + readerCopy = reader; + global::G.ChatMessage? chat = default; + try + { + chat = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.ToolMessage? tool = default; + try + { + tool = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::G.Message( + chat, + tool + ); + + if (chat != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (tool != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.Message value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + if (value.IsChat) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Chat, typeof(global::G.ChatMessage), options); + } + else if (value.IsTool) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Tool, typeof(global::G.ToolMessage), options); + } + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.OneOf1.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.OneOf1.g.verified.cs new file mode 100644 index 0000000000..df0c950066 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.OneOf1.g.verified.cs @@ -0,0 +1,54 @@ +//HintName: JsonConverters.OneOf1.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public class OneOfJsonConverter : global::System.Text.Json.Serialization.JsonConverter> + { + /// + public override global::System.OneOf Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + var + readerCopy = reader; + T1? value1 = default; + try + { + value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::System.OneOf( + value1 + ); + + if (value1 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::System.OneOf value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + if (value.IsValue1) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeof(T1), options); + } + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.OneOf2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.OneOf2.g.verified.cs new file mode 100644 index 0000000000..70069629b3 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.OneOf2.g.verified.cs @@ -0,0 +1,73 @@ +//HintName: JsonConverters.OneOf2.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public class OneOfJsonConverter : global::System.Text.Json.Serialization.JsonConverter> + { + /// + public override global::System.OneOf Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + var + readerCopy = reader; + T1? value1 = default; + try + { + value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + T2? value2 = default; + try + { + value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::System.OneOf( + value1, + value2 + ); + + if (value1 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (value2 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::System.OneOf value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + if (value.IsValue1) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeof(T1), options); + } + else if (value.IsValue2) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeof(T2), options); + } + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.OneOfFactory1.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.OneOfFactory1.g.verified.cs new file mode 100644 index 0000000000..a653ae98b2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.OneOfFactory1.g.verified.cs @@ -0,0 +1,26 @@ +//HintName: JsonConverters.OneOfFactory1.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class OneOfJsonConverterFactory1 : global::System.Text.Json.Serialization.JsonConverterFactory + { + /// + public override bool CanConvert(global::System.Type? typeToConvert) + { + return typeToConvert is { IsGenericType: true } && typeToConvert.GetGenericTypeDefinition() == typeof(global::System.OneOf<>); + } + + /// + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + typeToConvert = typeToConvert ?? throw new global::System.ArgumentNullException(nameof(typeToConvert)); + + return (global::System.Text.Json.Serialization.JsonConverter)global::System.Activator.CreateInstance( + typeof(OneOfJsonConverter<>).MakeGenericType(typeToConvert.GenericTypeArguments))!; + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.OneOfFactory2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.OneOfFactory2.g.verified.cs new file mode 100644 index 0000000000..976e8ead5b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.OneOfFactory2.g.verified.cs @@ -0,0 +1,26 @@ +//HintName: JsonConverters.OneOfFactory2.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class OneOfJsonConverterFactory2 : global::System.Text.Json.Serialization.JsonConverterFactory + { + /// + public override bool CanConvert(global::System.Type? typeToConvert) + { + return typeToConvert is { IsGenericType: true } && typeToConvert.GetGenericTypeDefinition() == typeof(global::System.OneOf<,>); + } + + /// + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + typeToConvert = typeToConvert ?? throw new global::System.ArgumentNullException(nameof(typeToConvert)); + + return (global::System.Text.Json.Serialization.JsonConverter)global::System.Activator.CreateInstance( + typeof(OneOfJsonConverter<,>).MakeGenericType(typeToConvert.GenericTypeArguments))!; + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ResponseFormat.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ResponseFormat.g.verified.cs new file mode 100644 index 0000000000..2bc17486d7 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ResponseFormat.g.verified.cs @@ -0,0 +1,74 @@ +//HintName: JsonConverters.ResponseFormat.g.cs +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenApiGenerator.JsonConverters +{ + /// + public class ResponseFormatJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ResponseFormat Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + var + readerCopy = reader; + global::G.TextResponseFormat? text = default; + try + { + text = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.JSONResponseFormat? jSON = default; + try + { + jSON = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::G.ResponseFormat( + text, + jSON + ); + + if (text != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (jSON != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ResponseFormat value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + if (value.IsText) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeof(global::G.TextResponseFormat), options); + } + else if (value.IsJSON) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.JSON, typeof(global::G.JSONResponseFormat), options); + } + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ResponseFormat2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ResponseFormat2.g.verified.cs new file mode 100644 index 0000000000..00def65082 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ResponseFormat2.g.verified.cs @@ -0,0 +1,74 @@ +//HintName: JsonConverters.ResponseFormat2.g.cs +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenApiGenerator.JsonConverters +{ + /// + public class ResponseFormat2JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ResponseFormat2 Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + var + readerCopy = reader; + global::G.TextResponseFormat? textFormat = default; + try + { + textFormat = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.JSONResponseFormat2? jSON = default; + try + { + jSON = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::G.ResponseFormat2( + textFormat, + jSON + ); + + if (textFormat != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (jSON != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ResponseFormat2 value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + if (value.IsTextFormat) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.TextFormat, typeof(global::G.TextResponseFormat), options); + } + else if (value.IsJSON) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.JSON, typeof(global::G.JSONResponseFormat2), options); + } + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ResponseFormatType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ResponseFormatType.g.verified.cs new file mode 100644 index 0000000000..d5511d8ba1 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ResponseFormatType.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.ResponseFormatType.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ResponseFormatTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ResponseFormatType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ResponseFormatTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ResponseFormatType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ResponseFormatType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.ResponseFormatTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ResponseFormatTypeNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ResponseFormatTypeNullable.g.verified.cs new file mode 100644 index 0000000000..80649cbe91 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ResponseFormatTypeNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.ResponseFormatTypeNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ResponseFormatTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ResponseFormatType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ResponseFormatTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ResponseFormatType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ResponseFormatType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.ResponseFormatTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.Source.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.Source.g.verified.cs new file mode 100644 index 0000000000..f4966a16f4 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.Source.g.verified.cs @@ -0,0 +1,74 @@ +//HintName: JsonConverters.Source.g.cs +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenApiGenerator.JsonConverters +{ + /// + public class SourceJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.Source Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + var + readerCopy = reader; + global::G.ToolSource? tool = default; + try + { + tool = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.DocumentSource? document = default; + try + { + document = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::G.Source( + tool, + document + ); + + if (tool != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (document != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.Source value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + if (value.IsTool) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Tool, typeof(global::G.ToolSource), options); + } + else if (value.IsDocument) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Document, typeof(global::G.DocumentSource), options); + } + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.Status.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.Status.g.verified.cs new file mode 100644 index 0000000000..a74f1d286f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.Status.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.Status.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class StatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.Status Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.StatusExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.Status)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.Status value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.StatusExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.StatusNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.StatusNullable.g.verified.cs new file mode 100644 index 0000000000..2fab5857c0 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.StatusNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.StatusNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class StatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.Status? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.StatusExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.Status)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.Status? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.StatusExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.Strategy.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.Strategy.g.verified.cs new file mode 100644 index 0000000000..8430eaf1bd --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.Strategy.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.Strategy.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class StrategyJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.Strategy Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.StrategyExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.Strategy)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.Strategy value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.StrategyExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.StrategyNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.StrategyNullable.g.verified.cs new file mode 100644 index 0000000000..6b5c3c652c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.StrategyNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.StrategyNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class StrategyNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.Strategy? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.StrategyExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.Strategy)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.Strategy? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.StrategyExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.StreamedChatResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.StreamedChatResponse.g.verified.cs new file mode 100644 index 0000000000..9fc155a22d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.StreamedChatResponse.g.verified.cs @@ -0,0 +1,188 @@ +//HintName: JsonConverters.StreamedChatResponse.g.cs +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenApiGenerator.JsonConverters +{ + /// + public class StreamedChatResponseJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.StreamedChatResponse Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + var + readerCopy = reader; + global::G.ChatStreamStartEvent? streamStartEvent = default; + try + { + streamStartEvent = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.ChatSearchQueriesGenerationEvent? searchQueriesGenerationEvent = default; + try + { + searchQueriesGenerationEvent = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.ChatSearchResultsEvent? searchResultsEvent = default; + try + { + searchResultsEvent = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.ChatTextGenerationEvent? textGenerationEvent = default; + try + { + textGenerationEvent = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.ChatCitationGenerationEvent? citationGenerationEvent = default; + try + { + citationGenerationEvent = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.ChatToolCallsGenerationEvent? toolCallsGenerationEvent = default; + try + { + toolCallsGenerationEvent = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.ChatStreamEndEvent? streamEndEvent = default; + try + { + streamEndEvent = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.ChatToolCallsChunkEvent? toolCallsChunkEvent = default; + try + { + toolCallsChunkEvent = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::G.StreamedChatResponse( + streamStartEvent, + searchQueriesGenerationEvent, + searchResultsEvent, + textGenerationEvent, + citationGenerationEvent, + toolCallsGenerationEvent, + streamEndEvent, + toolCallsChunkEvent + ); + + if (streamStartEvent != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (searchQueriesGenerationEvent != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (searchResultsEvent != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (textGenerationEvent != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (citationGenerationEvent != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (toolCallsGenerationEvent != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (streamEndEvent != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (toolCallsChunkEvent != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.StreamedChatResponse value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + if (value.IsStreamStartEvent) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.StreamStartEvent, typeof(global::G.ChatStreamStartEvent), options); + } + else if (value.IsSearchQueriesGenerationEvent) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.SearchQueriesGenerationEvent, typeof(global::G.ChatSearchQueriesGenerationEvent), options); + } + else if (value.IsSearchResultsEvent) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.SearchResultsEvent, typeof(global::G.ChatSearchResultsEvent), options); + } + else if (value.IsTextGenerationEvent) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.TextGenerationEvent, typeof(global::G.ChatTextGenerationEvent), options); + } + else if (value.IsCitationGenerationEvent) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.CitationGenerationEvent, typeof(global::G.ChatCitationGenerationEvent), options); + } + else if (value.IsToolCallsGenerationEvent) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ToolCallsGenerationEvent, typeof(global::G.ChatToolCallsGenerationEvent), options); + } + else if (value.IsStreamEndEvent) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.StreamEndEvent, typeof(global::G.ChatStreamEndEvent), options); + } + else if (value.IsToolCallsChunkEvent) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ToolCallsChunkEvent, typeof(global::G.ChatToolCallsChunkEvent), options); + } + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.StreamedChatResponse2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.StreamedChatResponse2.g.verified.cs new file mode 100644 index 0000000000..f508f87d5a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.StreamedChatResponse2.g.verified.cs @@ -0,0 +1,207 @@ +//HintName: JsonConverters.StreamedChatResponse2.g.cs +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenApiGenerator.JsonConverters +{ + /// + public class StreamedChatResponse2JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.StreamedChatResponse2 Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + var + readerCopy = reader; + global::G.ChatMessageStartEvent? messageStartEvent = default; + try + { + messageStartEvent = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.ChatContentStartEvent? contentStartEvent = default; + try + { + contentStartEvent = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.ChatContentDeltaEvent? contentDeltaEvent = default; + try + { + contentDeltaEvent = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.ChatContentEndEvent? contentEndEvent = default; + try + { + contentEndEvent = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.ChatToolPlanDeltaEvent? toolPlanDeltaEvent = default; + try + { + toolPlanDeltaEvent = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.ChatToolCallStartEvent? toolCallStartEvent = default; + try + { + toolCallStartEvent = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.ChatToolCallDeltaEvent? toolCallDeltaEvent = default; + try + { + toolCallDeltaEvent = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.ChatToolCallEndEvent? toolCallEndEvent = default; + try + { + toolCallEndEvent = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + global::G.ChatMessageEndEvent? messageEndEvent = default; + try + { + messageEndEvent = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::G.StreamedChatResponse2( + messageStartEvent, + contentStartEvent, + contentDeltaEvent, + contentEndEvent, + toolPlanDeltaEvent, + toolCallStartEvent, + toolCallDeltaEvent, + toolCallEndEvent, + messageEndEvent + ); + + if (messageStartEvent != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (contentStartEvent != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (contentDeltaEvent != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (contentEndEvent != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (toolPlanDeltaEvent != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (toolCallStartEvent != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (toolCallDeltaEvent != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (toolCallEndEvent != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (messageEndEvent != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.StreamedChatResponse2 value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + if (value.IsMessageStartEvent) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageStartEvent, typeof(global::G.ChatMessageStartEvent), options); + } + else if (value.IsContentStartEvent) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ContentStartEvent, typeof(global::G.ChatContentStartEvent), options); + } + else if (value.IsContentDeltaEvent) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ContentDeltaEvent, typeof(global::G.ChatContentDeltaEvent), options); + } + else if (value.IsContentEndEvent) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ContentEndEvent, typeof(global::G.ChatContentEndEvent), options); + } + else if (value.IsToolPlanDeltaEvent) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ToolPlanDeltaEvent, typeof(global::G.ChatToolPlanDeltaEvent), options); + } + else if (value.IsToolCallStartEvent) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ToolCallStartEvent, typeof(global::G.ChatToolCallStartEvent), options); + } + else if (value.IsToolCallDeltaEvent) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ToolCallDeltaEvent, typeof(global::G.ChatToolCallDeltaEvent), options); + } + else if (value.IsToolCallEndEvent) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ToolCallEndEvent, typeof(global::G.ChatToolCallEndEvent), options); + } + else if (value.IsMessageEndEvent) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageEndEvent, typeof(global::G.ChatMessageEndEvent), options); + } + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.SummarizeRequestExtractiveness.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.SummarizeRequestExtractiveness.g.verified.cs new file mode 100644 index 0000000000..d9ca4ed690 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.SummarizeRequestExtractiveness.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.SummarizeRequestExtractiveness.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class SummarizeRequestExtractivenessJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.SummarizeRequestExtractiveness Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.SummarizeRequestExtractivenessExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.SummarizeRequestExtractiveness)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.SummarizeRequestExtractiveness value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.SummarizeRequestExtractivenessExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.SummarizeRequestExtractivenessNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.SummarizeRequestExtractivenessNullable.g.verified.cs new file mode 100644 index 0000000000..0657f68df6 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.SummarizeRequestExtractivenessNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.SummarizeRequestExtractivenessNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class SummarizeRequestExtractivenessNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.SummarizeRequestExtractiveness? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.SummarizeRequestExtractivenessExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.SummarizeRequestExtractiveness)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.SummarizeRequestExtractiveness? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.SummarizeRequestExtractivenessExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.SummarizeRequestFormat.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.SummarizeRequestFormat.g.verified.cs new file mode 100644 index 0000000000..edd0f1e2de --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.SummarizeRequestFormat.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.SummarizeRequestFormat.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class SummarizeRequestFormatJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.SummarizeRequestFormat Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.SummarizeRequestFormatExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.SummarizeRequestFormat)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.SummarizeRequestFormat value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.SummarizeRequestFormatExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.SummarizeRequestFormatNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.SummarizeRequestFormatNullable.g.verified.cs new file mode 100644 index 0000000000..1e2bce3ab2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.SummarizeRequestFormatNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.SummarizeRequestFormatNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class SummarizeRequestFormatNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.SummarizeRequestFormat? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.SummarizeRequestFormatExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.SummarizeRequestFormat)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.SummarizeRequestFormat? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.SummarizeRequestFormatExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.SummarizeRequestLength.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.SummarizeRequestLength.g.verified.cs new file mode 100644 index 0000000000..992597f449 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.SummarizeRequestLength.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.SummarizeRequestLength.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class SummarizeRequestLengthJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.SummarizeRequestLength Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.SummarizeRequestLengthExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.SummarizeRequestLength)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.SummarizeRequestLength value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.SummarizeRequestLengthExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.SummarizeRequestLengthNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.SummarizeRequestLengthNullable.g.verified.cs new file mode 100644 index 0000000000..2903fc95c1 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.SummarizeRequestLengthNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.SummarizeRequestLengthNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class SummarizeRequestLengthNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.SummarizeRequestLength? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.SummarizeRequestLengthExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.SummarizeRequestLength)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.SummarizeRequestLength? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.SummarizeRequestLengthExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.SystemMessageRole.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.SystemMessageRole.g.verified.cs new file mode 100644 index 0000000000..57f5f60a1c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.SystemMessageRole.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.SystemMessageRole.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class SystemMessageRoleJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.SystemMessageRole Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.SystemMessageRoleExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.SystemMessageRole)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.SystemMessageRole value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.SystemMessageRoleExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.SystemMessageRoleNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.SystemMessageRoleNullable.g.verified.cs new file mode 100644 index 0000000000..5ab2a68abf --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.SystemMessageRoleNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.SystemMessageRoleNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class SystemMessageRoleNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.SystemMessageRole? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.SystemMessageRoleExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.SystemMessageRole)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.SystemMessageRole? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.SystemMessageRoleExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.TextContentType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.TextContentType.g.verified.cs new file mode 100644 index 0000000000..33320179cc --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.TextContentType.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.TextContentType.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class TextContentTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.TextContentType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.TextContentTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.TextContentType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.TextContentType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.TextContentTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.TextContentTypeNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.TextContentTypeNullable.g.verified.cs new file mode 100644 index 0000000000..f714d21233 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.TextContentTypeNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.TextContentTypeNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class TextContentTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.TextContentType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.TextContentTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.TextContentType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.TextContentType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.TextContentTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.Tool2Type.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.Tool2Type.g.verified.cs new file mode 100644 index 0000000000..04af551c95 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.Tool2Type.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.Tool2Type.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class Tool2TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.Tool2Type Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.Tool2TypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.Tool2Type)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.Tool2Type value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.Tool2TypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.Tool2TypeNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.Tool2TypeNullable.g.verified.cs new file mode 100644 index 0000000000..6c60b93607 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.Tool2TypeNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.Tool2TypeNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class Tool2TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.Tool2Type? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.Tool2TypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.Tool2Type)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.Tool2Type? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.Tool2TypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ToolCall2Type.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ToolCall2Type.g.verified.cs new file mode 100644 index 0000000000..e76e26fa63 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ToolCall2Type.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.ToolCall2Type.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ToolCall2TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ToolCall2Type Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ToolCall2TypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ToolCall2Type)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ToolCall2Type value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.ToolCall2TypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ToolCall2TypeNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ToolCall2TypeNullable.g.verified.cs new file mode 100644 index 0000000000..13ff85c9fa --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ToolCall2TypeNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.ToolCall2TypeNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ToolCall2TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ToolCall2Type? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ToolCall2TypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ToolCall2Type)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ToolCall2Type? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.ToolCall2TypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ToolContentType.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ToolContentType.g.verified.cs new file mode 100644 index 0000000000..0767c8776a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ToolContentType.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.ToolContentType.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ToolContentTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ToolContentType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ToolContentTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ToolContentType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ToolContentType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.ToolContentTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ToolContentTypeNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ToolContentTypeNullable.g.verified.cs new file mode 100644 index 0000000000..990be4596c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ToolContentTypeNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.ToolContentTypeNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ToolContentTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ToolContentType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ToolContentTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ToolContentType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ToolContentType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.ToolContentTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ToolMessage2Role.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ToolMessage2Role.g.verified.cs new file mode 100644 index 0000000000..59de9d93c6 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ToolMessage2Role.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.ToolMessage2Role.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ToolMessage2RoleJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ToolMessage2Role Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ToolMessage2RoleExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ToolMessage2Role)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ToolMessage2Role value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.ToolMessage2RoleExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ToolMessage2RoleNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ToolMessage2RoleNullable.g.verified.cs new file mode 100644 index 0000000000..26d8a08a38 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ToolMessage2RoleNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.ToolMessage2RoleNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class ToolMessage2RoleNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.ToolMessage2Role? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.ToolMessage2RoleExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.ToolMessage2Role)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.ToolMessage2Role? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.ToolMessage2RoleExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.UpdateClusterJobRequestStatus.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.UpdateClusterJobRequestStatus.g.verified.cs new file mode 100644 index 0000000000..a4945a9bd2 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.UpdateClusterJobRequestStatus.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.UpdateClusterJobRequestStatus.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class UpdateClusterJobRequestStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.UpdateClusterJobRequestStatus Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.UpdateClusterJobRequestStatusExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.UpdateClusterJobRequestStatus)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.UpdateClusterJobRequestStatus value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.UpdateClusterJobRequestStatusExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.UpdateClusterJobRequestStatusNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.UpdateClusterJobRequestStatusNullable.g.verified.cs new file mode 100644 index 0000000000..f84116300b --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.UpdateClusterJobRequestStatusNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.UpdateClusterJobRequestStatusNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class UpdateClusterJobRequestStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.UpdateClusterJobRequestStatus? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.UpdateClusterJobRequestStatusExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.UpdateClusterJobRequestStatus)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.UpdateClusterJobRequestStatus? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.UpdateClusterJobRequestStatusExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.UserMessageRole.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.UserMessageRole.g.verified.cs new file mode 100644 index 0000000000..667dcdf975 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.UserMessageRole.g.verified.cs @@ -0,0 +1,50 @@ +//HintName: JsonConverters.UserMessageRole.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class UserMessageRoleJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.UserMessageRole Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.UserMessageRoleExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.UserMessageRole)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.UserMessageRole value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::G.UserMessageRoleExtensions.ToValueString(value)); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.UserMessageRoleNullable.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.UserMessageRoleNullable.g.verified.cs new file mode 100644 index 0000000000..abec314583 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.UserMessageRoleNullable.g.verified.cs @@ -0,0 +1,57 @@ +//HintName: JsonConverters.UserMessageRoleNullable.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class UserMessageRoleNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::G.UserMessageRole? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::G.UserMessageRoleExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::G.UserMessageRole)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::G.UserMessageRole? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::G.UserMessageRoleExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#OneOf.1.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#OneOf.1.g.verified.cs new file mode 100644 index 0000000000..5f34723afb --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#OneOf.1.g.verified.cs @@ -0,0 +1,115 @@ +//HintName: OneOf.1.g.cs +using System.Linq; + +#nullable enable + +namespace System +{ + /// + /// + /// + public readonly partial struct OneOf : global::System.IEquatable> + { + /// + /// + /// +#if NET6_0_OR_GREATER + public T1? Value1 { get; init; } +#else + public T1? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator OneOf(T1 value) => new OneOf(value); + + /// + /// + /// + public static implicit operator T1?(OneOf @this) => @this.Value1; + + /// + /// + /// + public OneOf(T1? value) + { + Value1 = value; + } + + /// + /// + /// + public object? Object => + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(T1), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(OneOf other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) + ; + } + + /// + /// + /// + public static bool operator ==(OneOf obj1, OneOf obj2) + { + return global::System.Collections.Generic.EqualityComparer>.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(OneOf obj1, OneOf obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is OneOf o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#OneOf.2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#OneOf.2.g.verified.cs new file mode 100644 index 0000000000..43d464658e --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#OneOf.2.g.verified.cs @@ -0,0 +1,166 @@ +//HintName: OneOf.2.g.cs +using System.Linq; + +#nullable enable + +namespace System +{ + /// + /// + /// + public readonly partial struct OneOf : global::System.IEquatable> + { + /// + /// + /// +#if NET6_0_OR_GREATER + public T1? Value1 { get; init; } +#else + public T1? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator OneOf(T1 value) => new OneOf(value); + + /// + /// + /// + public static implicit operator T1?(OneOf @this) => @this.Value1; + + /// + /// + /// + public OneOf(T1? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public T2? Value2 { get; init; } +#else + public T2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator OneOf(T2 value) => new OneOf(value); + + /// + /// + /// + public static implicit operator T2?(OneOf @this) => @this.Value2; + + /// + /// + /// + public OneOf(T2? value) + { + Value2 = value; + } + + /// + /// + /// + public OneOf( + T1? value1, + T2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 && !IsValue2 || !IsValue1 && IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(T1), + Value2, + typeof(T2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(OneOf other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(OneOf obj1, OneOf obj2) + { + return global::System.Collections.Generic.EqualityComparer>.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(OneOf obj1, OneOf obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is OneOf o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/NewtonsoftJson/Tests.HuggingFace_Diagnostics.verified.txt b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/NewtonsoftJson/Tests.HuggingFace_Diagnostics.verified.txt new file mode 100644 index 0000000000..ad47dbb93f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/NewtonsoftJson/Tests.HuggingFace_Diagnostics.verified.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/NewtonsoftJson/_#AnyOf.2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/NewtonsoftJson/_#AnyOf.2.g.verified.cs new file mode 100644 index 0000000000..8333f3c3e9 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/NewtonsoftJson/_#AnyOf.2.g.verified.cs @@ -0,0 +1,166 @@ +//HintName: AnyOf.2.g.cs +using System.Linq; + +#nullable enable + +namespace System +{ + /// + /// + /// + public readonly partial struct AnyOf : global::System.IEquatable> + { + /// + /// + /// +#if NET6_0_OR_GREATER + public T1? Value1 { get; init; } +#else + public T1? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator AnyOf(T1 value) => new AnyOf(value); + + /// + /// + /// + public static implicit operator T1?(AnyOf @this) => @this.Value1; + + /// + /// + /// + public AnyOf(T1? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public T2? Value2 { get; init; } +#else + public T2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator AnyOf(T2 value) => new AnyOf(value); + + /// + /// + /// + public static implicit operator T2?(AnyOf @this) => @this.Value2; + + /// + /// + /// + public AnyOf(T2? value) + { + Value2 = value; + } + + /// + /// + /// + public AnyOf( + T1? value1, + T2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 || IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(T1), + Value2, + typeof(T2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(AnyOf other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(AnyOf obj1, AnyOf obj2) + { + return global::System.Collections.Generic.EqualityComparer>.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(AnyOf obj1, AnyOf obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is AnyOf o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/NewtonsoftJson/_#G.Api.GenerateText.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/NewtonsoftJson/_#G.Api.GenerateText.g.verified.cs new file mode 100644 index 0000000000..163690446c --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/NewtonsoftJson/_#G.Api.GenerateText.g.verified.cs @@ -0,0 +1,136 @@ +//HintName: G.Api.GenerateText.g.cs + +#nullable enable + +namespace G +{ + public partial class Api + { + partial void PrepareGenerateTextArguments( + global::System.Net.Http.HttpClient httpClient, + ref string modelId, + global::G.GenerateTextRequest request); + partial void PrepareGenerateTextRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string modelId, + global::G.GenerateTextRequest request); + partial void ProcessGenerateTextResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGenerateTextResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Creates a completion for the provided prompt and parameters. + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GenerateTextAsync( + string modelId, + global::G.GenerateTextRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareGenerateTextArguments( + httpClient: _httpClient, + modelId: ref modelId, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/models/{modelId}", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::Newtonsoft.Json.JsonConvert.SerializeObject(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareGenerateTextRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + modelId: modelId, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessGenerateTextResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessGenerateTextResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::Newtonsoft.Json.JsonConvert.DeserializeObject?>(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Creates a completion for the provided prompt and parameters. + /// + /// + /// + /// The prompt that you want to complete.
+ /// Example: This is a test. + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GenerateTextAsync( + string modelId, + string? inputs, + global::G.GenerateTextRequestParameters? parameters = default, + global::G.GenerateTextRequestOptions? options = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.GenerateTextRequest + { + Inputs = inputs, + Parameters = parameters, + Options = options, + }; + + return await GenerateTextAsync( + modelId: modelId, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/NewtonsoftJson/_#G.Api.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/NewtonsoftJson/_#G.Api.g.verified.cs new file mode 100644 index 0000000000..3f79eefe25 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/NewtonsoftJson/_#G.Api.g.verified.cs @@ -0,0 +1,61 @@ +//HintName: G.Api.g.cs + +#nullable enable + +namespace G +{ + /// + /// APIs for sampling from and fine-tuning language models
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class Api : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api-inference.huggingface.co/"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::Newtonsoft.Json.JsonSerializerSettings _jsonSerializerOptions; + + + /// + /// Creates a new instance of the Api. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public Api( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::Newtonsoft.Json.JsonSerializerSettings? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::Newtonsoft.Json.JsonSerializerSettings(); + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/NewtonsoftJson/_#G.Models.ErrorResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/NewtonsoftJson/_#G.Models.ErrorResponse.g.verified.cs new file mode 100644 index 0000000000..17fda25069 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/NewtonsoftJson/_#G.Models.ErrorResponse.g.verified.cs @@ -0,0 +1,26 @@ +//HintName: G.Models.ErrorResponse.g.cs + +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ErrorResponse + { + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("error", Required = global::Newtonsoft.Json.Required.Always)] + public global::System.AnyOf> Error { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/NewtonsoftJson/_#G.Models.GenerateTextRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/NewtonsoftJson/_#G.Models.GenerateTextRequest.g.verified.cs new file mode 100644 index 0000000000..56c98b8fed --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/NewtonsoftJson/_#G.Models.GenerateTextRequest.g.verified.cs @@ -0,0 +1,37 @@ +//HintName: G.Models.GenerateTextRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateTextRequest + { + /// + /// The prompt that you want to complete.
+ /// Example: This is a test. + ///
+ [global::Newtonsoft.Json.JsonProperty("inputs", Required = global::Newtonsoft.Json.Required.Always)] + public string? Inputs { get; set; } = default!; + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("parameters")] + public global::G.GenerateTextRequestParameters? Parameters { get; set; } + + /// + /// + /// + [global::Newtonsoft.Json.JsonProperty("options")] + public global::G.GenerateTextRequestOptions? Options { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/NewtonsoftJson/_#G.Models.GenerateTextRequestOptions.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/NewtonsoftJson/_#G.Models.GenerateTextRequestOptions.g.verified.cs new file mode 100644 index 0000000000..d8727d5f67 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/NewtonsoftJson/_#G.Models.GenerateTextRequestOptions.g.verified.cs @@ -0,0 +1,32 @@ +//HintName: G.Models.GenerateTextRequestOptions.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateTextRequestOptions + { + /// + /// There is a cache layer on the inference API to speedup requests we have already seen. Most models can use those results as is as models are deterministic (meaning the results will be the same anyway). However if you use a non deterministic model, you can set this parameter to prevent the caching mechanism from being used resulting in a real new query.
+ /// Default Value: true + ///
+ [global::Newtonsoft.Json.JsonProperty("use_cache")] + public object? UseCache { get; set; } + + /// + /// If the model is not ready, wait for it instead of receiving 503. It limits the number of requests required to get your inference done. It is advised to only set this flag to true after receiving a 503 error as it will limit hanging in your application to known places.
+ /// Default Value: false + ///
+ [global::Newtonsoft.Json.JsonProperty("wait_for_model")] + public object? WaitForModel { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/NewtonsoftJson/_#G.Models.GenerateTextRequestParameters.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/NewtonsoftJson/_#G.Models.GenerateTextRequestParameters.g.verified.cs new file mode 100644 index 0000000000..b9dd5b152a --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/NewtonsoftJson/_#G.Models.GenerateTextRequestParameters.g.verified.cs @@ -0,0 +1,88 @@ +//HintName: G.Models.GenerateTextRequestParameters.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateTextRequestParameters + { + /// + /// Integer to define the top tokens considered within the sample operation to create new text.
+ /// Example: 1 + ///
+ [global::Newtonsoft.Json.JsonProperty("top_k")] + public int? TopK { get; set; } + + /// + /// Float to define the tokens that are within the sample operation of text generation.
+ /// Add tokens in the sample for more probable to least probable until the sum of the probabilities is greater than top_p.
+ /// Example: 1 + ///
+ [global::Newtonsoft.Json.JsonProperty("top_p")] + public double? TopP { get; set; } + + /// + /// The temperature of the sampling operation.
+ /// 1 means regular sampling,
+ /// 0 means always take the highest score,
+ /// 100.0 is getting closer to uniform probability.
+ /// Default Value: 1
+ /// Example: 1 + ///
+ [global::Newtonsoft.Json.JsonProperty("temperature")] + public double? Temperature { get; set; } = 1; + + /// + /// The more a token is used within generation the more it is penalized to not be picked in successive generation passes.
+ /// Example: 1 + ///
+ [global::Newtonsoft.Json.JsonProperty("repetition_penalty")] + public double? RepetitionPenalty { get; set; } + + /// + /// The amount of new tokens to be generated, this does not include the input length it is a estimate of the size of generated text you want.
+ /// Each new tokens slows down the request, so look for balance between response times and length of text generated.
+ /// Example: 250 + ///
+ [global::Newtonsoft.Json.JsonProperty("max_new_tokens")] + public int? MaxNewTokens { get; set; } + + /// + /// The amount of time in seconds that the query should take maximum. Network can cause some overhead so it will be a soft limit. Use that in combination with max_new_tokens for best results.
+ /// Example: 1 + ///
+ [global::Newtonsoft.Json.JsonProperty("max_time")] + public double? MaxTime { get; set; } + + /// + /// If set to False, the return results will not contain the original query making it easier for prompting.
+ /// Default Value: true + ///
+ [global::Newtonsoft.Json.JsonProperty("return_full_text")] + public object? ReturnFullText { get; set; } + + /// + /// The number of proposition you want to be returned.
+ /// Default Value: 1
+ /// Example: 1 + ///
+ [global::Newtonsoft.Json.JsonProperty("num_return_sequences")] + public int? NumReturnSequences { get; set; } = 1; + + /// + /// Whether or not to use sampling, use greedy decoding otherwise.
+ /// Default Value: true + ///
+ [global::Newtonsoft.Json.JsonProperty("do_sample")] + public object? DoSample { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/NewtonsoftJson/_#G.Models.GenerateTextResponseValue.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/NewtonsoftJson/_#G.Models.GenerateTextResponseValue.g.verified.cs new file mode 100644 index 0000000000..5fdd6fc0db --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/NewtonsoftJson/_#G.Models.GenerateTextResponseValue.g.verified.cs @@ -0,0 +1,24 @@ +//HintName: G.Models.GenerateTextResponseValue.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateTextResponseValue + { + /// + /// The resulting completion up to and excluding the stop sequences. + /// + [global::Newtonsoft.Json.JsonProperty("generated_text", Required = global::Newtonsoft.Json.Required.Always)] + public string GeneratedText { get; set; } = default!; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::Newtonsoft.Json.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/NewtonsoftJson/_#G.Polyfills.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/NewtonsoftJson/_#G.Polyfills.g.verified.cs new file mode 100644 index 0000000000..241c8bfd80 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/NewtonsoftJson/_#G.Polyfills.g.verified.cs @@ -0,0 +1,54 @@ +//HintName: G.Polyfills.g.cs + +#if !NET6_0_OR_GREATER +#nullable enable + +namespace G +{ + /// + /// + /// + public static partial class OpenApiGeneratorPolyfills + { + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsStringAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsStringAsync(); + } + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsStreamAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsStreamAsync(); + } + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsByteArrayAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsByteArrayAsync(); + } + } +} +#endif \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/Tests.HuggingFace_Diagnostics.verified.txt b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/Tests.HuggingFace_Diagnostics.verified.txt new file mode 100644 index 0000000000..ad47dbb93f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/Tests.HuggingFace_Diagnostics.verified.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/_#AnyOf.2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/_#AnyOf.2.g.verified.cs new file mode 100644 index 0000000000..8333f3c3e9 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/_#AnyOf.2.g.verified.cs @@ -0,0 +1,166 @@ +//HintName: AnyOf.2.g.cs +using System.Linq; + +#nullable enable + +namespace System +{ + /// + /// + /// + public readonly partial struct AnyOf : global::System.IEquatable> + { + /// + /// + /// +#if NET6_0_OR_GREATER + public T1? Value1 { get; init; } +#else + public T1? Value1 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] +#endif + public bool IsValue1 => Value1 != null; + + /// + /// + /// + public static implicit operator AnyOf(T1 value) => new AnyOf(value); + + /// + /// + /// + public static implicit operator T1?(AnyOf @this) => @this.Value1; + + /// + /// + /// + public AnyOf(T1? value) + { + Value1 = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public T2? Value2 { get; init; } +#else + public T2? Value2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] +#endif + public bool IsValue2 => Value2 != null; + + /// + /// + /// + public static implicit operator AnyOf(T2 value) => new AnyOf(value); + + /// + /// + /// + public static implicit operator T2?(AnyOf @this) => @this.Value2; + + /// + /// + /// + public AnyOf(T2? value) + { + Value2 = value; + } + + /// + /// + /// + public AnyOf( + T1? value1, + T2? value2 + ) + { + Value1 = value1; + Value2 = value2; + } + + /// + /// + /// + public object? Object => + Value2 as object ?? + Value1 as object + ; + + /// + /// + /// + public bool Validate() + { + return IsValue1 || IsValue2; + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Value1, + typeof(T1), + Value2, + typeof(T2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + return fields.Aggregate(offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(AnyOf other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + ; + } + + /// + /// + /// + public static bool operator ==(AnyOf obj1, AnyOf obj2) + { + return global::System.Collections.Generic.EqualityComparer>.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(AnyOf obj1, AnyOf obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is AnyOf o && Equals(o); + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/_#G.Api.GenerateText.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/_#G.Api.GenerateText.g.verified.cs new file mode 100644 index 0000000000..97bbdce276 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/_#G.Api.GenerateText.g.verified.cs @@ -0,0 +1,136 @@ +//HintName: G.Api.GenerateText.g.cs + +#nullable enable + +namespace G +{ + public partial class Api + { + partial void PrepareGenerateTextArguments( + global::System.Net.Http.HttpClient httpClient, + ref string modelId, + global::G.GenerateTextRequest request); + partial void PrepareGenerateTextRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string modelId, + global::G.GenerateTextRequest request); + partial void ProcessGenerateTextResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGenerateTextResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Creates a completion for the provided prompt and parameters. + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GenerateTextAsync( + string modelId, + global::G.GenerateTextRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareGenerateTextArguments( + httpClient: _httpClient, + modelId: ref modelId, + request: request); + + using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/models/{modelId}", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, _jsonSerializerOptions); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: _httpClient, + request: httpRequest); + PrepareGenerateTextRequest( + httpClient: _httpClient, + httpRequestMessage: httpRequest, + modelId: modelId, + request: request); + + using var response = await _httpClient.SendAsync( + request: httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: _httpClient, + response: response); + ProcessGenerateTextResponse( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessGenerateTextResponseContent( + httpClient: _httpClient, + httpResponseMessage: response, + content: ref __content); + + try + { + response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException ex) + { + throw new global::System.InvalidOperationException(__content, ex); + } + + return + global::System.Text.Json.JsonSerializer.Deserialize?>(__content, _jsonSerializerOptions) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + + /// + /// Creates a completion for the provided prompt and parameters. + /// + /// + /// + /// The prompt that you want to complete.
+ /// Example: This is a test. + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GenerateTextAsync( + string modelId, + string? inputs, + global::G.GenerateTextRequestParameters? parameters = default, + global::G.GenerateTextRequestOptions? options = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var request = new global::G.GenerateTextRequest + { + Inputs = inputs, + Parameters = parameters, + Options = options, + }; + + return await GenerateTextAsync( + modelId: modelId, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/_#G.Api.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/_#G.Api.g.verified.cs new file mode 100644 index 0000000000..986d489f13 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/_#G.Api.g.verified.cs @@ -0,0 +1,69 @@ +//HintName: G.Api.g.cs + +#nullable enable + +namespace G +{ + /// + /// APIs for sampling from and fine-tuning language models
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class Api : global::System.IDisposable + { + /// + /// + /// + public const string BaseUrl = "https://api-inference.huggingface.co/"; + + private readonly global::System.Net.Http.HttpClient _httpClient; + private readonly global::System.Text.Json.JsonSerializerOptions _jsonSerializerOptions; + + + /// + /// Creates a new instance of the Api. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// + /// + /// + public Api( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null + ) + { + _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _jsonSerializerOptions = _jsonSerializerOptions ?? new global::System.Text.Json.JsonSerializerOptions + { + PropertyNameCaseInsensitive = true, + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + Converters = + { + new global::OpenApiGenerator.JsonConverters.AnyOfJsonConverterFactory2(), + } + }; + } + + /// + public void Dispose() + { + _httpClient.Dispose(); + } + + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/_#G.Models.ErrorResponse.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/_#G.Models.ErrorResponse.g.verified.cs new file mode 100644 index 0000000000..8027e3ff3d --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/_#G.Models.ErrorResponse.g.verified.cs @@ -0,0 +1,28 @@ +//HintName: G.Models.ErrorResponse.g.cs + +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class ErrorResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("error")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AnyOfJsonConverterFactory2))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.AnyOf> Error { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/_#G.Models.GenerateTextRequest.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/_#G.Models.GenerateTextRequest.g.verified.cs new file mode 100644 index 0000000000..17673e9296 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/_#G.Models.GenerateTextRequest.g.verified.cs @@ -0,0 +1,38 @@ +//HintName: G.Models.GenerateTextRequest.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateTextRequest + { + /// + /// The prompt that you want to complete.
+ /// Example: This is a test. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("inputs")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string? Inputs { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("parameters")] + public global::G.GenerateTextRequestParameters? Parameters { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("options")] + public global::G.GenerateTextRequestOptions? Options { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/_#G.Models.GenerateTextRequestOptions.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/_#G.Models.GenerateTextRequestOptions.g.verified.cs new file mode 100644 index 0000000000..4fb51ad83f --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/_#G.Models.GenerateTextRequestOptions.g.verified.cs @@ -0,0 +1,32 @@ +//HintName: G.Models.GenerateTextRequestOptions.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateTextRequestOptions + { + /// + /// There is a cache layer on the inference API to speedup requests we have already seen. Most models can use those results as is as models are deterministic (meaning the results will be the same anyway). However if you use a non deterministic model, you can set this parameter to prevent the caching mechanism from being used resulting in a real new query.
+ /// Default Value: true + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("use_cache")] + public object? UseCache { get; set; } + + /// + /// If the model is not ready, wait for it instead of receiving 503. It limits the number of requests required to get your inference done. It is advised to only set this flag to true after receiving a 503 error as it will limit hanging in your application to known places.
+ /// Default Value: false + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("wait_for_model")] + public object? WaitForModel { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/_#G.Models.GenerateTextRequestParameters.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/_#G.Models.GenerateTextRequestParameters.g.verified.cs new file mode 100644 index 0000000000..4427208c35 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/_#G.Models.GenerateTextRequestParameters.g.verified.cs @@ -0,0 +1,88 @@ +//HintName: G.Models.GenerateTextRequestParameters.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateTextRequestParameters + { + /// + /// Integer to define the top tokens considered within the sample operation to create new text.
+ /// Example: 1 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("top_k")] + public int? TopK { get; set; } + + /// + /// Float to define the tokens that are within the sample operation of text generation.
+ /// Add tokens in the sample for more probable to least probable until the sum of the probabilities is greater than top_p.
+ /// Example: 1 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("top_p")] + public double? TopP { get; set; } + + /// + /// The temperature of the sampling operation.
+ /// 1 means regular sampling,
+ /// 0 means always take the highest score,
+ /// 100.0 is getting closer to uniform probability.
+ /// Default Value: 1
+ /// Example: 1 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] + public double? Temperature { get; set; } = 1; + + /// + /// The more a token is used within generation the more it is penalized to not be picked in successive generation passes.
+ /// Example: 1 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("repetition_penalty")] + public double? RepetitionPenalty { get; set; } + + /// + /// The amount of new tokens to be generated, this does not include the input length it is a estimate of the size of generated text you want.
+ /// Each new tokens slows down the request, so look for balance between response times and length of text generated.
+ /// Example: 250 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("max_new_tokens")] + public int? MaxNewTokens { get; set; } + + /// + /// The amount of time in seconds that the query should take maximum. Network can cause some overhead so it will be a soft limit. Use that in combination with max_new_tokens for best results.
+ /// Example: 1 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("max_time")] + public double? MaxTime { get; set; } + + /// + /// If set to False, the return results will not contain the original query making it easier for prompting.
+ /// Default Value: true + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("return_full_text")] + public object? ReturnFullText { get; set; } + + /// + /// The number of proposition you want to be returned.
+ /// Default Value: 1
+ /// Example: 1 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("num_return_sequences")] + public int? NumReturnSequences { get; set; } = 1; + + /// + /// Whether or not to use sampling, use greedy decoding otherwise.
+ /// Default Value: true + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("do_sample")] + public object? DoSample { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/_#G.Models.GenerateTextResponseValue.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/_#G.Models.GenerateTextResponseValue.g.verified.cs new file mode 100644 index 0000000000..d9543567a5 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/_#G.Models.GenerateTextResponseValue.g.verified.cs @@ -0,0 +1,25 @@ +//HintName: G.Models.GenerateTextResponseValue.g.cs + +#nullable enable + +namespace G +{ + /// + /// + /// + public sealed partial class GenerateTextResponseValue + { + /// + /// The resulting completion up to and excluding the stop sequences. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("generated_text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string GeneratedText { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/_#G.Polyfills.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/_#G.Polyfills.g.verified.cs new file mode 100644 index 0000000000..241c8bfd80 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/_#G.Polyfills.g.verified.cs @@ -0,0 +1,54 @@ +//HintName: G.Polyfills.g.cs + +#if !NET6_0_OR_GREATER +#nullable enable + +namespace G +{ + /// + /// + /// + public static partial class OpenApiGeneratorPolyfills + { + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsStringAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsStringAsync(); + } + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsStreamAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsStreamAsync(); + } + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsByteArrayAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsByteArrayAsync(); + } + } +} +#endif \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/_#JsonConverters.AnyOf2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/_#JsonConverters.AnyOf2.g.verified.cs new file mode 100644 index 0000000000..2bb1d9a806 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/_#JsonConverters.AnyOf2.g.verified.cs @@ -0,0 +1,73 @@ +//HintName: JsonConverters.AnyOf2.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public class AnyOfJsonConverter : global::System.Text.Json.Serialization.JsonConverter> + { + /// + public override global::System.AnyOf Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + var + readerCopy = reader; + T1? value1 = default; + try + { + value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + readerCopy = reader; + T2? value2 = default; + try + { + value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, options); + } + catch (global::System.Text.Json.JsonException) + { + } + + var result = new global::System.AnyOf( + value1, + value2 + ); + + if (value1 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + else if (value2 != null) + { + _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, options); + } + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::System.AnyOf value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + + if (value.IsValue1) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeof(T1), options); + } + else if (value.IsValue2) + { + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeof(T2), options); + } + } + } +} \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/_#JsonConverters.AnyOfFactory2.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/_#JsonConverters.AnyOfFactory2.g.verified.cs new file mode 100644 index 0000000000..e6208cd916 --- /dev/null +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/HuggingFace/SystemTextJson/_#JsonConverters.AnyOfFactory2.g.verified.cs @@ -0,0 +1,26 @@ +//HintName: JsonConverters.AnyOfFactory2.g.cs +#nullable enable + +namespace OpenApiGenerator.JsonConverters +{ + /// + public sealed class AnyOfJsonConverterFactory2 : global::System.Text.Json.Serialization.JsonConverterFactory + { + /// + public override bool CanConvert(global::System.Type? typeToConvert) + { + return typeToConvert is { IsGenericType: true } && typeToConvert.GetGenericTypeDefinition() == typeof(global::System.AnyOf<,>); + } + + /// + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + typeToConvert = typeToConvert ?? throw new global::System.ArgumentNullException(nameof(typeToConvert)); + + return (global::System.Text.Json.Serialization.JsonConverter)global::System.Activator.CreateInstance( + typeof(AnyOfJsonConverter<,>).MakeGenericType(typeToConvert.GenericTypeArguments))!; + } + } +} diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Tests.cs b/src/tests/OpenApiGenerator.SnapshotTests/Tests.cs index 6b166d029e..23341ad602 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Tests.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Tests.cs @@ -70,6 +70,42 @@ public Task LangSmith(JsonSerializerType jsonSerializerType) }); } + [DataTestMethod] + [DataRow(JsonSerializerType.SystemTextJson)] + [DataRow(JsonSerializerType.NewtonsoftJson)] + public Task HuggingFace(JsonSerializerType jsonSerializerType) + { + return CheckSourceAsync(jsonSerializerType, [ + new CustomAdditionalText( + path: H.Resources.huggingface_yaml.FileName, + text: H.Resources.huggingface_yaml.AsString()) + ]); + } + + [DataTestMethod] + [DataRow(JsonSerializerType.SystemTextJson)] + [DataRow(JsonSerializerType.NewtonsoftJson)] + public Task Ai21(JsonSerializerType jsonSerializerType) + { + return CheckSourceAsync(jsonSerializerType, [ + new CustomAdditionalText( + path: H.Resources.ai21_yaml.FileName, + text: H.Resources.ai21_yaml.AsString()) + ]); + } + + [DataTestMethod] + [DataRow(JsonSerializerType.SystemTextJson)] + [DataRow(JsonSerializerType.NewtonsoftJson)] + public Task Cohere(JsonSerializerType jsonSerializerType) + { + return CheckSourceAsync(jsonSerializerType, [ + new CustomAdditionalText( + path: H.Resources.cohere_yaml.FileName, + text: H.Resources.cohere_yaml.AsString()) + ]); + } + [DataTestMethod] [DataRow(JsonSerializerType.SystemTextJson)] [DataRow(JsonSerializerType.NewtonsoftJson)] diff --git a/src/tests/OpenApiGenerator.UnitTests/DataTests.cs b/src/tests/OpenApiGenerator.UnitTests/DataTests.cs index 88a40e14c9..1ef735300d 100644 --- a/src/tests/OpenApiGenerator.UnitTests/DataTests.cs +++ b/src/tests/OpenApiGenerator.UnitTests/DataTests.cs @@ -74,4 +74,28 @@ public Task Dedoose() H.Resources.dedoose_json.AsString(), DefaultSettings))); } + + [TestMethod] + public Task Ai21() + { + return VerifyAsync(Data.Prepare(( + H.Resources.ai21_yaml.AsString(), + DefaultSettings))); + } + + [TestMethod] + public Task HuggingFace() + { + return VerifyAsync(Data.Prepare(( + H.Resources.huggingface_yaml.AsString(), + DefaultSettings))); + } + + [TestMethod] + public Task Cohere() + { + return VerifyAsync(Data.Prepare(( + H.Resources.cohere_yaml.AsString(), + DefaultSettings))); + } } \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.UnitTests/Snapshots/Ai21/ResolvedSchemas/_.verified.txt b/src/tests/OpenApiGenerator.UnitTests/Snapshots/Ai21/ResolvedSchemas/_.verified.txt new file mode 100644 index 0000000000..90c450ea99 --- /dev/null +++ b/src/tests/OpenApiGenerator.UnitTests/Snapshots/Ai21/ResolvedSchemas/_.verified.txt @@ -0,0 +1,564 @@ +[ + AnswerBody(class)[], + Context(string)[], + Question(string)[], + AnswerLength(ref)[], + Mode(ref)[], + AnswerLength(enum)[RAG Engine], + Mode(enum)[RAG Engine], + AssistantMessage(class)[Jamba Complete], + AssistantMessageRole(enum)[Jamba Complete], + Content(string)[Jamba Complete], + ToolCalls(array)[Jamba Complete], + ToolCall(ref)[Jamba Complete], + ToolCall(class)[], + Id(string)[], + ToolCallType(enum)[], + ToolFunction(ref)[], + ToolFunction(class)[], + Name(string)[], + Arguments(string)[], + BodyConvertDocumentFileStudioV1ChatFilesConvertPost(class)[], + Files(array)[], + FilesItem(byte[])[], + BodyV1LibraryUpload(class)[Library management], + File(byte[])[Library management], + Path(string)[Library management], + Labels(array)[Library management], + LabelsItem(string)[Library management], + PublicUrl(string)[Library management], + CustomConfigs(string)[Library management], + BodyV1UploadDataset(class)[datasets], + DatasetFile(byte[])[datasets], + DatasetName(string)[datasets], + SelectedColumns(string)[datasets], + ApproveWhitespaceCorrection(bool)[datasets], + DeleteLongRows(bool)[datasets], + SplitRatio(double)[datasets], + ChatCompletion(class)[Jamba Complete], + Id(string)[Jamba Complete], + Choices(array)[Jamba Complete], + ChatCompletionResponseChoice(ref)[Jamba Complete], + UsageInfo(ref)[Jamba Complete], + ChatCompletionMeta(class)[Jamba Complete], + ChatCompletionResponseChoice(class)[Jamba Complete], + Index(int)[Jamba Complete], + AssistantMessage(ref)[Jamba Complete], + Logprobs(ref)[Jamba Complete], + FinishReason(string)[Jamba Complete], + Logprobs(class)[Jamba Complete], + Content(array)[Jamba Complete], + LogprobsData(ref)[Jamba Complete], + LogprobsData(class)[Jamba Complete], + Token(string)[Jamba Complete], + Logprob(double)[Jamba Complete], + TopLogprobs(array)[Jamba Complete], + TopLogprobsData(ref)[Jamba Complete], + TopLogprobsData(class)[Jamba Complete], + Token(string)[Jamba Complete], + Logprob(double)[Jamba Complete], + UsageInfo(class)[Jamba Complete], + PromptTokens(int)[Jamba Complete], + CompletionTokens(int)[Jamba Complete], + TotalTokens(int)[Jamba Complete], + ChatCompletionResponseDeltaChoice(class)[Jamba Complete], + Index(int)[Jamba Complete], + Delta(anyOf)[Jamba Complete], + ChatStreamingFirstDelta(ref)[Jamba Complete], + ChatStreamingContentDelta(ref)[Jamba Complete], + Logprobs(ref)[Jamba Complete], + FinishReason(string)[Jamba Complete], + ChatStreamingFirstDelta(class)[], + ChatStreamingFirstDeltaRole(enum)[], + ChatStreamingContentDelta(class)[], + Content(string)[], + ChatCompletionVllmStreamingMessage(class)[Jamba Complete], + Id(string)[Jamba Complete], + Choices(array)[Jamba Complete], + ChatCompletionResponseDeltaChoice(ref)[Jamba Complete], + UsageInfo(ref)[Jamba Complete], + ChatCompletionVllmStreamingMessageMeta(class)[Jamba Complete], + ChatMessage(class)[chat], + RoleType(ref)[chat], + Text(string)[chat], + RoleType(enum)[chat], + ChatOutput(class)[chat], + Text(string)[chat], + RoleType(ref)[chat], + FinishReason(ref)[chat], + FinishReason(class)[chat], + Reason(string)[chat], + Length(int)[chat], + Sequence(string)[chat], + ChatResponse(class)[chat], + Id(string)[chat], + Outputs(array)[chat], + ChatOutput(ref)[chat], + CompletionBody(class)[completion], + Prompt(string)[completion], + NumResults(int)[completion], + MaxTokens(int)[completion], + MinTokens(int)[completion], + Temperature(double)[completion], + TopP(double)[completion], + MinP(double)[completion], + StopSequences(array)[completion], + StopSequencesItem(string)[completion], + TopKReturn(int)[completion], + CompletionBodyLogitBias(class)[completion], + FrequencyPenalty(allOf)[completion], + Penalty(ref)[completion], + PresencePenalty(allOf)[completion], + Penalty(ref)[completion], + CountPenalty(allOf)[completion], + Penalty(ref)[completion], + Epoch(int)[completion], + Penalty(class)[completion, chat], + Scale(double)[completion, chat], + ApplyToWhitespaces(bool)[completion, chat], + ApplyToPunctuations(bool)[completion, chat], + ApplyToNumbers(bool)[completion, chat], + ApplyToStopwords(bool)[completion, chat], + ApplyToEmojis(bool)[completion, chat], + ConversationalRagFlowPublicFields(class)[], + Messages(array)[], + Message(ref)[], + Path(string)[], + Labels(array)[], + LabelsItem(string)[], + FileIds(array)[], + FileIdsItem(string)[], + MaxSegments(int)[], + ConversationalRagFlowPublicFieldsRetrievalStrategy(enum)[], + RetrievalSimilarityThreshold(double)[], + MaxNeighbors(int)[], + HybridSearchAlpha(double)[], + Message(class)[], + MessageRole(enum)[], + Content(string)[], + ConversationalRagResult(class)[], + Id(string)[], + Choices(array)[], + Message(ref)[], + SearchQueries(array)[], + SearchQueriesItem(string)[], + ContextRetrieved(bool)[], + AnswerInContext(bool)[], + Sources(array)[], + ConversationalRagSource(ref)[], + ConversationalRagSource(class)[], + Text(string)[], + FileId(string)[], + FileName(string)[], + Score(double)[], + Order(int)[], + PublicUrl(string)[], + Labels(array)[], + LabelsItem(string)[], + Correction(class)[grammatical error corrections], + Suggestion(string)[grammatical error corrections], + StartIndex(int)[grammatical error corrections], + EndIndex(int)[grammatical error corrections], + OriginalText(string)[grammatical error corrections], + CorrectionType(ref)[grammatical error corrections], + CorrectionType(enum)[grammatical error corrections], + CorrectionsBody(class)[grammatical error corrections], + Text(string)[grammatical error corrections], + CorrectionsResponse(class)[grammatical error corrections], + Id(string)[grammatical error corrections], + Corrections(array)[grammatical error corrections], + Correction(ref)[grammatical error corrections], + CustomModelInput(class)[custom-models], + CustomModelType(ref)[custom-models], + LearningRate(double)[custom-models], + NumEpochs(int)[custom-models], + DatasetId(string)[custom-models], + ModelName(string)[custom-models], + CustomModelType(enum)[custom-models], + CustomModelUpdateBody(class)[custom-models], + DefaultEpoch(int)[custom-models], + DocumentSchema(class)[Jamba Complete], + Id(string)[Jamba Complete], + Content(string)[Jamba Complete], + DocumentSchemaMetadata(class)[Jamba Complete], + DocumentType(enum)[summarize, segmentation], + EmbedType(enum)[], + EmbeddingsBody(class)[], + Texts(array)[], + TextsItem(string)[], + Type(allOf)[], + EmbedType(ref)[], + FileDeleteResponse(class)[Library management], + Id(string)[Library management], + FileId(string)[Library management], + FileResponse(class)[Library management], + FileId(string)[Library management], + Name(string)[Library management], + Path(string)[Library management], + FileType(string)[Library management], + SizeBytes(int)[Library management], + Labels(array)[Library management], + LabelsItem(string)[Library management], + PublicUrl(string)[Library management], + CreatedBy(string)[Library management], + CreationDate(DateTime)[Library management], + LastUpdated(DateTime)[Library management], + Status(string)[Library management], + FileStatus(enum)[Library management], + FileUploadResponse(class)[Library management], + Id(string)[Library management], + FileId(string)[Library management], + FilesUpdateRequest(class)[Library management], + PublicUrl(string)[Library management], + Labels(array)[Library management], + LabelsItem(string)[Library management], + FunctionToolDefinition(class)[Jamba Complete], + Name(string)[], + Description(string)[], + ToolParameters(ref)[], + ToolParameters(class)[], + ToolParametersType(enum)[], + ToolParametersProperties(class)[], + Required(array)[], + RequiredItem(string)[], + HTTPValidationError(class)[Jamba Complete, completion, custom-models, datasets, paraphrase, summarize, segmentation, grammatical error corrections, Library management, RAG Engine, chat, tokenize], + Detail(array)[Jamba Complete, completion, custom-models, datasets, paraphrase, summarize, segmentation, grammatical error corrections, Library management, RAG Engine, chat, tokenize], + ValidationError(ref)[Jamba Complete, completion, custom-models, datasets, paraphrase, summarize, segmentation, grammatical error corrections, Library management, RAG Engine, chat, tokenize], + ValidationError(class)[Jamba Complete, completion, custom-models, datasets, paraphrase, summarize, segmentation, grammatical error corrections, Library management, RAG Engine, chat, tokenize], + Loc(array)[Jamba Complete, completion, custom-models, datasets, paraphrase, summarize, segmentation, grammatical error corrections, Library management, RAG Engine, chat, tokenize], + LocItem(anyOf)[Jamba Complete, completion, custom-models, datasets, paraphrase, summarize, segmentation, grammatical error corrections, Library management, RAG Engine, chat, tokenize], + LocItemVariant1(string)[Jamba Complete, completion, custom-models, datasets, paraphrase, summarize, segmentation, grammatical error corrections, Library management, RAG Engine, chat, tokenize], + LocItemVariant2(int)[Jamba Complete, completion, custom-models, datasets, paraphrase, summarize, segmentation, grammatical error corrections, Library management, RAG Engine, chat, tokenize], + Msg(string)[Jamba Complete, completion, custom-models, datasets, paraphrase, summarize, segmentation, grammatical error corrections, Library management, RAG Engine, chat, tokenize], + Type(string)[Jamba Complete, completion, custom-models, datasets, paraphrase, summarize, segmentation, grammatical error corrections, Library management, RAG Engine, chat, tokenize], + Highlight(class)[], + Text(string)[], + StartIndex(int)[], + EndIndex(int)[], + LibraryAnswerRequest(class)[RAG Engine], + Question(string)[RAG Engine], + MaxSegments(int)[RAG Engine], + Path(string)[RAG Engine], + Labels(array)[RAG Engine], + LabelsItem(string)[RAG Engine], + FileIds(array)[RAG Engine], + FileIdsItem(string)[RAG Engine], + AnswerLength(ref)[RAG Engine], + Mode(ref)[RAG Engine], + RetrievalStrategy(allOf)[RAG Engine], + RetrievalStrategy3(ref)[RAG Engine], + RetrievalSimilarityThreshold(double)[RAG Engine], + HybridSearchAlpha(double)[RAG Engine], + RetrievalStrategy3(enum)[RAG Engine], + LibraryAnswerResponse(class)[RAG Engine], + Id(string)[RAG Engine], + AnswerInContext(bool)[RAG Engine], + Answer(string)[RAG Engine], + Sources(array)[RAG Engine], + SourceDocument(ref)[RAG Engine], + SourceDocument(class)[RAG Engine], + FileId(string)[RAG Engine], + Name(string)[RAG Engine], + Highlights(array)[RAG Engine], + HighlightsItem(string)[RAG Engine], + PublicUrl(string)[RAG Engine], + Labels(array)[RAG Engine], + LabelsItem(string)[RAG Engine], + LibrarySearchRequest(class)[RAG Engine], + Query(string)[RAG Engine], + MaxSegments(int)[RAG Engine], + Path(string)[RAG Engine], + Labels(array)[RAG Engine], + LabelsItem(string)[RAG Engine], + FileIds(array)[RAG Engine], + FileIdsItem(string)[RAG Engine], + RetrievalStrategy2(allOf)[RAG Engine], + RetrievalStrategy3(ref)[RAG Engine], + MaxNeighbors(int)[RAG Engine], + RetrievalSimilarityThreshold(double)[RAG Engine], + HybridSearchAlpha(double)[RAG Engine], + LibrarySearchResponse(class)[RAG Engine], + Id(string)[RAG Engine], + Results(array)[RAG Engine], + LibrarySearchResult(ref)[RAG Engine], + LibrarySearchResult(class)[RAG Engine], + Text(string)[RAG Engine], + FileId(string)[RAG Engine], + FileName(string)[RAG Engine], + Score(double)[RAG Engine], + Order(int)[RAG Engine], + PublicUrl(string)[RAG Engine], + Labels(array)[RAG Engine], + LabelsItem(string)[RAG Engine], + MockResponseConfig(class)[Jamba Complete], + ResponseDelaySeconds(double)[Jamba Complete], + StreamResponseDelayBetweenDeltasSeconds(double)[Jamba Complete], + ModelName(enum)[Jamba Complete], + ParaphraseBody(class)[paraphrase], + Text(string)[paraphrase], + Style(allOf)[paraphrase], + StyleType(ref)[paraphrase], + StartIndex(int)[paraphrase], + EndIndex(int)[paraphrase], + StyleType(enum)[paraphrase], + ResponseFormat(class)[Jamba Complete], + ResponseFormatType(enum)[Jamba Complete], + Segment(class)[segmentation], + SegmentText(string)[segmentation], + SegmentType(string)[segmentation], + SegmentSummary(class)[summarize], + Summary(string)[summarize], + SegmentText(string)[summarize], + SegmentHtml(string)[summarize], + SegmentType(string)[summarize], + HasSummary(bool)[summarize], + Highlights(array)[summarize], + Highlight(ref)[summarize], + SegmentationBody(class)[segmentation], + DocumentType(ref)[segmentation], + Source(string)[segmentation], + SegmentationResponse(class)[segmentation], + Id(string)[segmentation], + Segments(array)[segmentation], + Segment(ref)[segmentation], + SegmentedSummaryBody(class)[summarize], + Source(string)[summarize], + DocumentType(ref)[summarize], + Focus(string)[summarize], + SummarizationResponse(class)[summarize], + Id(string)[summarize], + Summary(string)[summarize], + SummarizeBody(class)[summarize], + Source(string)[summarize], + DocumentType(ref)[summarize], + Focus(string)[summarize], + SummaryMethod(ref)[summarize], + SummaryMethod(enum)[summarize], + SummarizeBySegmentResponse(class)[summarize], + Id(string)[summarize], + Segments(array)[summarize], + SegmentSummary(ref)[summarize], + SystemMessage(class)[Jamba Complete], + SystemMessageRole(enum)[Jamba Complete], + Content(string)[Jamba Complete], + TokenizeBody(class)[tokenize], + Text(string)[tokenize], + ToolDefinition(class)[Jamba Complete], + ToolDefinitionType(enum)[Jamba Complete], + FunctionToolDefinition(ref)[Jamba Complete], + ToolMessage(class)[Jamba Complete], + ToolMessageRole(enum)[Jamba Complete], + Content(string)[Jamba Complete], + ToolCallId(string)[Jamba Complete], + UserMessage(class)[Jamba Complete], + UserMessageRole(enum)[Jamba Complete], + Content(string)[Jamba Complete], + LanguageStudioApiServerDataTypesChatChatRequest(class)[Jamba Complete], + ModelName(ref)[Jamba Complete], + Messages(array)[Jamba Complete], + MessagesItem(oneOf)[Jamba Complete], + UserMessage(ref)[Jamba Complete], + AssistantMessage(ref)[Jamba Complete], + ToolMessage(ref)[Jamba Complete], + SystemMessage(ref)[Jamba Complete], + Tools(array)[Jamba Complete], + ToolDefinition(ref)[Jamba Complete], + N(int)[Jamba Complete], + MaxTokens(int)[Jamba Complete], + Temperature(double)[Jamba Complete], + TopP(double)[Jamba Complete], + Stop(anyOf)[Jamba Complete], + StopVariant1(string)[Jamba Complete], + StopVariant2(array)[Jamba Complete], + StopVariant2Item(string)[Jamba Complete], + Stream(bool)[Jamba Complete], + MockResponseConfig(ref)[Jamba Complete], + Documents(array)[Jamba Complete], + DocumentSchema(ref)[Jamba Complete], + ResponseFormat2(allOf)[Jamba Complete], + ResponseFormat(ref)[Jamba Complete], + LanguageStudioApiServerDataTypesJ2ChatChatRequest(class)[chat], + Messages(array)[chat], + ChatMessage(ref)[chat], + System(string)[chat], + FrequencyPenalty2(allOf)[chat], + Penalty(ref)[chat], + PresencePenalty2(allOf)[chat], + Penalty(ref)[chat], + CountPenalty2(allOf)[chat], + Penalty(ref)[chat], + NumResults(int)[chat], + Temperature(double)[chat], + MaxTokens(int)[chat], + MinTokens(int)[chat], + TopP(double)[chat], + TopKReturn(int)[chat], + StopSequences(array)[chat], + StopSequencesItem(string)[chat], + BodyConvertDocumentFileStudioV1ChatFilesConvertPost(ref)[], + LanguageStudioApiServerDataTypesChatChatRequest(ref)[Jamba Complete], + CompletionBody(ref)[completion], + CompletionBody(ref)[completion], + CompletionBody(ref)[completion], + CompletionBody(ref)[completion], + CompletionBody(ref)[completion], + CompletionBody(ref)[completion], + CompletionBody(ref)[completion], + CompletionBody(ref)[completion], + CompletionBody(ref)[completion], + CompletionBody(ref)[completion], + CompletionBody(ref)[completion], + CompletionBody(ref)[completion], + CompletionBody(ref)[completion], + CompletionBody(ref)[completion], + CompletionBody(ref)[completion], + CustomModelInput(ref)[custom-models], + CustomModelUpdateBody(ref)[custom-models], + BodyV1UploadDataset(ref)[datasets], + ParaphraseBody(ref)[paraphrase], + SummarizeBody(ref)[summarize], + SegmentedSummaryBody(ref)[summarize], + SegmentationBody(ref)[segmentation], + EmbeddingsBody(ref)[], + ConversationalRagFlowPublicFields(ref)[], + CorrectionsBody(ref)[grammatical error corrections], + BodyV1LibraryUpload(ref)[Library management], + FilesUpdateRequest(ref)[Library management], + LibraryAnswerRequest(ref)[RAG Engine], + LibrarySearchRequest(ref)[RAG Engine], + AnswerBody(ref)[], + LanguageStudioApiServerDataTypesJ2ChatChatRequest(ref)[chat], + TokenizeBody(ref)[tokenize], + V1ChatCompleteAuthorization(string)[Jamba Complete], + V1J2LightCompleteModel(string)[completion], + V1J2LightCustomModelCompleteCustomModelName(string)[completion], + V1J2LightCustomModelCompleteCustomModelType(string)[completion], + V1J2MidCompleteModel(string)[completion], + V1J2MidCustomModelCompleteCustomModelName(string)[completion], + V1J2MidCustomModelCompleteCustomModelType(string)[completion], + V1J2UltraCompleteModel(string)[completion], + V1J2UltraCompleteCustomModelName(string)[completion], + V1J2UltraCompleteCustomModelType(string)[completion], + V1J2LargeCompleteModel(string)[completion], + V1J2LargeInstructCompleteModel(string)[completion], + V1J2GrandeCompleteModel(string)[completion], + V1J2GrandeInstructCompleteModel(string)[completion], + V1J2JumboCompleteModel(string)[completion], + V1J2JumboInstructCompleteModel(string)[completion], + V1J2LargeCustomModelCompleteCustomModelName(string)[completion], + V1J2LargeCustomModelCompleteCustomModelType(string)[completion], + V1J2GrandeCustomModelCompleteCustomModelName(string)[completion], + V1J2GrandeCustomModelCompleteCustomModelType(string)[completion], + V1J2JumboCompleteCustomModelName(string)[completion], + V1J2JumboCompleteCustomModelType(string)[completion], + V1GetCustomModelsIncludeMetadata(bool)[custom-models], + V1GetCustomModelCustomModelPid(string)[custom-models], + V1UpdateCustomModelCustomModelPid(string)[custom-models], + V1GetDatasetDatasetPid(string)[datasets], + V1DeleteDatasetDatasetPid(string)[datasets], + V1GetDatasetDownloadUrlDatasetPid(string)[datasets], + V1GetDatasetDownloadUrlDatasetName(string)[datasets], + V1LibraryManagementName(string)[Library management], + V1LibraryManagementPath(string)[Library management], + FileStatus(ref)[Library management], + V1LibraryManagementLabel(array)[Library management], + V1LibraryManagementLabelItem(string)[Library management], + V1LibraryManagementLimit(int)[Library management], + V1LibraryManagementOffset(int)[Library management], + V1LibraryManagementFileId(string)[Library management], + V1LibraryManagementFileId(string)[Library management], + V1LibraryDeleteFileId(string)[Library management], + V1LibraryManagementFileId(string)[RAG Engine], + V1J2UltraChatModel(string)[chat], + ConvertDocumentFileStudioV1ChatFilesConvertPostResponse(class)[], + HTTPValidationError(ref)[], + V1ChatCompleteResponse(anyOf)[Jamba Complete], + ChatCompletion(ref)[Jamba Complete], + V1ChatCompleteResponseVariant2(array)[Jamba Complete], + ChatCompletionVllmStreamingMessage(ref)[Jamba Complete], + HTTPValidationError(ref)[Jamba Complete], + V1J2LightCompleteResponse(class)[completion], + HTTPValidationError(ref)[completion], + V1J2LightCustomModelCompleteResponse(class)[completion], + HTTPValidationError(ref)[completion], + V1J2MidCompleteResponse(class)[completion], + HTTPValidationError(ref)[completion], + V1J2MidCustomModelCompleteResponse(class)[completion], + HTTPValidationError(ref)[completion], + V1J2UltraCompleteResponse(class)[completion], + HTTPValidationError(ref)[completion], + V1J2UltraCompleteResponse2(class)[completion], + HTTPValidationError(ref)[completion], + V1J2LargeCompleteResponse(class)[completion], + HTTPValidationError(ref)[completion], + V1J2LargeInstructCompleteResponse(class)[completion], + HTTPValidationError(ref)[completion], + V1J2GrandeCompleteResponse(class)[completion], + HTTPValidationError(ref)[completion], + V1J2GrandeInstructCompleteResponse(class)[completion], + HTTPValidationError(ref)[completion], + V1J2JumboCompleteResponse(class)[completion], + HTTPValidationError(ref)[completion], + V1J2JumboInstructCompleteResponse(class)[completion], + HTTPValidationError(ref)[completion], + V1J2LargeCustomModelCompleteResponse(class)[completion], + HTTPValidationError(ref)[completion], + V1J2GrandeCustomModelCompleteResponse(class)[completion], + HTTPValidationError(ref)[completion], + V1J2JumboCompleteResponse2(class)[completion], + HTTPValidationError(ref)[completion], + V1GetCustomModelsResponse(class)[custom-models], + HTTPValidationError(ref)[custom-models], + V1CreateCustomModelResponse(class)[custom-models], + HTTPValidationError(ref)[custom-models], + V1GetCustomModelResponse(class)[custom-models], + HTTPValidationError(ref)[custom-models], + V1UpdateCustomModelResponse(class)[custom-models], + HTTPValidationError(ref)[custom-models], + V1GetDatasetsResponse(class)[datasets], + V1UploadDatasetResponse(class)[datasets], + HTTPValidationError(ref)[datasets], + V1GetDatasetResponse(class)[datasets], + HTTPValidationError(ref)[datasets], + V1DeleteDatasetResponse(class)[datasets], + HTTPValidationError(ref)[datasets], + V1GetDatasetDownloadUrlResponse(class)[datasets], + HTTPValidationError(ref)[datasets], + V1ParaphrazeResponse(class)[paraphrase], + HTTPValidationError(ref)[paraphrase], + SummarizationResponse(ref)[summarize], + HTTPValidationError(ref)[summarize], + SummarizeBySegmentResponse(ref)[summarize], + HTTPValidationError(ref)[summarize], + SegmentationResponse(ref)[segmentation], + HTTPValidationError(ref)[segmentation], + V1EmbedResponse(class)[], + HTTPValidationError(ref)[], + ConversationalRagResult(ref)[], + HTTPValidationError(ref)[], + CorrectionsResponse(ref)[grammatical error corrections], + HTTPValidationError(ref)[grammatical error corrections], + V1LibraryManagementResponse(array)[Library management], + FileResponse(ref)[Library management], + HTTPValidationError(ref)[Library management], + FileUploadResponse(ref)[Library management], + HTTPValidationError(ref)[Library management], + FileResponse(ref)[Library management], + HTTPValidationError(ref)[Library management], + V1LibraryManagementResponse(class)[Library management], + HTTPValidationError(ref)[Library management], + FileDeleteResponse(ref)[Library management], + HTTPValidationError(ref)[Library management], + LibraryAnswerResponse(ref)[RAG Engine], + HTTPValidationError(ref)[RAG Engine], + LibrarySearchResponse(ref)[RAG Engine], + HTTPValidationError(ref)[RAG Engine], + V1LibraryManagementResponse(string)[RAG Engine], + HTTPValidationError(ref)[RAG Engine], + V1AnswerResponse(class)[], + HTTPValidationError(ref)[], + ChatResponse(ref)[chat], + HTTPValidationError(ref)[chat], + V1TokenizeResponse(class)[tokenize], + HTTPValidationError(ref)[tokenize] +] \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.UnitTests/Snapshots/Ai21/Schemas/_.verified.txt b/src/tests/OpenApiGenerator.UnitTests/Snapshots/Ai21/Schemas/_.verified.txt new file mode 100644 index 0000000000..30c56aacd1 --- /dev/null +++ b/src/tests/OpenApiGenerator.UnitTests/Snapshots/Ai21/Schemas/_.verified.txt @@ -0,0 +1,564 @@ +[ + AnswerBody(class), + Context(string), + Question(string), + AnswerLength(ref), + Mode(ref), + AnswerLength(enum), + AssistantMessage(class), + AssistantMessageRole(enum), + Content(string), + ToolCalls(array), + ToolCall(ref), + BodyConvertDocumentFileStudioV1ChatFilesConvertPost(class), + Files(array), + FilesItem(byte[]), + BodyV1LibraryUpload(class), + File(byte[]), + Path(string), + Labels(array), + LabelsItem(string), + PublicUrl(string), + CustomConfigs(string), + BodyV1UploadDataset(class), + DatasetFile(byte[]), + DatasetName(string), + SelectedColumns(string), + ApproveWhitespaceCorrection(bool), + DeleteLongRows(bool), + SplitRatio(double), + ChatCompletion(class), + Id(string), + Choices(array), + ChatCompletionResponseChoice(ref), + UsageInfo(ref), + ChatCompletionMeta(class), + ChatCompletionResponseChoice(class), + Index(int), + AssistantMessage(ref), + Logprobs(ref), + FinishReason(string), + ChatCompletionResponseDeltaChoice(class), + Index(int), + Delta(anyOf), + ChatStreamingFirstDelta(ref), + ChatStreamingContentDelta(ref), + Logprobs(ref), + FinishReason(string), + ChatCompletionVllmStreamingMessage(class), + Id(string), + Choices(array), + ChatCompletionResponseDeltaChoice(ref), + UsageInfo(ref), + ChatCompletionVllmStreamingMessageMeta(class), + ChatMessage(class), + RoleType(ref), + Text(string), + ChatOutput(class), + Text(string), + RoleType(ref), + FinishReason(ref), + ChatResponse(class), + Id(string), + Outputs(array), + ChatOutput(ref), + ChatStreamingContentDelta(class), + Content(string), + ChatStreamingFirstDelta(class), + ChatStreamingFirstDeltaRole(enum), + CompletionBody(class), + Prompt(string), + NumResults(int), + MaxTokens(int), + MinTokens(int), + Temperature(double), + TopP(double), + MinP(double), + StopSequences(array), + StopSequencesItem(string), + TopKReturn(int), + CompletionBodyLogitBias(class), + FrequencyPenalty(allOf), + Penalty(ref), + PresencePenalty(allOf), + Penalty(ref), + CountPenalty(allOf), + Penalty(ref), + Epoch(int), + ConversationalRagFlowPublicFields(class), + Messages(array), + Message(ref), + Path(string), + Labels(array), + LabelsItem(string), + FileIds(array), + FileIdsItem(string), + MaxSegments(int), + ConversationalRagFlowPublicFieldsRetrievalStrategy(enum), + RetrievalSimilarityThreshold(double), + MaxNeighbors(int), + HybridSearchAlpha(double), + ConversationalRagResult(class), + Id(string), + Choices(array), + Message(ref), + SearchQueries(array), + SearchQueriesItem(string), + ContextRetrieved(bool), + AnswerInContext(bool), + Sources(array), + ConversationalRagSource(ref), + ConversationalRagSource(class), + Text(string), + FileId(string), + FileName(string), + Score(double), + Order(int), + PublicUrl(string), + Labels(array), + LabelsItem(string), + Correction(class), + Suggestion(string), + StartIndex(int), + EndIndex(int), + OriginalText(string), + CorrectionType(ref), + CorrectionType(enum), + CorrectionsBody(class), + Text(string), + CorrectionsResponse(class), + Id(string), + Corrections(array), + Correction(ref), + CustomModelInput(class), + CustomModelType(ref), + LearningRate(double), + NumEpochs(int), + DatasetId(string), + ModelName(string), + CustomModelType(enum), + CustomModelUpdateBody(class), + DefaultEpoch(int), + DocumentSchema(class), + Id(string), + Content(string), + DocumentSchemaMetadata(class), + DocumentType(enum), + EmbedType(enum), + EmbeddingsBody(class), + Texts(array), + TextsItem(string), + Type(allOf), + EmbedType(ref), + FileDeleteResponse(class), + Id(string), + FileId(string), + FileResponse(class), + FileId(string), + Name(string), + Path(string), + FileType(string), + SizeBytes(int), + Labels(array), + LabelsItem(string), + PublicUrl(string), + CreatedBy(string), + CreationDate(DateTime), + LastUpdated(DateTime), + Status(string), + FileStatus(enum), + FileUploadResponse(class), + Id(string), + FileId(string), + FilesUpdateRequest(class), + PublicUrl(string), + Labels(array), + LabelsItem(string), + FinishReason(class), + Reason(string), + Length(int), + Sequence(string), + FunctionToolDefinition(class), + Name(string), + Description(string), + ToolParameters(ref), + HTTPValidationError(class), + Detail(array), + ValidationError(ref), + Highlight(class), + Text(string), + StartIndex(int), + EndIndex(int), + LibraryAnswerRequest(class), + Question(string), + MaxSegments(int), + Path(string), + Labels(array), + LabelsItem(string), + FileIds(array), + FileIdsItem(string), + AnswerLength(ref), + Mode(ref), + RetrievalStrategy(allOf), + RetrievalStrategy3(ref), + RetrievalSimilarityThreshold(double), + HybridSearchAlpha(double), + LibraryAnswerResponse(class), + Id(string), + AnswerInContext(bool), + Answer(string), + Sources(array), + SourceDocument(ref), + LibrarySearchRequest(class), + Query(string), + MaxSegments(int), + Path(string), + Labels(array), + LabelsItem(string), + FileIds(array), + FileIdsItem(string), + RetrievalStrategy2(allOf), + RetrievalStrategy3(ref), + MaxNeighbors(int), + RetrievalSimilarityThreshold(double), + HybridSearchAlpha(double), + LibrarySearchResponse(class), + Id(string), + Results(array), + LibrarySearchResult(ref), + LibrarySearchResult(class), + Text(string), + FileId(string), + FileName(string), + Score(double), + Order(int), + PublicUrl(string), + Labels(array), + LabelsItem(string), + Logprobs(class), + Content(array), + LogprobsData(ref), + LogprobsData(class), + Token(string), + Logprob(double), + TopLogprobs(array), + TopLogprobsData(ref), + Message(class), + MessageRole(enum), + Content(string), + MockResponseConfig(class), + ResponseDelaySeconds(double), + StreamResponseDelayBetweenDeltasSeconds(double), + Mode(enum), + ModelName(enum), + ParaphraseBody(class), + Text(string), + Style(allOf), + StyleType(ref), + StartIndex(int), + EndIndex(int), + Penalty(class), + Scale(double), + ApplyToWhitespaces(bool), + ApplyToPunctuations(bool), + ApplyToNumbers(bool), + ApplyToStopwords(bool), + ApplyToEmojis(bool), + ResponseFormat(class), + ResponseFormatType(enum), + RetrievalStrategy3(enum), + RoleType(enum), + Segment(class), + SegmentText(string), + SegmentType(string), + SegmentSummary(class), + Summary(string), + SegmentText(string), + SegmentHtml(string), + SegmentType(string), + HasSummary(bool), + Highlights(array), + Highlight(ref), + SegmentationBody(class), + DocumentType(ref), + Source(string), + SegmentationResponse(class), + Id(string), + Segments(array), + Segment(ref), + SegmentedSummaryBody(class), + Source(string), + DocumentType(ref), + Focus(string), + SourceDocument(class), + FileId(string), + Name(string), + Highlights(array), + HighlightsItem(string), + PublicUrl(string), + Labels(array), + LabelsItem(string), + StyleType(enum), + SummarizationResponse(class), + Id(string), + Summary(string), + SummarizeBody(class), + Source(string), + DocumentType(ref), + Focus(string), + SummaryMethod(ref), + SummarizeBySegmentResponse(class), + Id(string), + Segments(array), + SegmentSummary(ref), + SummaryMethod(enum), + SystemMessage(class), + SystemMessageRole(enum), + Content(string), + TokenizeBody(class), + Text(string), + ToolCall(class), + Id(string), + ToolCallType(enum), + ToolFunction(ref), + ToolDefinition(class), + ToolDefinitionType(enum), + FunctionToolDefinition(ref), + ToolFunction(class), + Name(string), + Arguments(string), + ToolMessage(class), + ToolMessageRole(enum), + Content(string), + ToolCallId(string), + ToolParameters(class), + ToolParametersType(enum), + ToolParametersProperties(class), + Required(array), + RequiredItem(string), + TopLogprobsData(class), + Token(string), + Logprob(double), + UsageInfo(class), + PromptTokens(int), + CompletionTokens(int), + TotalTokens(int), + UserMessage(class), + UserMessageRole(enum), + Content(string), + ValidationError(class), + Loc(array), + LocItem(anyOf), + LocItemVariant1(string), + LocItemVariant2(int), + Msg(string), + Type(string), + LanguageStudioApiServerDataTypesChatChatRequest(class), + ModelName(ref), + Messages(array), + MessagesItem(oneOf), + UserMessage(ref), + AssistantMessage(ref), + ToolMessage(ref), + SystemMessage(ref), + Tools(array), + ToolDefinition(ref), + N(int), + MaxTokens(int), + Temperature(double), + TopP(double), + Stop(anyOf), + StopVariant1(string), + StopVariant2(array), + StopVariant2Item(string), + Stream(bool), + MockResponseConfig(ref), + Documents(array), + DocumentSchema(ref), + ResponseFormat2(allOf), + ResponseFormat(ref), + LanguageStudioApiServerDataTypesJ2ChatChatRequest(class), + Messages(array), + ChatMessage(ref), + System(string), + FrequencyPenalty2(allOf), + Penalty(ref), + PresencePenalty2(allOf), + Penalty(ref), + CountPenalty2(allOf), + Penalty(ref), + NumResults(int), + Temperature(double), + MaxTokens(int), + MinTokens(int), + TopP(double), + TopKReturn(int), + StopSequences(array), + StopSequencesItem(string), + BodyConvertDocumentFileStudioV1ChatFilesConvertPost(ref), + LanguageStudioApiServerDataTypesChatChatRequest(ref), + CompletionBody(ref), + CompletionBody(ref), + CompletionBody(ref), + CompletionBody(ref), + CompletionBody(ref), + CompletionBody(ref), + CompletionBody(ref), + CompletionBody(ref), + CompletionBody(ref), + CompletionBody(ref), + CompletionBody(ref), + CompletionBody(ref), + CompletionBody(ref), + CompletionBody(ref), + CompletionBody(ref), + CustomModelInput(ref), + CustomModelUpdateBody(ref), + BodyV1UploadDataset(ref), + ParaphraseBody(ref), + SummarizeBody(ref), + SegmentedSummaryBody(ref), + SegmentationBody(ref), + EmbeddingsBody(ref), + ConversationalRagFlowPublicFields(ref), + CorrectionsBody(ref), + BodyV1LibraryUpload(ref), + FilesUpdateRequest(ref), + LibraryAnswerRequest(ref), + LibrarySearchRequest(ref), + AnswerBody(ref), + LanguageStudioApiServerDataTypesJ2ChatChatRequest(ref), + TokenizeBody(ref), + V1ChatCompleteAuthorization(string), + V1J2LightCompleteModel(string), + V1J2LightCustomModelCompleteCustomModelName(string), + V1J2LightCustomModelCompleteCustomModelType(string), + V1J2MidCompleteModel(string), + V1J2MidCustomModelCompleteCustomModelName(string), + V1J2MidCustomModelCompleteCustomModelType(string), + V1J2UltraCompleteModel(string), + V1J2UltraCompleteCustomModelName(string), + V1J2UltraCompleteCustomModelType(string), + V1J2LargeCompleteModel(string), + V1J2LargeInstructCompleteModel(string), + V1J2GrandeCompleteModel(string), + V1J2GrandeInstructCompleteModel(string), + V1J2JumboCompleteModel(string), + V1J2JumboInstructCompleteModel(string), + V1J2LargeCustomModelCompleteCustomModelName(string), + V1J2LargeCustomModelCompleteCustomModelType(string), + V1J2GrandeCustomModelCompleteCustomModelName(string), + V1J2GrandeCustomModelCompleteCustomModelType(string), + V1J2JumboCompleteCustomModelName(string), + V1J2JumboCompleteCustomModelType(string), + V1GetCustomModelsIncludeMetadata(bool), + V1GetCustomModelCustomModelPid(string), + V1UpdateCustomModelCustomModelPid(string), + V1GetDatasetDatasetPid(string), + V1DeleteDatasetDatasetPid(string), + V1GetDatasetDownloadUrlDatasetPid(string), + V1GetDatasetDownloadUrlDatasetName(string), + V1LibraryManagementName(string), + V1LibraryManagementPath(string), + FileStatus(ref), + V1LibraryManagementLabel(array), + V1LibraryManagementLabelItem(string), + V1LibraryManagementLimit(int), + V1LibraryManagementOffset(int), + V1LibraryManagementFileId(string), + V1LibraryManagementFileId(string), + V1LibraryDeleteFileId(string), + V1LibraryManagementFileId(string), + V1J2UltraChatModel(string), + ConvertDocumentFileStudioV1ChatFilesConvertPostResponse(class), + HTTPValidationError(ref), + V1ChatCompleteResponse(anyOf), + ChatCompletion(ref), + V1ChatCompleteResponseVariant2(array), + ChatCompletionVllmStreamingMessage(ref), + HTTPValidationError(ref), + V1J2LightCompleteResponse(class), + HTTPValidationError(ref), + V1J2LightCustomModelCompleteResponse(class), + HTTPValidationError(ref), + V1J2MidCompleteResponse(class), + HTTPValidationError(ref), + V1J2MidCustomModelCompleteResponse(class), + HTTPValidationError(ref), + V1J2UltraCompleteResponse(class), + HTTPValidationError(ref), + V1J2UltraCompleteResponse2(class), + HTTPValidationError(ref), + V1J2LargeCompleteResponse(class), + HTTPValidationError(ref), + V1J2LargeInstructCompleteResponse(class), + HTTPValidationError(ref), + V1J2GrandeCompleteResponse(class), + HTTPValidationError(ref), + V1J2GrandeInstructCompleteResponse(class), + HTTPValidationError(ref), + V1J2JumboCompleteResponse(class), + HTTPValidationError(ref), + V1J2JumboInstructCompleteResponse(class), + HTTPValidationError(ref), + V1J2LargeCustomModelCompleteResponse(class), + HTTPValidationError(ref), + V1J2GrandeCustomModelCompleteResponse(class), + HTTPValidationError(ref), + V1J2JumboCompleteResponse2(class), + HTTPValidationError(ref), + V1GetCustomModelsResponse(class), + HTTPValidationError(ref), + V1CreateCustomModelResponse(class), + HTTPValidationError(ref), + V1GetCustomModelResponse(class), + HTTPValidationError(ref), + V1UpdateCustomModelResponse(class), + HTTPValidationError(ref), + V1GetDatasetsResponse(class), + V1UploadDatasetResponse(class), + HTTPValidationError(ref), + V1GetDatasetResponse(class), + HTTPValidationError(ref), + V1DeleteDatasetResponse(class), + HTTPValidationError(ref), + V1GetDatasetDownloadUrlResponse(class), + HTTPValidationError(ref), + V1ParaphrazeResponse(class), + HTTPValidationError(ref), + SummarizationResponse(ref), + HTTPValidationError(ref), + SummarizeBySegmentResponse(ref), + HTTPValidationError(ref), + SegmentationResponse(ref), + HTTPValidationError(ref), + V1EmbedResponse(class), + HTTPValidationError(ref), + ConversationalRagResult(ref), + HTTPValidationError(ref), + CorrectionsResponse(ref), + HTTPValidationError(ref), + V1LibraryManagementResponse(array), + FileResponse(ref), + HTTPValidationError(ref), + FileUploadResponse(ref), + HTTPValidationError(ref), + FileResponse(ref), + HTTPValidationError(ref), + V1LibraryManagementResponse(class), + HTTPValidationError(ref), + FileDeleteResponse(ref), + HTTPValidationError(ref), + LibraryAnswerResponse(ref), + HTTPValidationError(ref), + LibrarySearchResponse(ref), + HTTPValidationError(ref), + V1LibraryManagementResponse(string), + HTTPValidationError(ref), + V1AnswerResponse(class), + HTTPValidationError(ref), + ChatResponse(ref), + HTTPValidationError(ref), + V1TokenizeResponse(class), + HTTPValidationError(ref) +] \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.UnitTests/Snapshots/Cohere/ResolvedSchemas/_.verified.txt b/src/tests/OpenApiGenerator.UnitTests/Snapshots/Cohere/ResolvedSchemas/_.verified.txt new file mode 100644 index 0000000000..ef58db4bac --- /dev/null +++ b/src/tests/OpenApiGenerator.UnitTests/Snapshots/Cohere/ResolvedSchemas/_.verified.txt @@ -0,0 +1,1713 @@ +[ + ChatRole(enum)[], + ToolCall(class)[], + Name(string)[], + ToolCallParameters(class)[], + ChatMessage(class)[], + ChatRole(ref)[], + Message(string)[], + ToolCalls(array)[], + ToolCall(ref)[], + ToolResult(class)[], + ToolCall(ref)[], + Outputs(array)[], + ToolResultOutput(class)[], + ToolMessage(class)[], + ChatRole(ref)[], + ToolResults(array)[], + ToolResult(ref)[], + Message(oneOf)[], + ChatMessage(ref)[], + ToolMessage(ref)[], + ChatConnector(class)[], + Id(string)[], + UserAccessToken(string)[], + ContinueOnFailure(bool)[], + ChatConnectorOptions(class)[], + ChatDocument(class)[], + Id(string)[], + Tool(class)[], + Name(string)[], + Description(string)[], + ToolParameterDefinitions(class)[], + ResponseFormatType(enum)[], + TextResponseFormat(class)[], + ResponseFormatType(ref)[], + JSONResponseFormat(class)[], + ResponseFormatType(ref)[], + JSONResponseFormatSchema(class)[], + ResponseFormat(oneOf)[], + TextResponseFormat(ref)[], + JSONResponseFormat(ref)[], + ChatCitation(class)[], + Start(int)[], + End(int)[], + Text(string)[], + DocumentIds(array)[], + DocumentIdsItem(string)[], + ChatSearchQuery(class)[], + Text(string)[], + GenerationId(string)[], + ChatSearchResultConnector(class)[], + Id(string)[], + ChatSearchResult(class)[], + ChatSearchQuery(ref)[], + ChatSearchResultConnector(ref)[], + DocumentIds(array)[], + DocumentIdsItem(string)[], + ErrorMessage(string)[], + ContinueOnFailure(bool)[], + FinishReason(enum)[], + ApiMeta(class)[/embed-jobs], + ApiMetaApiVersion(class)[/embed-jobs], + Version(string)[/embed-jobs], + IsDeprecated(bool)[/embed-jobs], + IsExperimental(bool)[/embed-jobs], + ApiMetaBilledUnits(class)[/embed-jobs], + InputTokens(double)[/embed-jobs], + OutputTokens(double)[/embed-jobs], + SearchUnits(double)[/embed-jobs], + Classifications(double)[/embed-jobs], + ApiMetaTokens(class)[/embed-jobs], + InputTokens(double)[/embed-jobs], + OutputTokens(double)[/embed-jobs], + Warnings(array)[/embed-jobs], + WarningsItem(string)[/embed-jobs], + NonStreamedChatResponse(class)[], + Text(string)[], + GenerationId(string)[], + Citations(array)[], + ChatCitation(ref)[], + Documents(array)[], + ChatDocument(ref)[], + IsSearchRequired(bool)[], + SearchQueries(array)[], + ChatSearchQuery(ref)[], + SearchResults(array)[], + ChatSearchResult(ref)[], + FinishReason(ref)[], + ToolCalls(array)[], + ToolCall(ref)[], + ChatHistory(array)[], + Message(ref)[], + ApiMeta(ref)[], + ChatStreamEvent(class)[], + ChatStreamEventEventType(enum)[], + ChatStreamStartEvent(allOf)[], + ChatStreamEvent(ref)[], + ChatStreamStartEventVariant2(class)[], + GenerationId(string)[], + ChatSearchQueriesGenerationEvent(allOf)[], + ChatStreamEvent(ref)[], + ChatSearchQueriesGenerationEventVariant2(class)[], + SearchQueries(array)[], + ChatSearchQuery(ref)[], + ChatSearchResultsEvent(allOf)[], + ChatStreamEvent(ref)[], + ChatSearchResultsEventVariant2(class)[], + SearchResults(array)[], + ChatSearchResult(ref)[], + Documents(array)[], + ChatDocument(ref)[], + ChatTextGenerationEvent(allOf)[], + ChatStreamEvent(ref)[], + ChatTextGenerationEventVariant2(class)[], + Text(string)[], + ChatCitationGenerationEvent(allOf)[], + ChatStreamEvent(ref)[], + ChatCitationGenerationEventVariant2(class)[], + Citations(array)[], + ChatCitation(ref)[], + ChatToolCallsGenerationEvent(allOf)[], + ChatStreamEvent(ref)[], + ChatToolCallsGenerationEventVariant2(class)[], + Text(string)[], + ToolCalls(array)[], + ToolCall(ref)[], + ChatStreamEndEvent(allOf)[], + ChatStreamEvent(ref)[], + ChatStreamEndEventVariant2(class)[], + ChatStreamEndEventVariant2FinishReason(enum)[], + NonStreamedChatResponse(ref)[], + ToolCallDelta(class)[], + Name(string)[], + Index(double)[], + Parameters(string)[], + Text(string)[], + ChatToolCallsChunkEvent(allOf)[], + ChatStreamEvent(ref)[], + ChatToolCallsChunkEventVariant2(class)[], + ToolCallDelta(ref)[], + StreamedChatResponse(oneOf)[], + ChatStreamStartEvent(ref)[], + ChatSearchQueriesGenerationEvent(ref)[], + ChatSearchResultsEvent(ref)[], + ChatTextGenerationEvent(ref)[], + ChatCitationGenerationEvent(ref)[], + ChatToolCallsGenerationEvent(ref)[], + ChatStreamEndEvent(ref)[], + ChatToolCallsChunkEvent(ref)[], + TextContent(class)[], + TextContentType(enum)[], + Text(string)[], + Content(oneOf)[], + TextContent(ref)[], + UserMessage(class)[], + UserMessageRole(enum)[], + Content2(oneOf)[], + ContentVariant1(string)[], + ContentVariant2(array)[], + Content(ref)[], + Documents(array)[], + ChatDocument(ref)[], + ToolCall2(class)[], + Id(string)[], + ToolCall2Type(enum)[], + ToolCall2Function(class)[], + Name(string)[], + Arguments(string)[], + ToolSource(class)[], + Id(string)[], + ToolSourceToolOutput(class)[], + DocumentSource(class)[], + Id(string)[], + DocumentSourceDocument(class)[], + Source(oneOf)[], + ToolSource(ref)[], + DocumentSource(ref)[], + Citation(class)[], + Start(int)[], + End(int)[], + Text(string)[], + Sources(array)[], + Source(ref)[], + AssistantMessage(class)[], + AssistantMessageRole(enum)[], + ToolCalls(array)[], + ToolCall2(ref)[], + ToolPlan(string)[], + Content3(oneOf)[], + ContentVariant1(string)[], + ContentVariant2(array)[], + ContentVariant2Item(oneOf)[], + TextContent(ref)[], + Citations(array)[], + Citation(ref)[], + SystemMessage(class)[], + SystemMessageRole(enum)[], + Content4(oneOf)[], + ContentVariant1(string)[], + ContentVariant2(array)[], + ContentVariant2Item2(oneOf)[], + TextContent(ref)[], + ToolContent(class)[], + ToolContentType(enum)[], + ToolContentOutput(class)[], + ToolMessage2(class)[], + ToolMessage2Role(enum)[], + ToolCallId(string)[], + ToolContent(array)[], + ToolContentItem(oneOf)[], + ToolContent(ref)[], + ChatMessage2(oneOf)[], + UserMessage(ref)[], + AssistantMessage(ref)[], + SystemMessage(ref)[], + ToolMessage2(ref)[], + ChatMessages(array)[], + ChatMessage2(ref)[], + Tool2(class)[], + Tool2Type(enum)[], + Tool2Function(class)[], + Name(string)[], + Description(string)[], + Tool2FunctionParameters(class)[], + JSONResponseFormat2(class)[], + ResponseFormatType(ref)[], + JSONResponseFormat2JsonSchema(class)[], + ResponseFormat2(oneOf)[], + TextResponseFormat(ref)[], + JSONResponseFormat2(ref)[], + ChatFinishReason(enum)[], + AssistantMessageResponse(class)[], + AssistantMessageResponseRole(enum)[], + ToolCalls(array)[], + ToolCall2(ref)[], + ToolPlan(string)[], + Content(array)[], + ContentItem(oneOf)[], + TextContent(ref)[], + Citations(array)[], + Citation(ref)[], + Usage(class)[], + UsageBilledUnits(class)[], + InputTokens(double)[], + OutputTokens(double)[], + SearchUnits(double)[], + Classifications(double)[], + UsageTokens(class)[], + InputTokens(double)[], + OutputTokens(double)[], + NonStreamedChatResponse2(class)[], + Id(string)[], + ChatFinishReason(ref)[], + AssistantMessageResponse(ref)[], + Usage(ref)[], + ChatStreamEventType(class)[], + ChatStreamEventTypeType(enum)[], + ChatMessageStartEvent(allOf)[], + ChatStreamEventType(ref)[], + ChatMessageStartEventVariant2(class)[], + Id(string)[], + ChatMessageStartEventVariant2Delta(class)[], + ChatMessageStartEventVariant2DeltaMessage(class)[], + ChatMessageStartEventVariant2DeltaMessageRole(enum)[], + ChatContentStartEvent(allOf)[], + ChatStreamEventType(ref)[], + ChatContentStartEventVariant2(class)[], + Index(int)[], + ChatContentStartEventVariant2Delta(class)[], + ChatContentStartEventVariant2DeltaMessage(class)[], + ChatContentStartEventVariant2DeltaMessageContent(class)[], + Text(string)[], + ChatContentStartEventVariant2DeltaMessageContentType(enum)[], + ChatContentDeltaEvent(allOf)[], + ChatStreamEventType(ref)[], + ChatContentDeltaEventVariant2(class)[], + Index(int)[], + ChatContentDeltaEventVariant2Delta(class)[], + ChatContentDeltaEventVariant2DeltaMessage(class)[], + ChatContentDeltaEventVariant2DeltaMessageContent(class)[], + Text(string)[], + ChatContentEndEvent(allOf)[], + ChatStreamEventType(ref)[], + ChatContentEndEventVariant2(class)[], + Index(int)[], + ChatToolPlanDeltaEvent(allOf)[], + ChatStreamEventType(ref)[], + ChatToolPlanDeltaEventVariant2(class)[], + ChatToolPlanDeltaEventVariant2Delta(class)[], + ToolPlan(string)[], + ChatToolCallStartEvent(allOf)[], + ChatStreamEventType(ref)[], + ChatToolCallStartEventVariant2(class)[], + Index(int)[], + ChatToolCallStartEventVariant2Delta(class)[], + ChatToolCallStartEventVariant2DeltaToolCall(class)[], + Id(string)[], + ChatToolCallStartEventVariant2DeltaToolCallType(enum)[], + ChatToolCallStartEventVariant2DeltaToolCallFunction(class)[], + Name(string)[], + Arguments(string)[], + ChatToolCallDeltaEvent(allOf)[], + ChatStreamEventType(ref)[], + ChatToolCallDeltaEventVariant2(class)[], + Index(int)[], + ChatToolCallDeltaEventVariant2Delta(class)[], + ChatToolCallDeltaEventVariant2DeltaToolCall(class)[], + ChatToolCallDeltaEventVariant2DeltaToolCallFunction(class)[], + Arguments(string)[], + ChatToolCallEndEvent(allOf)[], + ChatStreamEventType(ref)[], + ChatToolCallEndEventVariant2(class)[], + Index(int)[], + CitationStartEvent(allOf)[], + ChatStreamEventType(ref)[], + CitationStartEventVariant2(class)[], + Index(int)[], + CitationStartEventVariant2Delta(class)[], + CitationStartEventVariant2DeltaMessage(class)[], + Citation(ref)[], + CitationEndEvent(allOf)[], + ChatStreamEventType(ref)[], + CitationEndEventVariant2(class)[], + Index(int)[], + ChatMessageEndEvent(allOf)[], + ChatStreamEventType(ref)[], + ChatMessageEndEventVariant2(class)[], + Id(string)[], + ChatMessageEndEventVariant2Delta(class)[], + ChatFinishReason(ref)[], + Usage(ref)[], + StreamedChatResponse2(oneOf)[], + ChatMessageStartEvent(ref)[], + ChatContentStartEvent(ref)[], + ChatContentDeltaEvent(ref)[], + ChatContentEndEvent(ref)[], + ChatToolPlanDeltaEvent(ref)[], + ChatToolCallStartEvent(ref)[], + ChatToolCallDeltaEvent(ref)[], + ChatToolCallEndEvent(ref)[], + ChatMessageEndEvent(ref)[], + SingleGeneration(class)[], + Id(string)[], + Text(string)[], + Index(int)[], + Likelihood(double)[], + TokenLikelihoods(array)[], + SingleGenerationTokenLikelihood(class)[], + Token(string)[], + Likelihood(double)[], + Generation(class)[], + Id(string)[], + Prompt(string)[], + Generations(array)[], + SingleGeneration(ref)[], + ApiMeta(ref)[], + GenerateStreamEvent(class)[], + GenerateStreamEventEventType(enum)[], + GenerateStreamText(allOf)[], + GenerateStreamEvent(ref)[], + GenerateStreamTextVariant2(class)[], + Text(string)[], + Index(int)[], + IsFinished(bool)[], + SingleGenerationInStream(class)[], + Id(string)[], + Text(string)[], + Index(int)[], + FinishReason(ref)[], + GenerateStreamEnd(allOf)[], + GenerateStreamEvent(ref)[], + GenerateStreamEndVariant2(class)[], + IsFinished(bool)[], + FinishReason(ref)[], + GenerateStreamEndVariant2Response(class)[], + Id(string)[], + Prompt(string)[], + Generations(array)[], + SingleGenerationInStream(ref)[], + GenerateStreamError(allOf)[], + GenerateStreamEvent(ref)[], + GenerateStreamErrorVariant2(class)[], + Index(int)[], + IsFinished(bool)[], + FinishReason(ref)[], + Err(string)[], + GenerateStreamedResponse(oneOf)[], + GenerateStreamText(ref)[], + GenerateStreamEnd(ref)[], + GenerateStreamError(ref)[], + EmbedInputType(enum)[/embed-jobs], + EmbeddingType(enum)[/embed-jobs], + EmbedFloatsResponse(class)[], + EmbedFloatsResponseResponseType(enum)[], + Id(string)[], + Embeddings(array)[], + EmbeddingsItem(array)[], + EmbeddingsItemItem(double)[], + Texts(array)[], + TextsItem(string)[], + ApiMeta(ref)[], + EmbedByTypeResponse(class)[], + EmbedByTypeResponseResponseType(enum)[], + Id(string)[], + EmbedByTypeResponseEmbeddings(class)[], + EmbeddingsItem(array)[], + EmbeddingsItemItem(double)[], + Float(array)[], + FloatItem(array)[], + FloatItemItem(double)[], + Int8(array)[], + Int8Item(array)[], + Int8ItemItem(int)[], + Uint8(array)[], + Uint8Item(array)[], + Uint8ItemItem(int)[], + Binary(array)[], + BinaryItem(array)[], + BinaryItemItem(int)[], + Ubinary(array)[], + UbinaryItem(array)[], + UbinaryItemItem(int)[], + Texts(array)[], + TextsItem(string)[], + ApiMeta(ref)[], + EmbedJob(class)[/embed-jobs], + JobId(string)[/embed-jobs], + Name(string)[/embed-jobs], + EmbedJobStatus(enum)[/embed-jobs], + CreatedAt(DateTime)[/embed-jobs], + InputDatasetId(string)[/embed-jobs], + OutputDatasetId(string)[/embed-jobs], + Model(string)[/embed-jobs], + EmbedJobTruncate(enum)[/embed-jobs], + ApiMeta(ref)[/embed-jobs], + ListEmbedJobResponse(class)[/embed-jobs], + EmbedJobs(array)[/embed-jobs], + EmbedJob(ref)[/embed-jobs], + CreateEmbedJobRequest(class)[/embed-jobs], + Model(string)[/embed-jobs], + DatasetId(string)[/embed-jobs], + EmbedInputType(ref)[/embed-jobs], + Name(string)[/embed-jobs], + EmbeddingTypes(array)[/embed-jobs], + EmbeddingType(ref)[/embed-jobs], + CreateEmbedJobRequestTruncate(enum)[/embed-jobs], + CreateEmbedJobResponse(class)[/embed-jobs], + JobId(string)[/embed-jobs], + ApiMeta(ref)[/embed-jobs], + RerankDocument(class)[], + Text(string)[], + ClassifyExample(class)[], + Text(string)[], + Label(string)[], + DatasetValidationStatus(enum)[/datasets], + DatasetType(enum)[/datasets], + DatasetPart(class)[/datasets], + Id(string)[/datasets], + Name(string)[/datasets], + Url(string)[/datasets], + Index(int)[/datasets], + SizeBytes(int)[/datasets], + NumRows(int)[/datasets], + OriginalUrl(string)[/datasets], + Samples(array)[/datasets], + SamplesItem(string)[/datasets], + ParseInfo(class)[/datasets], + Separator(string)[/datasets], + Delimiter(string)[/datasets], + RerankerDataMetrics(class)[/datasets], + NumTrainQueries(double)[/datasets], + NumTrainRelevantPassages(double)[/datasets], + NumTrainHardNegatives(double)[/datasets], + NumEvalQueries(double)[/datasets], + NumEvalRelevantPassages(double)[/datasets], + NumEvalHardNegatives(double)[/datasets], + ChatDataMetrics(class)[/datasets], + NumTrainTurns(double)[/datasets], + NumEvalTurns(double)[/datasets], + Preamble(string)[/datasets], + LabelMetric(class)[], + TotalExamples(double)[], + Label(string)[], + Samples(array)[], + SamplesItem(string)[], + ClassifyDataMetrics(class)[/datasets], + LabelMetrics(array)[/datasets], + LabelMetric(ref)[/datasets], + FinetuneDatasetMetrics(class)[/datasets], + TrainableTokenCount(double)[/datasets], + TotalExamples(double)[/datasets], + TrainExamples(double)[/datasets], + TrainSizeBytes(double)[/datasets], + EvalExamples(double)[/datasets], + EvalSizeBytes(double)[/datasets], + RerankerDataMetrics(ref)[/datasets], + ChatDataMetrics(ref)[/datasets], + ClassifyDataMetrics(ref)[/datasets], + Metrics(class)[/datasets], + FinetuneDatasetMetrics(ref)[/datasets], + Dataset(class)[/datasets], + Id(string)[/datasets], + Name(string)[/datasets], + CreatedAt(DateTime)[/datasets], + UpdatedAt(DateTime)[/datasets], + DatasetType(ref)[/datasets], + DatasetValidationStatus(ref)[/datasets], + ValidationError(string)[/datasets], + Schema(string)[/datasets], + RequiredFields(array)[/datasets], + RequiredFieldsItem(string)[/datasets], + PreserveFields(array)[/datasets], + PreserveFieldsItem(string)[/datasets], + DatasetParts(array)[/datasets], + DatasetPart(ref)[/datasets], + ValidationWarnings(array)[/datasets], + ValidationWarningsItem(string)[/datasets], + ParseInfo(ref)[/datasets], + Metrics(ref)[/datasets], + ConnectorOAuth(class)[/connectors], + ClientId(string)[/connectors], + ClientSecret(string)[/connectors], + AuthorizeUrl(string)[/connectors], + TokenUrl(string)[/connectors], + Scope(string)[/connectors], + Connector(class)[/connectors], + Id(string)[/connectors], + OrganizationId(string)[/connectors], + Name(string)[/connectors], + Description(string)[/connectors], + Url(string)[/connectors], + CreatedAt(DateTime)[/connectors], + UpdatedAt(DateTime)[/connectors], + Excludes(array)[/connectors], + ExcludesItem(string)[/connectors], + AuthType(string)[/connectors], + ConnectorOAuth(ref)[/connectors], + ConnectorAuthStatus(enum)[/connectors], + Active(bool)[/connectors], + ContinueOnFailure(bool)[/connectors], + ListConnectorsResponse(class)[/connectors], + Connectors(array)[/connectors], + Connector(ref)[/connectors], + TotalCount(double)[/connectors], + CreateConnectorOAuth(class)[/connectors], + ClientId(string)[/connectors], + ClientSecret(string)[/connectors], + AuthorizeUrl(string)[/connectors], + TokenUrl(string)[/connectors], + Scope(string)[/connectors], + AuthTokenType(enum)[/connectors], + CreateConnectorServiceAuth(class)[/connectors], + AuthTokenType(ref)[/connectors], + Token(string)[/connectors], + CreateConnectorRequest(class)[/connectors], + Name(string)[/connectors], + Description(string)[/connectors], + Url(string)[/connectors], + Excludes(array)[/connectors], + ExcludesItem(string)[/connectors], + CreateConnectorOAuth(ref)[/connectors], + Active(bool)[/connectors], + ContinueOnFailure(bool)[/connectors], + CreateConnectorServiceAuth(ref)[/connectors], + CreateConnectorResponse(class)[/connectors], + Connector(ref)[/connectors], + GetConnectorResponse(class)[/connectors], + Connector(ref)[/connectors], + DeleteConnectorResponse(class)[/connectors], + UpdateConnectorRequest(class)[/connectors], + Name(string)[/connectors], + Url(string)[/connectors], + Excludes(array)[/connectors], + ExcludesItem(string)[/connectors], + CreateConnectorOAuth(ref)[/connectors], + Active(bool)[/connectors], + ContinueOnFailure(bool)[/connectors], + CreateConnectorServiceAuth(ref)[/connectors], + UpdateConnectorResponse(class)[/connectors], + Connector(ref)[/connectors], + OAuthAuthorizeResponse(class)[/connectors], + RedirectUrl(string)[/connectors], + ConnectorLog(class)[], + Id(string)[], + ConnectorId(string)[], + RequestId(string)[], + UserId(string)[], + OrganizationId(string)[], + CreatedAt(DateTime)[], + StatusCode(int)[], + DurationMillis(int)[], + ErrorMessage(string)[], + GetConnectorsLogsResponse(class)[], + ConnectorLogs(array)[], + ConnectorLog(ref)[], + Total(double)[], + TokenLikelihood(class)[], + Encoded(int)[], + Decoded(string)[], + LogLikelihood(double)[], + LogLikelihoodResponse(class)[], + Id(string)[], + PromptTokens(array)[], + TokenLikelihood(ref)[], + CompletionTokens(array)[], + TokenLikelihood(ref)[], + RawPromptTokens(array)[], + TokenLikelihood(ref)[], + ApiMeta(ref)[], + Cluster(class)[], + Id(string)[], + Keywords(array)[], + KeywordsItem(string)[], + Description(string)[], + Size(int)[], + SampleElements(array)[], + SampleElementsItem(string)[], + GetClusterJobResponse(class)[], + JobId(string)[], + CreatedAt(DateTime)[], + EmbeddingsUrl(string)[], + InputDatasetId(string)[], + MinClusterSize(int)[], + NNeighbors(int)[], + IsDeterministic(bool)[], + GetClusterJobResponseStatus(enum)[], + IsFinalState(bool)[], + OutputClustersUrl(string)[], + OutputOutliersUrl(string)[], + Clusters(array)[], + Cluster(ref)[], + Error(string)[], + ApiMeta(ref)[], + ListClusterJobsResponse(class)[], + Jobs(array)[], + GetClusterJobResponse(ref)[], + TotalCount(int)[], + ApiMeta(ref)[], + CreateClusterJobRequest(class)[], + EmbeddingsUrl(string)[], + InputDatasetId(string)[], + MinClusterSize(int)[], + NNeighbors(int)[], + IsDeterministic(bool)[], + GenerateDescriptions(bool)[], + CreateClusterJobResponse(class)[], + JobId(string)[], + UpdateClusterJobRequest(class)[], + UpdateClusterJobRequestStatus(enum)[], + Clusters(array)[], + Cluster(ref)[], + OutputClustersGsPath(string)[], + OutputOutliersGsPath(string)[], + Error(string)[], + UpdateClusterJobRequestInputTrackingMetrics(class)[], + UpdateClusterJobRequestOutputTrackingMetrics(class)[], + UpdateClusterJobResponse(class)[], + JobId(string)[], + CompatibleEndpoint(enum)[/models], + GetModelResponse(class)[/models], + Name(string)[/models], + Endpoints(array)[/models], + CompatibleEndpoint(ref)[/models], + Finetuned(bool)[/models], + ContextLength(double)[/models], + TokenizerUrl(string)[/models], + DefaultEndpoints(array)[/models], + CompatibleEndpoint(ref)[/models], + ListModelsResponse(class)[/models], + Models(array)[/models], + GetModelResponse(ref)[/models], + NextPageToken(string)[/models], + BaseType(enum)[/finetuning], + Strategy(enum)[/finetuning], + BaseModel(class)[/finetuning], + Name(string)[/finetuning], + Version(string)[/finetuning], + BaseType(ref)[/finetuning], + Strategy(ref)[/finetuning], + Hyperparameters(class)[/finetuning], + EarlyStoppingPatience(int)[/finetuning], + EarlyStoppingThreshold(double)[/finetuning], + TrainBatchSize(int)[/finetuning], + TrainEpochs(int)[/finetuning], + LearningRate(double)[/finetuning], + WandbConfig(class)[/finetuning], + Project(string)[/finetuning], + ApiKey(string)[/finetuning], + Entity(string)[/finetuning], + Settings(class)[/finetuning], + BaseModel(ref)[/finetuning], + DatasetId(string)[/finetuning], + Hyperparameters(ref)[/finetuning], + MultiLabel(bool)[/finetuning], + WandbConfig(ref)[/finetuning], + Status(enum)[/finetuning], + FinetunedModel(class)[/finetuning], + Id(string)[/finetuning], + Name(string)[/finetuning], + CreatorId(string)[/finetuning], + OrganizationId(string)[/finetuning], + Settings(ref)[/finetuning], + Status(ref)[/finetuning], + CreatedAt(DateTime)[/finetuning], + UpdatedAt(DateTime)[/finetuning], + CompletedAt(DateTime)[/finetuning], + LastUsed(DateTime)[/finetuning], + ListFinetunedModelsResponse(class)[/finetuning], + FinetunedModels(array)[/finetuning], + FinetunedModel(ref)[/finetuning], + NextPageToken(string)[/finetuning], + TotalSize(int)[/finetuning], + Error(class)[/finetuning], + Message(string)[/finetuning], + CreateFinetunedModelResponse(class)[/finetuning], + FinetunedModel(ref)[/finetuning], + GetFinetunedModelResponse(class)[/finetuning], + FinetunedModel(ref)[/finetuning], + DeleteFinetunedModelResponse(class)[/finetuning], + UpdateFinetunedModelResponse(class)[/finetuning], + FinetunedModel(ref)[/finetuning], + Event(class)[/finetuning], + UserId(string)[/finetuning], + Status(ref)[/finetuning], + CreatedAt(DateTime)[/finetuning], + ListEventsResponse(class)[/finetuning], + Events(array)[/finetuning], + Event(ref)[/finetuning], + NextPageToken(string)[/finetuning], + TotalSize(int)[/finetuning], + TrainingStepMetrics(class)[/finetuning], + CreatedAt(DateTime)[/finetuning], + StepNumber(int)[/finetuning], + TrainingStepMetricsMetrics(class)[/finetuning], + ListTrainingStepMetricsResponse(class)[/finetuning], + StepMetrics(array)[/finetuning], + TrainingStepMetrics(ref)[/finetuning], + NextPageToken(string)[/finetuning], + ChatRequest(class)[], + Message(string)[], + Model(string)[], + Stream(bool)[], + Preamble(string)[], + ChatHistory(array)[], + Message(ref)[], + ConversationId(string)[], + ChatRequestPromptTruncation(enum)[], + Connectors(array)[], + ChatConnector(ref)[], + SearchQueriesOnly(bool)[], + Documents(array)[], + ChatDocument(ref)[], + ChatRequestCitationQuality(enum)[], + Temperature(float)[], + MaxTokens(int)[], + MaxInputTokens(int)[], + K(int)[], + P(double)[], + Seed(int)[], + StopSequences(array)[], + StopSequencesItem(string)[], + FrequencyPenalty(double)[], + PresencePenalty(double)[], + Tools(array)[], + Tool(ref)[], + ToolResults(array)[], + ToolResult(ref)[], + ForceSingleStep(bool)[], + ResponseFormat(ref)[], + Chatv2Request(class)[], + Model(string)[], + ChatMessages(ref)[], + Tools(array)[], + Tool2(ref)[], + Chatv2RequestCitationMode(enum)[], + ResponseFormat2(ref)[], + MaxTokens(int)[], + StopSequences(array)[], + StopSequencesItem(string)[], + Temperature(float)[], + Seed(int)[], + FrequencyPenalty(float)[], + PresencePenalty(float)[], + K(float)[], + P(float)[], + GenerateRequest(class)[], + Prompt(string)[], + Model(string)[], + NumGenerations(int)[], + Stream(bool)[], + MaxTokens(int)[], + GenerateRequestTruncate(enum)[], + Temperature(double)[], + Seed(int)[], + Preset(string)[], + EndSequences(array)[], + EndSequencesItem(string)[], + StopSequences(array)[], + StopSequencesItem(string)[], + K(int)[], + P(double)[], + FrequencyPenalty(double)[], + PresencePenalty(double)[], + GenerateRequestReturnLikelihoods(enum)[], + RawPrompting(bool)[], + EmbedRequest(class)[], + Texts(array)[], + TextsItem(string)[], + Model(string)[], + EmbedInputType(ref)[], + EmbeddingTypes(array)[], + EmbeddingType(ref)[], + EmbedRequestTruncate(enum)[], + CreateEmbedJobRequest(ref)[/embed-jobs], + RerankRequest(class)[], + Model(string)[], + Query(string)[], + Documents(array)[], + DocumentsItem(oneOf)[], + DocumentsItemVariant1(string)[], + RerankDocument(ref)[], + TopN(int)[], + RankFields(array)[], + RankFieldsItem(string)[], + ReturnDocuments(bool)[], + MaxChunksPerDoc(int)[], + ClassifyRequest(class)[], + Inputs(array)[], + InputsItem(string)[], + Examples(array)[], + ClassifyExample(ref)[], + Model(string)[], + Preset(string)[], + ClassifyRequestTruncate(enum)[], + CreateDatasetRequest(class)[/datasets], + Data(byte[])[/datasets], + EvalData(byte[])[/datasets], + SummarizeRequest(class)[], + Text(string)[], + SummarizeRequestLength(enum)[], + SummarizeRequestFormat(enum)[], + Model(string)[], + SummarizeRequestExtractiveness(enum)[], + Temperature(double)[], + AdditionalCommand(string)[], + TokenizeRequest(class)[], + Text(string)[], + Model(string)[], + DetokenizeRequest(class)[], + Tokens(array)[], + TokensItem(int)[], + Model(string)[], + CreateConnectorRequest(ref)[/connectors], + UpdateConnectorRequest(ref)[/connectors], + FinetunedModel(ref)[/finetuning], + UpdateFinetunedModelRequest(class)[/finetuning], + Name(string)[/finetuning], + CreatorId(string)[/finetuning], + OrganizationId(string)[/finetuning], + Settings(ref)[/finetuning], + Status(ref)[/finetuning], + CreatedAt(DateTime)[/finetuning], + UpdatedAt(DateTime)[/finetuning], + CompletedAt(DateTime)[/finetuning], + LastUsed(DateTime)[/finetuning], + ChatXClientName(string)[], + GenerateXClientName(string)[], + EmbedXClientName(string)[], + CreateEmbedJobXClientName(string)[/embed-jobs], + ListEmbedJobsXClientName(string)[/embed-jobs], + GetEmbedJobId(string)[/embed-jobs], + GetEmbedJobXClientName(string)[/embed-jobs], + CancelEmbedJobId(string)[/embed-jobs], + CancelEmbedJobXClientName(string)[/embed-jobs], + RerankXClientName(string)[], + ClassifyXClientName(string)[], + CreateDatasetName(string)[/datasets], + DatasetType(ref)[/datasets], + CreateDatasetKeepOriginalFile(bool)[/datasets], + CreateDatasetSkipMalformedInput(bool)[/datasets], + CreateDatasetKeepFields(array)[/datasets], + CreateDatasetKeepFieldsItem(string)[/datasets], + CreateDatasetOptionalFields(array)[/datasets], + CreateDatasetOptionalFieldsItem(string)[/datasets], + CreateDatasetTextSeparator(string)[/datasets], + CreateDatasetCsvDelimiter(string)[/datasets], + CreateDatasetXClientName(string)[/datasets], + ListDatasetsDatasetType(string)[/datasets], + ListDatasetsBefore(DateTime)[/datasets], + ListDatasetsAfter(DateTime)[/datasets], + ListDatasetsLimit(double)[/datasets], + ListDatasetsOffset(double)[/datasets], + DatasetValidationStatus(ref)[/datasets], + ListDatasetsXClientName(string)[/datasets], + GetDatasetUsageXClientName(string)[/datasets], + GetDatasetId(string)[/datasets], + GetDatasetXClientName(string)[/datasets], + DeleteDatasetId(string)[/datasets], + DeleteDatasetXClientName(string)[/datasets], + SummarizeXClientName(string)[], + TokenizeXClientName(string)[], + DetokenizeXClientName(string)[], + ListConnectorsLimit(double)[/connectors], + ListConnectorsOffset(double)[/connectors], + ListConnectorsXClientName(string)[/connectors], + CreateConnectorXClientName(string)[/connectors], + GetConnectorId(string)[/connectors], + GetConnectorXClientName(string)[/connectors], + UpdateConnectorId(string)[/connectors], + UpdateConnectorXClientName(string)[/connectors], + DeleteConnectorId(string)[/connectors], + DeleteConnectorXClientName(string)[/connectors], + OAuthAuthorizeConnectorId(string)[/connectors], + OAuthAuthorizeConnectorAfterTokenRedirect(string)[/connectors], + OAuthAuthorizeConnectorXClientName(string)[/connectors], + GetModelModel(string)[/models], + GetModelXClientName(string)[/models], + ListModelsPageSize(double)[/models], + ListModelsPageToken(string)[/models], + CompatibleEndpoint(ref)[/models], + ListModelsDefaultOnly(bool)[/models], + CheckAPIKeyXClientName(string)[], + ListFinetunedModelsPageSize(int)[/finetuning], + ListFinetunedModelsPageToken(string)[/finetuning], + ListFinetunedModelsOrderBy(string)[/finetuning], + ListFinetunedModelsXClientName(string)[/finetuning], + CreateFinetunedModelXClientName(string)[/finetuning], + UpdateFinetunedModelId(string)[/finetuning], + UpdateFinetunedModelXClientName(string)[/finetuning], + GetFinetunedModelId(string)[/finetuning], + GetFinetunedModelXClientName(string)[/finetuning], + DeleteFinetunedModelId(string)[/finetuning], + DeleteFinetunedModelXClientName(string)[/finetuning], + ListEventsFinetunedModelId(string)[/finetuning], + ListEventsPageSize(int)[/finetuning], + ListEventsPageToken(string)[/finetuning], + ListEventsOrderBy(string)[/finetuning], + ListEventsXClientName(string)[/finetuning], + ListTrainingStepMetricsFinetunedModelId(string)[/finetuning], + ListTrainingStepMetricsPageSize(int)[/finetuning], + ListTrainingStepMetricsPageToken(string)[/finetuning], + ListTrainingStepMetricsXClientName(string)[/finetuning], + ChatResponse(oneOf)[], + NonStreamedChatResponse(ref)[], + StreamedChatResponse(ref)[], + ChatResponse2(class)[], + Data(string)[], + ChatResponse3(class)[], + Data(string)[], + ChatResponse4(class)[], + Data(string)[], + ChatResponse5(class)[], + Data(string)[], + ChatResponse6(class)[], + Data(string)[], + ChatResponse7(class)[], + Data(string)[], + ChatResponse8(class)[], + Data(string)[], + ChatResponse9(class)[], + Data(string)[], + ChatResponse10(class)[], + Data(string)[], + ChatResponse11(class)[], + Data(string)[], + ChatResponse12(class)[], + Data(string)[], + ChatResponse13(class)[], + Data(string)[], + Chatv2Response(oneOf)[], + NonStreamedChatResponse2(ref)[], + StreamedChatResponse2(ref)[], + Chatv2Response2(class)[], + Data(string)[], + Chatv2Response3(class)[], + Data(string)[], + Chatv2Response4(class)[], + Data(string)[], + Chatv2Response5(class)[], + Data(string)[], + Chatv2Response6(class)[], + Data(string)[], + Chatv2Response7(class)[], + Data(string)[], + Chatv2Response8(class)[], + Data(string)[], + Chatv2Response9(class)[], + Data(string)[], + Chatv2Response10(class)[], + Data(string)[], + Chatv2Response11(class)[], + Data(string)[], + Chatv2Response12(class)[], + Data(string)[], + Chatv2Response13(class)[], + Data(string)[], + Generation(ref)[], + GenerateStreamedResponse(ref)[], + GenerateResponse(class)[], + Data(string)[], + GenerateResponse2(class)[], + Data(string)[], + GenerateResponse3(class)[], + Data(string)[], + GenerateResponse4(class)[], + Data(string)[], + GenerateResponse5(class)[], + Data(string)[], + GenerateResponse6(class)[], + Data(string)[], + GenerateResponse7(class)[], + Data(string)[], + GenerateResponse8(class)[], + Data(string)[], + GenerateResponse9(class)[], + Data(string)[], + GenerateResponse10(class)[], + Data(string)[], + GenerateResponse11(class)[], + Data(string)[], + GenerateResponse12(class)[], + Data(string)[], + EmbedResponse(oneOf)[], + EmbedFloatsResponse(ref)[], + EmbedByTypeResponse(ref)[], + EmbedResponse2(class)[], + Data(string)[], + EmbedResponse3(class)[], + Data(string)[], + EmbedResponse4(class)[], + Data(string)[], + EmbedResponse5(class)[], + Data(string)[], + EmbedResponse6(class)[], + Data(string)[], + EmbedResponse7(class)[], + Data(string)[], + EmbedResponse8(class)[], + Data(string)[], + EmbedResponse9(class)[], + Data(string)[], + EmbedResponse10(class)[], + Data(string)[], + EmbedResponse11(class)[], + Data(string)[], + EmbedResponse12(class)[], + Data(string)[], + EmbedResponse13(class)[], + Data(string)[], + CreateEmbedJobResponse(ref)[/embed-jobs], + CreateEmbedJobResponse2(class)[/embed-jobs], + Data(string)[/embed-jobs], + CreateEmbedJobResponse3(class)[/embed-jobs], + Data(string)[/embed-jobs], + CreateEmbedJobResponse4(class)[/embed-jobs], + Data(string)[/embed-jobs], + CreateEmbedJobResponse5(class)[/embed-jobs], + Data(string)[/embed-jobs], + CreateEmbedJobResponse6(class)[/embed-jobs], + Data(string)[/embed-jobs], + CreateEmbedJobResponse7(class)[/embed-jobs], + Data(string)[/embed-jobs], + CreateEmbedJobResponse8(class)[/embed-jobs], + Data(string)[/embed-jobs], + CreateEmbedJobResponse9(class)[/embed-jobs], + Data(string)[/embed-jobs], + CreateEmbedJobResponse10(class)[/embed-jobs], + Data(string)[/embed-jobs], + CreateEmbedJobResponse11(class)[/embed-jobs], + Data(string)[/embed-jobs], + CreateEmbedJobResponse12(class)[/embed-jobs], + Data(string)[/embed-jobs], + CreateEmbedJobResponse13(class)[/embed-jobs], + Data(string)[/embed-jobs], + ListEmbedJobResponse(ref)[/embed-jobs], + ListEmbedJobsResponse(class)[/embed-jobs], + Data(string)[/embed-jobs], + ListEmbedJobsResponse2(class)[/embed-jobs], + Data(string)[/embed-jobs], + ListEmbedJobsResponse3(class)[/embed-jobs], + Data(string)[/embed-jobs], + ListEmbedJobsResponse4(class)[/embed-jobs], + Data(string)[/embed-jobs], + ListEmbedJobsResponse5(class)[/embed-jobs], + Data(string)[/embed-jobs], + ListEmbedJobsResponse6(class)[/embed-jobs], + Data(string)[/embed-jobs], + ListEmbedJobsResponse7(class)[/embed-jobs], + Data(string)[/embed-jobs], + ListEmbedJobsResponse8(class)[/embed-jobs], + Data(string)[/embed-jobs], + ListEmbedJobsResponse9(class)[/embed-jobs], + Data(string)[/embed-jobs], + ListEmbedJobsResponse10(class)[/embed-jobs], + Data(string)[/embed-jobs], + ListEmbedJobsResponse11(class)[/embed-jobs], + Data(string)[/embed-jobs], + ListEmbedJobsResponse12(class)[/embed-jobs], + Data(string)[/embed-jobs], + EmbedJob(ref)[/embed-jobs], + GetEmbedJobResponse(class)[/embed-jobs], + Data(string)[/embed-jobs], + GetEmbedJobResponse2(class)[/embed-jobs], + Data(string)[/embed-jobs], + GetEmbedJobResponse3(class)[/embed-jobs], + Data(string)[/embed-jobs], + GetEmbedJobResponse4(class)[/embed-jobs], + Data(string)[/embed-jobs], + GetEmbedJobResponse5(class)[/embed-jobs], + Data(string)[/embed-jobs], + GetEmbedJobResponse6(class)[/embed-jobs], + Data(string)[/embed-jobs], + GetEmbedJobResponse7(class)[/embed-jobs], + Data(string)[/embed-jobs], + GetEmbedJobResponse8(class)[/embed-jobs], + Data(string)[/embed-jobs], + GetEmbedJobResponse9(class)[/embed-jobs], + Data(string)[/embed-jobs], + GetEmbedJobResponse10(class)[/embed-jobs], + Data(string)[/embed-jobs], + GetEmbedJobResponse11(class)[/embed-jobs], + Data(string)[/embed-jobs], + GetEmbedJobResponse12(class)[/embed-jobs], + Data(string)[/embed-jobs], + CancelEmbedJobResponse(class)[/embed-jobs], + Data(string)[/embed-jobs], + CancelEmbedJobResponse2(class)[/embed-jobs], + Data(string)[/embed-jobs], + CancelEmbedJobResponse3(class)[/embed-jobs], + Data(string)[/embed-jobs], + CancelEmbedJobResponse4(class)[/embed-jobs], + Data(string)[/embed-jobs], + CancelEmbedJobResponse5(class)[/embed-jobs], + Data(string)[/embed-jobs], + CancelEmbedJobResponse6(class)[/embed-jobs], + Data(string)[/embed-jobs], + CancelEmbedJobResponse7(class)[/embed-jobs], + Data(string)[/embed-jobs], + CancelEmbedJobResponse8(class)[/embed-jobs], + Data(string)[/embed-jobs], + CancelEmbedJobResponse9(class)[/embed-jobs], + Data(string)[/embed-jobs], + CancelEmbedJobResponse10(class)[/embed-jobs], + Data(string)[/embed-jobs], + CancelEmbedJobResponse11(class)[/embed-jobs], + Data(string)[/embed-jobs], + CancelEmbedJobResponse12(class)[/embed-jobs], + Data(string)[/embed-jobs], + RerankResponse(class)[], + Id(string)[], + Results(array)[], + RerankResponseResult(class)[], + RerankResponseResultDocument(class)[], + Text(string)[], + Index(int)[], + RelevanceScore(float)[], + ApiMeta(ref)[], + RerankResponse2(class)[], + Data(string)[], + RerankResponse3(class)[], + Data(string)[], + RerankResponse4(class)[], + Data(string)[], + RerankResponse5(class)[], + Data(string)[], + RerankResponse6(class)[], + Data(string)[], + RerankResponse7(class)[], + Data(string)[], + RerankResponse8(class)[], + Data(string)[], + RerankResponse9(class)[], + Data(string)[], + RerankResponse10(class)[], + Data(string)[], + RerankResponse11(class)[], + Data(string)[], + RerankResponse12(class)[], + Data(string)[], + RerankResponse13(class)[], + Data(string)[], + ClassifyResponse(class)[], + Id(string)[], + Classifications(array)[], + ClassifyResponseClassification(class)[], + Id(string)[], + Input(string)[], + Prediction(string)[], + Predictions(array)[], + PredictionsItem(string)[], + Confidence(float)[], + Confidences(array)[], + ConfidencesItem(float)[], + ClassifyResponseClassificationLabels(class)[], + ClassifyResponseClassificationClassificationType(enum)[], + ApiMeta(ref)[], + ClassifyResponse2(class)[], + Data(string)[], + ClassifyResponse3(class)[], + Data(string)[], + ClassifyResponse4(class)[], + Data(string)[], + ClassifyResponse5(class)[], + Data(string)[], + ClassifyResponse6(class)[], + Data(string)[], + ClassifyResponse7(class)[], + Data(string)[], + ClassifyResponse8(class)[], + Data(string)[], + ClassifyResponse9(class)[], + Data(string)[], + ClassifyResponse10(class)[], + Data(string)[], + ClassifyResponse11(class)[], + Data(string)[], + ClassifyResponse12(class)[], + Data(string)[], + ClassifyResponse13(class)[], + Data(string)[], + CreateDatasetResponse(class)[/datasets], + Id(string)[/datasets], + CreateDatasetResponse2(class)[/datasets], + Data(string)[/datasets], + CreateDatasetResponse3(class)[/datasets], + Data(string)[/datasets], + CreateDatasetResponse4(class)[/datasets], + Data(string)[/datasets], + CreateDatasetResponse5(class)[/datasets], + Data(string)[/datasets], + CreateDatasetResponse6(class)[/datasets], + Data(string)[/datasets], + CreateDatasetResponse7(class)[/datasets], + Data(string)[/datasets], + CreateDatasetResponse8(class)[/datasets], + Data(string)[/datasets], + CreateDatasetResponse9(class)[/datasets], + Data(string)[/datasets], + CreateDatasetResponse10(class)[/datasets], + Data(string)[/datasets], + CreateDatasetResponse11(class)[/datasets], + Data(string)[/datasets], + CreateDatasetResponse12(class)[/datasets], + Data(string)[/datasets], + CreateDatasetResponse13(class)[/datasets], + Data(string)[/datasets], + ListDatasetsResponse(class)[/datasets], + Datasets(array)[/datasets], + Dataset(ref)[/datasets], + ListDatasetsResponse2(class)[/datasets], + Data(string)[/datasets], + ListDatasetsResponse3(class)[/datasets], + Data(string)[/datasets], + ListDatasetsResponse4(class)[/datasets], + Data(string)[/datasets], + ListDatasetsResponse5(class)[/datasets], + Data(string)[/datasets], + ListDatasetsResponse6(class)[/datasets], + Data(string)[/datasets], + ListDatasetsResponse7(class)[/datasets], + Data(string)[/datasets], + ListDatasetsResponse8(class)[/datasets], + Data(string)[/datasets], + ListDatasetsResponse9(class)[/datasets], + Data(string)[/datasets], + ListDatasetsResponse10(class)[/datasets], + Data(string)[/datasets], + ListDatasetsResponse11(class)[/datasets], + Data(string)[/datasets], + ListDatasetsResponse12(class)[/datasets], + Data(string)[/datasets], + ListDatasetsResponse13(class)[/datasets], + Data(string)[/datasets], + GetDatasetUsageResponse(class)[/datasets], + OrganizationUsage(double)[/datasets], + GetDatasetUsageResponse2(class)[/datasets], + Data(string)[/datasets], + GetDatasetUsageResponse3(class)[/datasets], + Data(string)[/datasets], + GetDatasetUsageResponse4(class)[/datasets], + Data(string)[/datasets], + GetDatasetUsageResponse5(class)[/datasets], + Data(string)[/datasets], + GetDatasetUsageResponse6(class)[/datasets], + Data(string)[/datasets], + GetDatasetUsageResponse7(class)[/datasets], + Data(string)[/datasets], + GetDatasetUsageResponse8(class)[/datasets], + Data(string)[/datasets], + GetDatasetUsageResponse9(class)[/datasets], + Data(string)[/datasets], + GetDatasetUsageResponse10(class)[/datasets], + Data(string)[/datasets], + GetDatasetUsageResponse11(class)[/datasets], + Data(string)[/datasets], + GetDatasetUsageResponse12(class)[/datasets], + Data(string)[/datasets], + GetDatasetUsageResponse13(class)[/datasets], + Data(string)[/datasets], + GetDatasetResponse(class)[/datasets], + Dataset(ref)[/datasets], + GetDatasetResponse2(class)[/datasets], + Data(string)[/datasets], + GetDatasetResponse3(class)[/datasets], + Data(string)[/datasets], + GetDatasetResponse4(class)[/datasets], + Data(string)[/datasets], + GetDatasetResponse5(class)[/datasets], + Data(string)[/datasets], + GetDatasetResponse6(class)[/datasets], + Data(string)[/datasets], + GetDatasetResponse7(class)[/datasets], + Data(string)[/datasets], + GetDatasetResponse8(class)[/datasets], + Data(string)[/datasets], + GetDatasetResponse9(class)[/datasets], + Data(string)[/datasets], + GetDatasetResponse10(class)[/datasets], + Data(string)[/datasets], + GetDatasetResponse11(class)[/datasets], + Data(string)[/datasets], + GetDatasetResponse12(class)[/datasets], + Data(string)[/datasets], + GetDatasetResponse13(class)[/datasets], + Data(string)[/datasets], + DeleteDatasetResponse(class)[/datasets], + DeleteDatasetResponse2(class)[/datasets], + Data(string)[/datasets], + DeleteDatasetResponse3(class)[/datasets], + Data(string)[/datasets], + DeleteDatasetResponse4(class)[/datasets], + Data(string)[/datasets], + DeleteDatasetResponse5(class)[/datasets], + Data(string)[/datasets], + DeleteDatasetResponse6(class)[/datasets], + Data(string)[/datasets], + DeleteDatasetResponse7(class)[/datasets], + Data(string)[/datasets], + DeleteDatasetResponse8(class)[/datasets], + Data(string)[/datasets], + DeleteDatasetResponse9(class)[/datasets], + Data(string)[/datasets], + DeleteDatasetResponse10(class)[/datasets], + Data(string)[/datasets], + DeleteDatasetResponse11(class)[/datasets], + Data(string)[/datasets], + DeleteDatasetResponse12(class)[/datasets], + Data(string)[/datasets], + DeleteDatasetResponse13(class)[/datasets], + Data(string)[/datasets], + SummarizeResponse(class)[], + Id(string)[], + Summary(string)[], + ApiMeta(ref)[], + SummarizeResponse2(class)[], + Data(string)[], + SummarizeResponse3(class)[], + Data(string)[], + SummarizeResponse4(class)[], + Data(string)[], + SummarizeResponse5(class)[], + Data(string)[], + SummarizeResponse6(class)[], + Data(string)[], + SummarizeResponse7(class)[], + Data(string)[], + SummarizeResponse8(class)[], + Data(string)[], + SummarizeResponse9(class)[], + Data(string)[], + SummarizeResponse10(class)[], + Data(string)[], + SummarizeResponse11(class)[], + Data(string)[], + SummarizeResponse12(class)[], + Data(string)[], + SummarizeResponse13(class)[], + Data(string)[], + TokenizeResponse(class)[], + Tokens(array)[], + TokensItem(int)[], + TokenStrings(array)[], + TokenStringsItem(string)[], + ApiMeta(ref)[], + TokenizeResponse2(class)[], + Data(string)[], + TokenizeResponse3(class)[], + Data(string)[], + TokenizeResponse4(class)[], + Data(string)[], + TokenizeResponse5(class)[], + Data(string)[], + TokenizeResponse6(class)[], + Data(string)[], + TokenizeResponse7(class)[], + Data(string)[], + TokenizeResponse8(class)[], + Data(string)[], + TokenizeResponse9(class)[], + Data(string)[], + TokenizeResponse10(class)[], + Data(string)[], + TokenizeResponse11(class)[], + Data(string)[], + TokenizeResponse12(class)[], + Data(string)[], + TokenizeResponse13(class)[], + Data(string)[], + DetokenizeResponse(class)[], + Text(string)[], + ApiMeta(ref)[], + DetokenizeResponse2(class)[], + Data(string)[], + DetokenizeResponse3(class)[], + Data(string)[], + DetokenizeResponse4(class)[], + Data(string)[], + DetokenizeResponse5(class)[], + Data(string)[], + DetokenizeResponse6(class)[], + Data(string)[], + DetokenizeResponse7(class)[], + Data(string)[], + DetokenizeResponse8(class)[], + Data(string)[], + DetokenizeResponse9(class)[], + Data(string)[], + DetokenizeResponse10(class)[], + Data(string)[], + DetokenizeResponse11(class)[], + Data(string)[], + DetokenizeResponse12(class)[], + Data(string)[], + DetokenizeResponse13(class)[], + Data(string)[], + ListConnectorsResponse(ref)[/connectors], + ListConnectorsResponse2(class)[/connectors], + Data(string)[/connectors], + ListConnectorsResponse3(class)[/connectors], + Data(string)[/connectors], + ListConnectorsResponse4(class)[/connectors], + Data(string)[/connectors], + ListConnectorsResponse5(class)[/connectors], + Data(string)[/connectors], + ListConnectorsResponse6(class)[/connectors], + Data(string)[/connectors], + ListConnectorsResponse7(class)[/connectors], + Data(string)[/connectors], + ListConnectorsResponse8(class)[/connectors], + Data(string)[/connectors], + ListConnectorsResponse9(class)[/connectors], + Data(string)[/connectors], + ListConnectorsResponse10(class)[/connectors], + Data(string)[/connectors], + ListConnectorsResponse11(class)[/connectors], + Data(string)[/connectors], + ListConnectorsResponse12(class)[/connectors], + Data(string)[/connectors], + ListConnectorsResponse13(class)[/connectors], + Data(string)[/connectors], + CreateConnectorResponse(ref)[/connectors], + CreateConnectorResponse2(class)[/connectors], + Data(string)[/connectors], + CreateConnectorResponse3(class)[/connectors], + Data(string)[/connectors], + CreateConnectorResponse4(class)[/connectors], + Data(string)[/connectors], + CreateConnectorResponse5(class)[/connectors], + Data(string)[/connectors], + CreateConnectorResponse6(class)[/connectors], + Data(string)[/connectors], + CreateConnectorResponse7(class)[/connectors], + Data(string)[/connectors], + CreateConnectorResponse8(class)[/connectors], + Data(string)[/connectors], + CreateConnectorResponse9(class)[/connectors], + Data(string)[/connectors], + CreateConnectorResponse10(class)[/connectors], + Data(string)[/connectors], + CreateConnectorResponse11(class)[/connectors], + Data(string)[/connectors], + CreateConnectorResponse12(class)[/connectors], + Data(string)[/connectors], + CreateConnectorResponse13(class)[/connectors], + Data(string)[/connectors], + GetConnectorResponse(ref)[/connectors], + GetConnectorResponse2(class)[/connectors], + Data(string)[/connectors], + GetConnectorResponse3(class)[/connectors], + Data(string)[/connectors], + GetConnectorResponse4(class)[/connectors], + Data(string)[/connectors], + GetConnectorResponse5(class)[/connectors], + Data(string)[/connectors], + GetConnectorResponse6(class)[/connectors], + Data(string)[/connectors], + GetConnectorResponse7(class)[/connectors], + Data(string)[/connectors], + GetConnectorResponse8(class)[/connectors], + Data(string)[/connectors], + GetConnectorResponse9(class)[/connectors], + Data(string)[/connectors], + GetConnectorResponse10(class)[/connectors], + Data(string)[/connectors], + GetConnectorResponse11(class)[/connectors], + Data(string)[/connectors], + GetConnectorResponse12(class)[/connectors], + Data(string)[/connectors], + GetConnectorResponse13(class)[/connectors], + Data(string)[/connectors], + UpdateConnectorResponse(ref)[/connectors], + UpdateConnectorResponse2(class)[/connectors], + Data(string)[/connectors], + UpdateConnectorResponse3(class)[/connectors], + Data(string)[/connectors], + UpdateConnectorResponse4(class)[/connectors], + Data(string)[/connectors], + UpdateConnectorResponse5(class)[/connectors], + Data(string)[/connectors], + UpdateConnectorResponse6(class)[/connectors], + Data(string)[/connectors], + UpdateConnectorResponse7(class)[/connectors], + Data(string)[/connectors], + UpdateConnectorResponse8(class)[/connectors], + Data(string)[/connectors], + UpdateConnectorResponse9(class)[/connectors], + Data(string)[/connectors], + UpdateConnectorResponse10(class)[/connectors], + Data(string)[/connectors], + UpdateConnectorResponse11(class)[/connectors], + Data(string)[/connectors], + UpdateConnectorResponse12(class)[/connectors], + Data(string)[/connectors], + UpdateConnectorResponse13(class)[/connectors], + Data(string)[/connectors], + DeleteConnectorResponse(ref)[/connectors], + DeleteConnectorResponse2(class)[/connectors], + Data(string)[/connectors], + DeleteConnectorResponse3(class)[/connectors], + Data(string)[/connectors], + DeleteConnectorResponse4(class)[/connectors], + Data(string)[/connectors], + DeleteConnectorResponse5(class)[/connectors], + Data(string)[/connectors], + DeleteConnectorResponse6(class)[/connectors], + Data(string)[/connectors], + DeleteConnectorResponse7(class)[/connectors], + Data(string)[/connectors], + DeleteConnectorResponse8(class)[/connectors], + Data(string)[/connectors], + DeleteConnectorResponse9(class)[/connectors], + Data(string)[/connectors], + DeleteConnectorResponse10(class)[/connectors], + Data(string)[/connectors], + DeleteConnectorResponse11(class)[/connectors], + Data(string)[/connectors], + DeleteConnectorResponse12(class)[/connectors], + Data(string)[/connectors], + DeleteConnectorResponse13(class)[/connectors], + Data(string)[/connectors], + OAuthAuthorizeResponse(ref)[/connectors], + OAuthAuthorizeConnectorResponse(class)[/connectors], + Data(string)[/connectors], + OAuthAuthorizeConnectorResponse2(class)[/connectors], + Data(string)[/connectors], + OAuthAuthorizeConnectorResponse3(class)[/connectors], + Data(string)[/connectors], + OAuthAuthorizeConnectorResponse4(class)[/connectors], + Data(string)[/connectors], + OAuthAuthorizeConnectorResponse5(class)[/connectors], + Data(string)[/connectors], + OAuthAuthorizeConnectorResponse6(class)[/connectors], + Data(string)[/connectors], + OAuthAuthorizeConnectorResponse7(class)[/connectors], + Data(string)[/connectors], + OAuthAuthorizeConnectorResponse8(class)[/connectors], + Data(string)[/connectors], + OAuthAuthorizeConnectorResponse9(class)[/connectors], + Data(string)[/connectors], + OAuthAuthorizeConnectorResponse10(class)[/connectors], + Data(string)[/connectors], + OAuthAuthorizeConnectorResponse11(class)[/connectors], + Data(string)[/connectors], + OAuthAuthorizeConnectorResponse12(class)[/connectors], + Data(string)[/connectors], + GetModelResponse(ref)[/models], + GetModelResponse2(class)[/models], + Data(string)[/models], + GetModelResponse3(class)[/models], + Data(string)[/models], + GetModelResponse4(class)[/models], + Data(string)[/models], + GetModelResponse5(class)[/models], + Data(string)[/models], + GetModelResponse6(class)[/models], + Data(string)[/models], + GetModelResponse7(class)[/models], + Data(string)[/models], + GetModelResponse8(class)[/models], + Data(string)[/models], + GetModelResponse9(class)[/models], + Data(string)[/models], + GetModelResponse10(class)[/models], + Data(string)[/models], + GetModelResponse11(class)[/models], + Data(string)[/models], + GetModelResponse12(class)[/models], + Data(string)[/models], + GetModelResponse13(class)[/models], + Data(string)[/models], + ListModelsResponse(ref)[/models], + ListModelsResponse2(class)[/models], + Data(string)[/models], + ListModelsResponse3(class)[/models], + Data(string)[/models], + ListModelsResponse4(class)[/models], + Data(string)[/models], + ListModelsResponse5(class)[/models], + Data(string)[/models], + ListModelsResponse6(class)[/models], + Data(string)[/models], + ListModelsResponse7(class)[/models], + Data(string)[/models], + ListModelsResponse8(class)[/models], + Data(string)[/models], + ListModelsResponse9(class)[/models], + Data(string)[/models], + ListModelsResponse10(class)[/models], + Data(string)[/models], + ListModelsResponse11(class)[/models], + Data(string)[/models], + ListModelsResponse12(class)[/models], + Data(string)[/models], + ListModelsResponse13(class)[/models], + Data(string)[/models], + CheckAPIKeyResponse(class)[], + Valid(bool)[], + OrganizationId(string)[], + OwnerId(string)[], + CheckAPIKeyResponse2(class)[], + Data(string)[], + CheckAPIKeyResponse3(class)[], + Data(string)[], + CheckAPIKeyResponse4(class)[], + Data(string)[], + CheckAPIKeyResponse5(class)[], + Data(string)[], + CheckAPIKeyResponse6(class)[], + Data(string)[], + CheckAPIKeyResponse7(class)[], + Data(string)[], + CheckAPIKeyResponse8(class)[], + Data(string)[], + CheckAPIKeyResponse9(class)[], + Data(string)[], + CheckAPIKeyResponse10(class)[], + Data(string)[], + CheckAPIKeyResponse11(class)[], + Data(string)[], + CheckAPIKeyResponse12(class)[], + Data(string)[], + CheckAPIKeyResponse13(class)[], + Data(string)[], + ListFinetunedModelsResponse(ref)[/finetuning], + Error(ref)[/finetuning], + Error(ref)[/finetuning], + Error(ref)[/finetuning], + Error(ref)[/finetuning], + Error(ref)[/finetuning], + Error(ref)[/finetuning], + CreateFinetunedModelResponse(ref)[/finetuning], + Error(ref)[/finetuning], + Error(ref)[/finetuning], + Error(ref)[/finetuning], + Error(ref)[/finetuning], + Error(ref)[/finetuning], + Error(ref)[/finetuning], + UpdateFinetunedModelResponse(ref)[/finetuning], + Error(ref)[/finetuning], + Error(ref)[/finetuning], + Error(ref)[/finetuning], + Error(ref)[/finetuning], + Error(ref)[/finetuning], + Error(ref)[/finetuning], + GetFinetunedModelResponse(ref)[/finetuning], + Error(ref)[/finetuning], + Error(ref)[/finetuning], + Error(ref)[/finetuning], + Error(ref)[/finetuning], + Error(ref)[/finetuning], + Error(ref)[/finetuning], + DeleteFinetunedModelResponse(ref)[/finetuning], + Error(ref)[/finetuning], + Error(ref)[/finetuning], + Error(ref)[/finetuning], + Error(ref)[/finetuning], + Error(ref)[/finetuning], + Error(ref)[/finetuning], + ListEventsResponse(ref)[/finetuning], + Error(ref)[/finetuning], + Error(ref)[/finetuning], + Error(ref)[/finetuning], + Error(ref)[/finetuning], + Error(ref)[/finetuning], + Error(ref)[/finetuning], + ListTrainingStepMetricsResponse(ref)[/finetuning], + Error(ref)[/finetuning], + Error(ref)[/finetuning], + Error(ref)[/finetuning], + Error(ref)[/finetuning], + Error(ref)[/finetuning], + Error(ref)[/finetuning] +] \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.UnitTests/Snapshots/Cohere/Schemas/_.verified.txt b/src/tests/OpenApiGenerator.UnitTests/Snapshots/Cohere/Schemas/_.verified.txt new file mode 100644 index 0000000000..fd45b62c3e --- /dev/null +++ b/src/tests/OpenApiGenerator.UnitTests/Snapshots/Cohere/Schemas/_.verified.txt @@ -0,0 +1,1713 @@ +[ + ChatRole(enum), + ToolCall(class), + Name(string), + ToolCallParameters(class), + ChatMessage(class), + ChatRole(ref), + Message(string), + ToolCalls(array), + ToolCall(ref), + ToolResult(class), + ToolCall(ref), + Outputs(array), + ToolResultOutput(class), + ToolMessage(class), + ChatRole(ref), + ToolResults(array), + ToolResult(ref), + Message(oneOf), + ChatMessage(ref), + ToolMessage(ref), + ChatConnector(class), + Id(string), + UserAccessToken(string), + ContinueOnFailure(bool), + ChatConnectorOptions(class), + ChatDocument(class), + Id(string), + Tool(class), + Name(string), + Description(string), + ToolParameterDefinitions(class), + ResponseFormatType(enum), + TextResponseFormat(class), + ResponseFormatType(ref), + JSONResponseFormat(class), + ResponseFormatType(ref), + JSONResponseFormatSchema(class), + ResponseFormat(oneOf), + TextResponseFormat(ref), + JSONResponseFormat(ref), + ChatCitation(class), + Start(int), + End(int), + Text(string), + DocumentIds(array), + DocumentIdsItem(string), + ChatSearchQuery(class), + Text(string), + GenerationId(string), + ChatSearchResultConnector(class), + Id(string), + ChatSearchResult(class), + ChatSearchQuery(ref), + ChatSearchResultConnector(ref), + DocumentIds(array), + DocumentIdsItem(string), + ErrorMessage(string), + ContinueOnFailure(bool), + FinishReason(enum), + ApiMeta(class), + ApiMetaApiVersion(class), + Version(string), + IsDeprecated(bool), + IsExperimental(bool), + ApiMetaBilledUnits(class), + InputTokens(double), + OutputTokens(double), + SearchUnits(double), + Classifications(double), + ApiMetaTokens(class), + InputTokens(double), + OutputTokens(double), + Warnings(array), + WarningsItem(string), + NonStreamedChatResponse(class), + Text(string), + GenerationId(string), + Citations(array), + ChatCitation(ref), + Documents(array), + ChatDocument(ref), + IsSearchRequired(bool), + SearchQueries(array), + ChatSearchQuery(ref), + SearchResults(array), + ChatSearchResult(ref), + FinishReason(ref), + ToolCalls(array), + ToolCall(ref), + ChatHistory(array), + Message(ref), + ApiMeta(ref), + ChatStreamEvent(class), + ChatStreamEventEventType(enum), + ChatStreamStartEvent(allOf), + ChatStreamEvent(ref), + ChatStreamStartEventVariant2(class), + GenerationId(string), + ChatSearchQueriesGenerationEvent(allOf), + ChatStreamEvent(ref), + ChatSearchQueriesGenerationEventVariant2(class), + SearchQueries(array), + ChatSearchQuery(ref), + ChatSearchResultsEvent(allOf), + ChatStreamEvent(ref), + ChatSearchResultsEventVariant2(class), + SearchResults(array), + ChatSearchResult(ref), + Documents(array), + ChatDocument(ref), + ChatTextGenerationEvent(allOf), + ChatStreamEvent(ref), + ChatTextGenerationEventVariant2(class), + Text(string), + ChatCitationGenerationEvent(allOf), + ChatStreamEvent(ref), + ChatCitationGenerationEventVariant2(class), + Citations(array), + ChatCitation(ref), + ChatToolCallsGenerationEvent(allOf), + ChatStreamEvent(ref), + ChatToolCallsGenerationEventVariant2(class), + Text(string), + ToolCalls(array), + ToolCall(ref), + ChatStreamEndEvent(allOf), + ChatStreamEvent(ref), + ChatStreamEndEventVariant2(class), + ChatStreamEndEventVariant2FinishReason(enum), + NonStreamedChatResponse(ref), + ToolCallDelta(class), + Name(string), + Index(double), + Parameters(string), + Text(string), + ChatToolCallsChunkEvent(allOf), + ChatStreamEvent(ref), + ChatToolCallsChunkEventVariant2(class), + ToolCallDelta(ref), + StreamedChatResponse(oneOf), + ChatStreamStartEvent(ref), + ChatSearchQueriesGenerationEvent(ref), + ChatSearchResultsEvent(ref), + ChatTextGenerationEvent(ref), + ChatCitationGenerationEvent(ref), + ChatToolCallsGenerationEvent(ref), + ChatStreamEndEvent(ref), + ChatToolCallsChunkEvent(ref), + TextContent(class), + TextContentType(enum), + Text(string), + Content(oneOf), + TextContent(ref), + UserMessage(class), + UserMessageRole(enum), + Content2(oneOf), + ContentVariant1(string), + ContentVariant2(array), + Content(ref), + Documents(array), + ChatDocument(ref), + ToolCall2(class), + Id(string), + ToolCall2Type(enum), + ToolCall2Function(class), + Name(string), + Arguments(string), + ToolSource(class), + Id(string), + ToolSourceToolOutput(class), + DocumentSource(class), + Id(string), + DocumentSourceDocument(class), + Source(oneOf), + ToolSource(ref), + DocumentSource(ref), + Citation(class), + Start(int), + End(int), + Text(string), + Sources(array), + Source(ref), + AssistantMessage(class), + AssistantMessageRole(enum), + ToolCalls(array), + ToolCall2(ref), + ToolPlan(string), + Content3(oneOf), + ContentVariant1(string), + ContentVariant2(array), + ContentVariant2Item(oneOf), + TextContent(ref), + Citations(array), + Citation(ref), + SystemMessage(class), + SystemMessageRole(enum), + Content4(oneOf), + ContentVariant1(string), + ContentVariant2(array), + ContentVariant2Item2(oneOf), + TextContent(ref), + ToolContent(class), + ToolContentType(enum), + ToolContentOutput(class), + ToolMessage2(class), + ToolMessage2Role(enum), + ToolCallId(string), + ToolContent(array), + ToolContentItem(oneOf), + ToolContent(ref), + ChatMessage2(oneOf), + UserMessage(ref), + AssistantMessage(ref), + SystemMessage(ref), + ToolMessage2(ref), + ChatMessages(array), + ChatMessage2(ref), + Tool2(class), + Tool2Type(enum), + Tool2Function(class), + Name(string), + Description(string), + Tool2FunctionParameters(class), + JSONResponseFormat2(class), + ResponseFormatType(ref), + JSONResponseFormat2JsonSchema(class), + ResponseFormat2(oneOf), + TextResponseFormat(ref), + JSONResponseFormat2(ref), + ChatFinishReason(enum), + AssistantMessageResponse(class), + AssistantMessageResponseRole(enum), + ToolCalls(array), + ToolCall2(ref), + ToolPlan(string), + Content(array), + ContentItem(oneOf), + TextContent(ref), + Citations(array), + Citation(ref), + Usage(class), + UsageBilledUnits(class), + InputTokens(double), + OutputTokens(double), + SearchUnits(double), + Classifications(double), + UsageTokens(class), + InputTokens(double), + OutputTokens(double), + NonStreamedChatResponse2(class), + Id(string), + ChatFinishReason(ref), + AssistantMessageResponse(ref), + Usage(ref), + ChatStreamEventType(class), + ChatStreamEventTypeType(enum), + ChatMessageStartEvent(allOf), + ChatStreamEventType(ref), + ChatMessageStartEventVariant2(class), + Id(string), + ChatMessageStartEventVariant2Delta(class), + ChatMessageStartEventVariant2DeltaMessage(class), + ChatMessageStartEventVariant2DeltaMessageRole(enum), + ChatContentStartEvent(allOf), + ChatStreamEventType(ref), + ChatContentStartEventVariant2(class), + Index(int), + ChatContentStartEventVariant2Delta(class), + ChatContentStartEventVariant2DeltaMessage(class), + ChatContentStartEventVariant2DeltaMessageContent(class), + Text(string), + ChatContentStartEventVariant2DeltaMessageContentType(enum), + ChatContentDeltaEvent(allOf), + ChatStreamEventType(ref), + ChatContentDeltaEventVariant2(class), + Index(int), + ChatContentDeltaEventVariant2Delta(class), + ChatContentDeltaEventVariant2DeltaMessage(class), + ChatContentDeltaEventVariant2DeltaMessageContent(class), + Text(string), + ChatContentEndEvent(allOf), + ChatStreamEventType(ref), + ChatContentEndEventVariant2(class), + Index(int), + ChatToolPlanDeltaEvent(allOf), + ChatStreamEventType(ref), + ChatToolPlanDeltaEventVariant2(class), + ChatToolPlanDeltaEventVariant2Delta(class), + ToolPlan(string), + ChatToolCallStartEvent(allOf), + ChatStreamEventType(ref), + ChatToolCallStartEventVariant2(class), + Index(int), + ChatToolCallStartEventVariant2Delta(class), + ChatToolCallStartEventVariant2DeltaToolCall(class), + Id(string), + ChatToolCallStartEventVariant2DeltaToolCallType(enum), + ChatToolCallStartEventVariant2DeltaToolCallFunction(class), + Name(string), + Arguments(string), + ChatToolCallDeltaEvent(allOf), + ChatStreamEventType(ref), + ChatToolCallDeltaEventVariant2(class), + Index(int), + ChatToolCallDeltaEventVariant2Delta(class), + ChatToolCallDeltaEventVariant2DeltaToolCall(class), + ChatToolCallDeltaEventVariant2DeltaToolCallFunction(class), + Arguments(string), + ChatToolCallEndEvent(allOf), + ChatStreamEventType(ref), + ChatToolCallEndEventVariant2(class), + Index(int), + CitationStartEvent(allOf), + ChatStreamEventType(ref), + CitationStartEventVariant2(class), + Index(int), + CitationStartEventVariant2Delta(class), + CitationStartEventVariant2DeltaMessage(class), + Citation(ref), + CitationEndEvent(allOf), + ChatStreamEventType(ref), + CitationEndEventVariant2(class), + Index(int), + ChatMessageEndEvent(allOf), + ChatStreamEventType(ref), + ChatMessageEndEventVariant2(class), + Id(string), + ChatMessageEndEventVariant2Delta(class), + ChatFinishReason(ref), + Usage(ref), + StreamedChatResponse2(oneOf), + ChatMessageStartEvent(ref), + ChatContentStartEvent(ref), + ChatContentDeltaEvent(ref), + ChatContentEndEvent(ref), + ChatToolPlanDeltaEvent(ref), + ChatToolCallStartEvent(ref), + ChatToolCallDeltaEvent(ref), + ChatToolCallEndEvent(ref), + ChatMessageEndEvent(ref), + SingleGeneration(class), + Id(string), + Text(string), + Index(int), + Likelihood(double), + TokenLikelihoods(array), + SingleGenerationTokenLikelihood(class), + Token(string), + Likelihood(double), + Generation(class), + Id(string), + Prompt(string), + Generations(array), + SingleGeneration(ref), + ApiMeta(ref), + GenerateStreamEvent(class), + GenerateStreamEventEventType(enum), + GenerateStreamText(allOf), + GenerateStreamEvent(ref), + GenerateStreamTextVariant2(class), + Text(string), + Index(int), + IsFinished(bool), + SingleGenerationInStream(class), + Id(string), + Text(string), + Index(int), + FinishReason(ref), + GenerateStreamEnd(allOf), + GenerateStreamEvent(ref), + GenerateStreamEndVariant2(class), + IsFinished(bool), + FinishReason(ref), + GenerateStreamEndVariant2Response(class), + Id(string), + Prompt(string), + Generations(array), + SingleGenerationInStream(ref), + GenerateStreamError(allOf), + GenerateStreamEvent(ref), + GenerateStreamErrorVariant2(class), + Index(int), + IsFinished(bool), + FinishReason(ref), + Err(string), + GenerateStreamedResponse(oneOf), + GenerateStreamText(ref), + GenerateStreamEnd(ref), + GenerateStreamError(ref), + EmbedInputType(enum), + EmbeddingType(enum), + EmbedFloatsResponse(class), + EmbedFloatsResponseResponseType(enum), + Id(string), + Embeddings(array), + EmbeddingsItem(array), + EmbeddingsItemItem(double), + Texts(array), + TextsItem(string), + ApiMeta(ref), + EmbedByTypeResponse(class), + EmbedByTypeResponseResponseType(enum), + Id(string), + EmbedByTypeResponseEmbeddings(class), + EmbeddingsItem(array), + EmbeddingsItemItem(double), + Float(array), + FloatItem(array), + FloatItemItem(double), + Int8(array), + Int8Item(array), + Int8ItemItem(int), + Uint8(array), + Uint8Item(array), + Uint8ItemItem(int), + Binary(array), + BinaryItem(array), + BinaryItemItem(int), + Ubinary(array), + UbinaryItem(array), + UbinaryItemItem(int), + Texts(array), + TextsItem(string), + ApiMeta(ref), + EmbedJob(class), + JobId(string), + Name(string), + EmbedJobStatus(enum), + CreatedAt(DateTime), + InputDatasetId(string), + OutputDatasetId(string), + Model(string), + EmbedJobTruncate(enum), + ApiMeta(ref), + ListEmbedJobResponse(class), + EmbedJobs(array), + EmbedJob(ref), + CreateEmbedJobRequest(class), + Model(string), + DatasetId(string), + EmbedInputType(ref), + Name(string), + EmbeddingTypes(array), + EmbeddingType(ref), + CreateEmbedJobRequestTruncate(enum), + CreateEmbedJobResponse(class), + JobId(string), + ApiMeta(ref), + RerankDocument(class), + Text(string), + ClassifyExample(class), + Text(string), + Label(string), + DatasetValidationStatus(enum), + DatasetType(enum), + DatasetPart(class), + Id(string), + Name(string), + Url(string), + Index(int), + SizeBytes(int), + NumRows(int), + OriginalUrl(string), + Samples(array), + SamplesItem(string), + ParseInfo(class), + Separator(string), + Delimiter(string), + RerankerDataMetrics(class), + NumTrainQueries(double), + NumTrainRelevantPassages(double), + NumTrainHardNegatives(double), + NumEvalQueries(double), + NumEvalRelevantPassages(double), + NumEvalHardNegatives(double), + ChatDataMetrics(class), + NumTrainTurns(double), + NumEvalTurns(double), + Preamble(string), + LabelMetric(class), + TotalExamples(double), + Label(string), + Samples(array), + SamplesItem(string), + ClassifyDataMetrics(class), + LabelMetrics(array), + LabelMetric(ref), + FinetuneDatasetMetrics(class), + TrainableTokenCount(double), + TotalExamples(double), + TrainExamples(double), + TrainSizeBytes(double), + EvalExamples(double), + EvalSizeBytes(double), + RerankerDataMetrics(ref), + ChatDataMetrics(ref), + ClassifyDataMetrics(ref), + Metrics(class), + FinetuneDatasetMetrics(ref), + Dataset(class), + Id(string), + Name(string), + CreatedAt(DateTime), + UpdatedAt(DateTime), + DatasetType(ref), + DatasetValidationStatus(ref), + ValidationError(string), + Schema(string), + RequiredFields(array), + RequiredFieldsItem(string), + PreserveFields(array), + PreserveFieldsItem(string), + DatasetParts(array), + DatasetPart(ref), + ValidationWarnings(array), + ValidationWarningsItem(string), + ParseInfo(ref), + Metrics(ref), + ConnectorOAuth(class), + ClientId(string), + ClientSecret(string), + AuthorizeUrl(string), + TokenUrl(string), + Scope(string), + Connector(class), + Id(string), + OrganizationId(string), + Name(string), + Description(string), + Url(string), + CreatedAt(DateTime), + UpdatedAt(DateTime), + Excludes(array), + ExcludesItem(string), + AuthType(string), + ConnectorOAuth(ref), + ConnectorAuthStatus(enum), + Active(bool), + ContinueOnFailure(bool), + ListConnectorsResponse(class), + Connectors(array), + Connector(ref), + TotalCount(double), + CreateConnectorOAuth(class), + ClientId(string), + ClientSecret(string), + AuthorizeUrl(string), + TokenUrl(string), + Scope(string), + AuthTokenType(enum), + CreateConnectorServiceAuth(class), + AuthTokenType(ref), + Token(string), + CreateConnectorRequest(class), + Name(string), + Description(string), + Url(string), + Excludes(array), + ExcludesItem(string), + CreateConnectorOAuth(ref), + Active(bool), + ContinueOnFailure(bool), + CreateConnectorServiceAuth(ref), + CreateConnectorResponse(class), + Connector(ref), + GetConnectorResponse(class), + Connector(ref), + DeleteConnectorResponse(class), + UpdateConnectorRequest(class), + Name(string), + Url(string), + Excludes(array), + ExcludesItem(string), + CreateConnectorOAuth(ref), + Active(bool), + ContinueOnFailure(bool), + CreateConnectorServiceAuth(ref), + UpdateConnectorResponse(class), + Connector(ref), + OAuthAuthorizeResponse(class), + RedirectUrl(string), + ConnectorLog(class), + Id(string), + ConnectorId(string), + RequestId(string), + UserId(string), + OrganizationId(string), + CreatedAt(DateTime), + StatusCode(int), + DurationMillis(int), + ErrorMessage(string), + GetConnectorsLogsResponse(class), + ConnectorLogs(array), + ConnectorLog(ref), + Total(double), + TokenLikelihood(class), + Encoded(int), + Decoded(string), + LogLikelihood(double), + LogLikelihoodResponse(class), + Id(string), + PromptTokens(array), + TokenLikelihood(ref), + CompletionTokens(array), + TokenLikelihood(ref), + RawPromptTokens(array), + TokenLikelihood(ref), + ApiMeta(ref), + Cluster(class), + Id(string), + Keywords(array), + KeywordsItem(string), + Description(string), + Size(int), + SampleElements(array), + SampleElementsItem(string), + GetClusterJobResponse(class), + JobId(string), + CreatedAt(DateTime), + EmbeddingsUrl(string), + InputDatasetId(string), + MinClusterSize(int), + NNeighbors(int), + IsDeterministic(bool), + GetClusterJobResponseStatus(enum), + IsFinalState(bool), + OutputClustersUrl(string), + OutputOutliersUrl(string), + Clusters(array), + Cluster(ref), + Error(string), + ApiMeta(ref), + ListClusterJobsResponse(class), + Jobs(array), + GetClusterJobResponse(ref), + TotalCount(int), + ApiMeta(ref), + CreateClusterJobRequest(class), + EmbeddingsUrl(string), + InputDatasetId(string), + MinClusterSize(int), + NNeighbors(int), + IsDeterministic(bool), + GenerateDescriptions(bool), + CreateClusterJobResponse(class), + JobId(string), + UpdateClusterJobRequest(class), + UpdateClusterJobRequestStatus(enum), + Clusters(array), + Cluster(ref), + OutputClustersGsPath(string), + OutputOutliersGsPath(string), + Error(string), + UpdateClusterJobRequestInputTrackingMetrics(class), + UpdateClusterJobRequestOutputTrackingMetrics(class), + UpdateClusterJobResponse(class), + JobId(string), + CompatibleEndpoint(enum), + GetModelResponse(class), + Name(string), + Endpoints(array), + CompatibleEndpoint(ref), + Finetuned(bool), + ContextLength(double), + TokenizerUrl(string), + DefaultEndpoints(array), + CompatibleEndpoint(ref), + ListModelsResponse(class), + Models(array), + GetModelResponse(ref), + NextPageToken(string), + BaseType(enum), + Strategy(enum), + BaseModel(class), + Name(string), + Version(string), + BaseType(ref), + Strategy(ref), + Hyperparameters(class), + EarlyStoppingPatience(int), + EarlyStoppingThreshold(double), + TrainBatchSize(int), + TrainEpochs(int), + LearningRate(double), + WandbConfig(class), + Project(string), + ApiKey(string), + Entity(string), + Settings(class), + BaseModel(ref), + DatasetId(string), + Hyperparameters(ref), + MultiLabel(bool), + WandbConfig(ref), + Status(enum), + FinetunedModel(class), + Id(string), + Name(string), + CreatorId(string), + OrganizationId(string), + Settings(ref), + Status(ref), + CreatedAt(DateTime), + UpdatedAt(DateTime), + CompletedAt(DateTime), + LastUsed(DateTime), + ListFinetunedModelsResponse(class), + FinetunedModels(array), + FinetunedModel(ref), + NextPageToken(string), + TotalSize(int), + Error(class), + Message(string), + CreateFinetunedModelResponse(class), + FinetunedModel(ref), + GetFinetunedModelResponse(class), + FinetunedModel(ref), + DeleteFinetunedModelResponse(class), + UpdateFinetunedModelResponse(class), + FinetunedModel(ref), + Event(class), + UserId(string), + Status(ref), + CreatedAt(DateTime), + ListEventsResponse(class), + Events(array), + Event(ref), + NextPageToken(string), + TotalSize(int), + TrainingStepMetrics(class), + CreatedAt(DateTime), + StepNumber(int), + TrainingStepMetricsMetrics(class), + ListTrainingStepMetricsResponse(class), + StepMetrics(array), + TrainingStepMetrics(ref), + NextPageToken(string), + ChatRequest(class), + Message(string), + Model(string), + Stream(bool), + Preamble(string), + ChatHistory(array), + Message(ref), + ConversationId(string), + ChatRequestPromptTruncation(enum), + Connectors(array), + ChatConnector(ref), + SearchQueriesOnly(bool), + Documents(array), + ChatDocument(ref), + ChatRequestCitationQuality(enum), + Temperature(float), + MaxTokens(int), + MaxInputTokens(int), + K(int), + P(double), + Seed(int), + StopSequences(array), + StopSequencesItem(string), + FrequencyPenalty(double), + PresencePenalty(double), + Tools(array), + Tool(ref), + ToolResults(array), + ToolResult(ref), + ForceSingleStep(bool), + ResponseFormat(ref), + Chatv2Request(class), + Model(string), + ChatMessages(ref), + Tools(array), + Tool2(ref), + Chatv2RequestCitationMode(enum), + ResponseFormat2(ref), + MaxTokens(int), + StopSequences(array), + StopSequencesItem(string), + Temperature(float), + Seed(int), + FrequencyPenalty(float), + PresencePenalty(float), + K(float), + P(float), + GenerateRequest(class), + Prompt(string), + Model(string), + NumGenerations(int), + Stream(bool), + MaxTokens(int), + GenerateRequestTruncate(enum), + Temperature(double), + Seed(int), + Preset(string), + EndSequences(array), + EndSequencesItem(string), + StopSequences(array), + StopSequencesItem(string), + K(int), + P(double), + FrequencyPenalty(double), + PresencePenalty(double), + GenerateRequestReturnLikelihoods(enum), + RawPrompting(bool), + EmbedRequest(class), + Texts(array), + TextsItem(string), + Model(string), + EmbedInputType(ref), + EmbeddingTypes(array), + EmbeddingType(ref), + EmbedRequestTruncate(enum), + CreateEmbedJobRequest(ref), + RerankRequest(class), + Model(string), + Query(string), + Documents(array), + DocumentsItem(oneOf), + DocumentsItemVariant1(string), + RerankDocument(ref), + TopN(int), + RankFields(array), + RankFieldsItem(string), + ReturnDocuments(bool), + MaxChunksPerDoc(int), + ClassifyRequest(class), + Inputs(array), + InputsItem(string), + Examples(array), + ClassifyExample(ref), + Model(string), + Preset(string), + ClassifyRequestTruncate(enum), + CreateDatasetRequest(class), + Data(byte[]), + EvalData(byte[]), + SummarizeRequest(class), + Text(string), + SummarizeRequestLength(enum), + SummarizeRequestFormat(enum), + Model(string), + SummarizeRequestExtractiveness(enum), + Temperature(double), + AdditionalCommand(string), + TokenizeRequest(class), + Text(string), + Model(string), + DetokenizeRequest(class), + Tokens(array), + TokensItem(int), + Model(string), + CreateConnectorRequest(ref), + UpdateConnectorRequest(ref), + FinetunedModel(ref), + UpdateFinetunedModelRequest(class), + Name(string), + CreatorId(string), + OrganizationId(string), + Settings(ref), + Status(ref), + CreatedAt(DateTime), + UpdatedAt(DateTime), + CompletedAt(DateTime), + LastUsed(DateTime), + ChatXClientName(string), + GenerateXClientName(string), + EmbedXClientName(string), + CreateEmbedJobXClientName(string), + ListEmbedJobsXClientName(string), + GetEmbedJobId(string), + GetEmbedJobXClientName(string), + CancelEmbedJobId(string), + CancelEmbedJobXClientName(string), + RerankXClientName(string), + ClassifyXClientName(string), + CreateDatasetName(string), + DatasetType(ref), + CreateDatasetKeepOriginalFile(bool), + CreateDatasetSkipMalformedInput(bool), + CreateDatasetKeepFields(array), + CreateDatasetKeepFieldsItem(string), + CreateDatasetOptionalFields(array), + CreateDatasetOptionalFieldsItem(string), + CreateDatasetTextSeparator(string), + CreateDatasetCsvDelimiter(string), + CreateDatasetXClientName(string), + ListDatasetsDatasetType(string), + ListDatasetsBefore(DateTime), + ListDatasetsAfter(DateTime), + ListDatasetsLimit(double), + ListDatasetsOffset(double), + DatasetValidationStatus(ref), + ListDatasetsXClientName(string), + GetDatasetUsageXClientName(string), + GetDatasetId(string), + GetDatasetXClientName(string), + DeleteDatasetId(string), + DeleteDatasetXClientName(string), + SummarizeXClientName(string), + TokenizeXClientName(string), + DetokenizeXClientName(string), + ListConnectorsLimit(double), + ListConnectorsOffset(double), + ListConnectorsXClientName(string), + CreateConnectorXClientName(string), + GetConnectorId(string), + GetConnectorXClientName(string), + UpdateConnectorId(string), + UpdateConnectorXClientName(string), + DeleteConnectorId(string), + DeleteConnectorXClientName(string), + OAuthAuthorizeConnectorId(string), + OAuthAuthorizeConnectorAfterTokenRedirect(string), + OAuthAuthorizeConnectorXClientName(string), + GetModelModel(string), + GetModelXClientName(string), + ListModelsPageSize(double), + ListModelsPageToken(string), + CompatibleEndpoint(ref), + ListModelsDefaultOnly(bool), + CheckAPIKeyXClientName(string), + ListFinetunedModelsPageSize(int), + ListFinetunedModelsPageToken(string), + ListFinetunedModelsOrderBy(string), + ListFinetunedModelsXClientName(string), + CreateFinetunedModelXClientName(string), + UpdateFinetunedModelId(string), + UpdateFinetunedModelXClientName(string), + GetFinetunedModelId(string), + GetFinetunedModelXClientName(string), + DeleteFinetunedModelId(string), + DeleteFinetunedModelXClientName(string), + ListEventsFinetunedModelId(string), + ListEventsPageSize(int), + ListEventsPageToken(string), + ListEventsOrderBy(string), + ListEventsXClientName(string), + ListTrainingStepMetricsFinetunedModelId(string), + ListTrainingStepMetricsPageSize(int), + ListTrainingStepMetricsPageToken(string), + ListTrainingStepMetricsXClientName(string), + ChatResponse(oneOf), + NonStreamedChatResponse(ref), + StreamedChatResponse(ref), + ChatResponse2(class), + Data(string), + ChatResponse3(class), + Data(string), + ChatResponse4(class), + Data(string), + ChatResponse5(class), + Data(string), + ChatResponse6(class), + Data(string), + ChatResponse7(class), + Data(string), + ChatResponse8(class), + Data(string), + ChatResponse9(class), + Data(string), + ChatResponse10(class), + Data(string), + ChatResponse11(class), + Data(string), + ChatResponse12(class), + Data(string), + ChatResponse13(class), + Data(string), + Chatv2Response(oneOf), + NonStreamedChatResponse2(ref), + StreamedChatResponse2(ref), + Chatv2Response2(class), + Data(string), + Chatv2Response3(class), + Data(string), + Chatv2Response4(class), + Data(string), + Chatv2Response5(class), + Data(string), + Chatv2Response6(class), + Data(string), + Chatv2Response7(class), + Data(string), + Chatv2Response8(class), + Data(string), + Chatv2Response9(class), + Data(string), + Chatv2Response10(class), + Data(string), + Chatv2Response11(class), + Data(string), + Chatv2Response12(class), + Data(string), + Chatv2Response13(class), + Data(string), + Generation(ref), + GenerateStreamedResponse(ref), + GenerateResponse(class), + Data(string), + GenerateResponse2(class), + Data(string), + GenerateResponse3(class), + Data(string), + GenerateResponse4(class), + Data(string), + GenerateResponse5(class), + Data(string), + GenerateResponse6(class), + Data(string), + GenerateResponse7(class), + Data(string), + GenerateResponse8(class), + Data(string), + GenerateResponse9(class), + Data(string), + GenerateResponse10(class), + Data(string), + GenerateResponse11(class), + Data(string), + GenerateResponse12(class), + Data(string), + EmbedResponse(oneOf), + EmbedFloatsResponse(ref), + EmbedByTypeResponse(ref), + EmbedResponse2(class), + Data(string), + EmbedResponse3(class), + Data(string), + EmbedResponse4(class), + Data(string), + EmbedResponse5(class), + Data(string), + EmbedResponse6(class), + Data(string), + EmbedResponse7(class), + Data(string), + EmbedResponse8(class), + Data(string), + EmbedResponse9(class), + Data(string), + EmbedResponse10(class), + Data(string), + EmbedResponse11(class), + Data(string), + EmbedResponse12(class), + Data(string), + EmbedResponse13(class), + Data(string), + CreateEmbedJobResponse(ref), + CreateEmbedJobResponse2(class), + Data(string), + CreateEmbedJobResponse3(class), + Data(string), + CreateEmbedJobResponse4(class), + Data(string), + CreateEmbedJobResponse5(class), + Data(string), + CreateEmbedJobResponse6(class), + Data(string), + CreateEmbedJobResponse7(class), + Data(string), + CreateEmbedJobResponse8(class), + Data(string), + CreateEmbedJobResponse9(class), + Data(string), + CreateEmbedJobResponse10(class), + Data(string), + CreateEmbedJobResponse11(class), + Data(string), + CreateEmbedJobResponse12(class), + Data(string), + CreateEmbedJobResponse13(class), + Data(string), + ListEmbedJobResponse(ref), + ListEmbedJobsResponse(class), + Data(string), + ListEmbedJobsResponse2(class), + Data(string), + ListEmbedJobsResponse3(class), + Data(string), + ListEmbedJobsResponse4(class), + Data(string), + ListEmbedJobsResponse5(class), + Data(string), + ListEmbedJobsResponse6(class), + Data(string), + ListEmbedJobsResponse7(class), + Data(string), + ListEmbedJobsResponse8(class), + Data(string), + ListEmbedJobsResponse9(class), + Data(string), + ListEmbedJobsResponse10(class), + Data(string), + ListEmbedJobsResponse11(class), + Data(string), + ListEmbedJobsResponse12(class), + Data(string), + EmbedJob(ref), + GetEmbedJobResponse(class), + Data(string), + GetEmbedJobResponse2(class), + Data(string), + GetEmbedJobResponse3(class), + Data(string), + GetEmbedJobResponse4(class), + Data(string), + GetEmbedJobResponse5(class), + Data(string), + GetEmbedJobResponse6(class), + Data(string), + GetEmbedJobResponse7(class), + Data(string), + GetEmbedJobResponse8(class), + Data(string), + GetEmbedJobResponse9(class), + Data(string), + GetEmbedJobResponse10(class), + Data(string), + GetEmbedJobResponse11(class), + Data(string), + GetEmbedJobResponse12(class), + Data(string), + CancelEmbedJobResponse(class), + Data(string), + CancelEmbedJobResponse2(class), + Data(string), + CancelEmbedJobResponse3(class), + Data(string), + CancelEmbedJobResponse4(class), + Data(string), + CancelEmbedJobResponse5(class), + Data(string), + CancelEmbedJobResponse6(class), + Data(string), + CancelEmbedJobResponse7(class), + Data(string), + CancelEmbedJobResponse8(class), + Data(string), + CancelEmbedJobResponse9(class), + Data(string), + CancelEmbedJobResponse10(class), + Data(string), + CancelEmbedJobResponse11(class), + Data(string), + CancelEmbedJobResponse12(class), + Data(string), + RerankResponse(class), + Id(string), + Results(array), + RerankResponseResult(class), + RerankResponseResultDocument(class), + Text(string), + Index(int), + RelevanceScore(float), + ApiMeta(ref), + RerankResponse2(class), + Data(string), + RerankResponse3(class), + Data(string), + RerankResponse4(class), + Data(string), + RerankResponse5(class), + Data(string), + RerankResponse6(class), + Data(string), + RerankResponse7(class), + Data(string), + RerankResponse8(class), + Data(string), + RerankResponse9(class), + Data(string), + RerankResponse10(class), + Data(string), + RerankResponse11(class), + Data(string), + RerankResponse12(class), + Data(string), + RerankResponse13(class), + Data(string), + ClassifyResponse(class), + Id(string), + Classifications(array), + ClassifyResponseClassification(class), + Id(string), + Input(string), + Prediction(string), + Predictions(array), + PredictionsItem(string), + Confidence(float), + Confidences(array), + ConfidencesItem(float), + ClassifyResponseClassificationLabels(class), + ClassifyResponseClassificationClassificationType(enum), + ApiMeta(ref), + ClassifyResponse2(class), + Data(string), + ClassifyResponse3(class), + Data(string), + ClassifyResponse4(class), + Data(string), + ClassifyResponse5(class), + Data(string), + ClassifyResponse6(class), + Data(string), + ClassifyResponse7(class), + Data(string), + ClassifyResponse8(class), + Data(string), + ClassifyResponse9(class), + Data(string), + ClassifyResponse10(class), + Data(string), + ClassifyResponse11(class), + Data(string), + ClassifyResponse12(class), + Data(string), + ClassifyResponse13(class), + Data(string), + CreateDatasetResponse(class), + Id(string), + CreateDatasetResponse2(class), + Data(string), + CreateDatasetResponse3(class), + Data(string), + CreateDatasetResponse4(class), + Data(string), + CreateDatasetResponse5(class), + Data(string), + CreateDatasetResponse6(class), + Data(string), + CreateDatasetResponse7(class), + Data(string), + CreateDatasetResponse8(class), + Data(string), + CreateDatasetResponse9(class), + Data(string), + CreateDatasetResponse10(class), + Data(string), + CreateDatasetResponse11(class), + Data(string), + CreateDatasetResponse12(class), + Data(string), + CreateDatasetResponse13(class), + Data(string), + ListDatasetsResponse(class), + Datasets(array), + Dataset(ref), + ListDatasetsResponse2(class), + Data(string), + ListDatasetsResponse3(class), + Data(string), + ListDatasetsResponse4(class), + Data(string), + ListDatasetsResponse5(class), + Data(string), + ListDatasetsResponse6(class), + Data(string), + ListDatasetsResponse7(class), + Data(string), + ListDatasetsResponse8(class), + Data(string), + ListDatasetsResponse9(class), + Data(string), + ListDatasetsResponse10(class), + Data(string), + ListDatasetsResponse11(class), + Data(string), + ListDatasetsResponse12(class), + Data(string), + ListDatasetsResponse13(class), + Data(string), + GetDatasetUsageResponse(class), + OrganizationUsage(double), + GetDatasetUsageResponse2(class), + Data(string), + GetDatasetUsageResponse3(class), + Data(string), + GetDatasetUsageResponse4(class), + Data(string), + GetDatasetUsageResponse5(class), + Data(string), + GetDatasetUsageResponse6(class), + Data(string), + GetDatasetUsageResponse7(class), + Data(string), + GetDatasetUsageResponse8(class), + Data(string), + GetDatasetUsageResponse9(class), + Data(string), + GetDatasetUsageResponse10(class), + Data(string), + GetDatasetUsageResponse11(class), + Data(string), + GetDatasetUsageResponse12(class), + Data(string), + GetDatasetUsageResponse13(class), + Data(string), + GetDatasetResponse(class), + Dataset(ref), + GetDatasetResponse2(class), + Data(string), + GetDatasetResponse3(class), + Data(string), + GetDatasetResponse4(class), + Data(string), + GetDatasetResponse5(class), + Data(string), + GetDatasetResponse6(class), + Data(string), + GetDatasetResponse7(class), + Data(string), + GetDatasetResponse8(class), + Data(string), + GetDatasetResponse9(class), + Data(string), + GetDatasetResponse10(class), + Data(string), + GetDatasetResponse11(class), + Data(string), + GetDatasetResponse12(class), + Data(string), + GetDatasetResponse13(class), + Data(string), + DeleteDatasetResponse(class), + DeleteDatasetResponse2(class), + Data(string), + DeleteDatasetResponse3(class), + Data(string), + DeleteDatasetResponse4(class), + Data(string), + DeleteDatasetResponse5(class), + Data(string), + DeleteDatasetResponse6(class), + Data(string), + DeleteDatasetResponse7(class), + Data(string), + DeleteDatasetResponse8(class), + Data(string), + DeleteDatasetResponse9(class), + Data(string), + DeleteDatasetResponse10(class), + Data(string), + DeleteDatasetResponse11(class), + Data(string), + DeleteDatasetResponse12(class), + Data(string), + DeleteDatasetResponse13(class), + Data(string), + SummarizeResponse(class), + Id(string), + Summary(string), + ApiMeta(ref), + SummarizeResponse2(class), + Data(string), + SummarizeResponse3(class), + Data(string), + SummarizeResponse4(class), + Data(string), + SummarizeResponse5(class), + Data(string), + SummarizeResponse6(class), + Data(string), + SummarizeResponse7(class), + Data(string), + SummarizeResponse8(class), + Data(string), + SummarizeResponse9(class), + Data(string), + SummarizeResponse10(class), + Data(string), + SummarizeResponse11(class), + Data(string), + SummarizeResponse12(class), + Data(string), + SummarizeResponse13(class), + Data(string), + TokenizeResponse(class), + Tokens(array), + TokensItem(int), + TokenStrings(array), + TokenStringsItem(string), + ApiMeta(ref), + TokenizeResponse2(class), + Data(string), + TokenizeResponse3(class), + Data(string), + TokenizeResponse4(class), + Data(string), + TokenizeResponse5(class), + Data(string), + TokenizeResponse6(class), + Data(string), + TokenizeResponse7(class), + Data(string), + TokenizeResponse8(class), + Data(string), + TokenizeResponse9(class), + Data(string), + TokenizeResponse10(class), + Data(string), + TokenizeResponse11(class), + Data(string), + TokenizeResponse12(class), + Data(string), + TokenizeResponse13(class), + Data(string), + DetokenizeResponse(class), + Text(string), + ApiMeta(ref), + DetokenizeResponse2(class), + Data(string), + DetokenizeResponse3(class), + Data(string), + DetokenizeResponse4(class), + Data(string), + DetokenizeResponse5(class), + Data(string), + DetokenizeResponse6(class), + Data(string), + DetokenizeResponse7(class), + Data(string), + DetokenizeResponse8(class), + Data(string), + DetokenizeResponse9(class), + Data(string), + DetokenizeResponse10(class), + Data(string), + DetokenizeResponse11(class), + Data(string), + DetokenizeResponse12(class), + Data(string), + DetokenizeResponse13(class), + Data(string), + ListConnectorsResponse(ref), + ListConnectorsResponse2(class), + Data(string), + ListConnectorsResponse3(class), + Data(string), + ListConnectorsResponse4(class), + Data(string), + ListConnectorsResponse5(class), + Data(string), + ListConnectorsResponse6(class), + Data(string), + ListConnectorsResponse7(class), + Data(string), + ListConnectorsResponse8(class), + Data(string), + ListConnectorsResponse9(class), + Data(string), + ListConnectorsResponse10(class), + Data(string), + ListConnectorsResponse11(class), + Data(string), + ListConnectorsResponse12(class), + Data(string), + ListConnectorsResponse13(class), + Data(string), + CreateConnectorResponse(ref), + CreateConnectorResponse2(class), + Data(string), + CreateConnectorResponse3(class), + Data(string), + CreateConnectorResponse4(class), + Data(string), + CreateConnectorResponse5(class), + Data(string), + CreateConnectorResponse6(class), + Data(string), + CreateConnectorResponse7(class), + Data(string), + CreateConnectorResponse8(class), + Data(string), + CreateConnectorResponse9(class), + Data(string), + CreateConnectorResponse10(class), + Data(string), + CreateConnectorResponse11(class), + Data(string), + CreateConnectorResponse12(class), + Data(string), + CreateConnectorResponse13(class), + Data(string), + GetConnectorResponse(ref), + GetConnectorResponse2(class), + Data(string), + GetConnectorResponse3(class), + Data(string), + GetConnectorResponse4(class), + Data(string), + GetConnectorResponse5(class), + Data(string), + GetConnectorResponse6(class), + Data(string), + GetConnectorResponse7(class), + Data(string), + GetConnectorResponse8(class), + Data(string), + GetConnectorResponse9(class), + Data(string), + GetConnectorResponse10(class), + Data(string), + GetConnectorResponse11(class), + Data(string), + GetConnectorResponse12(class), + Data(string), + GetConnectorResponse13(class), + Data(string), + UpdateConnectorResponse(ref), + UpdateConnectorResponse2(class), + Data(string), + UpdateConnectorResponse3(class), + Data(string), + UpdateConnectorResponse4(class), + Data(string), + UpdateConnectorResponse5(class), + Data(string), + UpdateConnectorResponse6(class), + Data(string), + UpdateConnectorResponse7(class), + Data(string), + UpdateConnectorResponse8(class), + Data(string), + UpdateConnectorResponse9(class), + Data(string), + UpdateConnectorResponse10(class), + Data(string), + UpdateConnectorResponse11(class), + Data(string), + UpdateConnectorResponse12(class), + Data(string), + UpdateConnectorResponse13(class), + Data(string), + DeleteConnectorResponse(ref), + DeleteConnectorResponse2(class), + Data(string), + DeleteConnectorResponse3(class), + Data(string), + DeleteConnectorResponse4(class), + Data(string), + DeleteConnectorResponse5(class), + Data(string), + DeleteConnectorResponse6(class), + Data(string), + DeleteConnectorResponse7(class), + Data(string), + DeleteConnectorResponse8(class), + Data(string), + DeleteConnectorResponse9(class), + Data(string), + DeleteConnectorResponse10(class), + Data(string), + DeleteConnectorResponse11(class), + Data(string), + DeleteConnectorResponse12(class), + Data(string), + DeleteConnectorResponse13(class), + Data(string), + OAuthAuthorizeResponse(ref), + OAuthAuthorizeConnectorResponse(class), + Data(string), + OAuthAuthorizeConnectorResponse2(class), + Data(string), + OAuthAuthorizeConnectorResponse3(class), + Data(string), + OAuthAuthorizeConnectorResponse4(class), + Data(string), + OAuthAuthorizeConnectorResponse5(class), + Data(string), + OAuthAuthorizeConnectorResponse6(class), + Data(string), + OAuthAuthorizeConnectorResponse7(class), + Data(string), + OAuthAuthorizeConnectorResponse8(class), + Data(string), + OAuthAuthorizeConnectorResponse9(class), + Data(string), + OAuthAuthorizeConnectorResponse10(class), + Data(string), + OAuthAuthorizeConnectorResponse11(class), + Data(string), + OAuthAuthorizeConnectorResponse12(class), + Data(string), + GetModelResponse(ref), + GetModelResponse2(class), + Data(string), + GetModelResponse3(class), + Data(string), + GetModelResponse4(class), + Data(string), + GetModelResponse5(class), + Data(string), + GetModelResponse6(class), + Data(string), + GetModelResponse7(class), + Data(string), + GetModelResponse8(class), + Data(string), + GetModelResponse9(class), + Data(string), + GetModelResponse10(class), + Data(string), + GetModelResponse11(class), + Data(string), + GetModelResponse12(class), + Data(string), + GetModelResponse13(class), + Data(string), + ListModelsResponse(ref), + ListModelsResponse2(class), + Data(string), + ListModelsResponse3(class), + Data(string), + ListModelsResponse4(class), + Data(string), + ListModelsResponse5(class), + Data(string), + ListModelsResponse6(class), + Data(string), + ListModelsResponse7(class), + Data(string), + ListModelsResponse8(class), + Data(string), + ListModelsResponse9(class), + Data(string), + ListModelsResponse10(class), + Data(string), + ListModelsResponse11(class), + Data(string), + ListModelsResponse12(class), + Data(string), + ListModelsResponse13(class), + Data(string), + CheckAPIKeyResponse(class), + Valid(bool), + OrganizationId(string), + OwnerId(string), + CheckAPIKeyResponse2(class), + Data(string), + CheckAPIKeyResponse3(class), + Data(string), + CheckAPIKeyResponse4(class), + Data(string), + CheckAPIKeyResponse5(class), + Data(string), + CheckAPIKeyResponse6(class), + Data(string), + CheckAPIKeyResponse7(class), + Data(string), + CheckAPIKeyResponse8(class), + Data(string), + CheckAPIKeyResponse9(class), + Data(string), + CheckAPIKeyResponse10(class), + Data(string), + CheckAPIKeyResponse11(class), + Data(string), + CheckAPIKeyResponse12(class), + Data(string), + CheckAPIKeyResponse13(class), + Data(string), + ListFinetunedModelsResponse(ref), + Error(ref), + Error(ref), + Error(ref), + Error(ref), + Error(ref), + Error(ref), + CreateFinetunedModelResponse(ref), + Error(ref), + Error(ref), + Error(ref), + Error(ref), + Error(ref), + Error(ref), + UpdateFinetunedModelResponse(ref), + Error(ref), + Error(ref), + Error(ref), + Error(ref), + Error(ref), + Error(ref), + GetFinetunedModelResponse(ref), + Error(ref), + Error(ref), + Error(ref), + Error(ref), + Error(ref), + Error(ref), + DeleteFinetunedModelResponse(ref), + Error(ref), + Error(ref), + Error(ref), + Error(ref), + Error(ref), + Error(ref), + ListEventsResponse(ref), + Error(ref), + Error(ref), + Error(ref), + Error(ref), + Error(ref), + Error(ref), + ListTrainingStepMetricsResponse(ref), + Error(ref), + Error(ref), + Error(ref), + Error(ref), + Error(ref), + Error(ref) +] \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.UnitTests/Snapshots/GitHub/ResolvedSchemas/_.verified.txt b/src/tests/OpenApiGenerator.UnitTests/Snapshots/GitHub/ResolvedSchemas/_.verified.txt index d3904f3851..074f6e635e 100644 --- a/src/tests/OpenApiGenerator.UnitTests/Snapshots/GitHub/ResolvedSchemas/_.verified.txt +++ b/src/tests/OpenApiGenerator.UnitTests/Snapshots/GitHub/ResolvedSchemas/_.verified.txt @@ -35315,9 +35315,9 @@ Description(string)[checks], Identifier(string)[checks], ChecksCreateRequestVariant1(class)[checks], - ChecksCreateRequestVariant1Status(class)[checks], + ChecksCreateRequestVariant1Status(enum)[checks], ChecksCreateRequestVariant2(class)[checks], - ChecksCreateRequestVariant2Status(class)[checks], + ChecksCreateRequestVariant2Status(enum)[checks], ChecksUpdateRequest(class)[checks], Name(string)[checks], DetailsUrl(string)[checks], @@ -35352,9 +35352,9 @@ Description(string)[checks], Identifier(string)[checks], ChecksUpdateRequestVariant1(class)[checks], - ChecksUpdateRequestVariant1Status(class)[checks], + ChecksUpdateRequestVariant1Status(enum)[checks], ChecksUpdateRequestVariant2(class)[checks], - ChecksUpdateRequestVariant2Status(class)[checks], + ChecksUpdateRequestVariant2Status(enum)[checks], ChecksCreateSuiteRequest(class)[checks], HeadSha(string)[checks], ChecksSetSuitesPreferencesRequest(class)[checks], diff --git a/src/tests/OpenApiGenerator.UnitTests/Snapshots/GitHub/Schemas/_.verified.txt b/src/tests/OpenApiGenerator.UnitTests/Snapshots/GitHub/Schemas/_.verified.txt index 7bc0118c2a..ed4838a9be 100644 --- a/src/tests/OpenApiGenerator.UnitTests/Snapshots/GitHub/Schemas/_.verified.txt +++ b/src/tests/OpenApiGenerator.UnitTests/Snapshots/GitHub/Schemas/_.verified.txt @@ -35315,9 +35315,9 @@ Description(string), Identifier(string), ChecksCreateRequestVariant1(class), - ChecksCreateRequestVariant1Status(class), + ChecksCreateRequestVariant1Status(enum), ChecksCreateRequestVariant2(class), - ChecksCreateRequestVariant2Status(class), + ChecksCreateRequestVariant2Status(enum), ChecksUpdateRequest(class), Name(string), DetailsUrl(string), @@ -35352,9 +35352,9 @@ Description(string), Identifier(string), ChecksUpdateRequestVariant1(class), - ChecksUpdateRequestVariant1Status(class), + ChecksUpdateRequestVariant1Status(enum), ChecksUpdateRequestVariant2(class), - ChecksUpdateRequestVariant2Status(class), + ChecksUpdateRequestVariant2Status(enum), ChecksCreateSuiteRequest(class), HeadSha(string), ChecksSetSuitesPreferencesRequest(class), diff --git a/src/tests/OpenApiGenerator.UnitTests/Snapshots/HuggingFace/ResolvedSchemas/_.verified.txt b/src/tests/OpenApiGenerator.UnitTests/Snapshots/HuggingFace/ResolvedSchemas/_.verified.txt new file mode 100644 index 0000000000..58ef312b9a --- /dev/null +++ b/src/tests/OpenApiGenerator.UnitTests/Snapshots/HuggingFace/ResolvedSchemas/_.verified.txt @@ -0,0 +1,31 @@ +[ + ErrorResponse(class)[], + Error(anyOf)[], + ErrorVariant1(string)[], + ErrorVariant2(array)[], + ErrorVariant2Item(string)[], + GenerateTextRequest(class)[HuggingFace], + Inputs(string)[HuggingFace], + GenerateTextRequestParameters(ref)[HuggingFace], + GenerateTextRequestOptions(ref)[HuggingFace], + GenerateTextRequestParameters(class)[HuggingFace], + TopK(int)[HuggingFace], + TopP(double)[HuggingFace], + Temperature(double)[HuggingFace], + RepetitionPenalty(double)[HuggingFace], + MaxNewTokens(int)[HuggingFace], + MaxTime(double)[HuggingFace], + ReturnFullText(bool)[HuggingFace], + NumReturnSequences(int)[HuggingFace], + DoSample(bool)[HuggingFace], + GenerateTextRequestOptions(class)[HuggingFace], + UseCache(bool)[HuggingFace], + WaitForModel(bool)[HuggingFace], + GenerateTextResponse(array)[HuggingFace], + GenerateTextResponseValue(ref)[HuggingFace], + GenerateTextResponseValue(class)[HuggingFace], + GeneratedText(string)[HuggingFace], + GenerateTextRequest(ref)[HuggingFace], + GenerateTextModelId(string)[HuggingFace], + GenerateTextResponse(ref)[HuggingFace] +] \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.UnitTests/Snapshots/HuggingFace/Schemas/_.verified.txt b/src/tests/OpenApiGenerator.UnitTests/Snapshots/HuggingFace/Schemas/_.verified.txt new file mode 100644 index 0000000000..d656ba8701 --- /dev/null +++ b/src/tests/OpenApiGenerator.UnitTests/Snapshots/HuggingFace/Schemas/_.verified.txt @@ -0,0 +1,31 @@ +[ + ErrorResponse(class), + Error(anyOf), + ErrorVariant1(string), + ErrorVariant2(array), + ErrorVariant2Item(string), + GenerateTextRequest(class), + Inputs(string), + GenerateTextRequestParameters(ref), + GenerateTextRequestOptions(ref), + GenerateTextRequestParameters(class), + TopK(int), + TopP(double), + Temperature(double), + RepetitionPenalty(double), + MaxNewTokens(int), + MaxTime(double), + ReturnFullText(bool), + NumReturnSequences(int), + DoSample(bool), + GenerateTextRequestOptions(class), + UseCache(bool), + WaitForModel(bool), + GenerateTextResponse(array), + GenerateTextResponseValue(ref), + GenerateTextResponseValue(class), + GeneratedText(string), + GenerateTextRequest(ref), + GenerateTextModelId(string), + GenerateTextResponse(ref) +] \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.UnitTests/Snapshots/LangSmith/ResolvedSchemas/_.verified.txt b/src/tests/OpenApiGenerator.UnitTests/Snapshots/LangSmith/ResolvedSchemas/_.verified.txt index 73bc82b38b..b2d779fb3c 100644 --- a/src/tests/OpenApiGenerator.UnitTests/Snapshots/LangSmith/ResolvedSchemas/_.verified.txt +++ b/src/tests/OpenApiGenerator.UnitTests/Snapshots/LangSmith/ResolvedSchemas/_.verified.txt @@ -38,7 +38,7 @@ NumReviewersPerItem(anyOf)[annotation-queues], NumReviewersPerItemVariant1(int)[annotation-queues], NumReviewersPerItemVariant2(null)[annotation-queues], - EnableReservations(anyOf)[annotation-queues], + EnableReservations(bool)[annotation-queues], EnableReservationsVariant1(bool)[annotation-queues], EnableReservationsVariant2(null)[annotation-queues], ReservationMinutes(anyOf)[annotation-queues], @@ -73,7 +73,7 @@ NumReviewersPerItem2(anyOf)[annotation-queues], NumReviewersPerItemVariant1(int)[annotation-queues], NumReviewersPerItemVariant2(null)[annotation-queues], - EnableReservations2(anyOf)[annotation-queues], + EnableReservations2(bool)[annotation-queues], EnableReservationsVariant1(bool)[annotation-queues], EnableReservationsVariant2(null)[annotation-queues], ReservationMinutes2(anyOf)[annotation-queues], @@ -94,7 +94,7 @@ NumReviewersPerItem3(anyOf)[annotation-queues], NumReviewersPerItemVariant1(int)[annotation-queues], NumReviewersPerItemVariant2(null)[annotation-queues], - EnableReservations3(anyOf)[annotation-queues], + EnableReservations3(bool)[annotation-queues], EnableReservationsVariant1(bool)[annotation-queues], EnableReservationsVariant2(null)[annotation-queues], ReservationMinutes3(anyOf)[annotation-queues], @@ -397,7 +397,7 @@ CreateFeedbackConfigSchema(class)[feedback-configs], FeedbackKey(string)[feedback-configs], FeedbackConfig(ref)[feedback-configs], - IsLowerScoreBetter(anyOf)[feedback-configs], + IsLowerScoreBetter(bool)[feedback-configs], IsLowerScoreBetterVariant1(bool)[feedback-configs], IsLowerScoreBetterVariant2(null)[feedback-configs], FeedbackConfig(class)[feedback, feedback-configs, datasets], @@ -734,7 +734,7 @@ OutputsSchemaDefinition(anyOf)[datasets], DatasetOutputsSchemaDefinition(class)[datasets], OutputsSchemaDefinitionVariant2(null)[datasets], - ExternallyManaged(anyOf)[datasets], + ExternallyManaged(bool)[datasets], ExternallyManagedVariant1(bool)[datasets], ExternallyManagedVariant2(null)[datasets], Id(string)[datasets], @@ -760,7 +760,7 @@ OutputsSchemaDefinition2(anyOf)[datasets], DatasetCreateOutputsSchemaDefinition(class)[datasets], OutputsSchemaDefinitionVariant2(null)[datasets], - ExternallyManaged2(anyOf)[datasets], + ExternallyManaged2(bool)[datasets], ExternallyManagedVariant1(bool)[datasets], ExternallyManagedVariant2(null)[datasets], Id3(anyOf)[datasets], @@ -803,7 +803,7 @@ OutputsSchemaDefinition3(anyOf)[public], DatasetPublicSchemaOutputsSchemaDefinition(class)[public], OutputsSchemaDefinitionVariant2(null)[public], - ExternallyManaged3(anyOf)[public], + ExternallyManaged3(bool)[public], ExternallyManagedVariant1(bool)[public], ExternallyManagedVariant2(null)[public], Id(string)[public], @@ -823,7 +823,7 @@ OutputsSchemaDefinition4(anyOf)[datasets], DatasetSchemaForUpdateOutputsSchemaDefinition(class)[datasets], OutputsSchemaDefinitionVariant2(null)[datasets], - ExternallyManaged4(anyOf)[datasets], + ExternallyManaged4(bool)[datasets], ExternallyManagedVariant1(bool)[datasets], ExternallyManagedVariant2(null)[datasets], Id(string)[datasets], @@ -4219,7 +4219,7 @@ ListReposApiV1ReposGetUpstreamRepoHandle(anyOf)[repos], ListReposApiV1ReposGetUpstreamRepoHandleVariant1(string)[repos], ListReposApiV1ReposGetUpstreamRepoHandleVariant2(null)[repos], - ListReposApiV1ReposGetMatchPrefix(anyOf)[repos], + ListReposApiV1ReposGetMatchPrefix(bool)[repos], ListReposApiV1ReposGetMatchPrefixVariant1(bool)[repos], ListReposApiV1ReposGetMatchPrefixVariant2(null)[repos], ListReposApiV1ReposGetTagValueId(anyOf)[repos], @@ -4271,7 +4271,7 @@ ListRepoTagsApiV1ReposTagsGetUpstreamRepoHandle(anyOf)[repos], ListRepoTagsApiV1ReposTagsGetUpstreamRepoHandleVariant1(string)[repos], ListRepoTagsApiV1ReposTagsGetUpstreamRepoHandleVariant2(null)[repos], - ListRepoTagsApiV1ReposTagsGetMatchPrefix(anyOf)[repos], + ListRepoTagsApiV1ReposTagsGetMatchPrefix(bool)[repos], ListRepoTagsApiV1ReposTagsGetMatchPrefixVariant1(bool)[repos], ListRepoTagsApiV1ReposTagsGetMatchPrefixVariant2(null)[repos], ListRepoTagsApiV1ReposTagsGetTagValueId(anyOf)[repos], @@ -4291,7 +4291,7 @@ GetCommitApiV1CommitsOwnerRepoCommitGetCommit(string)[commits], GetCommitApiV1CommitsOwnerRepoCommitGetGetExamples(bool)[commits], GetCommitApiV1CommitsOwnerRepoCommitGetIsView(bool)[commits], - GetCommitApiV1CommitsOwnerRepoCommitGetIncludeModel(anyOf)[commits], + GetCommitApiV1CommitsOwnerRepoCommitGetIncludeModel(bool)[commits], GetCommitApiV1CommitsOwnerRepoCommitGetIncludeModelVariant1(bool)[commits], GetCommitApiV1CommitsOwnerRepoCommitGetIncludeModelVariant2(null)[commits], CreateCommentApiV1CommentsOwnerRepoPostOwner(string)[comments], diff --git a/src/tests/OpenApiGenerator.UnitTests/Snapshots/LangSmith/Schemas/_.verified.txt b/src/tests/OpenApiGenerator.UnitTests/Snapshots/LangSmith/Schemas/_.verified.txt index 63899f0c1b..404cf489a6 100644 --- a/src/tests/OpenApiGenerator.UnitTests/Snapshots/LangSmith/Schemas/_.verified.txt +++ b/src/tests/OpenApiGenerator.UnitTests/Snapshots/LangSmith/Schemas/_.verified.txt @@ -38,7 +38,7 @@ NumReviewersPerItem(anyOf), NumReviewersPerItemVariant1(int), NumReviewersPerItemVariant2(null), - EnableReservations(anyOf), + EnableReservations(bool), EnableReservationsVariant1(bool), EnableReservationsVariant2(null), ReservationMinutes(anyOf), @@ -73,7 +73,7 @@ NumReviewersPerItem2(anyOf), NumReviewersPerItemVariant1(int), NumReviewersPerItemVariant2(null), - EnableReservations2(anyOf), + EnableReservations2(bool), EnableReservationsVariant1(bool), EnableReservationsVariant2(null), ReservationMinutes2(anyOf), @@ -94,7 +94,7 @@ NumReviewersPerItem3(anyOf), NumReviewersPerItemVariant1(int), NumReviewersPerItemVariant2(null), - EnableReservations3(anyOf), + EnableReservations3(bool), EnableReservationsVariant1(bool), EnableReservationsVariant2(null), ReservationMinutes3(anyOf), @@ -377,7 +377,7 @@ CreateFeedbackConfigSchema(class), FeedbackKey(string), FeedbackConfig(ref), - IsLowerScoreBetter(anyOf), + IsLowerScoreBetter(bool), IsLowerScoreBetterVariant1(bool), IsLowerScoreBetterVariant2(null), CreateRepoCommitRequest(class), @@ -630,7 +630,7 @@ OutputsSchemaDefinition(anyOf), DatasetOutputsSchemaDefinition(class), OutputsSchemaDefinitionVariant2(null), - ExternallyManaged(anyOf), + ExternallyManaged(bool), ExternallyManagedVariant1(bool), ExternallyManagedVariant2(null), Id(string), @@ -656,7 +656,7 @@ OutputsSchemaDefinition2(anyOf), DatasetCreateOutputsSchemaDefinition(class), OutputsSchemaDefinitionVariant2(null), - ExternallyManaged2(anyOf), + ExternallyManaged2(bool), ExternallyManagedVariant1(bool), ExternallyManagedVariant2(null), Id3(anyOf), @@ -699,7 +699,7 @@ OutputsSchemaDefinition3(anyOf), DatasetPublicSchemaOutputsSchemaDefinition(class), OutputsSchemaDefinitionVariant2(null), - ExternallyManaged3(anyOf), + ExternallyManaged3(bool), ExternallyManagedVariant1(bool), ExternallyManagedVariant2(null), Id(string), @@ -719,7 +719,7 @@ OutputsSchemaDefinition4(anyOf), DatasetSchemaForUpdateOutputsSchemaDefinition(class), OutputsSchemaDefinitionVariant2(null), - ExternallyManaged4(anyOf), + ExternallyManaged4(bool), ExternallyManagedVariant1(bool), ExternallyManagedVariant2(null), Id(string), @@ -4219,7 +4219,7 @@ ListReposApiV1ReposGetUpstreamRepoHandle(anyOf), ListReposApiV1ReposGetUpstreamRepoHandleVariant1(string), ListReposApiV1ReposGetUpstreamRepoHandleVariant2(null), - ListReposApiV1ReposGetMatchPrefix(anyOf), + ListReposApiV1ReposGetMatchPrefix(bool), ListReposApiV1ReposGetMatchPrefixVariant1(bool), ListReposApiV1ReposGetMatchPrefixVariant2(null), ListReposApiV1ReposGetTagValueId(anyOf), @@ -4271,7 +4271,7 @@ ListRepoTagsApiV1ReposTagsGetUpstreamRepoHandle(anyOf), ListRepoTagsApiV1ReposTagsGetUpstreamRepoHandleVariant1(string), ListRepoTagsApiV1ReposTagsGetUpstreamRepoHandleVariant2(null), - ListRepoTagsApiV1ReposTagsGetMatchPrefix(anyOf), + ListRepoTagsApiV1ReposTagsGetMatchPrefix(bool), ListRepoTagsApiV1ReposTagsGetMatchPrefixVariant1(bool), ListRepoTagsApiV1ReposTagsGetMatchPrefixVariant2(null), ListRepoTagsApiV1ReposTagsGetTagValueId(anyOf), @@ -4291,7 +4291,7 @@ GetCommitApiV1CommitsOwnerRepoCommitGetCommit(string), GetCommitApiV1CommitsOwnerRepoCommitGetGetExamples(bool), GetCommitApiV1CommitsOwnerRepoCommitGetIsView(bool), - GetCommitApiV1CommitsOwnerRepoCommitGetIncludeModel(anyOf), + GetCommitApiV1CommitsOwnerRepoCommitGetIncludeModel(bool), GetCommitApiV1CommitsOwnerRepoCommitGetIncludeModelVariant1(bool), GetCommitApiV1CommitsOwnerRepoCommitGetIncludeModelVariant2(null), CreateCommentApiV1CommentsOwnerRepoPostOwner(string),