From 5a7c8a95207d4077c224405fbc01eebcc4aa706e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 19 Sep 2024 18:25:02 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- .../Generated/Cohere.CohereApi.Chatv2.g.cs | 12 +- .../Generated/Cohere.CohereApi.Embedv2.g.cs | 57 +- .../Generated/Cohere.CohereApi.Rerankv2.g.cs | 166 ++++ .../Generated/Cohere.ICohereApi.Chatv2.g.cs | 10 +- .../Generated/Cohere.ICohereApi.Embedv2.g.cs | 44 +- .../Generated/Cohere.ICohereApi.Rerankv2.g.cs | 65 ++ .../Cohere.Models.AssistantMessage.g.cs | 2 +- ...ohere.Models.AssistantMessageResponse.g.cs | 2 +- ....g.cs => Cohere.Models.ChatMessageV2.g.cs} | 110 +-- ...2.g.cs => Cohere.Models.ChatResponse.g.cs} | 2 +- ...g.cs => Cohere.Models.ChatResponse14.g.cs} | 2 +- .../Cohere.Models.Chatv2Request.g.cs | 8 +- ...g.cs => Cohere.Models.Embedv2Request.g.cs} | 12 +- ...Cohere.Models.Embedv2RequestTruncate.g.cs} | 20 +- .../Cohere.Models.Hyperparameters.g.cs | 26 + .../Generated/Cohere.Models.Images.g.cs | 57 -- ...> Cohere.Models.JsonResponseFormatV2.g.cs} | 8 +- ...odels.JsonResponseFormatV2JsonSchema.g.cs} | 2 +- .../Cohere.Models.LoraTargetModules.g.cs | 68 ++ .../Cohere.Models.Rerankv2Request.g.cs | 70 ++ .../Cohere.Models.Rerankv2Response.g.cs | 36 + .../Cohere.Models.Rerankv2Response10.g.cs | 23 + .../Cohere.Models.Rerankv2Response11.g.cs | 23 + .../Cohere.Models.Rerankv2Response12.g.cs | 23 + .../Cohere.Models.Rerankv2Response13.g.cs | 23 + .../Cohere.Models.Rerankv2Response2.g.cs | 23 + .../Cohere.Models.Rerankv2Response3.g.cs | 23 + .../Cohere.Models.Rerankv2Response4.g.cs | 23 + .../Cohere.Models.Rerankv2Response5.g.cs | 23 + .../Cohere.Models.Rerankv2Response6.g.cs | 23 + .../Cohere.Models.Rerankv2Response7.g.cs | 23 + .../Cohere.Models.Rerankv2Response8.g.cs | 23 + .../Cohere.Models.Rerankv2Response9.g.cs | 23 + .../Cohere.Models.Rerankv2ResponseResult.g.cs | 37 + ...Models.Rerankv2ResponseResultDocument.g.cs | 24 + ...> Cohere.Models.ResponseFormatTypeV2.g.cs} | 16 +- ...cs => Cohere.Models.ResponseFormatV2.g.cs} | 60 +- ...Cohere.Models.StreamedChatResponseV2.g.cs} | 68 +- ...> Cohere.Models.TextResponseFormatV2.g.cs} | 6 +- ...ll2.g.cs => Cohere.Models.ToolCallV2.g.cs} | 8 +- ... => Cohere.Models.ToolCallV2Function.g.cs} | 2 +- ...g.cs => Cohere.Models.ToolCallV2Type.g.cs} | 12 +- ....g.cs => Cohere.Models.ToolMessageV2.g.cs} | 6 +- ...s => Cohere.Models.ToolMessageV2Role.g.cs} | 12 +- ...s.Tool2.g.cs => Cohere.Models.ToolV2.g.cs} | 8 +- ...g.cs => Cohere.Models.ToolV2Function.g.cs} | 4 +- ...here.Models.ToolV2FunctionParameters.g.cs} | 2 +- ...ype.g.cs => Cohere.Models.ToolV2Type.g.cs} | 12 +- .../Cohere.Models.V2EmbedRequest.g.cs | 166 ---- ...g.cs => JsonConverters.ChatMessageV2.g.cs} | 58 +- ...JsonConverters.Embedv2RequestTruncate.g.cs | 49 ++ ...erters.Embedv2RequestTruncateNullable.g.cs | 56 ++ ... => JsonConverters.LoraTargetModules.g.cs} | 12 +- ...Converters.LoraTargetModulesNullable.g.cs} | 12 +- ... JsonConverters.ResponseFormatTypeV2.g.cs} | 12 +- ...verters.ResponseFormatTypeV2Nullable.g.cs} | 12 +- ...s => JsonConverters.ResponseFormatV2.g.cs} | 46 +- ...sonConverters.StreamedChatResponseV2.g.cs} | 8 +- ....cs => JsonConverters.ToolCallV2Type.g.cs} | 12 +- ...sonConverters.ToolCallV2TypeNullable.g.cs} | 12 +- ... => JsonConverters.ToolMessageV2Role.g.cs} | 12 +- ...Converters.ToolMessageV2RoleNullable.g.cs} | 12 +- ...pe.g.cs => JsonConverters.ToolV2Type.g.cs} | 12 +- ...=> JsonConverters.ToolV2TypeNullable.g.cs} | 12 +- .../JsonConverters.V2EmbedRequest.g.cs | 87 -- .../Generated/JsonSerializerContext.g.cs | 29 +- .../Generated/JsonSerializerContextTypes.g.cs | 812 ++++++++++-------- src/libs/Cohere/openapi.yaml | 399 +++++---- 68 files changed, 1983 insertions(+), 1179 deletions(-) create mode 100644 src/libs/Cohere/Generated/Cohere.CohereApi.Rerankv2.g.cs create mode 100644 src/libs/Cohere/Generated/Cohere.ICohereApi.Rerankv2.g.cs rename src/libs/Cohere/Generated/{Cohere.Models.ChatMessage2.g.cs => Cohere.Models.ChatMessageV2.g.cs} (55%) rename src/libs/Cohere/Generated/{Cohere.Models.NonStreamedChatResponse2.g.cs => Cohere.Models.ChatResponse.g.cs} (96%) rename src/libs/Cohere/Generated/{Cohere.Models.ChatResponse2.g.cs => Cohere.Models.ChatResponse14.g.cs} (93%) rename src/libs/Cohere/Generated/{Cohere.Models.Texts.g.cs => Cohere.Models.Embedv2Request.g.cs} (89%) rename src/libs/Cohere/Generated/{Cohere.Models.TextsTruncate.g.cs => Cohere.Models.Embedv2RequestTruncate.g.cs} (70%) delete mode 100644 src/libs/Cohere/Generated/Cohere.Models.Images.g.cs rename src/libs/Cohere/Generated/{Cohere.Models.JSONResponseFormat2.g.cs => Cohere.Models.JsonResponseFormatV2.g.cs} (85%) rename src/libs/Cohere/Generated/{Cohere.Models.JSONResponseFormat2JsonSchema.g.cs => Cohere.Models.JsonResponseFormatV2JsonSchema.g.cs} (94%) create mode 100644 src/libs/Cohere/Generated/Cohere.Models.LoraTargetModules.g.cs create mode 100644 src/libs/Cohere/Generated/Cohere.Models.Rerankv2Request.g.cs create mode 100644 src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response.g.cs create mode 100644 src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response10.g.cs create mode 100644 src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response11.g.cs create mode 100644 src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response12.g.cs create mode 100644 src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response13.g.cs create mode 100644 src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response2.g.cs create mode 100644 src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response3.g.cs create mode 100644 src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response4.g.cs create mode 100644 src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response5.g.cs create mode 100644 src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response6.g.cs create mode 100644 src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response7.g.cs create mode 100644 src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response8.g.cs create mode 100644 src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response9.g.cs create mode 100644 src/libs/Cohere/Generated/Cohere.Models.Rerankv2ResponseResult.g.cs create mode 100644 src/libs/Cohere/Generated/Cohere.Models.Rerankv2ResponseResultDocument.g.cs rename src/libs/Cohere/Generated/{Cohere.Models.ResponseFormatType2.g.cs => Cohere.Models.ResponseFormatTypeV2.g.cs} (71%) rename src/libs/Cohere/Generated/{Cohere.Models.ResponseFormat2.g.cs => Cohere.Models.ResponseFormatV2.g.cs} (65%) rename src/libs/Cohere/Generated/{Cohere.Models.StreamedChatResponse2.g.cs => Cohere.Models.StreamedChatResponseV2.g.cs} (82%) rename src/libs/Cohere/Generated/{Cohere.Models.TextResponseFormat2.g.cs => Cohere.Models.TextResponseFormatV2.g.cs} (80%) rename src/libs/Cohere/Generated/{Cohere.Models.ToolCall2.g.cs => Cohere.Models.ToolCallV2.g.cs} (80%) rename src/libs/Cohere/Generated/{Cohere.Models.ToolCall2Function.g.cs => Cohere.Models.ToolCallV2Function.g.cs} (94%) rename src/libs/Cohere/Generated/{Cohere.Models.ToolCall2Type.g.cs => Cohere.Models.ToolCallV2Type.g.cs} (70%) rename src/libs/Cohere/Generated/{Cohere.Models.ToolMessage2.g.cs => Cohere.Models.ToolMessageV2.g.cs} (90%) rename src/libs/Cohere/Generated/{Cohere.Models.ToolMessage2Role.g.cs => Cohere.Models.ToolMessageV2Role.g.cs} (70%) rename src/libs/Cohere/Generated/{Cohere.Models.Tool2.g.cs => Cohere.Models.ToolV2.g.cs} (78%) rename src/libs/Cohere/Generated/{Cohere.Models.Tool2Function.g.cs => Cohere.Models.ToolV2Function.g.cs} (89%) rename src/libs/Cohere/Generated/{Cohere.Models.Tool2FunctionParameters.g.cs => Cohere.Models.ToolV2FunctionParameters.g.cs} (90%) rename src/libs/Cohere/Generated/{Cohere.Models.Tool2Type.g.cs => Cohere.Models.ToolV2Type.g.cs} (72%) delete mode 100644 src/libs/Cohere/Generated/Cohere.Models.V2EmbedRequest.g.cs rename src/libs/Cohere/Generated/{JsonConverters.ChatMessage2.g.cs => JsonConverters.ChatMessageV2.g.cs} (78%) create mode 100644 src/libs/Cohere/Generated/JsonConverters.Embedv2RequestTruncate.g.cs create mode 100644 src/libs/Cohere/Generated/JsonConverters.Embedv2RequestTruncateNullable.g.cs rename src/libs/Cohere/Generated/{JsonConverters.ToolMessage2Role.g.cs => JsonConverters.LoraTargetModules.g.cs} (70%) rename src/libs/Cohere/Generated/{JsonConverters.TextsTruncateNullable.g.cs => JsonConverters.LoraTargetModulesNullable.g.cs} (72%) rename src/libs/Cohere/Generated/{JsonConverters.ResponseFormatType2.g.cs => JsonConverters.ResponseFormatTypeV2.g.cs} (76%) rename src/libs/Cohere/Generated/{JsonConverters.ResponseFormatType2Nullable.g.cs => JsonConverters.ResponseFormatTypeV2Nullable.g.cs} (77%) rename src/libs/Cohere/Generated/{JsonConverters.ResponseFormat2.g.cs => JsonConverters.ResponseFormatV2.g.cs} (65%) rename src/libs/Cohere/Generated/{JsonConverters.StreamedChatResponse2.g.cs => JsonConverters.StreamedChatResponseV2.g.cs} (98%) rename src/libs/Cohere/Generated/{JsonConverters.TextsTruncate.g.cs => JsonConverters.ToolCallV2Type.g.cs} (71%) rename src/libs/Cohere/Generated/{JsonConverters.ToolCall2TypeNullable.g.cs => JsonConverters.ToolCallV2TypeNullable.g.cs} (73%) rename src/libs/Cohere/Generated/{JsonConverters.ToolCall2Type.g.cs => JsonConverters.ToolMessageV2Role.g.cs} (70%) rename src/libs/Cohere/Generated/{JsonConverters.ToolMessage2RoleNullable.g.cs => JsonConverters.ToolMessageV2RoleNullable.g.cs} (75%) rename src/libs/Cohere/Generated/{JsonConverters.Tool2Type.g.cs => JsonConverters.ToolV2Type.g.cs} (72%) rename src/libs/Cohere/Generated/{JsonConverters.Tool2TypeNullable.g.cs => JsonConverters.ToolV2TypeNullable.g.cs} (74%) delete mode 100644 src/libs/Cohere/Generated/JsonConverters.V2EmbedRequest.g.cs diff --git a/src/libs/Cohere/Generated/Cohere.CohereApi.Chatv2.g.cs b/src/libs/Cohere/Generated/Cohere.CohereApi.Chatv2.g.cs index 098cdc7..0c78dd9 100644 --- a/src/libs/Cohere/Generated/Cohere.CohereApi.Chatv2.g.cs +++ b/src/libs/Cohere/Generated/Cohere.CohereApi.Chatv2.g.cs @@ -28,7 +28,7 @@ partial void ProcessChatv2ResponseContent( /// /// The token to cancel the operation with /// - public async global::System.Threading.Tasks.Task> Chatv2Async( + public async global::System.Threading.Tasks.Task> Chatv2Async( global::Cohere.Chatv2Request request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -91,7 +91,7 @@ partial void ProcessChatv2ResponseContent( } return - global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::Cohere.OneOf?), JsonSerializerContext) as global::Cohere.OneOf? ?? + global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::Cohere.OneOf?), JsonSerializerContext) as global::Cohere.OneOf? ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } @@ -167,13 +167,13 @@ partial void ProcessChatv2ResponseContent( /// /// The token to cancel the operation with /// - public async global::System.Threading.Tasks.Task> Chatv2Async( + public async global::System.Threading.Tasks.Task> Chatv2Async( string model, - global::System.Collections.Generic.IList messages, - global::System.Collections.Generic.IList? tools = default, + global::System.Collections.Generic.IList messages, + global::System.Collections.Generic.IList? tools = default, global::System.Collections.Generic.IList>? documents = default, global::Cohere.CitationOptions? citationOptions = default, - global::Cohere.ResponseFormat2? responseFormat = default, + global::Cohere.ResponseFormatV2? responseFormat = default, global::Cohere.Chatv2RequestSafetyMode? safetyMode = default, int? maxTokens = default, global::System.Collections.Generic.IList? stopSequences = default, diff --git a/src/libs/Cohere/Generated/Cohere.CohereApi.Embedv2.g.cs b/src/libs/Cohere/Generated/Cohere.CohereApi.Embedv2.g.cs index bb452f4..5d80be9 100644 --- a/src/libs/Cohere/Generated/Cohere.CohereApi.Embedv2.g.cs +++ b/src/libs/Cohere/Generated/Cohere.CohereApi.Embedv2.g.cs @@ -8,12 +8,12 @@ public partial class CohereApi partial void PrepareEmbedv2Arguments( global::System.Net.Http.HttpClient httpClient, ref string? xClientName, - global::Cohere.V2EmbedRequest request); + global::Cohere.Embedv2Request request); partial void PrepareEmbedv2Request( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpRequestMessage httpRequestMessage, string? xClientName, - global::Cohere.V2EmbedRequest request); + global::Cohere.Embedv2Request request); partial void ProcessEmbedv2Response( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpResponseMessage httpResponseMessage); @@ -34,10 +34,12 @@ partial void ProcessEmbedv2ResponseContent( /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task Embedv2Async( - global::Cohere.V2EmbedRequest request, + global::Cohere.Embedv2Request request, string? xClientName = default, global::System.Threading.CancellationToken cancellationToken = default) { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + PrepareArguments( client: _httpClient); PrepareEmbedv2Arguments( @@ -108,14 +110,61 @@ partial void ProcessEmbedv2ResponseContent( /// 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.
+ /// - `"image"`: Used for embeddings with image input. + /// + /// + /// 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 Embedv2Async( + string model, string? xClientName = default, + global::System.Collections.Generic.IList? texts = default, + global::Cohere.EmbedInputType? inputType = default, + global::System.Collections.Generic.IList? embeddingTypes = default, + global::Cohere.Embedv2RequestTruncate? truncate = global::Cohere.Embedv2RequestTruncate.END, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::Cohere.V2EmbedRequest + var request = new global::Cohere.Embedv2Request { + Texts = texts, + Model = model, + InputType = inputType, + EmbeddingTypes = embeddingTypes, + Truncate = truncate, }; return await Embedv2Async( diff --git a/src/libs/Cohere/Generated/Cohere.CohereApi.Rerankv2.g.cs b/src/libs/Cohere/Generated/Cohere.CohereApi.Rerankv2.g.cs new file mode 100644 index 0000000..747624e --- /dev/null +++ b/src/libs/Cohere/Generated/Cohere.CohereApi.Rerankv2.g.cs @@ -0,0 +1,166 @@ + +#nullable enable + +namespace Cohere +{ + public partial class CohereApi + { + partial void PrepareRerankv2Arguments( + global::System.Net.Http.HttpClient httpClient, + ref string? xClientName, + global::Cohere.Rerankv2Request request); + partial void PrepareRerankv2Request( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? xClientName, + global::Cohere.Rerankv2Request request); + partial void ProcessRerankv2Response( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessRerankv2ResponseContent( + 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 Rerankv2Async( + global::Cohere.Rerankv2Request request, + string? xClientName = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: _httpClient); + PrepareRerankv2Arguments( + 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('/') + "/v2/rerank", global::System.UriKind.RelativeOrAbsolute)); + var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); + 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); + PrepareRerankv2Request( + 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); + ProcessRerankv2Response( + httpClient: _httpClient, + httpResponseMessage: response); + + var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: _httpClient, + response: response, + content: ref __content); + ProcessRerankv2ResponseContent( + 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, typeof(global::Cohere.Rerankv2Response), JsonSerializerContext) as global::Cohere.Rerankv2Response ?? + 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 Rerankv2Async( + string model, + string query, + global::System.Collections.Generic.IList> documents, + string? xClientName = 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::Cohere.Rerankv2Request + { + Model = model, + Query = query, + Documents = documents, + TopN = topN, + RankFields = rankFields, + ReturnDocuments = returnDocuments, + MaxChunksPerDoc = maxChunksPerDoc, + }; + + return await Rerankv2Async( + xClientName: xClientName, + request: request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Cohere/Generated/Cohere.ICohereApi.Chatv2.g.cs b/src/libs/Cohere/Generated/Cohere.ICohereApi.Chatv2.g.cs index dc3af2a..1c599f1 100644 --- a/src/libs/Cohere/Generated/Cohere.ICohereApi.Chatv2.g.cs +++ b/src/libs/Cohere/Generated/Cohere.ICohereApi.Chatv2.g.cs @@ -11,7 +11,7 @@ public partial interface ICohereApi /// /// The token to cancel the operation with /// - global::System.Threading.Tasks.Task> Chatv2Async( + global::System.Threading.Tasks.Task> Chatv2Async( global::Cohere.Chatv2Request request, global::System.Threading.CancellationToken cancellationToken = default); @@ -87,13 +87,13 @@ public partial interface ICohereApi /// /// The token to cancel the operation with /// - global::System.Threading.Tasks.Task> Chatv2Async( + global::System.Threading.Tasks.Task> Chatv2Async( string model, - global::System.Collections.Generic.IList messages, - global::System.Collections.Generic.IList? tools = default, + global::System.Collections.Generic.IList messages, + global::System.Collections.Generic.IList? tools = default, global::System.Collections.Generic.IList>? documents = default, global::Cohere.CitationOptions? citationOptions = default, - global::Cohere.ResponseFormat2? responseFormat = default, + global::Cohere.ResponseFormatV2? responseFormat = default, global::Cohere.Chatv2RequestSafetyMode? safetyMode = default, int? maxTokens = default, global::System.Collections.Generic.IList? stopSequences = default, diff --git a/src/libs/Cohere/Generated/Cohere.ICohereApi.Embedv2.g.cs b/src/libs/Cohere/Generated/Cohere.ICohereApi.Embedv2.g.cs index 9373362..994b7b6 100644 --- a/src/libs/Cohere/Generated/Cohere.ICohereApi.Embedv2.g.cs +++ b/src/libs/Cohere/Generated/Cohere.ICohereApi.Embedv2.g.cs @@ -15,7 +15,7 @@ public partial interface ICohereApi /// The token to cancel the operation with /// global::System.Threading.Tasks.Task Embedv2Async( - global::Cohere.V2EmbedRequest request, + global::Cohere.Embedv2Request request, string? xClientName = default, global::System.Threading.CancellationToken cancellationToken = default); @@ -26,10 +26,52 @@ public partial interface ICohereApi /// 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.
+ /// - `"image"`: Used for embeddings with image input. + /// + /// + /// 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 /// global::System.Threading.Tasks.Task Embedv2Async( + string model, string? xClientName = default, + global::System.Collections.Generic.IList? texts = default, + global::Cohere.EmbedInputType? inputType = default, + global::System.Collections.Generic.IList? embeddingTypes = default, + global::Cohere.Embedv2RequestTruncate? truncate = global::Cohere.Embedv2RequestTruncate.END, global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Cohere/Generated/Cohere.ICohereApi.Rerankv2.g.cs b/src/libs/Cohere/Generated/Cohere.ICohereApi.Rerankv2.g.cs new file mode 100644 index 0000000..1dad2be --- /dev/null +++ b/src/libs/Cohere/Generated/Cohere.ICohereApi.Rerankv2.g.cs @@ -0,0 +1,65 @@ +#nullable enable + +namespace Cohere +{ + public partial interface ICohereApi + { + /// + /// 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 + /// + global::System.Threading.Tasks.Task Rerankv2Async( + global::Cohere.Rerankv2Request request, + string? xClientName = default, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// 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 + /// + global::System.Threading.Tasks.Task Rerankv2Async( + string model, + string query, + global::System.Collections.Generic.IList> documents, + string? xClientName = default, + int? topN = default, + global::System.Collections.Generic.IList? rankFields = default, + bool? returnDocuments = false, + int? maxChunksPerDoc = 10, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Cohere/Generated/Cohere.Models.AssistantMessage.g.cs b/src/libs/Cohere/Generated/Cohere.Models.AssistantMessage.g.cs index d4cecf9..d176c59 100644 --- a/src/libs/Cohere/Generated/Cohere.Models.AssistantMessage.g.cs +++ b/src/libs/Cohere/Generated/Cohere.Models.AssistantMessage.g.cs @@ -21,7 +21,7 @@ public sealed partial class AssistantMessage /// /// [global::System.Text.Json.Serialization.JsonPropertyName("tool_calls")] - public global::System.Collections.Generic.IList? ToolCalls { get; set; } + public global::System.Collections.Generic.IList? ToolCalls { get; set; } /// /// diff --git a/src/libs/Cohere/Generated/Cohere.Models.AssistantMessageResponse.g.cs b/src/libs/Cohere/Generated/Cohere.Models.AssistantMessageResponse.g.cs index 326de1d..3e7b723 100644 --- a/src/libs/Cohere/Generated/Cohere.Models.AssistantMessageResponse.g.cs +++ b/src/libs/Cohere/Generated/Cohere.Models.AssistantMessageResponse.g.cs @@ -21,7 +21,7 @@ public sealed partial class AssistantMessageResponse /// /// [global::System.Text.Json.Serialization.JsonPropertyName("tool_calls")] - public global::System.Collections.Generic.IList? ToolCalls { get; set; } + public global::System.Collections.Generic.IList? ToolCalls { get; set; } /// /// diff --git a/src/libs/Cohere/Generated/Cohere.Models.ChatMessage2.g.cs b/src/libs/Cohere/Generated/Cohere.Models.ChatMessageV2.g.cs similarity index 55% rename from src/libs/Cohere/Generated/Cohere.Models.ChatMessage2.g.cs rename to src/libs/Cohere/Generated/Cohere.Models.ChatMessageV2.g.cs index be42e63..073169c 100644 --- a/src/libs/Cohere/Generated/Cohere.Models.ChatMessage2.g.cs +++ b/src/libs/Cohere/Generated/Cohere.Models.ChatMessageV2.g.cs @@ -8,120 +8,120 @@ namespace Cohere /// /// Represents a single message in the chat history from a given role. /// - public readonly partial struct ChatMessage2 : global::System.IEquatable + public readonly partial struct ChatMessageV2 : global::System.IEquatable { /// /// A message from the user. /// #if NET6_0_OR_GREATER - public global::Cohere.UserMessage? UserMessage { get; init; } + public global::Cohere.UserMessage? User { get; init; } #else - public global::Cohere.UserMessage? UserMessage { get; } + public global::Cohere.UserMessage? User { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(UserMessage))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(User))] #endif - public bool IsUserMessage => UserMessage != null; + public bool IsUser => User != null; /// /// /// - public static implicit operator ChatMessage2(global::Cohere.UserMessage value) => new ChatMessage2(value); + public static implicit operator ChatMessageV2(global::Cohere.UserMessage value) => new ChatMessageV2(value); /// /// /// - public static implicit operator global::Cohere.UserMessage?(ChatMessage2 @this) => @this.UserMessage; + public static implicit operator global::Cohere.UserMessage?(ChatMessageV2 @this) => @this.User; /// /// /// - public ChatMessage2(global::Cohere.UserMessage? value) + public ChatMessageV2(global::Cohere.UserMessage? value) { - UserMessage = value; + User = value; } /// /// A message from the assistant role can contain text and tool call information. /// #if NET6_0_OR_GREATER - public global::Cohere.AssistantMessage? AssistantMessage { get; init; } + public global::Cohere.AssistantMessage? Assistant { get; init; } #else - public global::Cohere.AssistantMessage? AssistantMessage { get; } + public global::Cohere.AssistantMessage? Assistant { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantMessage))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Assistant))] #endif - public bool IsAssistantMessage => AssistantMessage != null; + public bool IsAssistant => Assistant != null; /// /// /// - public static implicit operator ChatMessage2(global::Cohere.AssistantMessage value) => new ChatMessage2(value); + public static implicit operator ChatMessageV2(global::Cohere.AssistantMessage value) => new ChatMessageV2(value); /// /// /// - public static implicit operator global::Cohere.AssistantMessage?(ChatMessage2 @this) => @this.AssistantMessage; + public static implicit operator global::Cohere.AssistantMessage?(ChatMessageV2 @this) => @this.Assistant; /// /// /// - public ChatMessage2(global::Cohere.AssistantMessage? value) + public ChatMessageV2(global::Cohere.AssistantMessage? value) { - AssistantMessage = value; + Assistant = value; } /// /// A message from the system. /// #if NET6_0_OR_GREATER - public global::Cohere.SystemMessage? SystemMessage { get; init; } + public global::Cohere.SystemMessage? System { get; init; } #else - public global::Cohere.SystemMessage? SystemMessage { get; } + public global::Cohere.SystemMessage? System { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SystemMessage))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(System))] #endif - public bool IsSystemMessage => SystemMessage != null; + public bool IsSystem => System != null; /// /// /// - public static implicit operator ChatMessage2(global::Cohere.SystemMessage value) => new ChatMessage2(value); + public static implicit operator ChatMessageV2(global::Cohere.SystemMessage value) => new ChatMessageV2(value); /// /// /// - public static implicit operator global::Cohere.SystemMessage?(ChatMessage2 @this) => @this.SystemMessage; + public static implicit operator global::Cohere.SystemMessage?(ChatMessageV2 @this) => @this.System; /// /// /// - public ChatMessage2(global::Cohere.SystemMessage? value) + public ChatMessageV2(global::Cohere.SystemMessage? value) { - SystemMessage = value; + System = value; } /// /// A message from the system. /// #if NET6_0_OR_GREATER - public global::Cohere.ToolMessage2? Tool { get; init; } + public global::Cohere.ToolMessageV2? Tool { get; init; } #else - public global::Cohere.ToolMessage2? Tool { get; } + public global::Cohere.ToolMessageV2? Tool { get; } #endif /// @@ -135,17 +135,17 @@ public ChatMessage2(global::Cohere.SystemMessage? value) /// /// /// - public static implicit operator ChatMessage2(global::Cohere.ToolMessage2 value) => new ChatMessage2(value); + public static implicit operator ChatMessageV2(global::Cohere.ToolMessageV2 value) => new ChatMessageV2(value); /// /// /// - public static implicit operator global::Cohere.ToolMessage2?(ChatMessage2 @this) => @this.Tool; + public static implicit operator global::Cohere.ToolMessageV2?(ChatMessageV2 @this) => @this.Tool; /// /// /// - public ChatMessage2(global::Cohere.ToolMessage2? value) + public ChatMessageV2(global::Cohere.ToolMessageV2? value) { Tool = value; } @@ -153,16 +153,16 @@ public ChatMessage2(global::Cohere.ToolMessage2? value) /// /// /// - public ChatMessage2( - global::Cohere.UserMessage? userMessage, - global::Cohere.AssistantMessage? assistantMessage, - global::Cohere.SystemMessage? systemMessage, - global::Cohere.ToolMessage2? tool + public ChatMessageV2( + global::Cohere.UserMessage? user, + global::Cohere.AssistantMessage? assistant, + global::Cohere.SystemMessage? system, + global::Cohere.ToolMessageV2? tool ) { - UserMessage = userMessage; - AssistantMessage = assistantMessage; - SystemMessage = systemMessage; + User = user; + Assistant = assistant; + System = system; Tool = tool; } @@ -171,9 +171,9 @@ public ChatMessage2( /// public object? Object => Tool as object ?? - SystemMessage as object ?? - AssistantMessage as object ?? - UserMessage as object + System as object ?? + Assistant as object ?? + User as object ; /// @@ -181,7 +181,7 @@ UserMessage as object /// public bool Validate() { - return IsUserMessage && !IsAssistantMessage && !IsSystemMessage && !IsTool || !IsUserMessage && IsAssistantMessage && !IsSystemMessage && !IsTool || !IsUserMessage && !IsAssistantMessage && IsSystemMessage && !IsTool || !IsUserMessage && !IsAssistantMessage && !IsSystemMessage && IsTool; + return IsUser && !IsAssistant && !IsSystem && !IsTool || !IsUser && IsAssistant && !IsSystem && !IsTool || !IsUser && !IsAssistant && IsSystem && !IsTool || !IsUser && !IsAssistant && !IsSystem && IsTool; } /// @@ -191,14 +191,14 @@ public override int GetHashCode() { var fields = new object?[] { - UserMessage, + User, typeof(global::Cohere.UserMessage), - AssistantMessage, + Assistant, typeof(global::Cohere.AssistantMessage), - SystemMessage, + System, typeof(global::Cohere.SystemMessage), Tool, - typeof(global::Cohere.ToolMessage2), + typeof(global::Cohere.ToolMessageV2), }; const int offset = unchecked((int)2166136261); const int prime = 16777619; @@ -211,28 +211,28 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null /// /// /// - public bool Equals(ChatMessage2 other) + public bool Equals(ChatMessageV2 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) + global::System.Collections.Generic.EqualityComparer.Default.Equals(User, other.User) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Assistant, other.Assistant) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(System, other.System) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Tool, other.Tool) ; } /// /// /// - public static bool operator ==(ChatMessage2 obj1, ChatMessage2 obj2) + public static bool operator ==(ChatMessageV2 obj1, ChatMessageV2 obj2) { - return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); } /// /// /// - public static bool operator !=(ChatMessage2 obj1, ChatMessage2 obj2) + public static bool operator !=(ChatMessageV2 obj1, ChatMessageV2 obj2) { return !(obj1 == obj2); } @@ -242,7 +242,7 @@ public bool Equals(ChatMessage2 other) /// public override bool Equals(object? obj) { - return obj is ChatMessage2 o && Equals(o); + return obj is ChatMessageV2 o && Equals(o); } } } diff --git a/src/libs/Cohere/Generated/Cohere.Models.NonStreamedChatResponse2.g.cs b/src/libs/Cohere/Generated/Cohere.Models.ChatResponse.g.cs similarity index 96% rename from src/libs/Cohere/Generated/Cohere.Models.NonStreamedChatResponse2.g.cs rename to src/libs/Cohere/Generated/Cohere.Models.ChatResponse.g.cs index 21b3a4e..624831e 100644 --- a/src/libs/Cohere/Generated/Cohere.Models.NonStreamedChatResponse2.g.cs +++ b/src/libs/Cohere/Generated/Cohere.Models.ChatResponse.g.cs @@ -6,7 +6,7 @@ namespace Cohere /// /// /// - public sealed partial class NonStreamedChatResponse2 + public sealed partial class ChatResponse { /// /// Unique identifier for the generated reply. Useful for submitting feedback. diff --git a/src/libs/Cohere/Generated/Cohere.Models.ChatResponse2.g.cs b/src/libs/Cohere/Generated/Cohere.Models.ChatResponse14.g.cs similarity index 93% rename from src/libs/Cohere/Generated/Cohere.Models.ChatResponse2.g.cs rename to src/libs/Cohere/Generated/Cohere.Models.ChatResponse14.g.cs index 77c74ee..8198a2e 100644 --- a/src/libs/Cohere/Generated/Cohere.Models.ChatResponse2.g.cs +++ b/src/libs/Cohere/Generated/Cohere.Models.ChatResponse14.g.cs @@ -6,7 +6,7 @@ namespace Cohere /// /// /// - public sealed partial class ChatResponse2 + public sealed partial class ChatResponse14 { /// /// diff --git a/src/libs/Cohere/Generated/Cohere.Models.Chatv2Request.g.cs b/src/libs/Cohere/Generated/Cohere.Models.Chatv2Request.g.cs index 0390355..62a9ad9 100644 --- a/src/libs/Cohere/Generated/Cohere.Models.Chatv2Request.g.cs +++ b/src/libs/Cohere/Generated/Cohere.Models.Chatv2Request.g.cs @@ -23,14 +23,14 @@ public sealed partial class Chatv2Request /// [global::System.Text.Json.Serialization.JsonPropertyName("messages")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Messages { get; set; } + 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; } + public global::System.Collections.Generic.IList? Tools { get; set; } /// /// A list of relevant documents that the model can cite to generate a more accurate reply. Each document is either a string or document object with content and metadata. @@ -52,8 +52,8 @@ public sealed partial class Chatv2Request /// **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::Cohere.JsonConverters.ResponseFormat2JsonConverter))] - public global::Cohere.ResponseFormat2? ResponseFormat { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Cohere.JsonConverters.ResponseFormatV2JsonConverter))] + public global::Cohere.ResponseFormatV2? ResponseFormat { get; set; } /// /// Used to select the [safety instruction](/docs/safety-modes) inserted into the prompt. Defaults to `CONTEXTUAL`.
diff --git a/src/libs/Cohere/Generated/Cohere.Models.Texts.g.cs b/src/libs/Cohere/Generated/Cohere.Models.Embedv2Request.g.cs similarity index 89% rename from src/libs/Cohere/Generated/Cohere.Models.Texts.g.cs rename to src/libs/Cohere/Generated/Cohere.Models.Embedv2Request.g.cs index 4915680..6f07455 100644 --- a/src/libs/Cohere/Generated/Cohere.Models.Texts.g.cs +++ b/src/libs/Cohere/Generated/Cohere.Models.Embedv2Request.g.cs @@ -6,14 +6,13 @@ namespace Cohere /// /// /// - public sealed partial class Texts + public sealed partial class Embedv2Request { /// /// 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 Texts1 { get; set; } + public global::System.Collections.Generic.IList? Texts { get; set; } /// /// Defaults to embed-english-v2.0
@@ -41,8 +40,7 @@ public sealed partial class Texts ///
[global::System.Text.Json.Serialization.JsonPropertyName("input_type")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Cohere.JsonConverters.EmbedInputTypeJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::Cohere.EmbedInputType InputType { get; set; } + public global::Cohere.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.
@@ -62,8 +60,8 @@ public sealed partial class Texts /// Default Value: END ///
[global::System.Text.Json.Serialization.JsonPropertyName("truncate")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Cohere.JsonConverters.TextsTruncateJsonConverter))] - public global::Cohere.TextsTruncate? Truncate { get; set; } = global::Cohere.TextsTruncate.END; + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Cohere.JsonConverters.Embedv2RequestTruncateJsonConverter))] + public global::Cohere.Embedv2RequestTruncate? Truncate { get; set; } = global::Cohere.Embedv2RequestTruncate.END; /// /// Additional properties that are not explicitly defined in the schema diff --git a/src/libs/Cohere/Generated/Cohere.Models.TextsTruncate.g.cs b/src/libs/Cohere/Generated/Cohere.Models.Embedv2RequestTruncate.g.cs similarity index 70% rename from src/libs/Cohere/Generated/Cohere.Models.TextsTruncate.g.cs rename to src/libs/Cohere/Generated/Cohere.Models.Embedv2RequestTruncate.g.cs index 3e97c29..3f21d4d 100644 --- a/src/libs/Cohere/Generated/Cohere.Models.TextsTruncate.g.cs +++ b/src/libs/Cohere/Generated/Cohere.Models.Embedv2RequestTruncate.g.cs @@ -9,7 +9,7 @@ namespace Cohere /// If `NONE` is selected, when the input exceeds the maximum input token length an error will be returned.
/// Default Value: END ///
- public enum TextsTruncate + public enum Embedv2RequestTruncate { /// /// @@ -28,31 +28,31 @@ public enum TextsTruncate /// /// Enum extensions to do fast conversions without the reflection. /// - public static class TextsTruncateExtensions + public static class Embedv2RequestTruncateExtensions { /// /// Converts an enum to a string. /// - public static string ToValueString(this TextsTruncate value) + public static string ToValueString(this Embedv2RequestTruncate value) { return value switch { - TextsTruncate.NONE => "NONE", - TextsTruncate.START => "START", - TextsTruncate.END => "END", + Embedv2RequestTruncate.NONE => "NONE", + Embedv2RequestTruncate.START => "START", + Embedv2RequestTruncate.END => "END", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } /// /// Converts an string to a enum. /// - public static TextsTruncate? ToEnum(string value) + public static Embedv2RequestTruncate? ToEnum(string value) { return value switch { - "NONE" => TextsTruncate.NONE, - "START" => TextsTruncate.START, - "END" => TextsTruncate.END, + "NONE" => Embedv2RequestTruncate.NONE, + "START" => Embedv2RequestTruncate.START, + "END" => Embedv2RequestTruncate.END, _ => null, }; } diff --git a/src/libs/Cohere/Generated/Cohere.Models.Hyperparameters.g.cs b/src/libs/Cohere/Generated/Cohere.Models.Hyperparameters.g.cs index f626eea..0a6eaa8 100644 --- a/src/libs/Cohere/Generated/Cohere.Models.Hyperparameters.g.cs +++ b/src/libs/Cohere/Generated/Cohere.Models.Hyperparameters.g.cs @@ -40,6 +40,32 @@ public sealed partial class Hyperparameters [global::System.Text.Json.Serialization.JsonPropertyName("learning_rate")] public double? LearningRate { get; set; } + /// + /// Controls the scaling factor for LoRA updates. Higher values make the
+ /// updates more impactful. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("lora_alpha")] + public int? LoraAlpha { get; set; } + + /// + /// Specifies the rank for low-rank matrices. Lower ranks reduce parameters
+ /// but may limit model flexibility. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("lora_rank")] + public int? LoraRank { get; set; } + + /// + /// The possible combinations of LoRA modules to target.
+ /// - LORA_TARGET_MODULES_UNSPECIFIED: Unspecified LoRA target modules.
+ /// - LORA_TARGET_MODULES_QV: LoRA adapts the query and value matrices in transformer attention layers.
+ /// - LORA_TARGET_MODULES_QKVO: LoRA adapts query, key, value, and output matrices in attention layers.
+ /// - LORA_TARGET_MODULES_QKVO_FFN: LoRA adapts attention projection matrices and feed-forward networks (FFN).
+ /// Default Value: LORA_TARGET_MODULES_UNSPECIFIED + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("lora_target_modules")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Cohere.JsonConverters.LoraTargetModulesJsonConverter))] + public global::Cohere.LoraTargetModules? LoraTargetModules { get; set; } = global::Cohere.LoraTargetModules.LORATARGETMODULESUNSPECIFIED; + /// /// Additional properties that are not explicitly defined in the schema /// diff --git a/src/libs/Cohere/Generated/Cohere.Models.Images.g.cs b/src/libs/Cohere/Generated/Cohere.Models.Images.g.cs deleted file mode 100644 index 3ab6bff..0000000 --- a/src/libs/Cohere/Generated/Cohere.Models.Images.g.cs +++ /dev/null @@ -1,57 +0,0 @@ - -#nullable enable - -namespace Cohere -{ - /// - /// - /// - public sealed partial class Images - { - /// - /// 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")] - [global::System.Text.Json.Serialization.JsonRequired] - public required 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.
- /// - `"image"`: Used for embeddings with image input. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("input_type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Cohere.JsonConverters.EmbedInputTypeJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::Cohere.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; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - } -} \ No newline at end of file diff --git a/src/libs/Cohere/Generated/Cohere.Models.JSONResponseFormat2.g.cs b/src/libs/Cohere/Generated/Cohere.Models.JsonResponseFormatV2.g.cs similarity index 85% rename from src/libs/Cohere/Generated/Cohere.Models.JSONResponseFormat2.g.cs rename to src/libs/Cohere/Generated/Cohere.Models.JsonResponseFormatV2.g.cs index 597b0b7..5605e23 100644 --- a/src/libs/Cohere/Generated/Cohere.Models.JSONResponseFormat2.g.cs +++ b/src/libs/Cohere/Generated/Cohere.Models.JsonResponseFormatV2.g.cs @@ -6,16 +6,16 @@ namespace Cohere /// /// /// - public sealed partial class JSONResponseFormat2 + public sealed partial class JsonResponseFormatV2 { /// /// 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::Cohere.JsonConverters.ResponseFormatType2JsonConverter))] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Cohere.JsonConverters.ResponseFormatTypeV2JsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::Cohere.ResponseFormatType2 Type { get; set; } + public required global::Cohere.ResponseFormatTypeV2 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.
@@ -33,7 +33,7 @@ public sealed partial class JSONResponseFormat2 /// **Note**: This field must not be specified when the `type` is set to `"text"`. ///
[global::System.Text.Json.Serialization.JsonPropertyName("json_schema")] - public global::Cohere.JSONResponseFormat2JsonSchema? JsonSchema { get; set; } + public global::Cohere.JsonResponseFormatV2JsonSchema? JsonSchema { get; set; } /// /// Additional properties that are not explicitly defined in the schema diff --git a/src/libs/Cohere/Generated/Cohere.Models.JSONResponseFormat2JsonSchema.g.cs b/src/libs/Cohere/Generated/Cohere.Models.JsonResponseFormatV2JsonSchema.g.cs similarity index 94% rename from src/libs/Cohere/Generated/Cohere.Models.JSONResponseFormat2JsonSchema.g.cs rename to src/libs/Cohere/Generated/Cohere.Models.JsonResponseFormatV2JsonSchema.g.cs index 570ebab..17fc99a 100644 --- a/src/libs/Cohere/Generated/Cohere.Models.JSONResponseFormat2JsonSchema.g.cs +++ b/src/libs/Cohere/Generated/Cohere.Models.JsonResponseFormatV2JsonSchema.g.cs @@ -18,7 +18,7 @@ namespace Cohere /// ```
/// **Note**: This field must not be specified when the `type` is set to `"text"`. ///
- public sealed partial class JSONResponseFormat2JsonSchema + public sealed partial class JsonResponseFormatV2JsonSchema { /// diff --git a/src/libs/Cohere/Generated/Cohere.Models.LoraTargetModules.g.cs b/src/libs/Cohere/Generated/Cohere.Models.LoraTargetModules.g.cs new file mode 100644 index 0000000..a14f7a4 --- /dev/null +++ b/src/libs/Cohere/Generated/Cohere.Models.LoraTargetModules.g.cs @@ -0,0 +1,68 @@ + +#nullable enable + +namespace Cohere +{ + /// + /// The possible combinations of LoRA modules to target.
+ /// - LORA_TARGET_MODULES_UNSPECIFIED: Unspecified LoRA target modules.
+ /// - LORA_TARGET_MODULES_QV: LoRA adapts the query and value matrices in transformer attention layers.
+ /// - LORA_TARGET_MODULES_QKVO: LoRA adapts query, key, value, and output matrices in attention layers.
+ /// - LORA_TARGET_MODULES_QKVO_FFN: LoRA adapts attention projection matrices and feed-forward networks (FFN).
+ /// Default Value: LORA_TARGET_MODULES_UNSPECIFIED + ///
+ public enum LoraTargetModules + { + /// + /// + /// + LORATARGETMODULESUNSPECIFIED, + /// + /// + /// + LORATARGETMODULESQV, + /// + /// + /// + LORATARGETMODULESQKVO, + /// + /// + /// + LORATARGETMODULESQKVOFFN, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class LoraTargetModulesExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this LoraTargetModules value) + { + return value switch + { + LoraTargetModules.LORATARGETMODULESUNSPECIFIED => "LORA_TARGET_MODULES_UNSPECIFIED", + LoraTargetModules.LORATARGETMODULESQV => "LORA_TARGET_MODULES_QV", + LoraTargetModules.LORATARGETMODULESQKVO => "LORA_TARGET_MODULES_QKVO", + LoraTargetModules.LORATARGETMODULESQKVOFFN => "LORA_TARGET_MODULES_QKVO_FFN", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static LoraTargetModules? ToEnum(string value) + { + return value switch + { + "LORA_TARGET_MODULES_UNSPECIFIED" => LoraTargetModules.LORATARGETMODULESUNSPECIFIED, + "LORA_TARGET_MODULES_QV" => LoraTargetModules.LORATARGETMODULESQV, + "LORA_TARGET_MODULES_QKVO" => LoraTargetModules.LORATARGETMODULESQKVO, + "LORA_TARGET_MODULES_QKVO_FFN" => LoraTargetModules.LORATARGETMODULESQKVOFFN, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Cohere/Generated/Cohere.Models.Rerankv2Request.g.cs b/src/libs/Cohere/Generated/Cohere.Models.Rerankv2Request.g.cs new file mode 100644 index 0000000..3a85930 --- /dev/null +++ b/src/libs/Cohere/Generated/Cohere.Models.Rerankv2Request.g.cs @@ -0,0 +1,70 @@ + +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace Cohere +{ + /// + /// + /// + public sealed partial class Rerankv2Request + { + /// + /// 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")] + [global::System.Text.Json.Serialization.JsonRequired] + public required 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/libs/Cohere/Generated/Cohere.Models.Rerankv2Response.g.cs b/src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response.g.cs new file mode 100644 index 0000000..7657e3d --- /dev/null +++ b/src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response.g.cs @@ -0,0 +1,36 @@ + +#nullable enable + +namespace Cohere +{ + /// + /// + /// + public sealed partial class Rerankv2Response + { + /// + /// + /// + [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::Cohere.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/libs/Cohere/Generated/Cohere.Models.Rerankv2Response10.g.cs b/src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response10.g.cs new file mode 100644 index 0000000..91797dd --- /dev/null +++ b/src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response10.g.cs @@ -0,0 +1,23 @@ + +#nullable enable + +namespace Cohere +{ + /// + /// + /// + public sealed partial class Rerankv2Response10 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response11.g.cs b/src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response11.g.cs new file mode 100644 index 0000000..20fb3b1 --- /dev/null +++ b/src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response11.g.cs @@ -0,0 +1,23 @@ + +#nullable enable + +namespace Cohere +{ + /// + /// + /// + public sealed partial class Rerankv2Response11 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response12.g.cs b/src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response12.g.cs new file mode 100644 index 0000000..ec25a62 --- /dev/null +++ b/src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response12.g.cs @@ -0,0 +1,23 @@ + +#nullable enable + +namespace Cohere +{ + /// + /// + /// + public sealed partial class Rerankv2Response12 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response13.g.cs b/src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response13.g.cs new file mode 100644 index 0000000..86fc2c3 --- /dev/null +++ b/src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response13.g.cs @@ -0,0 +1,23 @@ + +#nullable enable + +namespace Cohere +{ + /// + /// + /// + public sealed partial class Rerankv2Response13 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response2.g.cs b/src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response2.g.cs new file mode 100644 index 0000000..fbf384b --- /dev/null +++ b/src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response2.g.cs @@ -0,0 +1,23 @@ + +#nullable enable + +namespace Cohere +{ + /// + /// + /// + public sealed partial class Rerankv2Response2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response3.g.cs b/src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response3.g.cs new file mode 100644 index 0000000..9a46599 --- /dev/null +++ b/src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response3.g.cs @@ -0,0 +1,23 @@ + +#nullable enable + +namespace Cohere +{ + /// + /// + /// + public sealed partial class Rerankv2Response3 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response4.g.cs b/src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response4.g.cs new file mode 100644 index 0000000..9ea004d --- /dev/null +++ b/src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response4.g.cs @@ -0,0 +1,23 @@ + +#nullable enable + +namespace Cohere +{ + /// + /// + /// + public sealed partial class Rerankv2Response4 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response5.g.cs b/src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response5.g.cs new file mode 100644 index 0000000..f9461af --- /dev/null +++ b/src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response5.g.cs @@ -0,0 +1,23 @@ + +#nullable enable + +namespace Cohere +{ + /// + /// + /// + public sealed partial class Rerankv2Response5 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response6.g.cs b/src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response6.g.cs new file mode 100644 index 0000000..e115489 --- /dev/null +++ b/src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response6.g.cs @@ -0,0 +1,23 @@ + +#nullable enable + +namespace Cohere +{ + /// + /// + /// + public sealed partial class Rerankv2Response6 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response7.g.cs b/src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response7.g.cs new file mode 100644 index 0000000..7a0dbfa --- /dev/null +++ b/src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response7.g.cs @@ -0,0 +1,23 @@ + +#nullable enable + +namespace Cohere +{ + /// + /// + /// + public sealed partial class Rerankv2Response7 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response8.g.cs b/src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response8.g.cs new file mode 100644 index 0000000..6741827 --- /dev/null +++ b/src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response8.g.cs @@ -0,0 +1,23 @@ + +#nullable enable + +namespace Cohere +{ + /// + /// + /// + public sealed partial class Rerankv2Response8 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response9.g.cs b/src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response9.g.cs new file mode 100644 index 0000000..433647a --- /dev/null +++ b/src/libs/Cohere/Generated/Cohere.Models.Rerankv2Response9.g.cs @@ -0,0 +1,23 @@ + +#nullable enable + +namespace Cohere +{ + /// + /// + /// + public sealed partial class Rerankv2Response9 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/libs/Cohere/Generated/Cohere.Models.Rerankv2ResponseResult.g.cs b/src/libs/Cohere/Generated/Cohere.Models.Rerankv2ResponseResult.g.cs new file mode 100644 index 0000000..3e82214 --- /dev/null +++ b/src/libs/Cohere/Generated/Cohere.Models.Rerankv2ResponseResult.g.cs @@ -0,0 +1,37 @@ + +#nullable enable + +namespace Cohere +{ + /// + /// + /// + public sealed partial class Rerankv2ResponseResult + { + /// + /// 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::Cohere.Rerankv2ResponseResultDocument? 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/libs/Cohere/Generated/Cohere.Models.Rerankv2ResponseResultDocument.g.cs b/src/libs/Cohere/Generated/Cohere.Models.Rerankv2ResponseResultDocument.g.cs new file mode 100644 index 0000000..c17e2f4 --- /dev/null +++ b/src/libs/Cohere/Generated/Cohere.Models.Rerankv2ResponseResultDocument.g.cs @@ -0,0 +1,24 @@ + +#nullable enable + +namespace Cohere +{ + /// + /// If `return_documents` is set as `false` this will return none, if `true` it will return the documents passed in + /// + public sealed partial class Rerankv2ResponseResultDocument + { + /// + /// 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/libs/Cohere/Generated/Cohere.Models.ResponseFormatType2.g.cs b/src/libs/Cohere/Generated/Cohere.Models.ResponseFormatTypeV2.g.cs similarity index 71% rename from src/libs/Cohere/Generated/Cohere.Models.ResponseFormatType2.g.cs rename to src/libs/Cohere/Generated/Cohere.Models.ResponseFormatTypeV2.g.cs index c09aaf2..5e42462 100644 --- a/src/libs/Cohere/Generated/Cohere.Models.ResponseFormatType2.g.cs +++ b/src/libs/Cohere/Generated/Cohere.Models.ResponseFormatTypeV2.g.cs @@ -7,7 +7,7 @@ namespace Cohere /// Defaults to `"text"`.
/// When set to `"json_object"`, the model's output will be a valid JSON Object. ///
- public enum ResponseFormatType2 + public enum ResponseFormatTypeV2 { /// /// @@ -22,29 +22,29 @@ public enum ResponseFormatType2 /// /// Enum extensions to do fast conversions without the reflection. /// - public static class ResponseFormatType2Extensions + public static class ResponseFormatTypeV2Extensions { /// /// Converts an enum to a string. /// - public static string ToValueString(this ResponseFormatType2 value) + public static string ToValueString(this ResponseFormatTypeV2 value) { return value switch { - ResponseFormatType2.Text => "text", - ResponseFormatType2.JsonObject => "json_object", + ResponseFormatTypeV2.Text => "text", + ResponseFormatTypeV2.JsonObject => "json_object", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } /// /// Converts an string to a enum. /// - public static ResponseFormatType2? ToEnum(string value) + public static ResponseFormatTypeV2? ToEnum(string value) { return value switch { - "text" => ResponseFormatType2.Text, - "json_object" => ResponseFormatType2.JsonObject, + "text" => ResponseFormatTypeV2.Text, + "json_object" => ResponseFormatTypeV2.JsonObject, _ => null, }; } diff --git a/src/libs/Cohere/Generated/Cohere.Models.ResponseFormat2.g.cs b/src/libs/Cohere/Generated/Cohere.Models.ResponseFormatV2.g.cs similarity index 65% rename from src/libs/Cohere/Generated/Cohere.Models.ResponseFormat2.g.cs rename to src/libs/Cohere/Generated/Cohere.Models.ResponseFormatV2.g.cs index bc3542c..e000ca6 100644 --- a/src/libs/Cohere/Generated/Cohere.Models.ResponseFormat2.g.cs +++ b/src/libs/Cohere/Generated/Cohere.Models.ResponseFormatV2.g.cs @@ -12,15 +12,15 @@ namespace Cohere /// **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 + public readonly partial struct ResponseFormatV2 : global::System.IEquatable { /// /// /// #if NET6_0_OR_GREATER - public global::Cohere.TextResponseFormat2? Text { get; init; } + public global::Cohere.TextResponseFormatV2? Text { get; init; } #else - public global::Cohere.TextResponseFormat2? Text { get; } + public global::Cohere.TextResponseFormatV2? Text { get; } #endif /// @@ -34,17 +34,17 @@ namespace Cohere /// /// /// - public static implicit operator ResponseFormat2(global::Cohere.TextResponseFormat2 value) => new ResponseFormat2(value); + public static implicit operator ResponseFormatV2(global::Cohere.TextResponseFormatV2 value) => new ResponseFormatV2(value); /// /// /// - public static implicit operator global::Cohere.TextResponseFormat2?(ResponseFormat2 @this) => @this.Text; + public static implicit operator global::Cohere.TextResponseFormatV2?(ResponseFormatV2 @this) => @this.Text; /// /// /// - public ResponseFormat2(global::Cohere.TextResponseFormat2? value) + public ResponseFormatV2(global::Cohere.TextResponseFormatV2? value) { Text = value; } @@ -53,54 +53,54 @@ public ResponseFormat2(global::Cohere.TextResponseFormat2? value) /// /// #if NET6_0_OR_GREATER - public global::Cohere.JSONResponseFormat2? JSON { get; init; } + public global::Cohere.JsonResponseFormatV2? Json { get; init; } #else - public global::Cohere.JSONResponseFormat2? JSON { get; } + public global::Cohere.JsonResponseFormatV2? Json { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(JSON))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Json))] #endif - public bool IsJSON => JSON != null; + public bool IsJson => Json != null; /// /// /// - public static implicit operator ResponseFormat2(global::Cohere.JSONResponseFormat2 value) => new ResponseFormat2(value); + public static implicit operator ResponseFormatV2(global::Cohere.JsonResponseFormatV2 value) => new ResponseFormatV2(value); /// /// /// - public static implicit operator global::Cohere.JSONResponseFormat2?(ResponseFormat2 @this) => @this.JSON; + public static implicit operator global::Cohere.JsonResponseFormatV2?(ResponseFormatV2 @this) => @this.Json; /// /// /// - public ResponseFormat2(global::Cohere.JSONResponseFormat2? value) + public ResponseFormatV2(global::Cohere.JsonResponseFormatV2? value) { - JSON = value; + Json = value; } /// /// /// - public ResponseFormat2( - global::Cohere.TextResponseFormat2? text, - global::Cohere.JSONResponseFormat2? jSON + public ResponseFormatV2( + global::Cohere.TextResponseFormatV2? text, + global::Cohere.JsonResponseFormatV2? json ) { Text = text; - JSON = jSON; + Json = json; } /// /// /// public object? Object => - JSON as object ?? + Json as object ?? Text as object ; @@ -109,7 +109,7 @@ Text as object ///
public bool Validate() { - return IsText && !IsJSON || !IsText && IsJSON; + return IsText && !IsJson || !IsText && IsJson; } /// @@ -120,9 +120,9 @@ public override int GetHashCode() var fields = new object?[] { Text, - typeof(global::Cohere.TextResponseFormat2), - JSON, - typeof(global::Cohere.JSONResponseFormat2), + typeof(global::Cohere.TextResponseFormatV2), + Json, + typeof(global::Cohere.JsonResponseFormatV2), }; const int offset = unchecked((int)2166136261); const int prime = 16777619; @@ -135,26 +135,26 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null /// /// /// - public bool Equals(ResponseFormat2 other) + public bool Equals(ResponseFormatV2 other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Text, other.Text) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(JSON, other.JSON) + global::System.Collections.Generic.EqualityComparer.Default.Equals(Text, other.Text) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Json, other.Json) ; } /// /// /// - public static bool operator ==(ResponseFormat2 obj1, ResponseFormat2 obj2) + public static bool operator ==(ResponseFormatV2 obj1, ResponseFormatV2 obj2) { - return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); } /// /// /// - public static bool operator !=(ResponseFormat2 obj1, ResponseFormat2 obj2) + public static bool operator !=(ResponseFormatV2 obj1, ResponseFormatV2 obj2) { return !(obj1 == obj2); } @@ -164,7 +164,7 @@ public bool Equals(ResponseFormat2 other) /// public override bool Equals(object? obj) { - return obj is ResponseFormat2 o && Equals(o); + return obj is ResponseFormatV2 o && Equals(o); } } } diff --git a/src/libs/Cohere/Generated/Cohere.Models.StreamedChatResponse2.g.cs b/src/libs/Cohere/Generated/Cohere.Models.StreamedChatResponseV2.g.cs similarity index 82% rename from src/libs/Cohere/Generated/Cohere.Models.StreamedChatResponse2.g.cs rename to src/libs/Cohere/Generated/Cohere.Models.StreamedChatResponseV2.g.cs index 3e4bc0a..12f7e0b 100644 --- a/src/libs/Cohere/Generated/Cohere.Models.StreamedChatResponse2.g.cs +++ b/src/libs/Cohere/Generated/Cohere.Models.StreamedChatResponseV2.g.cs @@ -8,7 +8,7 @@ namespace Cohere /// /// StreamedChatResponse is returned in streaming mode (specified with `stream=True` in the request). /// - public readonly partial struct StreamedChatResponse2 : global::System.IEquatable + public readonly partial struct StreamedChatResponseV2 : global::System.IEquatable { /// /// A streamed event which signifies that a stream has started. @@ -30,17 +30,17 @@ namespace Cohere /// /// /// - public static implicit operator StreamedChatResponse2(global::Cohere.ChatMessageStartEvent value) => new StreamedChatResponse2(value); + public static implicit operator StreamedChatResponseV2(global::Cohere.ChatMessageStartEvent value) => new StreamedChatResponseV2(value); /// /// /// - public static implicit operator global::Cohere.ChatMessageStartEvent?(StreamedChatResponse2 @this) => @this.MessageStartEvent; + public static implicit operator global::Cohere.ChatMessageStartEvent?(StreamedChatResponseV2 @this) => @this.MessageStartEvent; /// /// /// - public StreamedChatResponse2(global::Cohere.ChatMessageStartEvent? value) + public StreamedChatResponseV2(global::Cohere.ChatMessageStartEvent? value) { MessageStartEvent = value; } @@ -65,17 +65,17 @@ public StreamedChatResponse2(global::Cohere.ChatMessageStartEvent? value) /// /// /// - public static implicit operator StreamedChatResponse2(global::Cohere.ChatContentStartEvent value) => new StreamedChatResponse2(value); + public static implicit operator StreamedChatResponseV2(global::Cohere.ChatContentStartEvent value) => new StreamedChatResponseV2(value); /// /// /// - public static implicit operator global::Cohere.ChatContentStartEvent?(StreamedChatResponse2 @this) => @this.ContentStartEvent; + public static implicit operator global::Cohere.ChatContentStartEvent?(StreamedChatResponseV2 @this) => @this.ContentStartEvent; /// /// /// - public StreamedChatResponse2(global::Cohere.ChatContentStartEvent? value) + public StreamedChatResponseV2(global::Cohere.ChatContentStartEvent? value) { ContentStartEvent = value; } @@ -100,17 +100,17 @@ public StreamedChatResponse2(global::Cohere.ChatContentStartEvent? value) /// /// /// - public static implicit operator StreamedChatResponse2(global::Cohere.ChatContentDeltaEvent value) => new StreamedChatResponse2(value); + public static implicit operator StreamedChatResponseV2(global::Cohere.ChatContentDeltaEvent value) => new StreamedChatResponseV2(value); /// /// /// - public static implicit operator global::Cohere.ChatContentDeltaEvent?(StreamedChatResponse2 @this) => @this.ContentDeltaEvent; + public static implicit operator global::Cohere.ChatContentDeltaEvent?(StreamedChatResponseV2 @this) => @this.ContentDeltaEvent; /// /// /// - public StreamedChatResponse2(global::Cohere.ChatContentDeltaEvent? value) + public StreamedChatResponseV2(global::Cohere.ChatContentDeltaEvent? value) { ContentDeltaEvent = value; } @@ -135,17 +135,17 @@ public StreamedChatResponse2(global::Cohere.ChatContentDeltaEvent? value) /// /// /// - public static implicit operator StreamedChatResponse2(global::Cohere.ChatContentEndEvent value) => new StreamedChatResponse2(value); + public static implicit operator StreamedChatResponseV2(global::Cohere.ChatContentEndEvent value) => new StreamedChatResponseV2(value); /// /// /// - public static implicit operator global::Cohere.ChatContentEndEvent?(StreamedChatResponse2 @this) => @this.ContentEndEvent; + public static implicit operator global::Cohere.ChatContentEndEvent?(StreamedChatResponseV2 @this) => @this.ContentEndEvent; /// /// /// - public StreamedChatResponse2(global::Cohere.ChatContentEndEvent? value) + public StreamedChatResponseV2(global::Cohere.ChatContentEndEvent? value) { ContentEndEvent = value; } @@ -170,17 +170,17 @@ public StreamedChatResponse2(global::Cohere.ChatContentEndEvent? value) /// /// /// - public static implicit operator StreamedChatResponse2(global::Cohere.ChatToolPlanDeltaEvent value) => new StreamedChatResponse2(value); + public static implicit operator StreamedChatResponseV2(global::Cohere.ChatToolPlanDeltaEvent value) => new StreamedChatResponseV2(value); /// /// /// - public static implicit operator global::Cohere.ChatToolPlanDeltaEvent?(StreamedChatResponse2 @this) => @this.ToolPlanDeltaEvent; + public static implicit operator global::Cohere.ChatToolPlanDeltaEvent?(StreamedChatResponseV2 @this) => @this.ToolPlanDeltaEvent; /// /// /// - public StreamedChatResponse2(global::Cohere.ChatToolPlanDeltaEvent? value) + public StreamedChatResponseV2(global::Cohere.ChatToolPlanDeltaEvent? value) { ToolPlanDeltaEvent = value; } @@ -205,17 +205,17 @@ public StreamedChatResponse2(global::Cohere.ChatToolPlanDeltaEvent? value) /// /// /// - public static implicit operator StreamedChatResponse2(global::Cohere.ChatToolCallStartEvent value) => new StreamedChatResponse2(value); + public static implicit operator StreamedChatResponseV2(global::Cohere.ChatToolCallStartEvent value) => new StreamedChatResponseV2(value); /// /// /// - public static implicit operator global::Cohere.ChatToolCallStartEvent?(StreamedChatResponse2 @this) => @this.ToolCallStartEvent; + public static implicit operator global::Cohere.ChatToolCallStartEvent?(StreamedChatResponseV2 @this) => @this.ToolCallStartEvent; /// /// /// - public StreamedChatResponse2(global::Cohere.ChatToolCallStartEvent? value) + public StreamedChatResponseV2(global::Cohere.ChatToolCallStartEvent? value) { ToolCallStartEvent = value; } @@ -240,17 +240,17 @@ public StreamedChatResponse2(global::Cohere.ChatToolCallStartEvent? value) /// /// /// - public static implicit operator StreamedChatResponse2(global::Cohere.ChatToolCallDeltaEvent value) => new StreamedChatResponse2(value); + public static implicit operator StreamedChatResponseV2(global::Cohere.ChatToolCallDeltaEvent value) => new StreamedChatResponseV2(value); /// /// /// - public static implicit operator global::Cohere.ChatToolCallDeltaEvent?(StreamedChatResponse2 @this) => @this.ToolCallDeltaEvent; + public static implicit operator global::Cohere.ChatToolCallDeltaEvent?(StreamedChatResponseV2 @this) => @this.ToolCallDeltaEvent; /// /// /// - public StreamedChatResponse2(global::Cohere.ChatToolCallDeltaEvent? value) + public StreamedChatResponseV2(global::Cohere.ChatToolCallDeltaEvent? value) { ToolCallDeltaEvent = value; } @@ -275,17 +275,17 @@ public StreamedChatResponse2(global::Cohere.ChatToolCallDeltaEvent? value) /// /// /// - public static implicit operator StreamedChatResponse2(global::Cohere.ChatToolCallEndEvent value) => new StreamedChatResponse2(value); + public static implicit operator StreamedChatResponseV2(global::Cohere.ChatToolCallEndEvent value) => new StreamedChatResponseV2(value); /// /// /// - public static implicit operator global::Cohere.ChatToolCallEndEvent?(StreamedChatResponse2 @this) => @this.ToolCallEndEvent; + public static implicit operator global::Cohere.ChatToolCallEndEvent?(StreamedChatResponseV2 @this) => @this.ToolCallEndEvent; /// /// /// - public StreamedChatResponse2(global::Cohere.ChatToolCallEndEvent? value) + public StreamedChatResponseV2(global::Cohere.ChatToolCallEndEvent? value) { ToolCallEndEvent = value; } @@ -310,17 +310,17 @@ public StreamedChatResponse2(global::Cohere.ChatToolCallEndEvent? value) /// /// /// - public static implicit operator StreamedChatResponse2(global::Cohere.ChatMessageEndEvent value) => new StreamedChatResponse2(value); + public static implicit operator StreamedChatResponseV2(global::Cohere.ChatMessageEndEvent value) => new StreamedChatResponseV2(value); /// /// /// - public static implicit operator global::Cohere.ChatMessageEndEvent?(StreamedChatResponse2 @this) => @this.MessageEndEvent; + public static implicit operator global::Cohere.ChatMessageEndEvent?(StreamedChatResponseV2 @this) => @this.MessageEndEvent; /// /// /// - public StreamedChatResponse2(global::Cohere.ChatMessageEndEvent? value) + public StreamedChatResponseV2(global::Cohere.ChatMessageEndEvent? value) { MessageEndEvent = value; } @@ -328,7 +328,7 @@ public StreamedChatResponse2(global::Cohere.ChatMessageEndEvent? value) /// /// /// - public StreamedChatResponse2( + public StreamedChatResponseV2( global::Cohere.ChatMessageStartEvent? messageStartEvent, global::Cohere.ChatContentStartEvent? contentStartEvent, global::Cohere.ChatContentDeltaEvent? contentDeltaEvent, @@ -411,7 +411,7 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null /// /// /// - public bool Equals(StreamedChatResponse2 other) + public bool Equals(StreamedChatResponseV2 other) { return global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageStartEvent, other.MessageStartEvent) && @@ -429,15 +429,15 @@ public bool Equals(StreamedChatResponse2 other) /// /// /// - public static bool operator ==(StreamedChatResponse2 obj1, StreamedChatResponse2 obj2) + public static bool operator ==(StreamedChatResponseV2 obj1, StreamedChatResponseV2 obj2) { - return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); } /// /// /// - public static bool operator !=(StreamedChatResponse2 obj1, StreamedChatResponse2 obj2) + public static bool operator !=(StreamedChatResponseV2 obj1, StreamedChatResponseV2 obj2) { return !(obj1 == obj2); } @@ -447,7 +447,7 @@ public bool Equals(StreamedChatResponse2 other) /// public override bool Equals(object? obj) { - return obj is StreamedChatResponse2 o && Equals(o); + return obj is StreamedChatResponseV2 o && Equals(o); } } } diff --git a/src/libs/Cohere/Generated/Cohere.Models.TextResponseFormat2.g.cs b/src/libs/Cohere/Generated/Cohere.Models.TextResponseFormatV2.g.cs similarity index 80% rename from src/libs/Cohere/Generated/Cohere.Models.TextResponseFormat2.g.cs rename to src/libs/Cohere/Generated/Cohere.Models.TextResponseFormatV2.g.cs index 402cd53..e1e626a 100644 --- a/src/libs/Cohere/Generated/Cohere.Models.TextResponseFormat2.g.cs +++ b/src/libs/Cohere/Generated/Cohere.Models.TextResponseFormatV2.g.cs @@ -6,16 +6,16 @@ namespace Cohere /// /// /// - public sealed partial class TextResponseFormat2 + public sealed partial class TextResponseFormatV2 { /// /// 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::Cohere.JsonConverters.ResponseFormatType2JsonConverter))] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Cohere.JsonConverters.ResponseFormatTypeV2JsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::Cohere.ResponseFormatType2 Type { get; set; } + public required global::Cohere.ResponseFormatTypeV2 Type { get; set; } /// /// Additional properties that are not explicitly defined in the schema diff --git a/src/libs/Cohere/Generated/Cohere.Models.ToolCall2.g.cs b/src/libs/Cohere/Generated/Cohere.Models.ToolCallV2.g.cs similarity index 80% rename from src/libs/Cohere/Generated/Cohere.Models.ToolCall2.g.cs rename to src/libs/Cohere/Generated/Cohere.Models.ToolCallV2.g.cs index 73cf37d..64ab436 100644 --- a/src/libs/Cohere/Generated/Cohere.Models.ToolCall2.g.cs +++ b/src/libs/Cohere/Generated/Cohere.Models.ToolCallV2.g.cs @@ -6,7 +6,7 @@ namespace Cohere /// /// A array of tool calls to be made. /// - public sealed partial class ToolCall2 + public sealed partial class ToolCallV2 { /// /// @@ -18,14 +18,14 @@ public sealed partial class ToolCall2 /// /// [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Cohere.JsonConverters.ToolCall2TypeJsonConverter))] - public global::Cohere.ToolCall2Type? Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Cohere.JsonConverters.ToolCallV2TypeJsonConverter))] + public global::Cohere.ToolCallV2Type? Type { get; set; } /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("function")] - public global::Cohere.ToolCall2Function? Function { get; set; } + public global::Cohere.ToolCallV2Function? Function { get; set; } /// /// Additional properties that are not explicitly defined in the schema diff --git a/src/libs/Cohere/Generated/Cohere.Models.ToolCall2Function.g.cs b/src/libs/Cohere/Generated/Cohere.Models.ToolCallV2Function.g.cs similarity index 94% rename from src/libs/Cohere/Generated/Cohere.Models.ToolCall2Function.g.cs rename to src/libs/Cohere/Generated/Cohere.Models.ToolCallV2Function.g.cs index 135a516..34aaceb 100644 --- a/src/libs/Cohere/Generated/Cohere.Models.ToolCall2Function.g.cs +++ b/src/libs/Cohere/Generated/Cohere.Models.ToolCallV2Function.g.cs @@ -6,7 +6,7 @@ namespace Cohere /// /// /// - public sealed partial class ToolCall2Function + public sealed partial class ToolCallV2Function { /// /// diff --git a/src/libs/Cohere/Generated/Cohere.Models.ToolCall2Type.g.cs b/src/libs/Cohere/Generated/Cohere.Models.ToolCallV2Type.g.cs similarity index 70% rename from src/libs/Cohere/Generated/Cohere.Models.ToolCall2Type.g.cs rename to src/libs/Cohere/Generated/Cohere.Models.ToolCallV2Type.g.cs index 7ee7777..1991d17 100644 --- a/src/libs/Cohere/Generated/Cohere.Models.ToolCall2Type.g.cs +++ b/src/libs/Cohere/Generated/Cohere.Models.ToolCallV2Type.g.cs @@ -6,7 +6,7 @@ namespace Cohere /// /// /// - public enum ToolCall2Type + public enum ToolCallV2Type { /// /// @@ -17,27 +17,27 @@ public enum ToolCall2Type /// /// Enum extensions to do fast conversions without the reflection. /// - public static class ToolCall2TypeExtensions + public static class ToolCallV2TypeExtensions { /// /// Converts an enum to a string. /// - public static string ToValueString(this ToolCall2Type value) + public static string ToValueString(this ToolCallV2Type value) { return value switch { - ToolCall2Type.Function => "function", + ToolCallV2Type.Function => "function", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } /// /// Converts an string to a enum. /// - public static ToolCall2Type? ToEnum(string value) + public static ToolCallV2Type? ToEnum(string value) { return value switch { - "function" => ToolCall2Type.Function, + "function" => ToolCallV2Type.Function, _ => null, }; } diff --git a/src/libs/Cohere/Generated/Cohere.Models.ToolMessage2.g.cs b/src/libs/Cohere/Generated/Cohere.Models.ToolMessageV2.g.cs similarity index 90% rename from src/libs/Cohere/Generated/Cohere.Models.ToolMessage2.g.cs rename to src/libs/Cohere/Generated/Cohere.Models.ToolMessageV2.g.cs index e84e4a2..69136e9 100644 --- a/src/libs/Cohere/Generated/Cohere.Models.ToolMessage2.g.cs +++ b/src/libs/Cohere/Generated/Cohere.Models.ToolMessageV2.g.cs @@ -8,14 +8,14 @@ namespace Cohere /// /// A message from the system. /// - public sealed partial class ToolMessage2 + public sealed partial class ToolMessageV2 { /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("role")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Cohere.JsonConverters.ToolMessage2RoleJsonConverter))] - public global::Cohere.ToolMessage2Role Role { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Cohere.JsonConverters.ToolMessageV2RoleJsonConverter))] + public global::Cohere.ToolMessageV2Role Role { get; set; } /// /// The id of the associated tool call that has provided the given content diff --git a/src/libs/Cohere/Generated/Cohere.Models.ToolMessage2Role.g.cs b/src/libs/Cohere/Generated/Cohere.Models.ToolMessageV2Role.g.cs similarity index 70% rename from src/libs/Cohere/Generated/Cohere.Models.ToolMessage2Role.g.cs rename to src/libs/Cohere/Generated/Cohere.Models.ToolMessageV2Role.g.cs index 039d9fe..d1428dd 100644 --- a/src/libs/Cohere/Generated/Cohere.Models.ToolMessage2Role.g.cs +++ b/src/libs/Cohere/Generated/Cohere.Models.ToolMessageV2Role.g.cs @@ -6,7 +6,7 @@ namespace Cohere /// /// /// - public enum ToolMessage2Role + public enum ToolMessageV2Role { /// /// @@ -17,27 +17,27 @@ public enum ToolMessage2Role /// /// Enum extensions to do fast conversions without the reflection. /// - public static class ToolMessage2RoleExtensions + public static class ToolMessageV2RoleExtensions { /// /// Converts an enum to a string. /// - public static string ToValueString(this ToolMessage2Role value) + public static string ToValueString(this ToolMessageV2Role value) { return value switch { - ToolMessage2Role.Tool => "tool", + ToolMessageV2Role.Tool => "tool", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } /// /// Converts an string to a enum. /// - public static ToolMessage2Role? ToEnum(string value) + public static ToolMessageV2Role? ToEnum(string value) { return value switch { - "tool" => ToolMessage2Role.Tool, + "tool" => ToolMessageV2Role.Tool, _ => null, }; } diff --git a/src/libs/Cohere/Generated/Cohere.Models.Tool2.g.cs b/src/libs/Cohere/Generated/Cohere.Models.ToolV2.g.cs similarity index 78% rename from src/libs/Cohere/Generated/Cohere.Models.Tool2.g.cs rename to src/libs/Cohere/Generated/Cohere.Models.ToolV2.g.cs index e500e52..21727e6 100644 --- a/src/libs/Cohere/Generated/Cohere.Models.Tool2.g.cs +++ b/src/libs/Cohere/Generated/Cohere.Models.ToolV2.g.cs @@ -6,20 +6,20 @@ namespace Cohere /// /// /// - public sealed partial class Tool2 + public sealed partial class ToolV2 { /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Cohere.JsonConverters.Tool2TypeJsonConverter))] - public global::Cohere.Tool2Type? Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Cohere.JsonConverters.ToolV2TypeJsonConverter))] + public global::Cohere.ToolV2Type? Type { get; set; } /// /// The function to be executed. /// [global::System.Text.Json.Serialization.JsonPropertyName("function")] - public global::Cohere.Tool2Function? Function { get; set; } + public global::Cohere.ToolV2Function? Function { get; set; } /// /// Additional properties that are not explicitly defined in the schema diff --git a/src/libs/Cohere/Generated/Cohere.Models.Tool2Function.g.cs b/src/libs/Cohere/Generated/Cohere.Models.ToolV2Function.g.cs similarity index 89% rename from src/libs/Cohere/Generated/Cohere.Models.Tool2Function.g.cs rename to src/libs/Cohere/Generated/Cohere.Models.ToolV2Function.g.cs index 14bf15f..c2ef2ec 100644 --- a/src/libs/Cohere/Generated/Cohere.Models.Tool2Function.g.cs +++ b/src/libs/Cohere/Generated/Cohere.Models.ToolV2Function.g.cs @@ -6,7 +6,7 @@ namespace Cohere /// /// The function to be executed. /// - public sealed partial class Tool2Function + public sealed partial class ToolV2Function { /// /// The name of the function. @@ -24,7 +24,7 @@ public sealed partial class Tool2Function /// The parameters of the function as a JSON schema. /// [global::System.Text.Json.Serialization.JsonPropertyName("parameters")] - public global::Cohere.Tool2FunctionParameters? Parameters { get; set; } + public global::Cohere.ToolV2FunctionParameters? Parameters { get; set; } /// /// Additional properties that are not explicitly defined in the schema diff --git a/src/libs/Cohere/Generated/Cohere.Models.Tool2FunctionParameters.g.cs b/src/libs/Cohere/Generated/Cohere.Models.ToolV2FunctionParameters.g.cs similarity index 90% rename from src/libs/Cohere/Generated/Cohere.Models.Tool2FunctionParameters.g.cs rename to src/libs/Cohere/Generated/Cohere.Models.ToolV2FunctionParameters.g.cs index 2f9e4c7..0997097 100644 --- a/src/libs/Cohere/Generated/Cohere.Models.Tool2FunctionParameters.g.cs +++ b/src/libs/Cohere/Generated/Cohere.Models.ToolV2FunctionParameters.g.cs @@ -6,7 +6,7 @@ namespace Cohere /// /// The parameters of the function as a JSON schema. /// - public sealed partial class Tool2FunctionParameters + public sealed partial class ToolV2FunctionParameters { /// diff --git a/src/libs/Cohere/Generated/Cohere.Models.Tool2Type.g.cs b/src/libs/Cohere/Generated/Cohere.Models.ToolV2Type.g.cs similarity index 72% rename from src/libs/Cohere/Generated/Cohere.Models.Tool2Type.g.cs rename to src/libs/Cohere/Generated/Cohere.Models.ToolV2Type.g.cs index dce7078..8b0acc9 100644 --- a/src/libs/Cohere/Generated/Cohere.Models.Tool2Type.g.cs +++ b/src/libs/Cohere/Generated/Cohere.Models.ToolV2Type.g.cs @@ -6,7 +6,7 @@ namespace Cohere /// /// /// - public enum Tool2Type + public enum ToolV2Type { /// /// @@ -17,27 +17,27 @@ public enum Tool2Type /// /// Enum extensions to do fast conversions without the reflection. /// - public static class Tool2TypeExtensions + public static class ToolV2TypeExtensions { /// /// Converts an enum to a string. /// - public static string ToValueString(this Tool2Type value) + public static string ToValueString(this ToolV2Type value) { return value switch { - Tool2Type.Function => "function", + ToolV2Type.Function => "function", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } /// /// Converts an string to a enum. /// - public static Tool2Type? ToEnum(string value) + public static ToolV2Type? ToEnum(string value) { return value switch { - "function" => Tool2Type.Function, + "function" => ToolV2Type.Function, _ => null, }; } diff --git a/src/libs/Cohere/Generated/Cohere.Models.V2EmbedRequest.g.cs b/src/libs/Cohere/Generated/Cohere.Models.V2EmbedRequest.g.cs deleted file mode 100644 index bd37f4b..0000000 --- a/src/libs/Cohere/Generated/Cohere.Models.V2EmbedRequest.g.cs +++ /dev/null @@ -1,166 +0,0 @@ -using System.Linq; -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace Cohere -{ - /// - /// - /// - public readonly partial struct V2EmbedRequest : global::System.IEquatable - { - /// - /// - /// -#if NET6_0_OR_GREATER - public global::Cohere.Texts? Texts { get; init; } -#else - public global::Cohere.Texts? Texts { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Texts))] -#endif - public bool IsTexts => Texts != null; - - /// - /// - /// - public static implicit operator V2EmbedRequest(global::Cohere.Texts value) => new V2EmbedRequest(value); - - /// - /// - /// - public static implicit operator global::Cohere.Texts?(V2EmbedRequest @this) => @this.Texts; - - /// - /// - /// - public V2EmbedRequest(global::Cohere.Texts? value) - { - Texts = value; - } - - /// - /// - /// -#if NET6_0_OR_GREATER - public global::Cohere.Images? Images { get; init; } -#else - public global::Cohere.Images? Images { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Images))] -#endif - public bool IsImages => Images != null; - - /// - /// - /// - public static implicit operator V2EmbedRequest(global::Cohere.Images value) => new V2EmbedRequest(value); - - /// - /// - /// - public static implicit operator global::Cohere.Images?(V2EmbedRequest @this) => @this.Images; - - /// - /// - /// - public V2EmbedRequest(global::Cohere.Images? value) - { - Images = value; - } - - /// - /// - /// - public V2EmbedRequest( - global::Cohere.Texts? texts, - global::Cohere.Images? images - ) - { - Texts = texts; - Images = images; - } - - /// - /// - /// - public object? Object => - Images as object ?? - Texts as object - ; - - /// - /// - /// - public bool Validate() - { - return IsTexts && !IsImages || !IsTexts && IsImages; - } - - /// - /// - /// - public override int GetHashCode() - { - var fields = new object?[] - { - Texts, - typeof(global::Cohere.Texts), - Images, - typeof(global::Cohere.Images), - }; - 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(V2EmbedRequest other) - { - return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Texts, other.Texts) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Images, other.Images) - ; - } - - /// - /// - /// - public static bool operator ==(V2EmbedRequest obj1, V2EmbedRequest obj2) - { - return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); - } - - /// - /// - /// - public static bool operator !=(V2EmbedRequest obj1, V2EmbedRequest obj2) - { - return !(obj1 == obj2); - } - - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is V2EmbedRequest o && Equals(o); - } - } -} diff --git a/src/libs/Cohere/Generated/JsonConverters.ChatMessage2.g.cs b/src/libs/Cohere/Generated/JsonConverters.ChatMessageV2.g.cs similarity index 78% rename from src/libs/Cohere/Generated/JsonConverters.ChatMessage2.g.cs rename to src/libs/Cohere/Generated/JsonConverters.ChatMessageV2.g.cs index 4a1ff40..3f7edbe 100644 --- a/src/libs/Cohere/Generated/JsonConverters.ChatMessage2.g.cs +++ b/src/libs/Cohere/Generated/JsonConverters.ChatMessageV2.g.cs @@ -4,10 +4,10 @@ namespace Cohere.JsonConverters { /// - public class ChatMessage2JsonConverter : global::System.Text.Json.Serialization.JsonConverter + public class ChatMessageV2JsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::Cohere.ChatMessage2 Read( + public override global::Cohere.ChatMessageV2 Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -17,73 +17,73 @@ public class ChatMessage2JsonConverter : global::System.Text.Json.Serialization. var readerCopy = reader; - global::Cohere.UserMessage? userMessage = default; + global::Cohere.UserMessage? user = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Cohere.UserMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Cohere.UserMessage).Name}"); - userMessage = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + user = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::Cohere.AssistantMessage? assistantMessage = default; + global::Cohere.AssistantMessage? assistant = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Cohere.AssistantMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Cohere.AssistantMessage).Name}"); - assistantMessage = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + assistant = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::Cohere.SystemMessage? systemMessage = default; + global::Cohere.SystemMessage? system = default; try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Cohere.SystemMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Cohere.SystemMessage).Name}"); - systemMessage = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + system = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } readerCopy = reader; - global::Cohere.ToolMessage2? tool = default; + global::Cohere.ToolMessageV2? tool = default; try { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Cohere.ToolMessage2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Cohere.ToolMessage2).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Cohere.ToolMessageV2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Cohere.ToolMessageV2).Name}"); tool = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } - var result = new global::Cohere.ChatMessage2( - userMessage, - assistantMessage, - systemMessage, + var result = new global::Cohere.ChatMessageV2( + user, + assistant, + system, tool ); - if (userMessage != null) + if (user != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Cohere.UserMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Cohere.UserMessage).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (assistantMessage != null) + else if (assistant != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Cohere.AssistantMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Cohere.AssistantMessage).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (systemMessage != null) + else if (system != null) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Cohere.SystemMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Cohere.SystemMessage).Name}"); @@ -91,8 +91,8 @@ public class ChatMessage2JsonConverter : global::System.Text.Json.Serialization. } else if (tool != null) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Cohere.ToolMessage2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Cohere.ToolMessage2).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Cohere.ToolMessageV2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Cohere.ToolMessageV2).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } @@ -102,34 +102,34 @@ public class ChatMessage2JsonConverter : global::System.Text.Json.Serialization. /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::Cohere.ChatMessage2 value, + global::Cohere.ChatMessageV2 value, global::System.Text.Json.JsonSerializerOptions options) { options = options ?? throw new global::System.ArgumentNullException(nameof(options)); var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); - if (value.IsUserMessage) + if (value.IsUser) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Cohere.UserMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Cohere.UserMessage).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.UserMessage, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.User, typeInfo); } - else if (value.IsAssistantMessage) + else if (value.IsAssistant) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Cohere.AssistantMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Cohere.AssistantMessage).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantMessage, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Assistant, typeInfo); } - else if (value.IsSystemMessage) + else if (value.IsSystem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Cohere.SystemMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Cohere.SystemMessage).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.SystemMessage, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.System, typeInfo); } else if (value.IsTool) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Cohere.ToolMessage2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Cohere.ToolMessage2).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Cohere.ToolMessageV2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Cohere.ToolMessageV2).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.Tool, typeInfo); } } diff --git a/src/libs/Cohere/Generated/JsonConverters.Embedv2RequestTruncate.g.cs b/src/libs/Cohere/Generated/JsonConverters.Embedv2RequestTruncate.g.cs new file mode 100644 index 0000000..7192f2c --- /dev/null +++ b/src/libs/Cohere/Generated/JsonConverters.Embedv2RequestTruncate.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace Cohere.JsonConverters +{ + /// + public sealed class Embedv2RequestTruncateJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Cohere.Embedv2RequestTruncate Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Cohere.Embedv2RequestTruncateExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Cohere.Embedv2RequestTruncate)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Cohere.Embedv2RequestTruncate value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Cohere.Embedv2RequestTruncateExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Cohere/Generated/JsonConverters.Embedv2RequestTruncateNullable.g.cs b/src/libs/Cohere/Generated/JsonConverters.Embedv2RequestTruncateNullable.g.cs new file mode 100644 index 0000000..c93f411 --- /dev/null +++ b/src/libs/Cohere/Generated/JsonConverters.Embedv2RequestTruncateNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace Cohere.JsonConverters +{ + /// + public sealed class Embedv2RequestTruncateNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Cohere.Embedv2RequestTruncate? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Cohere.Embedv2RequestTruncateExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Cohere.Embedv2RequestTruncate)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Cohere.Embedv2RequestTruncate? 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::Cohere.Embedv2RequestTruncateExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Cohere/Generated/JsonConverters.ToolMessage2Role.g.cs b/src/libs/Cohere/Generated/JsonConverters.LoraTargetModules.g.cs similarity index 70% rename from src/libs/Cohere/Generated/JsonConverters.ToolMessage2Role.g.cs rename to src/libs/Cohere/Generated/JsonConverters.LoraTargetModules.g.cs index 0635fb3..bbb0dbc 100644 --- a/src/libs/Cohere/Generated/JsonConverters.ToolMessage2Role.g.cs +++ b/src/libs/Cohere/Generated/JsonConverters.LoraTargetModules.g.cs @@ -3,10 +3,10 @@ namespace Cohere.JsonConverters { /// - public sealed class ToolMessage2RoleJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class LoraTargetModulesJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::Cohere.ToolMessage2Role Read( + public override global::Cohere.LoraTargetModules Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class ToolMessage2RoleJsonConverter : global::System.Text.Json.Ser var stringValue = reader.GetString(); if (stringValue != null) { - return global::Cohere.ToolMessage2RoleExtensions.ToEnum(stringValue) ?? default; + return global::Cohere.LoraTargetModulesExtensions.ToEnum(stringValue) ?? default; } break; @@ -26,7 +26,7 @@ public sealed class ToolMessage2RoleJsonConverter : global::System.Text.Json.Ser case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::Cohere.ToolMessage2Role)numValue; + return (global::Cohere.LoraTargetModules)numValue; } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -38,12 +38,12 @@ public sealed class ToolMessage2RoleJsonConverter : global::System.Text.Json.Ser /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::Cohere.ToolMessage2Role value, + global::Cohere.LoraTargetModules value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - writer.WriteStringValue(global::Cohere.ToolMessage2RoleExtensions.ToValueString(value)); + writer.WriteStringValue(global::Cohere.LoraTargetModulesExtensions.ToValueString(value)); } } } diff --git a/src/libs/Cohere/Generated/JsonConverters.TextsTruncateNullable.g.cs b/src/libs/Cohere/Generated/JsonConverters.LoraTargetModulesNullable.g.cs similarity index 72% rename from src/libs/Cohere/Generated/JsonConverters.TextsTruncateNullable.g.cs rename to src/libs/Cohere/Generated/JsonConverters.LoraTargetModulesNullable.g.cs index b550376..4585957 100644 --- a/src/libs/Cohere/Generated/JsonConverters.TextsTruncateNullable.g.cs +++ b/src/libs/Cohere/Generated/JsonConverters.LoraTargetModulesNullable.g.cs @@ -3,10 +3,10 @@ namespace Cohere.JsonConverters { /// - public sealed class TextsTruncateNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class LoraTargetModulesNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::Cohere.TextsTruncate? Read( + public override global::Cohere.LoraTargetModules? Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class TextsTruncateNullableJsonConverter : global::System.Text.Jso var stringValue = reader.GetString(); if (stringValue != null) { - return global::Cohere.TextsTruncateExtensions.ToEnum(stringValue); + return global::Cohere.LoraTargetModulesExtensions.ToEnum(stringValue); } break; @@ -26,7 +26,7 @@ public sealed class TextsTruncateNullableJsonConverter : global::System.Text.Jso case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::Cohere.TextsTruncate)numValue; + return (global::Cohere.LoraTargetModules)numValue; } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -38,7 +38,7 @@ public sealed class TextsTruncateNullableJsonConverter : global::System.Text.Jso /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::Cohere.TextsTruncate? value, + global::Cohere.LoraTargetModules? value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); @@ -49,7 +49,7 @@ public override void Write( } else { - writer.WriteStringValue(global::Cohere.TextsTruncateExtensions.ToValueString(value.Value)); + writer.WriteStringValue(global::Cohere.LoraTargetModulesExtensions.ToValueString(value.Value)); } } } diff --git a/src/libs/Cohere/Generated/JsonConverters.ResponseFormatType2.g.cs b/src/libs/Cohere/Generated/JsonConverters.ResponseFormatTypeV2.g.cs similarity index 76% rename from src/libs/Cohere/Generated/JsonConverters.ResponseFormatType2.g.cs rename to src/libs/Cohere/Generated/JsonConverters.ResponseFormatTypeV2.g.cs index 9ff67f3..f050b0f 100644 --- a/src/libs/Cohere/Generated/JsonConverters.ResponseFormatType2.g.cs +++ b/src/libs/Cohere/Generated/JsonConverters.ResponseFormatTypeV2.g.cs @@ -3,10 +3,10 @@ namespace Cohere.JsonConverters { /// - public sealed class ResponseFormatType2JsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class ResponseFormatTypeV2JsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::Cohere.ResponseFormatType2 Read( + public override global::Cohere.ResponseFormatTypeV2 Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class ResponseFormatType2JsonConverter : global::System.Text.Json. var stringValue = reader.GetString(); if (stringValue != null) { - return global::Cohere.ResponseFormatType2Extensions.ToEnum(stringValue) ?? default; + return global::Cohere.ResponseFormatTypeV2Extensions.ToEnum(stringValue) ?? default; } break; @@ -26,7 +26,7 @@ public sealed class ResponseFormatType2JsonConverter : global::System.Text.Json. case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::Cohere.ResponseFormatType2)numValue; + return (global::Cohere.ResponseFormatTypeV2)numValue; } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -38,12 +38,12 @@ public sealed class ResponseFormatType2JsonConverter : global::System.Text.Json. /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::Cohere.ResponseFormatType2 value, + global::Cohere.ResponseFormatTypeV2 value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - writer.WriteStringValue(global::Cohere.ResponseFormatType2Extensions.ToValueString(value)); + writer.WriteStringValue(global::Cohere.ResponseFormatTypeV2Extensions.ToValueString(value)); } } } diff --git a/src/libs/Cohere/Generated/JsonConverters.ResponseFormatType2Nullable.g.cs b/src/libs/Cohere/Generated/JsonConverters.ResponseFormatTypeV2Nullable.g.cs similarity index 77% rename from src/libs/Cohere/Generated/JsonConverters.ResponseFormatType2Nullable.g.cs rename to src/libs/Cohere/Generated/JsonConverters.ResponseFormatTypeV2Nullable.g.cs index 79c1f04..8aa110b 100644 --- a/src/libs/Cohere/Generated/JsonConverters.ResponseFormatType2Nullable.g.cs +++ b/src/libs/Cohere/Generated/JsonConverters.ResponseFormatTypeV2Nullable.g.cs @@ -3,10 +3,10 @@ namespace Cohere.JsonConverters { /// - public sealed class ResponseFormatType2NullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class ResponseFormatTypeV2NullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::Cohere.ResponseFormatType2? Read( + public override global::Cohere.ResponseFormatTypeV2? Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class ResponseFormatType2NullableJsonConverter : global::System.Te var stringValue = reader.GetString(); if (stringValue != null) { - return global::Cohere.ResponseFormatType2Extensions.ToEnum(stringValue); + return global::Cohere.ResponseFormatTypeV2Extensions.ToEnum(stringValue); } break; @@ -26,7 +26,7 @@ public sealed class ResponseFormatType2NullableJsonConverter : global::System.Te case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::Cohere.ResponseFormatType2)numValue; + return (global::Cohere.ResponseFormatTypeV2)numValue; } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -38,7 +38,7 @@ public sealed class ResponseFormatType2NullableJsonConverter : global::System.Te /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::Cohere.ResponseFormatType2? value, + global::Cohere.ResponseFormatTypeV2? value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); @@ -49,7 +49,7 @@ public override void Write( } else { - writer.WriteStringValue(global::Cohere.ResponseFormatType2Extensions.ToValueString(value.Value)); + writer.WriteStringValue(global::Cohere.ResponseFormatTypeV2Extensions.ToValueString(value.Value)); } } } diff --git a/src/libs/Cohere/Generated/JsonConverters.ResponseFormat2.g.cs b/src/libs/Cohere/Generated/JsonConverters.ResponseFormatV2.g.cs similarity index 65% rename from src/libs/Cohere/Generated/JsonConverters.ResponseFormat2.g.cs rename to src/libs/Cohere/Generated/JsonConverters.ResponseFormatV2.g.cs index a2d3640..789ab28 100644 --- a/src/libs/Cohere/Generated/JsonConverters.ResponseFormat2.g.cs +++ b/src/libs/Cohere/Generated/JsonConverters.ResponseFormatV2.g.cs @@ -4,10 +4,10 @@ namespace Cohere.JsonConverters { /// - public class ResponseFormat2JsonConverter : global::System.Text.Json.Serialization.JsonConverter + public class ResponseFormatV2JsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::Cohere.ResponseFormat2 Read( + public override global::Cohere.ResponseFormatV2 Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -17,11 +17,11 @@ public class ResponseFormat2JsonConverter : global::System.Text.Json.Serializati var readerCopy = reader; - global::Cohere.TextResponseFormat2? text = default; + global::Cohere.TextResponseFormatV2? text = default; try { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Cohere.TextResponseFormat2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Cohere.TextResponseFormat2).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Cohere.TextResponseFormatV2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Cohere.TextResponseFormatV2).Name}"); text = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) @@ -29,32 +29,32 @@ public class ResponseFormat2JsonConverter : global::System.Text.Json.Serializati } readerCopy = reader; - global::Cohere.JSONResponseFormat2? jSON = default; + global::Cohere.JsonResponseFormatV2? json = default; try { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Cohere.JSONResponseFormat2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Cohere.JSONResponseFormat2).Name}"); - jSON = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Cohere.JsonResponseFormatV2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Cohere.JsonResponseFormatV2).Name}"); + json = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); } catch (global::System.Text.Json.JsonException) { } - var result = new global::Cohere.ResponseFormat2( + var result = new global::Cohere.ResponseFormatV2( text, - jSON + json ); if (text != null) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Cohere.TextResponseFormat2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Cohere.TextResponseFormat2).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Cohere.TextResponseFormatV2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Cohere.TextResponseFormatV2).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (jSON != null) + else if (json != null) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Cohere.JSONResponseFormat2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Cohere.JSONResponseFormat2).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Cohere.JsonResponseFormatV2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Cohere.JsonResponseFormatV2).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } @@ -64,7 +64,7 @@ public class ResponseFormat2JsonConverter : global::System.Text.Json.Serializati /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::Cohere.ResponseFormat2 value, + global::Cohere.ResponseFormatV2 value, global::System.Text.Json.JsonSerializerOptions options) { options = options ?? throw new global::System.ArgumentNullException(nameof(options)); @@ -72,15 +72,15 @@ public override void Write( if (value.IsText) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Cohere.TextResponseFormat2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Cohere.TextResponseFormat2).Name}"); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Cohere.TextResponseFormatV2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Cohere.TextResponseFormatV2).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeInfo); } - else if (value.IsJSON) + else if (value.IsJson) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Cohere.JSONResponseFormat2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Cohere.JSONResponseFormat2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.JSON, typeInfo); + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Cohere.JsonResponseFormatV2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Cohere.JsonResponseFormatV2).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Json, typeInfo); } } } diff --git a/src/libs/Cohere/Generated/JsonConverters.StreamedChatResponse2.g.cs b/src/libs/Cohere/Generated/JsonConverters.StreamedChatResponseV2.g.cs similarity index 98% rename from src/libs/Cohere/Generated/JsonConverters.StreamedChatResponse2.g.cs rename to src/libs/Cohere/Generated/JsonConverters.StreamedChatResponseV2.g.cs index b2f1d42..6779681 100644 --- a/src/libs/Cohere/Generated/JsonConverters.StreamedChatResponse2.g.cs +++ b/src/libs/Cohere/Generated/JsonConverters.StreamedChatResponseV2.g.cs @@ -4,10 +4,10 @@ namespace Cohere.JsonConverters { /// - public class StreamedChatResponse2JsonConverter : global::System.Text.Json.Serialization.JsonConverter + public class StreamedChatResponseV2JsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::Cohere.StreamedChatResponse2 Read( + public override global::Cohere.StreamedChatResponseV2 Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -124,7 +124,7 @@ public class StreamedChatResponse2JsonConverter : global::System.Text.Json.Seria { } - var result = new global::Cohere.StreamedChatResponse2( + var result = new global::Cohere.StreamedChatResponseV2( messageStartEvent, contentStartEvent, contentDeltaEvent, @@ -197,7 +197,7 @@ public class StreamedChatResponse2JsonConverter : global::System.Text.Json.Seria /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::Cohere.StreamedChatResponse2 value, + global::Cohere.StreamedChatResponseV2 value, global::System.Text.Json.JsonSerializerOptions options) { options = options ?? throw new global::System.ArgumentNullException(nameof(options)); diff --git a/src/libs/Cohere/Generated/JsonConverters.TextsTruncate.g.cs b/src/libs/Cohere/Generated/JsonConverters.ToolCallV2Type.g.cs similarity index 71% rename from src/libs/Cohere/Generated/JsonConverters.TextsTruncate.g.cs rename to src/libs/Cohere/Generated/JsonConverters.ToolCallV2Type.g.cs index 217a8e3..9c13edc 100644 --- a/src/libs/Cohere/Generated/JsonConverters.TextsTruncate.g.cs +++ b/src/libs/Cohere/Generated/JsonConverters.ToolCallV2Type.g.cs @@ -3,10 +3,10 @@ namespace Cohere.JsonConverters { /// - public sealed class TextsTruncateJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class ToolCallV2TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::Cohere.TextsTruncate Read( + public override global::Cohere.ToolCallV2Type Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class TextsTruncateJsonConverter : global::System.Text.Json.Serial var stringValue = reader.GetString(); if (stringValue != null) { - return global::Cohere.TextsTruncateExtensions.ToEnum(stringValue) ?? default; + return global::Cohere.ToolCallV2TypeExtensions.ToEnum(stringValue) ?? default; } break; @@ -26,7 +26,7 @@ public sealed class TextsTruncateJsonConverter : global::System.Text.Json.Serial case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::Cohere.TextsTruncate)numValue; + return (global::Cohere.ToolCallV2Type)numValue; } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -38,12 +38,12 @@ public sealed class TextsTruncateJsonConverter : global::System.Text.Json.Serial /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::Cohere.TextsTruncate value, + global::Cohere.ToolCallV2Type value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - writer.WriteStringValue(global::Cohere.TextsTruncateExtensions.ToValueString(value)); + writer.WriteStringValue(global::Cohere.ToolCallV2TypeExtensions.ToValueString(value)); } } } diff --git a/src/libs/Cohere/Generated/JsonConverters.ToolCall2TypeNullable.g.cs b/src/libs/Cohere/Generated/JsonConverters.ToolCallV2TypeNullable.g.cs similarity index 73% rename from src/libs/Cohere/Generated/JsonConverters.ToolCall2TypeNullable.g.cs rename to src/libs/Cohere/Generated/JsonConverters.ToolCallV2TypeNullable.g.cs index a3cce46..af52dc0 100644 --- a/src/libs/Cohere/Generated/JsonConverters.ToolCall2TypeNullable.g.cs +++ b/src/libs/Cohere/Generated/JsonConverters.ToolCallV2TypeNullable.g.cs @@ -3,10 +3,10 @@ namespace Cohere.JsonConverters { /// - public sealed class ToolCall2TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class ToolCallV2TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::Cohere.ToolCall2Type? Read( + public override global::Cohere.ToolCallV2Type? Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class ToolCall2TypeNullableJsonConverter : global::System.Text.Jso var stringValue = reader.GetString(); if (stringValue != null) { - return global::Cohere.ToolCall2TypeExtensions.ToEnum(stringValue); + return global::Cohere.ToolCallV2TypeExtensions.ToEnum(stringValue); } break; @@ -26,7 +26,7 @@ public sealed class ToolCall2TypeNullableJsonConverter : global::System.Text.Jso case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::Cohere.ToolCall2Type)numValue; + return (global::Cohere.ToolCallV2Type)numValue; } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -38,7 +38,7 @@ public sealed class ToolCall2TypeNullableJsonConverter : global::System.Text.Jso /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::Cohere.ToolCall2Type? value, + global::Cohere.ToolCallV2Type? value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); @@ -49,7 +49,7 @@ public override void Write( } else { - writer.WriteStringValue(global::Cohere.ToolCall2TypeExtensions.ToValueString(value.Value)); + writer.WriteStringValue(global::Cohere.ToolCallV2TypeExtensions.ToValueString(value.Value)); } } } diff --git a/src/libs/Cohere/Generated/JsonConverters.ToolCall2Type.g.cs b/src/libs/Cohere/Generated/JsonConverters.ToolMessageV2Role.g.cs similarity index 70% rename from src/libs/Cohere/Generated/JsonConverters.ToolCall2Type.g.cs rename to src/libs/Cohere/Generated/JsonConverters.ToolMessageV2Role.g.cs index 20cefc8..1d2be2c 100644 --- a/src/libs/Cohere/Generated/JsonConverters.ToolCall2Type.g.cs +++ b/src/libs/Cohere/Generated/JsonConverters.ToolMessageV2Role.g.cs @@ -3,10 +3,10 @@ namespace Cohere.JsonConverters { /// - public sealed class ToolCall2TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class ToolMessageV2RoleJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::Cohere.ToolCall2Type Read( + public override global::Cohere.ToolMessageV2Role Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class ToolCall2TypeJsonConverter : global::System.Text.Json.Serial var stringValue = reader.GetString(); if (stringValue != null) { - return global::Cohere.ToolCall2TypeExtensions.ToEnum(stringValue) ?? default; + return global::Cohere.ToolMessageV2RoleExtensions.ToEnum(stringValue) ?? default; } break; @@ -26,7 +26,7 @@ public sealed class ToolCall2TypeJsonConverter : global::System.Text.Json.Serial case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::Cohere.ToolCall2Type)numValue; + return (global::Cohere.ToolMessageV2Role)numValue; } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -38,12 +38,12 @@ public sealed class ToolCall2TypeJsonConverter : global::System.Text.Json.Serial /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::Cohere.ToolCall2Type value, + global::Cohere.ToolMessageV2Role value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - writer.WriteStringValue(global::Cohere.ToolCall2TypeExtensions.ToValueString(value)); + writer.WriteStringValue(global::Cohere.ToolMessageV2RoleExtensions.ToValueString(value)); } } } diff --git a/src/libs/Cohere/Generated/JsonConverters.ToolMessage2RoleNullable.g.cs b/src/libs/Cohere/Generated/JsonConverters.ToolMessageV2RoleNullable.g.cs similarity index 75% rename from src/libs/Cohere/Generated/JsonConverters.ToolMessage2RoleNullable.g.cs rename to src/libs/Cohere/Generated/JsonConverters.ToolMessageV2RoleNullable.g.cs index 3a093ad..3981ae1 100644 --- a/src/libs/Cohere/Generated/JsonConverters.ToolMessage2RoleNullable.g.cs +++ b/src/libs/Cohere/Generated/JsonConverters.ToolMessageV2RoleNullable.g.cs @@ -3,10 +3,10 @@ namespace Cohere.JsonConverters { /// - public sealed class ToolMessage2RoleNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class ToolMessageV2RoleNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::Cohere.ToolMessage2Role? Read( + public override global::Cohere.ToolMessageV2Role? Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class ToolMessage2RoleNullableJsonConverter : global::System.Text. var stringValue = reader.GetString(); if (stringValue != null) { - return global::Cohere.ToolMessage2RoleExtensions.ToEnum(stringValue); + return global::Cohere.ToolMessageV2RoleExtensions.ToEnum(stringValue); } break; @@ -26,7 +26,7 @@ public sealed class ToolMessage2RoleNullableJsonConverter : global::System.Text. case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::Cohere.ToolMessage2Role)numValue; + return (global::Cohere.ToolMessageV2Role)numValue; } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -38,7 +38,7 @@ public sealed class ToolMessage2RoleNullableJsonConverter : global::System.Text. /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::Cohere.ToolMessage2Role? value, + global::Cohere.ToolMessageV2Role? value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); @@ -49,7 +49,7 @@ public override void Write( } else { - writer.WriteStringValue(global::Cohere.ToolMessage2RoleExtensions.ToValueString(value.Value)); + writer.WriteStringValue(global::Cohere.ToolMessageV2RoleExtensions.ToValueString(value.Value)); } } } diff --git a/src/libs/Cohere/Generated/JsonConverters.Tool2Type.g.cs b/src/libs/Cohere/Generated/JsonConverters.ToolV2Type.g.cs similarity index 72% rename from src/libs/Cohere/Generated/JsonConverters.Tool2Type.g.cs rename to src/libs/Cohere/Generated/JsonConverters.ToolV2Type.g.cs index 2d8c1ea..4b534a0 100644 --- a/src/libs/Cohere/Generated/JsonConverters.Tool2Type.g.cs +++ b/src/libs/Cohere/Generated/JsonConverters.ToolV2Type.g.cs @@ -3,10 +3,10 @@ namespace Cohere.JsonConverters { /// - public sealed class Tool2TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class ToolV2TypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::Cohere.Tool2Type Read( + public override global::Cohere.ToolV2Type Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class Tool2TypeJsonConverter : global::System.Text.Json.Serializat var stringValue = reader.GetString(); if (stringValue != null) { - return global::Cohere.Tool2TypeExtensions.ToEnum(stringValue) ?? default; + return global::Cohere.ToolV2TypeExtensions.ToEnum(stringValue) ?? default; } break; @@ -26,7 +26,7 @@ public sealed class Tool2TypeJsonConverter : global::System.Text.Json.Serializat case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::Cohere.Tool2Type)numValue; + return (global::Cohere.ToolV2Type)numValue; } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -38,12 +38,12 @@ public sealed class Tool2TypeJsonConverter : global::System.Text.Json.Serializat /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::Cohere.Tool2Type value, + global::Cohere.ToolV2Type value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - writer.WriteStringValue(global::Cohere.Tool2TypeExtensions.ToValueString(value)); + writer.WriteStringValue(global::Cohere.ToolV2TypeExtensions.ToValueString(value)); } } } diff --git a/src/libs/Cohere/Generated/JsonConverters.Tool2TypeNullable.g.cs b/src/libs/Cohere/Generated/JsonConverters.ToolV2TypeNullable.g.cs similarity index 74% rename from src/libs/Cohere/Generated/JsonConverters.Tool2TypeNullable.g.cs rename to src/libs/Cohere/Generated/JsonConverters.ToolV2TypeNullable.g.cs index 46843b9..6c223ad 100644 --- a/src/libs/Cohere/Generated/JsonConverters.Tool2TypeNullable.g.cs +++ b/src/libs/Cohere/Generated/JsonConverters.ToolV2TypeNullable.g.cs @@ -3,10 +3,10 @@ namespace Cohere.JsonConverters { /// - public sealed class Tool2TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class ToolV2TypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::Cohere.Tool2Type? Read( + public override global::Cohere.ToolV2Type? Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class Tool2TypeNullableJsonConverter : global::System.Text.Json.Se var stringValue = reader.GetString(); if (stringValue != null) { - return global::Cohere.Tool2TypeExtensions.ToEnum(stringValue); + return global::Cohere.ToolV2TypeExtensions.ToEnum(stringValue); } break; @@ -26,7 +26,7 @@ public sealed class Tool2TypeNullableJsonConverter : global::System.Text.Json.Se case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::Cohere.Tool2Type)numValue; + return (global::Cohere.ToolV2Type)numValue; } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -38,7 +38,7 @@ public sealed class Tool2TypeNullableJsonConverter : global::System.Text.Json.Se /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::Cohere.Tool2Type? value, + global::Cohere.ToolV2Type? value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); @@ -49,7 +49,7 @@ public override void Write( } else { - writer.WriteStringValue(global::Cohere.Tool2TypeExtensions.ToValueString(value.Value)); + writer.WriteStringValue(global::Cohere.ToolV2TypeExtensions.ToValueString(value.Value)); } } } diff --git a/src/libs/Cohere/Generated/JsonConverters.V2EmbedRequest.g.cs b/src/libs/Cohere/Generated/JsonConverters.V2EmbedRequest.g.cs deleted file mode 100644 index d77d9f5..0000000 --- a/src/libs/Cohere/Generated/JsonConverters.V2EmbedRequest.g.cs +++ /dev/null @@ -1,87 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 // Type or member is obsolete - -namespace Cohere.JsonConverters -{ - /// - public class V2EmbedRequestJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Cohere.V2EmbedRequest Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); - var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); - - var - readerCopy = reader; - global::Cohere.Texts? texts = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Cohere.Texts), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Cohere.Texts).Name}"); - texts = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - readerCopy = reader; - global::Cohere.Images? images = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Cohere.Images), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Cohere.Images).Name}"); - images = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - - var result = new global::Cohere.V2EmbedRequest( - texts, - images - ); - - if (texts != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Cohere.Texts), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Cohere.Texts).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - else if (images != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Cohere.Images), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Cohere.Images).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } - - return result; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Cohere.V2EmbedRequest value, - global::System.Text.Json.JsonSerializerOptions options) - { - options = options ?? throw new global::System.ArgumentNullException(nameof(options)); - var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); - - if (value.IsTexts) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Cohere.Texts), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Cohere.Texts).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Texts, typeInfo); - } - else if (value.IsImages) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Cohere.Images), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Cohere.Images).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Images, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/Cohere/Generated/JsonSerializerContext.g.cs b/src/libs/Cohere/Generated/JsonSerializerContext.g.cs index 3352188..abd8b79 100644 --- a/src/libs/Cohere/Generated/JsonSerializerContext.g.cs +++ b/src/libs/Cohere/Generated/JsonSerializerContext.g.cs @@ -27,22 +27,22 @@ namespace Cohere typeof(global::Cohere.JsonConverters.TextContentTypeNullableJsonConverter), typeof(global::Cohere.JsonConverters.UserMessageRoleJsonConverter), typeof(global::Cohere.JsonConverters.UserMessageRoleNullableJsonConverter), - typeof(global::Cohere.JsonConverters.ToolCall2TypeJsonConverter), - typeof(global::Cohere.JsonConverters.ToolCall2TypeNullableJsonConverter), + typeof(global::Cohere.JsonConverters.ToolCallV2TypeJsonConverter), + typeof(global::Cohere.JsonConverters.ToolCallV2TypeNullableJsonConverter), typeof(global::Cohere.JsonConverters.AssistantMessageRoleJsonConverter), typeof(global::Cohere.JsonConverters.AssistantMessageRoleNullableJsonConverter), typeof(global::Cohere.JsonConverters.SystemMessageRoleJsonConverter), typeof(global::Cohere.JsonConverters.SystemMessageRoleNullableJsonConverter), typeof(global::Cohere.JsonConverters.DocumentContentTypeJsonConverter), typeof(global::Cohere.JsonConverters.DocumentContentTypeNullableJsonConverter), - typeof(global::Cohere.JsonConverters.ToolMessage2RoleJsonConverter), - typeof(global::Cohere.JsonConverters.ToolMessage2RoleNullableJsonConverter), - typeof(global::Cohere.JsonConverters.Tool2TypeJsonConverter), - typeof(global::Cohere.JsonConverters.Tool2TypeNullableJsonConverter), + typeof(global::Cohere.JsonConverters.ToolMessageV2RoleJsonConverter), + typeof(global::Cohere.JsonConverters.ToolMessageV2RoleNullableJsonConverter), + typeof(global::Cohere.JsonConverters.ToolV2TypeJsonConverter), + typeof(global::Cohere.JsonConverters.ToolV2TypeNullableJsonConverter), typeof(global::Cohere.JsonConverters.CitationOptionsModeJsonConverter), typeof(global::Cohere.JsonConverters.CitationOptionsModeNullableJsonConverter), - typeof(global::Cohere.JsonConverters.ResponseFormatType2JsonConverter), - typeof(global::Cohere.JsonConverters.ResponseFormatType2NullableJsonConverter), + typeof(global::Cohere.JsonConverters.ResponseFormatTypeV2JsonConverter), + typeof(global::Cohere.JsonConverters.ResponseFormatTypeV2NullableJsonConverter), typeof(global::Cohere.JsonConverters.ChatFinishReasonJsonConverter), typeof(global::Cohere.JsonConverters.ChatFinishReasonNullableJsonConverter), typeof(global::Cohere.JsonConverters.AssistantMessageResponseRoleJsonConverter), @@ -65,8 +65,6 @@ namespace Cohere typeof(global::Cohere.JsonConverters.EmbedFloatsResponseResponseTypeNullableJsonConverter), typeof(global::Cohere.JsonConverters.EmbedByTypeResponseResponseTypeJsonConverter), typeof(global::Cohere.JsonConverters.EmbedByTypeResponseResponseTypeNullableJsonConverter), - typeof(global::Cohere.JsonConverters.TextsTruncateJsonConverter), - typeof(global::Cohere.JsonConverters.TextsTruncateNullableJsonConverter), typeof(global::Cohere.JsonConverters.EmbedJobStatusJsonConverter), typeof(global::Cohere.JsonConverters.EmbedJobStatusNullableJsonConverter), typeof(global::Cohere.JsonConverters.EmbedJobTruncateJsonConverter), @@ -91,6 +89,8 @@ namespace Cohere typeof(global::Cohere.JsonConverters.BaseTypeNullableJsonConverter), typeof(global::Cohere.JsonConverters.StrategyJsonConverter), typeof(global::Cohere.JsonConverters.StrategyNullableJsonConverter), + typeof(global::Cohere.JsonConverters.LoraTargetModulesJsonConverter), + typeof(global::Cohere.JsonConverters.LoraTargetModulesNullableJsonConverter), typeof(global::Cohere.JsonConverters.StatusJsonConverter), typeof(global::Cohere.JsonConverters.StatusNullableJsonConverter), typeof(global::Cohere.JsonConverters.ChatRequestPromptTruncationJsonConverter), @@ -107,6 +107,8 @@ namespace Cohere typeof(global::Cohere.JsonConverters.GenerateRequestReturnLikelihoodsNullableJsonConverter), typeof(global::Cohere.JsonConverters.EmbedRequestTruncateJsonConverter), typeof(global::Cohere.JsonConverters.EmbedRequestTruncateNullableJsonConverter), + typeof(global::Cohere.JsonConverters.Embedv2RequestTruncateJsonConverter), + typeof(global::Cohere.JsonConverters.Embedv2RequestTruncateNullableJsonConverter), typeof(global::Cohere.JsonConverters.ClassifyRequestTruncateJsonConverter), typeof(global::Cohere.JsonConverters.ClassifyRequestTruncateNullableJsonConverter), typeof(global::Cohere.JsonConverters.SummarizeRequestLengthJsonConverter), @@ -135,8 +137,8 @@ namespace Cohere typeof(global::Cohere.JsonConverters.SourceJsonConverter), typeof(global::Cohere.JsonConverters.OneOfJsonConverterFactory1), typeof(global::Cohere.JsonConverters.ToolContentJsonConverter), - typeof(global::Cohere.JsonConverters.ChatMessage2JsonConverter), - typeof(global::Cohere.JsonConverters.ResponseFormat2JsonConverter), + typeof(global::Cohere.JsonConverters.ChatMessageV2JsonConverter), + typeof(global::Cohere.JsonConverters.ResponseFormatV2JsonConverter), typeof(global::Cohere.JsonConverters.ChatMessageStartEventJsonConverter), typeof(global::Cohere.JsonConverters.ChatContentStartEventJsonConverter), typeof(global::Cohere.JsonConverters.ChatContentDeltaEventJsonConverter), @@ -148,12 +150,11 @@ namespace Cohere typeof(global::Cohere.JsonConverters.CitationStartEventJsonConverter), typeof(global::Cohere.JsonConverters.CitationEndEventJsonConverter), typeof(global::Cohere.JsonConverters.ChatMessageEndEventJsonConverter), - typeof(global::Cohere.JsonConverters.StreamedChatResponse2JsonConverter), + typeof(global::Cohere.JsonConverters.StreamedChatResponseV2JsonConverter), typeof(global::Cohere.JsonConverters.GenerateStreamTextJsonConverter), typeof(global::Cohere.JsonConverters.GenerateStreamEndJsonConverter), typeof(global::Cohere.JsonConverters.GenerateStreamErrorJsonConverter), typeof(global::Cohere.JsonConverters.GenerateStreamedResponseJsonConverter), - typeof(global::Cohere.JsonConverters.V2EmbedRequestJsonConverter), })] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Cohere.JsonSerializerContextTypes))] diff --git a/src/libs/Cohere/Generated/JsonSerializerContextTypes.g.cs b/src/libs/Cohere/Generated/JsonSerializerContextTypes.g.cs index 14449c7..8326685 100644 --- a/src/libs/Cohere/Generated/JsonSerializerContextTypes.g.cs +++ b/src/libs/Cohere/Generated/JsonSerializerContextTypes.g.cs @@ -293,15 +293,15 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Cohere.ToolCall2? Type70 { get; set; } + public global::Cohere.ToolCallV2? Type70 { get; set; } /// /// /// - public global::Cohere.ToolCall2Type? Type71 { get; set; } + public global::Cohere.ToolCallV2Type? Type71 { get; set; } /// /// /// - public global::Cohere.ToolCall2Function? Type72 { get; set; } + public global::Cohere.ToolCallV2Function? Type72 { get; set; } /// /// /// @@ -341,7 +341,7 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::System.Collections.Generic.IList? Type82 { get; set; } + public global::System.Collections.Generic.IList? Type82 { get; set; } /// /// /// @@ -389,11 +389,11 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Cohere.ToolMessage2? Type94 { get; set; } + public global::Cohere.ToolMessageV2? Type94 { get; set; } /// /// /// - public global::Cohere.ToolMessage2Role? Type95 { get; set; } + public global::Cohere.ToolMessageV2Role? Type95 { get; set; } /// /// /// @@ -405,27 +405,27 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Cohere.ChatMessage2? Type98 { get; set; } + public global::Cohere.ChatMessageV2? Type98 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type99 { get; set; } + public global::System.Collections.Generic.IList? Type99 { get; set; } /// /// /// - public global::Cohere.Tool2? Type100 { get; set; } + public global::Cohere.ToolV2? Type100 { get; set; } /// /// /// - public global::Cohere.Tool2Type? Type101 { get; set; } + public global::Cohere.ToolV2Type? Type101 { get; set; } /// /// /// - public global::Cohere.Tool2Function? Type102 { get; set; } + public global::Cohere.ToolV2Function? Type102 { get; set; } /// /// /// - public global::Cohere.Tool2FunctionParameters? Type103 { get; set; } + public global::Cohere.ToolV2FunctionParameters? Type103 { get; set; } /// /// /// @@ -437,23 +437,23 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Cohere.ResponseFormatType2? Type106 { get; set; } + public global::Cohere.ResponseFormatTypeV2? Type106 { get; set; } /// /// /// - public global::Cohere.TextResponseFormat2? Type107 { get; set; } + public global::Cohere.TextResponseFormatV2? Type107 { get; set; } /// /// /// - public global::Cohere.JSONResponseFormat2? Type108 { get; set; } + public global::Cohere.JsonResponseFormatV2? Type108 { get; set; } /// /// /// - public global::Cohere.JSONResponseFormat2JsonSchema? Type109 { get; set; } + public global::Cohere.JsonResponseFormatV2JsonSchema? Type109 { get; set; } /// /// /// - public global::Cohere.ResponseFormat2? Type110 { get; set; } + public global::Cohere.ResponseFormatV2? Type110 { get; set; } /// /// /// @@ -481,7 +481,7 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Cohere.NonStreamedChatResponse2? Type117 { get; set; } + public global::Cohere.ChatResponse? Type117 { get; set; } /// /// /// @@ -665,7 +665,7 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Cohere.StreamedChatResponse2? Type163 { get; set; } + public global::Cohere.StreamedChatResponseV2? Type163 { get; set; } /// /// /// @@ -781,443 +781,443 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Cohere.Texts? Type192 { get; set; } + public global::Cohere.EmbedJob? Type192 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type193 { get; set; } + public global::Cohere.EmbedJobStatus? Type193 { get; set; } /// /// /// - public global::Cohere.TextsTruncate? Type194 { get; set; } + public global::System.DateTime? Type194 { get; set; } /// /// /// - public global::Cohere.Images? Type195 { get; set; } + public global::Cohere.EmbedJobTruncate? Type195 { get; set; } /// /// /// - public global::Cohere.V2EmbedRequest? Type196 { get; set; } + public global::Cohere.ListEmbedJobResponse? Type196 { get; set; } /// /// /// - public global::Cohere.EmbedJob? Type197 { get; set; } + public global::System.Collections.Generic.IList? Type197 { get; set; } /// /// /// - public global::Cohere.EmbedJobStatus? Type198 { get; set; } + public global::Cohere.CreateEmbedJobRequest? Type198 { get; set; } /// /// /// - public global::System.DateTime? Type199 { get; set; } + public global::System.Collections.Generic.IList? Type199 { get; set; } /// /// /// - public global::Cohere.EmbedJobTruncate? Type200 { get; set; } + public global::Cohere.CreateEmbedJobRequestTruncate? Type200 { get; set; } /// /// /// - public global::Cohere.ListEmbedJobResponse? Type201 { get; set; } + public global::Cohere.CreateEmbedJobResponse? Type201 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type202 { get; set; } + public global::Cohere.RerankDocument? Type202 { get; set; } /// /// /// - public global::Cohere.CreateEmbedJobRequest? Type203 { get; set; } + public global::Cohere.ClassifyExample? Type203 { get; set; } /// /// /// - public global::Cohere.CreateEmbedJobRequestTruncate? Type204 { get; set; } + public global::Cohere.DatasetValidationStatus? Type204 { get; set; } /// /// /// - public global::Cohere.CreateEmbedJobResponse? Type205 { get; set; } + public global::Cohere.DatasetType? Type205 { get; set; } /// /// /// - public global::Cohere.RerankDocument? Type206 { get; set; } + public global::Cohere.DatasetPart? Type206 { get; set; } /// /// /// - public global::Cohere.ClassifyExample? Type207 { get; set; } + public global::Cohere.ParseInfo? Type207 { get; set; } /// /// /// - public global::Cohere.DatasetValidationStatus? Type208 { get; set; } + public global::Cohere.RerankerDataMetrics? Type208 { get; set; } /// /// /// - public global::Cohere.DatasetType? Type209 { get; set; } + public global::Cohere.ChatDataMetrics? Type209 { get; set; } /// /// /// - public global::Cohere.DatasetPart? Type210 { get; set; } + public global::Cohere.LabelMetric? Type210 { get; set; } /// /// /// - public global::Cohere.ParseInfo? Type211 { get; set; } + public global::Cohere.ClassifyDataMetrics? Type211 { get; set; } /// /// /// - public global::Cohere.RerankerDataMetrics? Type212 { get; set; } + public global::System.Collections.Generic.IList? Type212 { get; set; } /// /// /// - public global::Cohere.ChatDataMetrics? Type213 { get; set; } + public global::Cohere.FinetuneDatasetMetrics? Type213 { get; set; } /// /// /// - public global::Cohere.LabelMetric? Type214 { get; set; } + public global::Cohere.Metrics? Type214 { get; set; } /// /// /// - public global::Cohere.ClassifyDataMetrics? Type215 { get; set; } + public global::Cohere.Dataset? Type215 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type216 { get; set; } + public global::System.Collections.Generic.IList? Type216 { get; set; } /// /// /// - public global::Cohere.FinetuneDatasetMetrics? Type217 { get; set; } + public global::Cohere.ConnectorOAuth? Type217 { get; set; } /// /// /// - public global::Cohere.Metrics? Type218 { get; set; } + public global::Cohere.Connector? Type218 { get; set; } /// /// /// - public global::Cohere.Dataset? Type219 { get; set; } + public global::Cohere.ConnectorAuthStatus? Type219 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type220 { get; set; } + public global::Cohere.ListConnectorsResponse? Type220 { get; set; } /// /// /// - public global::Cohere.ConnectorOAuth? Type221 { get; set; } + public global::System.Collections.Generic.IList? Type221 { get; set; } /// /// /// - public global::Cohere.Connector? Type222 { get; set; } + public global::Cohere.CreateConnectorOAuth? Type222 { get; set; } /// /// /// - public global::Cohere.ConnectorAuthStatus? Type223 { get; set; } + public global::Cohere.AuthTokenType? Type223 { get; set; } /// /// /// - public global::Cohere.ListConnectorsResponse? Type224 { get; set; } + public global::Cohere.CreateConnectorServiceAuth? Type224 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type225 { get; set; } + public global::Cohere.CreateConnectorRequest? Type225 { get; set; } /// /// /// - public global::Cohere.CreateConnectorOAuth? Type226 { get; set; } + public global::Cohere.CreateConnectorResponse? Type226 { get; set; } /// /// /// - public global::Cohere.AuthTokenType? Type227 { get; set; } + public global::Cohere.GetConnectorResponse? Type227 { get; set; } /// /// /// - public global::Cohere.CreateConnectorServiceAuth? Type228 { get; set; } + public global::Cohere.DeleteConnectorResponse? Type228 { get; set; } /// /// /// - public global::Cohere.CreateConnectorRequest? Type229 { get; set; } + public global::Cohere.UpdateConnectorRequest? Type229 { get; set; } /// /// /// - public global::Cohere.CreateConnectorResponse? Type230 { get; set; } + public global::Cohere.UpdateConnectorResponse? Type230 { get; set; } /// /// /// - public global::Cohere.GetConnectorResponse? Type231 { get; set; } + public global::Cohere.OAuthAuthorizeResponse? Type231 { get; set; } /// /// /// - public global::Cohere.DeleteConnectorResponse? Type232 { get; set; } + public global::Cohere.ConnectorLog? Type232 { get; set; } /// /// /// - public global::Cohere.UpdateConnectorRequest? Type233 { get; set; } + public global::Cohere.GetConnectorsLogsResponse? Type233 { get; set; } /// /// /// - public global::Cohere.UpdateConnectorResponse? Type234 { get; set; } + public global::System.Collections.Generic.IList? Type234 { get; set; } /// /// /// - public global::Cohere.OAuthAuthorizeResponse? Type235 { get; set; } + public global::Cohere.TokenLikelihood? Type235 { get; set; } /// /// /// - public global::Cohere.ConnectorLog? Type236 { get; set; } + public global::Cohere.LogLikelihoodResponse? Type236 { get; set; } /// /// /// - public global::Cohere.GetConnectorsLogsResponse? Type237 { get; set; } + public global::System.Collections.Generic.IList? Type237 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type238 { get; set; } + public global::Cohere.Cluster? Type238 { get; set; } /// /// /// - public global::Cohere.TokenLikelihood? Type239 { get; set; } + public global::Cohere.GetClusterJobResponse? Type239 { get; set; } /// /// /// - public global::Cohere.LogLikelihoodResponse? Type240 { get; set; } + public global::Cohere.GetClusterJobResponseStatus? Type240 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type241 { get; set; } + public global::System.Collections.Generic.IList? Type241 { get; set; } /// /// /// - public global::Cohere.Cluster? Type242 { get; set; } + public global::Cohere.ListClusterJobsResponse? Type242 { get; set; } /// /// /// - public global::Cohere.GetClusterJobResponse? Type243 { get; set; } + public global::System.Collections.Generic.IList? Type243 { get; set; } /// /// /// - public global::Cohere.GetClusterJobResponseStatus? Type244 { get; set; } + public global::Cohere.CreateClusterJobRequest? Type244 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type245 { get; set; } + public global::Cohere.CreateClusterJobResponse? Type245 { get; set; } /// /// /// - public global::Cohere.ListClusterJobsResponse? Type246 { get; set; } + public global::Cohere.UpdateClusterJobRequest? Type246 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type247 { get; set; } + public global::Cohere.UpdateClusterJobRequestStatus? Type247 { get; set; } /// /// /// - public global::Cohere.CreateClusterJobRequest? Type248 { get; set; } + public global::Cohere.UpdateClusterJobRequestInputTrackingMetrics? Type248 { get; set; } /// /// /// - public global::Cohere.CreateClusterJobResponse? Type249 { get; set; } + public global::Cohere.UpdateClusterJobRequestOutputTrackingMetrics? Type249 { get; set; } /// /// /// - public global::Cohere.UpdateClusterJobRequest? Type250 { get; set; } + public global::Cohere.UpdateClusterJobResponse? Type250 { get; set; } /// /// /// - public global::Cohere.UpdateClusterJobRequestStatus? Type251 { get; set; } + public global::Cohere.CompatibleEndpoint? Type251 { get; set; } /// /// /// - public global::Cohere.UpdateClusterJobRequestInputTrackingMetrics? Type252 { get; set; } + public global::Cohere.GetModelResponse? Type252 { get; set; } /// /// /// - public global::Cohere.UpdateClusterJobRequestOutputTrackingMetrics? Type253 { get; set; } + public global::System.Collections.Generic.IList? Type253 { get; set; } /// /// /// - public global::Cohere.UpdateClusterJobResponse? Type254 { get; set; } + public global::Cohere.ListModelsResponse? Type254 { get; set; } /// /// /// - public global::Cohere.CompatibleEndpoint? Type255 { get; set; } + public global::System.Collections.Generic.IList? Type255 { get; set; } /// /// /// - public global::Cohere.GetModelResponse? Type256 { get; set; } + public global::Cohere.BaseType? Type256 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type257 { get; set; } + public global::Cohere.Strategy? Type257 { get; set; } /// /// /// - public global::Cohere.ListModelsResponse? Type258 { get; set; } + public global::Cohere.BaseModel? Type258 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type259 { get; set; } + public global::Cohere.LoraTargetModules? Type259 { get; set; } /// /// /// - public global::Cohere.BaseType? Type260 { get; set; } + public global::Cohere.Hyperparameters? Type260 { get; set; } /// /// /// - public global::Cohere.Strategy? Type261 { get; set; } + public global::Cohere.WandbConfig? Type261 { get; set; } /// /// /// - public global::Cohere.BaseModel? Type262 { get; set; } + public global::Cohere.Settings? Type262 { get; set; } /// /// /// - public global::Cohere.Hyperparameters? Type263 { get; set; } + public global::Cohere.Status? Type263 { get; set; } /// /// /// - public global::Cohere.WandbConfig? Type264 { get; set; } + public global::Cohere.FinetunedModel? Type264 { get; set; } /// /// /// - public global::Cohere.Settings? Type265 { get; set; } + public global::Cohere.ListFinetunedModelsResponse? Type265 { get; set; } /// /// /// - public global::Cohere.Status? Type266 { get; set; } + public global::System.Collections.Generic.IList? Type266 { get; set; } /// /// /// - public global::Cohere.FinetunedModel? Type267 { get; set; } + public global::Cohere.Error? Type267 { get; set; } /// /// /// - public global::Cohere.ListFinetunedModelsResponse? Type268 { get; set; } + public global::Cohere.CreateFinetunedModelResponse? Type268 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type269 { get; set; } + public global::Cohere.GetFinetunedModelResponse? Type269 { get; set; } /// /// /// - public global::Cohere.Error? Type270 { get; set; } + public global::Cohere.DeleteFinetunedModelResponse? Type270 { get; set; } /// /// /// - public global::Cohere.CreateFinetunedModelResponse? Type271 { get; set; } + public global::Cohere.UpdateFinetunedModelResponse? Type271 { get; set; } /// /// /// - public global::Cohere.GetFinetunedModelResponse? Type272 { get; set; } + public global::Cohere.Event? Type272 { get; set; } /// /// /// - public global::Cohere.DeleteFinetunedModelResponse? Type273 { get; set; } + public global::Cohere.ListEventsResponse? Type273 { get; set; } /// /// /// - public global::Cohere.UpdateFinetunedModelResponse? Type274 { get; set; } + public global::System.Collections.Generic.IList? Type274 { get; set; } /// /// /// - public global::Cohere.Event? Type275 { get; set; } + public global::Cohere.TrainingStepMetrics? Type275 { get; set; } /// /// /// - public global::Cohere.ListEventsResponse? Type276 { get; set; } + public global::Cohere.TrainingStepMetricsMetrics? Type276 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type277 { get; set; } + public global::Cohere.ListTrainingStepMetricsResponse? Type277 { get; set; } /// /// /// - public global::Cohere.TrainingStepMetrics? Type278 { get; set; } + public global::System.Collections.Generic.IList? Type278 { get; set; } /// /// /// - public global::Cohere.TrainingStepMetricsMetrics? Type279 { get; set; } + public global::Cohere.ChatRequest? Type279 { get; set; } /// /// /// - public global::Cohere.ListTrainingStepMetricsResponse? Type280 { get; set; } + public global::Cohere.ChatRequestPromptTruncation? Type280 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type281 { get; set; } + public global::System.Collections.Generic.IList? Type281 { get; set; } /// /// /// - public global::Cohere.ChatRequest? Type282 { get; set; } + public global::Cohere.ChatRequestCitationQuality? Type282 { get; set; } /// /// /// - public global::Cohere.ChatRequestPromptTruncation? Type283 { get; set; } + public float? Type283 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type284 { get; set; } + public global::System.Collections.Generic.IList? Type284 { get; set; } /// /// /// - public global::Cohere.ChatRequestCitationQuality? Type285 { get; set; } + public global::Cohere.ChatRequestSafetyMode? Type285 { get; set; } /// /// /// - public float? Type286 { get; set; } + public global::Cohere.Chatv2Request? Type286 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type287 { get; set; } + public global::System.Collections.Generic.IList? Type287 { get; set; } /// /// /// - public global::Cohere.ChatRequestSafetyMode? Type288 { get; set; } + public global::System.Collections.Generic.IList>? Type288 { get; set; } /// /// /// - public global::Cohere.Chatv2Request? Type289 { get; set; } + public global::Cohere.OneOf? Type289 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type290 { get; set; } + public global::Cohere.Chatv2RequestSafetyMode? Type290 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type291 { get; set; } + public global::Cohere.GenerateRequest? Type291 { get; set; } /// /// /// - public global::Cohere.OneOf? Type292 { get; set; } + public global::Cohere.GenerateRequestTruncate? Type292 { get; set; } /// /// /// - public global::Cohere.Chatv2RequestSafetyMode? Type293 { get; set; } + public global::Cohere.GenerateRequestReturnLikelihoods? Type293 { get; set; } /// /// /// - public global::Cohere.GenerateRequest? Type294 { get; set; } + public global::Cohere.EmbedRequest? Type294 { get; set; } /// /// /// - public global::Cohere.GenerateRequestTruncate? Type295 { get; set; } + public global::Cohere.EmbedRequestTruncate? Type295 { get; set; } /// /// /// - public global::Cohere.GenerateRequestReturnLikelihoods? Type296 { get; set; } + public global::Cohere.Embedv2Request? Type296 { get; set; } /// /// /// - public global::Cohere.EmbedRequest? Type297 { get; set; } + public global::Cohere.Embedv2RequestTruncate? Type297 { get; set; } /// /// /// - public global::Cohere.EmbedRequestTruncate? Type298 { get; set; } + public global::Cohere.RerankRequest? Type298 { get; set; } /// /// /// - public global::Cohere.RerankRequest? Type299 { get; set; } + public global::System.Collections.Generic.IList>? Type299 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type300 { get; set; } + public global::Cohere.OneOf? Type300 { get; set; } /// /// /// - public global::Cohere.OneOf? Type301 { get; set; } + public global::Cohere.Rerankv2Request? Type301 { get; set; } /// /// /// @@ -1277,55 +1277,55 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Cohere.ChatResponse2? Type316 { get; set; } + public global::Cohere.ChatResponse3? Type316 { get; set; } /// /// /// - public global::Cohere.ChatResponse3? Type317 { get; set; } + public global::Cohere.ChatResponse4? Type317 { get; set; } /// /// /// - public global::Cohere.ChatResponse4? Type318 { get; set; } + public global::Cohere.ChatResponse5? Type318 { get; set; } /// /// /// - public global::Cohere.ChatResponse5? Type319 { get; set; } + public global::Cohere.ChatResponse6? Type319 { get; set; } /// /// /// - public global::Cohere.ChatResponse6? Type320 { get; set; } + public global::Cohere.ChatResponse7? Type320 { get; set; } /// /// /// - public global::Cohere.ChatResponse7? Type321 { get; set; } + public global::Cohere.ChatResponse8? Type321 { get; set; } /// /// /// - public global::Cohere.ChatResponse8? Type322 { get; set; } + public global::Cohere.ChatResponse9? Type322 { get; set; } /// /// /// - public global::Cohere.ChatResponse9? Type323 { get; set; } + public global::Cohere.ChatResponse10? Type323 { get; set; } /// /// /// - public global::Cohere.ChatResponse10? Type324 { get; set; } + public global::Cohere.ChatResponse11? Type324 { get; set; } /// /// /// - public global::Cohere.ChatResponse11? Type325 { get; set; } + public global::Cohere.ChatResponse12? Type325 { get; set; } /// /// /// - public global::Cohere.ChatResponse12? Type326 { get; set; } + public global::Cohere.ChatResponse13? Type326 { get; set; } /// /// /// - public global::Cohere.ChatResponse13? Type327 { get; set; } + public global::Cohere.ChatResponse14? Type327 { get; set; } /// /// /// - public global::Cohere.OneOf? Type328 { get; set; } + public global::Cohere.OneOf? Type328 { get; set; } /// /// /// @@ -1781,930 +1781,994 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Cohere.ClassifyResponse? Type442 { get; set; } + public global::Cohere.Rerankv2Response? Type442 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type443 { get; set; } + public global::System.Collections.Generic.IList? Type443 { get; set; } /// /// /// - public global::Cohere.ClassifyResponseClassification? Type444 { get; set; } + public global::Cohere.Rerankv2ResponseResult? Type444 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type445 { get; set; } + public global::Cohere.Rerankv2ResponseResultDocument? Type445 { get; set; } /// /// /// - public global::Cohere.ClassifyResponseClassificationLabels? Type446 { get; set; } + public global::Cohere.Rerankv2Response2? Type446 { get; set; } /// /// /// - public global::Cohere.ClassifyResponseClassificationClassificationType? Type447 { get; set; } + public global::Cohere.Rerankv2Response3? Type447 { get; set; } /// /// /// - public global::Cohere.ClassifyResponse2? Type448 { get; set; } + public global::Cohere.Rerankv2Response4? Type448 { get; set; } /// /// /// - public global::Cohere.ClassifyResponse3? Type449 { get; set; } + public global::Cohere.Rerankv2Response5? Type449 { get; set; } /// /// /// - public global::Cohere.ClassifyResponse4? Type450 { get; set; } + public global::Cohere.Rerankv2Response6? Type450 { get; set; } /// /// /// - public global::Cohere.ClassifyResponse5? Type451 { get; set; } + public global::Cohere.Rerankv2Response7? Type451 { get; set; } /// /// /// - public global::Cohere.ClassifyResponse6? Type452 { get; set; } + public global::Cohere.Rerankv2Response8? Type452 { get; set; } /// /// /// - public global::Cohere.ClassifyResponse7? Type453 { get; set; } + public global::Cohere.Rerankv2Response9? Type453 { get; set; } /// /// /// - public global::Cohere.ClassifyResponse8? Type454 { get; set; } + public global::Cohere.Rerankv2Response10? Type454 { get; set; } /// /// /// - public global::Cohere.ClassifyResponse9? Type455 { get; set; } + public global::Cohere.Rerankv2Response11? Type455 { get; set; } /// /// /// - public global::Cohere.ClassifyResponse10? Type456 { get; set; } + public global::Cohere.Rerankv2Response12? Type456 { get; set; } /// /// /// - public global::Cohere.ClassifyResponse11? Type457 { get; set; } + public global::Cohere.Rerankv2Response13? Type457 { get; set; } /// /// /// - public global::Cohere.ClassifyResponse12? Type458 { get; set; } + public global::Cohere.ClassifyResponse? Type458 { get; set; } /// /// /// - public global::Cohere.ClassifyResponse13? Type459 { get; set; } + public global::System.Collections.Generic.IList? Type459 { get; set; } /// /// /// - public global::Cohere.CreateDatasetResponse? Type460 { get; set; } + public global::Cohere.ClassifyResponseClassification? Type460 { get; set; } /// /// /// - public global::Cohere.CreateDatasetResponse2? Type461 { get; set; } + public global::System.Collections.Generic.IList? Type461 { get; set; } /// /// /// - public global::Cohere.CreateDatasetResponse3? Type462 { get; set; } + public global::Cohere.ClassifyResponseClassificationLabels? Type462 { get; set; } /// /// /// - public global::Cohere.CreateDatasetResponse4? Type463 { get; set; } + public global::Cohere.ClassifyResponseClassificationClassificationType? Type463 { get; set; } /// /// /// - public global::Cohere.CreateDatasetResponse5? Type464 { get; set; } + public global::Cohere.ClassifyResponse2? Type464 { get; set; } /// /// /// - public global::Cohere.CreateDatasetResponse6? Type465 { get; set; } + public global::Cohere.ClassifyResponse3? Type465 { get; set; } /// /// /// - public global::Cohere.CreateDatasetResponse7? Type466 { get; set; } + public global::Cohere.ClassifyResponse4? Type466 { get; set; } /// /// /// - public global::Cohere.CreateDatasetResponse8? Type467 { get; set; } + public global::Cohere.ClassifyResponse5? Type467 { get; set; } /// /// /// - public global::Cohere.CreateDatasetResponse9? Type468 { get; set; } + public global::Cohere.ClassifyResponse6? Type468 { get; set; } /// /// /// - public global::Cohere.CreateDatasetResponse10? Type469 { get; set; } + public global::Cohere.ClassifyResponse7? Type469 { get; set; } /// /// /// - public global::Cohere.CreateDatasetResponse11? Type470 { get; set; } + public global::Cohere.ClassifyResponse8? Type470 { get; set; } /// /// /// - public global::Cohere.CreateDatasetResponse12? Type471 { get; set; } + public global::Cohere.ClassifyResponse9? Type471 { get; set; } /// /// /// - public global::Cohere.CreateDatasetResponse13? Type472 { get; set; } + public global::Cohere.ClassifyResponse10? Type472 { get; set; } /// /// /// - public global::Cohere.ListDatasetsResponse? Type473 { get; set; } + public global::Cohere.ClassifyResponse11? Type473 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type474 { get; set; } + public global::Cohere.ClassifyResponse12? Type474 { get; set; } /// /// /// - public global::Cohere.ListDatasetsResponse2? Type475 { get; set; } + public global::Cohere.ClassifyResponse13? Type475 { get; set; } /// /// /// - public global::Cohere.ListDatasetsResponse3? Type476 { get; set; } + public global::Cohere.CreateDatasetResponse? Type476 { get; set; } /// /// /// - public global::Cohere.ListDatasetsResponse4? Type477 { get; set; } + public global::Cohere.CreateDatasetResponse2? Type477 { get; set; } /// /// /// - public global::Cohere.ListDatasetsResponse5? Type478 { get; set; } + public global::Cohere.CreateDatasetResponse3? Type478 { get; set; } /// /// /// - public global::Cohere.ListDatasetsResponse6? Type479 { get; set; } + public global::Cohere.CreateDatasetResponse4? Type479 { get; set; } /// /// /// - public global::Cohere.ListDatasetsResponse7? Type480 { get; set; } + public global::Cohere.CreateDatasetResponse5? Type480 { get; set; } /// /// /// - public global::Cohere.ListDatasetsResponse8? Type481 { get; set; } + public global::Cohere.CreateDatasetResponse6? Type481 { get; set; } /// /// /// - public global::Cohere.ListDatasetsResponse9? Type482 { get; set; } + public global::Cohere.CreateDatasetResponse7? Type482 { get; set; } /// /// /// - public global::Cohere.ListDatasetsResponse10? Type483 { get; set; } + public global::Cohere.CreateDatasetResponse8? Type483 { get; set; } /// /// /// - public global::Cohere.ListDatasetsResponse11? Type484 { get; set; } + public global::Cohere.CreateDatasetResponse9? Type484 { get; set; } /// /// /// - public global::Cohere.ListDatasetsResponse12? Type485 { get; set; } + public global::Cohere.CreateDatasetResponse10? Type485 { get; set; } /// /// /// - public global::Cohere.ListDatasetsResponse13? Type486 { get; set; } + public global::Cohere.CreateDatasetResponse11? Type486 { get; set; } /// /// /// - public global::Cohere.GetDatasetUsageResponse? Type487 { get; set; } + public global::Cohere.CreateDatasetResponse12? Type487 { get; set; } /// /// /// - public global::Cohere.GetDatasetUsageResponse2? Type488 { get; set; } + public global::Cohere.CreateDatasetResponse13? Type488 { get; set; } /// /// /// - public global::Cohere.GetDatasetUsageResponse3? Type489 { get; set; } + public global::Cohere.ListDatasetsResponse? Type489 { get; set; } /// /// /// - public global::Cohere.GetDatasetUsageResponse4? Type490 { get; set; } + public global::System.Collections.Generic.IList? Type490 { get; set; } /// /// /// - public global::Cohere.GetDatasetUsageResponse5? Type491 { get; set; } + public global::Cohere.ListDatasetsResponse2? Type491 { get; set; } /// /// /// - public global::Cohere.GetDatasetUsageResponse6? Type492 { get; set; } + public global::Cohere.ListDatasetsResponse3? Type492 { get; set; } /// /// /// - public global::Cohere.GetDatasetUsageResponse7? Type493 { get; set; } + public global::Cohere.ListDatasetsResponse4? Type493 { get; set; } /// /// /// - public global::Cohere.GetDatasetUsageResponse8? Type494 { get; set; } + public global::Cohere.ListDatasetsResponse5? Type494 { get; set; } /// /// /// - public global::Cohere.GetDatasetUsageResponse9? Type495 { get; set; } + public global::Cohere.ListDatasetsResponse6? Type495 { get; set; } /// /// /// - public global::Cohere.GetDatasetUsageResponse10? Type496 { get; set; } + public global::Cohere.ListDatasetsResponse7? Type496 { get; set; } /// /// /// - public global::Cohere.GetDatasetUsageResponse11? Type497 { get; set; } + public global::Cohere.ListDatasetsResponse8? Type497 { get; set; } /// /// /// - public global::Cohere.GetDatasetUsageResponse12? Type498 { get; set; } + public global::Cohere.ListDatasetsResponse9? Type498 { get; set; } /// /// /// - public global::Cohere.GetDatasetUsageResponse13? Type499 { get; set; } + public global::Cohere.ListDatasetsResponse10? Type499 { get; set; } /// /// /// - public global::Cohere.GetDatasetResponse? Type500 { get; set; } + public global::Cohere.ListDatasetsResponse11? Type500 { get; set; } /// /// /// - public global::Cohere.GetDatasetResponse2? Type501 { get; set; } + public global::Cohere.ListDatasetsResponse12? Type501 { get; set; } /// /// /// - public global::Cohere.GetDatasetResponse3? Type502 { get; set; } + public global::Cohere.ListDatasetsResponse13? Type502 { get; set; } /// /// /// - public global::Cohere.GetDatasetResponse4? Type503 { get; set; } + public global::Cohere.GetDatasetUsageResponse? Type503 { get; set; } /// /// /// - public global::Cohere.GetDatasetResponse5? Type504 { get; set; } + public global::Cohere.GetDatasetUsageResponse2? Type504 { get; set; } /// /// /// - public global::Cohere.GetDatasetResponse6? Type505 { get; set; } + public global::Cohere.GetDatasetUsageResponse3? Type505 { get; set; } /// /// /// - public global::Cohere.GetDatasetResponse7? Type506 { get; set; } + public global::Cohere.GetDatasetUsageResponse4? Type506 { get; set; } /// /// /// - public global::Cohere.GetDatasetResponse8? Type507 { get; set; } + public global::Cohere.GetDatasetUsageResponse5? Type507 { get; set; } /// /// /// - public global::Cohere.GetDatasetResponse9? Type508 { get; set; } + public global::Cohere.GetDatasetUsageResponse6? Type508 { get; set; } /// /// /// - public global::Cohere.GetDatasetResponse10? Type509 { get; set; } + public global::Cohere.GetDatasetUsageResponse7? Type509 { get; set; } /// /// /// - public global::Cohere.GetDatasetResponse11? Type510 { get; set; } + public global::Cohere.GetDatasetUsageResponse8? Type510 { get; set; } /// /// /// - public global::Cohere.GetDatasetResponse12? Type511 { get; set; } + public global::Cohere.GetDatasetUsageResponse9? Type511 { get; set; } /// /// /// - public global::Cohere.GetDatasetResponse13? Type512 { get; set; } + public global::Cohere.GetDatasetUsageResponse10? Type512 { get; set; } /// /// /// - public global::Cohere.DeleteDatasetResponse? Type513 { get; set; } + public global::Cohere.GetDatasetUsageResponse11? Type513 { get; set; } /// /// /// - public global::Cohere.DeleteDatasetResponse2? Type514 { get; set; } + public global::Cohere.GetDatasetUsageResponse12? Type514 { get; set; } /// /// /// - public global::Cohere.DeleteDatasetResponse3? Type515 { get; set; } + public global::Cohere.GetDatasetUsageResponse13? Type515 { get; set; } /// /// /// - public global::Cohere.DeleteDatasetResponse4? Type516 { get; set; } + public global::Cohere.GetDatasetResponse? Type516 { get; set; } /// /// /// - public global::Cohere.DeleteDatasetResponse5? Type517 { get; set; } + public global::Cohere.GetDatasetResponse2? Type517 { get; set; } /// /// /// - public global::Cohere.DeleteDatasetResponse6? Type518 { get; set; } + public global::Cohere.GetDatasetResponse3? Type518 { get; set; } /// /// /// - public global::Cohere.DeleteDatasetResponse7? Type519 { get; set; } + public global::Cohere.GetDatasetResponse4? Type519 { get; set; } /// /// /// - public global::Cohere.DeleteDatasetResponse8? Type520 { get; set; } + public global::Cohere.GetDatasetResponse5? Type520 { get; set; } /// /// /// - public global::Cohere.DeleteDatasetResponse9? Type521 { get; set; } + public global::Cohere.GetDatasetResponse6? Type521 { get; set; } /// /// /// - public global::Cohere.DeleteDatasetResponse10? Type522 { get; set; } + public global::Cohere.GetDatasetResponse7? Type522 { get; set; } /// /// /// - public global::Cohere.DeleteDatasetResponse11? Type523 { get; set; } + public global::Cohere.GetDatasetResponse8? Type523 { get; set; } /// /// /// - public global::Cohere.DeleteDatasetResponse12? Type524 { get; set; } + public global::Cohere.GetDatasetResponse9? Type524 { get; set; } /// /// /// - public global::Cohere.DeleteDatasetResponse13? Type525 { get; set; } + public global::Cohere.GetDatasetResponse10? Type525 { get; set; } /// /// /// - public global::Cohere.SummarizeResponse? Type526 { get; set; } + public global::Cohere.GetDatasetResponse11? Type526 { get; set; } /// /// /// - public global::Cohere.SummarizeResponse2? Type527 { get; set; } + public global::Cohere.GetDatasetResponse12? Type527 { get; set; } /// /// /// - public global::Cohere.SummarizeResponse3? Type528 { get; set; } + public global::Cohere.GetDatasetResponse13? Type528 { get; set; } /// /// /// - public global::Cohere.SummarizeResponse4? Type529 { get; set; } + public global::Cohere.DeleteDatasetResponse? Type529 { get; set; } /// /// /// - public global::Cohere.SummarizeResponse5? Type530 { get; set; } + public global::Cohere.DeleteDatasetResponse2? Type530 { get; set; } /// /// /// - public global::Cohere.SummarizeResponse6? Type531 { get; set; } + public global::Cohere.DeleteDatasetResponse3? Type531 { get; set; } /// /// /// - public global::Cohere.SummarizeResponse7? Type532 { get; set; } + public global::Cohere.DeleteDatasetResponse4? Type532 { get; set; } /// /// /// - public global::Cohere.SummarizeResponse8? Type533 { get; set; } + public global::Cohere.DeleteDatasetResponse5? Type533 { get; set; } /// /// /// - public global::Cohere.SummarizeResponse9? Type534 { get; set; } + public global::Cohere.DeleteDatasetResponse6? Type534 { get; set; } /// /// /// - public global::Cohere.SummarizeResponse10? Type535 { get; set; } + public global::Cohere.DeleteDatasetResponse7? Type535 { get; set; } /// /// /// - public global::Cohere.SummarizeResponse11? Type536 { get; set; } + public global::Cohere.DeleteDatasetResponse8? Type536 { get; set; } /// /// /// - public global::Cohere.SummarizeResponse12? Type537 { get; set; } + public global::Cohere.DeleteDatasetResponse9? Type537 { get; set; } /// /// /// - public global::Cohere.SummarizeResponse13? Type538 { get; set; } + public global::Cohere.DeleteDatasetResponse10? Type538 { get; set; } /// /// /// - public global::Cohere.TokenizeResponse? Type539 { get; set; } + public global::Cohere.DeleteDatasetResponse11? Type539 { get; set; } /// /// /// - public global::Cohere.TokenizeResponse2? Type540 { get; set; } + public global::Cohere.DeleteDatasetResponse12? Type540 { get; set; } /// /// /// - public global::Cohere.TokenizeResponse3? Type541 { get; set; } + public global::Cohere.DeleteDatasetResponse13? Type541 { get; set; } /// /// /// - public global::Cohere.TokenizeResponse4? Type542 { get; set; } + public global::Cohere.SummarizeResponse? Type542 { get; set; } /// /// /// - public global::Cohere.TokenizeResponse5? Type543 { get; set; } + public global::Cohere.SummarizeResponse2? Type543 { get; set; } /// /// /// - public global::Cohere.TokenizeResponse6? Type544 { get; set; } + public global::Cohere.SummarizeResponse3? Type544 { get; set; } /// /// /// - public global::Cohere.TokenizeResponse7? Type545 { get; set; } + public global::Cohere.SummarizeResponse4? Type545 { get; set; } /// /// /// - public global::Cohere.TokenizeResponse8? Type546 { get; set; } + public global::Cohere.SummarizeResponse5? Type546 { get; set; } /// /// /// - public global::Cohere.TokenizeResponse9? Type547 { get; set; } + public global::Cohere.SummarizeResponse6? Type547 { get; set; } /// /// /// - public global::Cohere.TokenizeResponse10? Type548 { get; set; } + public global::Cohere.SummarizeResponse7? Type548 { get; set; } /// /// /// - public global::Cohere.TokenizeResponse11? Type549 { get; set; } + public global::Cohere.SummarizeResponse8? Type549 { get; set; } /// /// /// - public global::Cohere.TokenizeResponse12? Type550 { get; set; } + public global::Cohere.SummarizeResponse9? Type550 { get; set; } /// /// /// - public global::Cohere.TokenizeResponse13? Type551 { get; set; } + public global::Cohere.SummarizeResponse10? Type551 { get; set; } /// /// /// - public global::Cohere.DetokenizeResponse? Type552 { get; set; } + public global::Cohere.SummarizeResponse11? Type552 { get; set; } /// /// /// - public global::Cohere.DetokenizeResponse2? Type553 { get; set; } + public global::Cohere.SummarizeResponse12? Type553 { get; set; } /// /// /// - public global::Cohere.DetokenizeResponse3? Type554 { get; set; } + public global::Cohere.SummarizeResponse13? Type554 { get; set; } /// /// /// - public global::Cohere.DetokenizeResponse4? Type555 { get; set; } + public global::Cohere.TokenizeResponse? Type555 { get; set; } /// /// /// - public global::Cohere.DetokenizeResponse5? Type556 { get; set; } + public global::Cohere.TokenizeResponse2? Type556 { get; set; } /// /// /// - public global::Cohere.DetokenizeResponse6? Type557 { get; set; } + public global::Cohere.TokenizeResponse3? Type557 { get; set; } /// /// /// - public global::Cohere.DetokenizeResponse7? Type558 { get; set; } + public global::Cohere.TokenizeResponse4? Type558 { get; set; } /// /// /// - public global::Cohere.DetokenizeResponse8? Type559 { get; set; } + public global::Cohere.TokenizeResponse5? Type559 { get; set; } /// /// /// - public global::Cohere.DetokenizeResponse9? Type560 { get; set; } + public global::Cohere.TokenizeResponse6? Type560 { get; set; } /// /// /// - public global::Cohere.DetokenizeResponse10? Type561 { get; set; } + public global::Cohere.TokenizeResponse7? Type561 { get; set; } /// /// /// - public global::Cohere.DetokenizeResponse11? Type562 { get; set; } + public global::Cohere.TokenizeResponse8? Type562 { get; set; } /// /// /// - public global::Cohere.DetokenizeResponse12? Type563 { get; set; } + public global::Cohere.TokenizeResponse9? Type563 { get; set; } /// /// /// - public global::Cohere.DetokenizeResponse13? Type564 { get; set; } + public global::Cohere.TokenizeResponse10? Type564 { get; set; } /// /// /// - public global::Cohere.ListConnectorsResponse2? Type565 { get; set; } + public global::Cohere.TokenizeResponse11? Type565 { get; set; } /// /// /// - public global::Cohere.ListConnectorsResponse3? Type566 { get; set; } + public global::Cohere.TokenizeResponse12? Type566 { get; set; } /// /// /// - public global::Cohere.ListConnectorsResponse4? Type567 { get; set; } + public global::Cohere.TokenizeResponse13? Type567 { get; set; } /// /// /// - public global::Cohere.ListConnectorsResponse5? Type568 { get; set; } + public global::Cohere.DetokenizeResponse? Type568 { get; set; } /// /// /// - public global::Cohere.ListConnectorsResponse6? Type569 { get; set; } + public global::Cohere.DetokenizeResponse2? Type569 { get; set; } /// /// /// - public global::Cohere.ListConnectorsResponse7? Type570 { get; set; } + public global::Cohere.DetokenizeResponse3? Type570 { get; set; } /// /// /// - public global::Cohere.ListConnectorsResponse8? Type571 { get; set; } + public global::Cohere.DetokenizeResponse4? Type571 { get; set; } /// /// /// - public global::Cohere.ListConnectorsResponse9? Type572 { get; set; } + public global::Cohere.DetokenizeResponse5? Type572 { get; set; } /// /// /// - public global::Cohere.ListConnectorsResponse10? Type573 { get; set; } + public global::Cohere.DetokenizeResponse6? Type573 { get; set; } /// /// /// - public global::Cohere.ListConnectorsResponse11? Type574 { get; set; } + public global::Cohere.DetokenizeResponse7? Type574 { get; set; } /// /// /// - public global::Cohere.ListConnectorsResponse12? Type575 { get; set; } + public global::Cohere.DetokenizeResponse8? Type575 { get; set; } /// /// /// - public global::Cohere.ListConnectorsResponse13? Type576 { get; set; } + public global::Cohere.DetokenizeResponse9? Type576 { get; set; } /// /// /// - public global::Cohere.CreateConnectorResponse2? Type577 { get; set; } + public global::Cohere.DetokenizeResponse10? Type577 { get; set; } /// /// /// - public global::Cohere.CreateConnectorResponse3? Type578 { get; set; } + public global::Cohere.DetokenizeResponse11? Type578 { get; set; } /// /// /// - public global::Cohere.CreateConnectorResponse4? Type579 { get; set; } + public global::Cohere.DetokenizeResponse12? Type579 { get; set; } /// /// /// - public global::Cohere.CreateConnectorResponse5? Type580 { get; set; } + public global::Cohere.DetokenizeResponse13? Type580 { get; set; } /// /// /// - public global::Cohere.CreateConnectorResponse6? Type581 { get; set; } + public global::Cohere.ListConnectorsResponse2? Type581 { get; set; } /// /// /// - public global::Cohere.CreateConnectorResponse7? Type582 { get; set; } + public global::Cohere.ListConnectorsResponse3? Type582 { get; set; } /// /// /// - public global::Cohere.CreateConnectorResponse8? Type583 { get; set; } + public global::Cohere.ListConnectorsResponse4? Type583 { get; set; } /// /// /// - public global::Cohere.CreateConnectorResponse9? Type584 { get; set; } + public global::Cohere.ListConnectorsResponse5? Type584 { get; set; } /// /// /// - public global::Cohere.CreateConnectorResponse10? Type585 { get; set; } + public global::Cohere.ListConnectorsResponse6? Type585 { get; set; } /// /// /// - public global::Cohere.CreateConnectorResponse11? Type586 { get; set; } + public global::Cohere.ListConnectorsResponse7? Type586 { get; set; } /// /// /// - public global::Cohere.CreateConnectorResponse12? Type587 { get; set; } + public global::Cohere.ListConnectorsResponse8? Type587 { get; set; } /// /// /// - public global::Cohere.CreateConnectorResponse13? Type588 { get; set; } + public global::Cohere.ListConnectorsResponse9? Type588 { get; set; } /// /// /// - public global::Cohere.GetConnectorResponse2? Type589 { get; set; } + public global::Cohere.ListConnectorsResponse10? Type589 { get; set; } /// /// /// - public global::Cohere.GetConnectorResponse3? Type590 { get; set; } + public global::Cohere.ListConnectorsResponse11? Type590 { get; set; } /// /// /// - public global::Cohere.GetConnectorResponse4? Type591 { get; set; } + public global::Cohere.ListConnectorsResponse12? Type591 { get; set; } /// /// /// - public global::Cohere.GetConnectorResponse5? Type592 { get; set; } + public global::Cohere.ListConnectorsResponse13? Type592 { get; set; } /// /// /// - public global::Cohere.GetConnectorResponse6? Type593 { get; set; } + public global::Cohere.CreateConnectorResponse2? Type593 { get; set; } /// /// /// - public global::Cohere.GetConnectorResponse7? Type594 { get; set; } + public global::Cohere.CreateConnectorResponse3? Type594 { get; set; } /// /// /// - public global::Cohere.GetConnectorResponse8? Type595 { get; set; } + public global::Cohere.CreateConnectorResponse4? Type595 { get; set; } /// /// /// - public global::Cohere.GetConnectorResponse9? Type596 { get; set; } + public global::Cohere.CreateConnectorResponse5? Type596 { get; set; } /// /// /// - public global::Cohere.GetConnectorResponse10? Type597 { get; set; } + public global::Cohere.CreateConnectorResponse6? Type597 { get; set; } /// /// /// - public global::Cohere.GetConnectorResponse11? Type598 { get; set; } + public global::Cohere.CreateConnectorResponse7? Type598 { get; set; } /// /// /// - public global::Cohere.GetConnectorResponse12? Type599 { get; set; } + public global::Cohere.CreateConnectorResponse8? Type599 { get; set; } /// /// /// - public global::Cohere.GetConnectorResponse13? Type600 { get; set; } + public global::Cohere.CreateConnectorResponse9? Type600 { get; set; } /// /// /// - public global::Cohere.UpdateConnectorResponse2? Type601 { get; set; } + public global::Cohere.CreateConnectorResponse10? Type601 { get; set; } /// /// /// - public global::Cohere.UpdateConnectorResponse3? Type602 { get; set; } + public global::Cohere.CreateConnectorResponse11? Type602 { get; set; } /// /// /// - public global::Cohere.UpdateConnectorResponse4? Type603 { get; set; } + public global::Cohere.CreateConnectorResponse12? Type603 { get; set; } /// /// /// - public global::Cohere.UpdateConnectorResponse5? Type604 { get; set; } + public global::Cohere.CreateConnectorResponse13? Type604 { get; set; } /// /// /// - public global::Cohere.UpdateConnectorResponse6? Type605 { get; set; } + public global::Cohere.GetConnectorResponse2? Type605 { get; set; } /// /// /// - public global::Cohere.UpdateConnectorResponse7? Type606 { get; set; } + public global::Cohere.GetConnectorResponse3? Type606 { get; set; } /// /// /// - public global::Cohere.UpdateConnectorResponse8? Type607 { get; set; } + public global::Cohere.GetConnectorResponse4? Type607 { get; set; } /// /// /// - public global::Cohere.UpdateConnectorResponse9? Type608 { get; set; } + public global::Cohere.GetConnectorResponse5? Type608 { get; set; } /// /// /// - public global::Cohere.UpdateConnectorResponse10? Type609 { get; set; } + public global::Cohere.GetConnectorResponse6? Type609 { get; set; } /// /// /// - public global::Cohere.UpdateConnectorResponse11? Type610 { get; set; } + public global::Cohere.GetConnectorResponse7? Type610 { get; set; } /// /// /// - public global::Cohere.UpdateConnectorResponse12? Type611 { get; set; } + public global::Cohere.GetConnectorResponse8? Type611 { get; set; } /// /// /// - public global::Cohere.UpdateConnectorResponse13? Type612 { get; set; } + public global::Cohere.GetConnectorResponse9? Type612 { get; set; } /// /// /// - public global::Cohere.DeleteConnectorResponse2? Type613 { get; set; } + public global::Cohere.GetConnectorResponse10? Type613 { get; set; } /// /// /// - public global::Cohere.DeleteConnectorResponse3? Type614 { get; set; } + public global::Cohere.GetConnectorResponse11? Type614 { get; set; } /// /// /// - public global::Cohere.DeleteConnectorResponse4? Type615 { get; set; } + public global::Cohere.GetConnectorResponse12? Type615 { get; set; } /// /// /// - public global::Cohere.DeleteConnectorResponse5? Type616 { get; set; } + public global::Cohere.GetConnectorResponse13? Type616 { get; set; } /// /// /// - public global::Cohere.DeleteConnectorResponse6? Type617 { get; set; } + public global::Cohere.UpdateConnectorResponse2? Type617 { get; set; } /// /// /// - public global::Cohere.DeleteConnectorResponse7? Type618 { get; set; } + public global::Cohere.UpdateConnectorResponse3? Type618 { get; set; } /// /// /// - public global::Cohere.DeleteConnectorResponse8? Type619 { get; set; } + public global::Cohere.UpdateConnectorResponse4? Type619 { get; set; } /// /// /// - public global::Cohere.DeleteConnectorResponse9? Type620 { get; set; } + public global::Cohere.UpdateConnectorResponse5? Type620 { get; set; } /// /// /// - public global::Cohere.DeleteConnectorResponse10? Type621 { get; set; } + public global::Cohere.UpdateConnectorResponse6? Type621 { get; set; } /// /// /// - public global::Cohere.DeleteConnectorResponse11? Type622 { get; set; } + public global::Cohere.UpdateConnectorResponse7? Type622 { get; set; } /// /// /// - public global::Cohere.DeleteConnectorResponse12? Type623 { get; set; } + public global::Cohere.UpdateConnectorResponse8? Type623 { get; set; } /// /// /// - public global::Cohere.DeleteConnectorResponse13? Type624 { get; set; } + public global::Cohere.UpdateConnectorResponse9? Type624 { get; set; } /// /// /// - public global::Cohere.OAuthAuthorizeConnectorResponse? Type625 { get; set; } + public global::Cohere.UpdateConnectorResponse10? Type625 { get; set; } /// /// /// - public global::Cohere.OAuthAuthorizeConnectorResponse2? Type626 { get; set; } + public global::Cohere.UpdateConnectorResponse11? Type626 { get; set; } /// /// /// - public global::Cohere.OAuthAuthorizeConnectorResponse3? Type627 { get; set; } + public global::Cohere.UpdateConnectorResponse12? Type627 { get; set; } /// /// /// - public global::Cohere.OAuthAuthorizeConnectorResponse4? Type628 { get; set; } + public global::Cohere.UpdateConnectorResponse13? Type628 { get; set; } /// /// /// - public global::Cohere.OAuthAuthorizeConnectorResponse5? Type629 { get; set; } + public global::Cohere.DeleteConnectorResponse2? Type629 { get; set; } /// /// /// - public global::Cohere.OAuthAuthorizeConnectorResponse6? Type630 { get; set; } + public global::Cohere.DeleteConnectorResponse3? Type630 { get; set; } /// /// /// - public global::Cohere.OAuthAuthorizeConnectorResponse7? Type631 { get; set; } + public global::Cohere.DeleteConnectorResponse4? Type631 { get; set; } /// /// /// - public global::Cohere.OAuthAuthorizeConnectorResponse8? Type632 { get; set; } + public global::Cohere.DeleteConnectorResponse5? Type632 { get; set; } /// /// /// - public global::Cohere.OAuthAuthorizeConnectorResponse9? Type633 { get; set; } + public global::Cohere.DeleteConnectorResponse6? Type633 { get; set; } /// /// /// - public global::Cohere.OAuthAuthorizeConnectorResponse10? Type634 { get; set; } + public global::Cohere.DeleteConnectorResponse7? Type634 { get; set; } /// /// /// - public global::Cohere.OAuthAuthorizeConnectorResponse11? Type635 { get; set; } + public global::Cohere.DeleteConnectorResponse8? Type635 { get; set; } /// /// /// - public global::Cohere.OAuthAuthorizeConnectorResponse12? Type636 { get; set; } + public global::Cohere.DeleteConnectorResponse9? Type636 { get; set; } /// /// /// - public global::Cohere.GetModelResponse2? Type637 { get; set; } + public global::Cohere.DeleteConnectorResponse10? Type637 { get; set; } /// /// /// - public global::Cohere.GetModelResponse3? Type638 { get; set; } + public global::Cohere.DeleteConnectorResponse11? Type638 { get; set; } /// /// /// - public global::Cohere.GetModelResponse4? Type639 { get; set; } + public global::Cohere.DeleteConnectorResponse12? Type639 { get; set; } /// /// /// - public global::Cohere.GetModelResponse5? Type640 { get; set; } + public global::Cohere.DeleteConnectorResponse13? Type640 { get; set; } /// /// /// - public global::Cohere.GetModelResponse6? Type641 { get; set; } + public global::Cohere.OAuthAuthorizeConnectorResponse? Type641 { get; set; } /// /// /// - public global::Cohere.GetModelResponse7? Type642 { get; set; } + public global::Cohere.OAuthAuthorizeConnectorResponse2? Type642 { get; set; } /// /// /// - public global::Cohere.GetModelResponse8? Type643 { get; set; } + public global::Cohere.OAuthAuthorizeConnectorResponse3? Type643 { get; set; } /// /// /// - public global::Cohere.GetModelResponse9? Type644 { get; set; } + public global::Cohere.OAuthAuthorizeConnectorResponse4? Type644 { get; set; } /// /// /// - public global::Cohere.GetModelResponse10? Type645 { get; set; } + public global::Cohere.OAuthAuthorizeConnectorResponse5? Type645 { get; set; } /// /// /// - public global::Cohere.GetModelResponse11? Type646 { get; set; } + public global::Cohere.OAuthAuthorizeConnectorResponse6? Type646 { get; set; } /// /// /// - public global::Cohere.GetModelResponse12? Type647 { get; set; } + public global::Cohere.OAuthAuthorizeConnectorResponse7? Type647 { get; set; } /// /// /// - public global::Cohere.GetModelResponse13? Type648 { get; set; } + public global::Cohere.OAuthAuthorizeConnectorResponse8? Type648 { get; set; } /// /// /// - public global::Cohere.ListModelsResponse2? Type649 { get; set; } + public global::Cohere.OAuthAuthorizeConnectorResponse9? Type649 { get; set; } /// /// /// - public global::Cohere.ListModelsResponse3? Type650 { get; set; } + public global::Cohere.OAuthAuthorizeConnectorResponse10? Type650 { get; set; } /// /// /// - public global::Cohere.ListModelsResponse4? Type651 { get; set; } + public global::Cohere.OAuthAuthorizeConnectorResponse11? Type651 { get; set; } /// /// /// - public global::Cohere.ListModelsResponse5? Type652 { get; set; } + public global::Cohere.OAuthAuthorizeConnectorResponse12? Type652 { get; set; } /// /// /// - public global::Cohere.ListModelsResponse6? Type653 { get; set; } + public global::Cohere.GetModelResponse2? Type653 { get; set; } /// /// /// - public global::Cohere.ListModelsResponse7? Type654 { get; set; } + public global::Cohere.GetModelResponse3? Type654 { get; set; } /// /// /// - public global::Cohere.ListModelsResponse8? Type655 { get; set; } + public global::Cohere.GetModelResponse4? Type655 { get; set; } /// /// /// - public global::Cohere.ListModelsResponse9? Type656 { get; set; } + public global::Cohere.GetModelResponse5? Type656 { get; set; } /// /// /// - public global::Cohere.ListModelsResponse10? Type657 { get; set; } + public global::Cohere.GetModelResponse6? Type657 { get; set; } /// /// /// - public global::Cohere.ListModelsResponse11? Type658 { get; set; } + public global::Cohere.GetModelResponse7? Type658 { get; set; } /// /// /// - public global::Cohere.ListModelsResponse12? Type659 { get; set; } + public global::Cohere.GetModelResponse8? Type659 { get; set; } /// /// /// - public global::Cohere.ListModelsResponse13? Type660 { get; set; } + public global::Cohere.GetModelResponse9? Type660 { get; set; } /// /// /// - public global::Cohere.CheckAPIKeyResponse? Type661 { get; set; } + public global::Cohere.GetModelResponse10? Type661 { get; set; } /// /// /// - public global::Cohere.CheckAPIKeyResponse2? Type662 { get; set; } + public global::Cohere.GetModelResponse11? Type662 { get; set; } /// /// /// - public global::Cohere.CheckAPIKeyResponse3? Type663 { get; set; } + public global::Cohere.GetModelResponse12? Type663 { get; set; } /// /// /// - public global::Cohere.CheckAPIKeyResponse4? Type664 { get; set; } + public global::Cohere.GetModelResponse13? Type664 { get; set; } /// /// /// - public global::Cohere.CheckAPIKeyResponse5? Type665 { get; set; } + public global::Cohere.ListModelsResponse2? Type665 { get; set; } /// /// /// - public global::Cohere.CheckAPIKeyResponse6? Type666 { get; set; } + public global::Cohere.ListModelsResponse3? Type666 { get; set; } /// /// /// - public global::Cohere.CheckAPIKeyResponse7? Type667 { get; set; } + public global::Cohere.ListModelsResponse4? Type667 { get; set; } /// /// /// - public global::Cohere.CheckAPIKeyResponse8? Type668 { get; set; } + public global::Cohere.ListModelsResponse5? Type668 { get; set; } /// /// /// - public global::Cohere.CheckAPIKeyResponse9? Type669 { get; set; } + public global::Cohere.ListModelsResponse6? Type669 { get; set; } /// /// /// - public global::Cohere.CheckAPIKeyResponse10? Type670 { get; set; } + public global::Cohere.ListModelsResponse7? Type670 { get; set; } /// /// /// - public global::Cohere.CheckAPIKeyResponse11? Type671 { get; set; } + public global::Cohere.ListModelsResponse8? Type671 { get; set; } /// /// /// - public global::Cohere.CheckAPIKeyResponse12? Type672 { get; set; } + public global::Cohere.ListModelsResponse9? Type672 { get; set; } /// /// /// - public global::Cohere.CheckAPIKeyResponse13? Type673 { get; set; } + public global::Cohere.ListModelsResponse10? Type673 { get; set; } + /// + /// + /// + public global::Cohere.ListModelsResponse11? Type674 { get; set; } + /// + /// + /// + public global::Cohere.ListModelsResponse12? Type675 { get; set; } + /// + /// + /// + public global::Cohere.ListModelsResponse13? Type676 { get; set; } + /// + /// + /// + public global::Cohere.CheckAPIKeyResponse? Type677 { get; set; } + /// + /// + /// + public global::Cohere.CheckAPIKeyResponse2? Type678 { get; set; } + /// + /// + /// + public global::Cohere.CheckAPIKeyResponse3? Type679 { get; set; } + /// + /// + /// + public global::Cohere.CheckAPIKeyResponse4? Type680 { get; set; } + /// + /// + /// + public global::Cohere.CheckAPIKeyResponse5? Type681 { get; set; } + /// + /// + /// + public global::Cohere.CheckAPIKeyResponse6? Type682 { get; set; } + /// + /// + /// + public global::Cohere.CheckAPIKeyResponse7? Type683 { get; set; } + /// + /// + /// + public global::Cohere.CheckAPIKeyResponse8? Type684 { get; set; } + /// + /// + /// + public global::Cohere.CheckAPIKeyResponse9? Type685 { get; set; } + /// + /// + /// + public global::Cohere.CheckAPIKeyResponse10? Type686 { get; set; } + /// + /// + /// + public global::Cohere.CheckAPIKeyResponse11? Type687 { get; set; } + /// + /// + /// + public global::Cohere.CheckAPIKeyResponse12? Type688 { get; set; } + /// + /// + /// + public global::Cohere.CheckAPIKeyResponse13? Type689 { get; set; } } } \ No newline at end of file diff --git a/src/libs/Cohere/openapi.yaml b/src/libs/Cohere/openapi.yaml index 5c934a5..dcdd403 100644 --- a/src/libs/Cohere/openapi.yaml +++ b/src/libs/Cohere/openapi.yaml @@ -756,7 +756,7 @@ paths: tools: type: array items: - $ref: '#/components/schemas/Tool-2' + $ref: '#/components/schemas/ToolV2' 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" documents: type: array @@ -768,7 +768,7 @@ paths: citation_options: $ref: '#/components/schemas/CitationOptions' response_format: - $ref: '#/components/schemas/ResponseFormat-2' + $ref: '#/components/schemas/ResponseFormatV2' safety_mode: enum: - CONTEXTUAL @@ -823,8 +823,8 @@ paths: application/json: schema: oneOf: - - $ref: '#/components/schemas/NonStreamedChatResponse-2' - - $ref: '#/components/schemas/StreamedChatResponse-2' + - $ref: '#/components/schemas/ChatResponse' + - $ref: '#/components/schemas/StreamedChatResponseV2' '400': $ref: '#/components/responses/BadRequest' '401': @@ -857,7 +857,6 @@ paths: format: sse stream-condition: $request.stream response: - x-fern-sdk-group-name: v2 required: - id - finish_reason @@ -873,7 +872,6 @@ paths: 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' @@ -3689,7 +3687,52 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/V2EmbedRequest' + required: + - model + 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 @@ -4224,6 +4267,156 @@ paths: version: '1' billed_units: search_units: 1 + /v2/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: rerankv2 + parameters: + - $ref: '#/components/parameters/RequestSource' + requestBody: + description: '' + content: + application/json: + schema: + required: + - query + - documents + - model + 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: + - v2-beta + x-fern-sdk-group-name: v2 + x-fern-sdk-method-name: rerank /v1/classify: post: summary: Classify @@ -7466,12 +7659,10 @@ components: 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 @@ -7490,8 +7681,7 @@ components: $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" description: A message from the user. - x-fern-sdk-group-name: v2 - ToolCall-2: + ToolCallV2: type: object properties: id: @@ -7508,7 +7698,6 @@ components: arguments: type: string description: A array of tool calls to be made. - x-fern-sdk-group-name: v2 ToolSource: type: object properties: @@ -7517,7 +7706,6 @@ components: description: The unique identifier of the document tool_output: type: object - x-fern-sdk-group-name: v2 DocumentSource: type: object properties: @@ -7527,13 +7715,11 @@ components: 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: @@ -7548,7 +7734,6 @@ components: items: $ref: '#/components/schemas/Source' description: Citation information containing sources and the text cited. - x-fern-sdk-group-name: v2 AssistantMessage: required: - role @@ -7561,7 +7746,7 @@ components: tool_calls: type: array items: - $ref: '#/components/schemas/ToolCall-2' + $ref: '#/components/schemas/ToolCallV2' tool_plan: type: string content: @@ -7576,7 +7761,6 @@ components: 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 @@ -7595,7 +7779,6 @@ components: oneOf: - $ref: '#/components/schemas/TextContent' description: A message from the system. - x-fern-sdk-group-name: v2 Document: required: - data @@ -7611,7 +7794,6 @@ components: type: string description: Unique identifier for this document which will be referenced in citations. If not provided an ID will be automatically generated description: "Relevant information that could be used by the model to generate a more accurate reply.\nThe content of each document are generally short (should be under 300 words). Metadata should be used to provide additional information, both the key name and the value will be\npassed to the model.\n" - x-fern-sdk-group-name: v2 DocumentContent: required: - type @@ -7625,14 +7807,12 @@ components: document: $ref: '#/components/schemas/Document' description: Document content. - x-fern-sdk-group-name: v2 ToolContent: oneOf: - $ref: '#/components/schemas/TextContent' - $ref: '#/components/schemas/DocumentContent' description: A content block which contains information about the content of a tool result - x-fern-sdk-group-name: v2 - ToolMessage-2: + ToolMessageV2: required: - role - tool_call_id @@ -7654,13 +7834,12 @@ components: $ref: '#/components/schemas/ToolContent' description: 'A single or list of outputs from a tool. The content should formatted as a JSON object string, or a list of tool content blocks' description: A message from the system. - x-fern-sdk-group-name: v2 - ChatMessage-2: + ChatMessageV2: oneOf: - $ref: '#/components/schemas/UserMessage' - $ref: '#/components/schemas/AssistantMessage' - $ref: '#/components/schemas/SystemMessage' - - $ref: '#/components/schemas/ToolMessage-2' + - $ref: '#/components/schemas/ToolMessageV2' description: Represents a single message in the chat history from a given role. discriminator: propertyName: role @@ -7668,15 +7847,13 @@ components: user: '#/components/schemas/UserMessage' assistant: '#/components/schemas/AssistantMessage' system: '#/components/schemas/SystemMessage' - tool: '#/components/schemas/ToolMessage-2' - x-fern-sdk-group-name: v2 + tool: '#/components/schemas/ToolMessageV2' ChatMessages: type: array items: - $ref: '#/components/schemas/ChatMessage-2' + $ref: '#/components/schemas/ChatMessageV2' 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: + ToolV2: type: object properties: type: @@ -7696,7 +7873,6 @@ components: type: object description: The parameters of the function as a JSON schema. description: The function to be executed. - x-fern-sdk-group-name: v2 CitationOptions: type: object properties: @@ -7708,50 +7884,45 @@ components: 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" description: Options for controlling citation generation. - x-fern-sdk-group-name: v2 - ResponseFormatType-2: + ResponseFormatTypeV2: 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-sdk-group-name: v2 x-fern-audiences: - public - TextResponseFormat-2: + TextResponseFormatV2: required: - type type: object properties: type: - $ref: '#/components/schemas/ResponseFormatType-2' - x-fern-sdk-group-name: v2 + $ref: '#/components/schemas/ResponseFormatTypeV2' x-fern-audiences: - public - JSONResponseFormat-2: + JsonResponseFormatV2: required: - type type: object properties: type: - $ref: '#/components/schemas/ResponseFormatType-2' + $ref: '#/components/schemas/ResponseFormatTypeV2' 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-sdk-group-name: v2 x-fern-audiences: - public - ResponseFormat-2: + ResponseFormatV2: oneOf: - - $ref: '#/components/schemas/TextResponseFormat-2' - - $ref: '#/components/schemas/JSONResponseFormat-2' + - $ref: '#/components/schemas/TextResponseFormatV2' + - $ref: '#/components/schemas/JsonResponseFormatV2' 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-2' - json_object: '#/components/schemas/JSONResponseFormat-2' - x-fern-sdk-group-name: v2 + text: '#/components/schemas/TextResponseFormatV2' + json_object: '#/components/schemas/JsonResponseFormatV2' ChatFinishReason: enum: - complete @@ -7763,7 +7934,6 @@ components: - error_limit type: string description: The reason a chat request has finished. - x-fern-sdk-group-name: v2 AssistantMessageResponse: required: - role @@ -7776,7 +7946,7 @@ components: tool_calls: type: array items: - $ref: '#/components/schemas/ToolCall-2' + $ref: '#/components/schemas/ToolCallV2' tool_plan: type: string content: @@ -7793,7 +7963,6 @@ components: 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: @@ -7821,8 +7990,7 @@ components: output_tokens: type: number description: "The number of tokens produced by the model.\n" - x-fern-sdk-group-name: v2 - NonStreamedChatResponse-2: + ChatResponse: required: - id - finish_reason @@ -7837,7 +8005,6 @@ components: $ref: '#/components/schemas/AssistantMessageResponse' usage: $ref: '#/components/schemas/Usage' - x-fern-sdk-group-name: v2 ChatStreamEventType: required: - type @@ -7857,7 +8024,6 @@ components: - message-end type: string description: The streamed event types - x-fern-sdk-group-name: v2 ChatMessageStartEvent: allOf: - $ref: '#/components/schemas/ChatStreamEventType' @@ -7878,7 +8044,6 @@ components: 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' @@ -7902,7 +8067,6 @@ components: - 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' @@ -7922,7 +8086,6 @@ components: 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' @@ -7931,7 +8094,6 @@ components: 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' @@ -7943,7 +8105,6 @@ components: 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' @@ -7971,7 +8132,6 @@ components: 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' @@ -7991,7 +8151,6 @@ components: 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' @@ -8000,7 +8159,6 @@ components: 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' @@ -8017,7 +8175,6 @@ components: citations: $ref: '#/components/schemas/Citation' description: A streamed event which signifies a citation has been created. - x-fern-sdk-group-name: v2 CitationEndEvent: allOf: - $ref: '#/components/schemas/ChatStreamEventType' @@ -8026,7 +8183,6 @@ components: index: type: integer description: A streamed event which signifies a citation has finished streaming. - x-fern-sdk-group-name: v2 ChatMessageEndEvent: allOf: - $ref: '#/components/schemas/ChatStreamEventType' @@ -8042,8 +8198,7 @@ components: 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: + StreamedChatResponseV2: oneOf: - $ref: '#/components/schemas/ChatMessageStartEvent' - $ref: '#/components/schemas/ChatContentStartEvent' @@ -8055,7 +8210,6 @@ components: - $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 @@ -10631,95 +10785,6 @@ components: api_version: version: '1' api_version: v2 - Texts: - required: - - texts - - model - - input_type - 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-sdk-group-name: v2 - x-fern-audiences: - - public - Images: - required: - - images - - model - - input_type - type: object - properties: - model: - type: string - description: "Defaults to embed-english-v2.0\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.\nAvailable models and corresponding embedding dimensions:\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* `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* `\"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 - x-fern-sdk-group-name: v2 - x-fern-audiences: - - public - V2EmbedRequest: - oneOf: - - $ref: '#/components/schemas/Texts' - - $ref: '#/components/schemas/Images' - discriminator: - propertyName: input_type - mapping: - search_document: '#/components/schemas/Texts' - search_query: '#/components/schemas/Texts' - classification: '#/components/schemas/Texts' - clustering: '#/components/schemas/Texts' - image: '#/components/schemas/Images' - x-fern-sdk-group-name: v2 EmbedJob: required: - job_id @@ -11929,6 +11994,18 @@ components: x-fern-sdk-group-name: - finetuning - finetuning + LoraTargetModules: + enum: + - LORA_TARGET_MODULES_UNSPECIFIED + - LORA_TARGET_MODULES_QV + - LORA_TARGET_MODULES_QKVO + - LORA_TARGET_MODULES_QKVO_FFN + type: string + description: "The possible combinations of LoRA modules to target.\n\n - LORA_TARGET_MODULES_UNSPECIFIED: Unspecified LoRA target modules.\n - LORA_TARGET_MODULES_QV: LoRA adapts the query and value matrices in transformer attention layers.\n - LORA_TARGET_MODULES_QKVO: LoRA adapts query, key, value, and output matrices in attention layers.\n - LORA_TARGET_MODULES_QKVO_FFN: LoRA adapts attention projection matrices and feed-forward networks (FFN)." + default: LORA_TARGET_MODULES_UNSPECIFIED + x-fern-sdk-group-name: + - finetuning + - finetuning Hyperparameters: type: object properties: @@ -11952,6 +12029,16 @@ components: type: number description: The learning rate to be used during training. format: double + lora_alpha: + type: integer + description: "Controls the scaling factor for LoRA updates. Higher values make the\nupdates more impactful." + format: int32 + lora_rank: + type: integer + description: "Specifies the rank for low-rank matrices. Lower ranks reduce parameters\nbut may limit model flexibility." + format: int32 + lora_target_modules: + $ref: '#/components/schemas/LoraTargetModules' description: The fine-tuning hyperparameters. x-fern-sdk-group-name: - finetuning