From 662a0e6e0db3c436c72636f77354ea2c5c9484b7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 27 Nov 2024 01:41:06 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- .../Generated/Cohere.CohereApi.Chatv2.g.cs | 8 +++++++- .../Generated/Cohere.ICohereApi.Chatv2.g.cs | 7 ++++++- .../Generated/Cohere.Models.Chatv2Request.g.cs | 17 +++++++++++++++-- src/libs/Cohere/openapi.yaml | 8 +++++++- 4 files changed, 35 insertions(+), 5 deletions(-) diff --git a/src/libs/Cohere/Generated/Cohere.CohereApi.Chatv2.g.cs b/src/libs/Cohere/Generated/Cohere.CohereApi.Chatv2.g.cs index ca661c6..289d41a 100644 --- a/src/libs/Cohere/Generated/Cohere.CohereApi.Chatv2.g.cs +++ b/src/libs/Cohere/Generated/Cohere.CohereApi.Chatv2.g.cs @@ -520,6 +520,10 @@ partial void ProcessChatv2ResponseContent( /// 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. /// + /// + /// When set to `true`, tool calls in the Assistant message will be forced to follow the tool definition strictly. Learn more in the [Strict Tools guide](https://docs.cohere.com/docs/structured-outputs-json#structured-outputs-tools).
+ /// **Note**: The first few requests with a new set of tools will take longer to process. + /// /// /// 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. /// @@ -567,7 +571,7 @@ partial void ProcessChatv2ResponseContent( /// Used to reduce repetitiveness of generated tokens. Similar to `frequency_penalty`, except that this penalty is applied equally to all tokens that have already appeared, regardless of their exact frequencies. /// /// - /// Ensures that only the top `k` most likely tokens are considered for generation at each step. When `k` is set to `0`, k-sampling is disabled.
+ /// Ensures that only the top `k` most likely tokens are considered for generation at each step. When `k` is set to `0`, k-sampling is disabled.
/// Defaults to `0`, min value of `0`, max value of `500`.
/// Default Value: 0F /// @@ -586,6 +590,7 @@ partial void ProcessChatv2ResponseContent( global::System.Collections.Generic.IList messages, string? xClientName = default, global::System.Collections.Generic.IList? tools = default, + bool? strictTools = default, global::System.Collections.Generic.IList>? documents = default, global::Cohere.CitationOptions? citationOptions = default, global::Cohere.ResponseFormatV2? responseFormat = default, @@ -606,6 +611,7 @@ partial void ProcessChatv2ResponseContent( Model = model, Messages = messages, Tools = tools, + StrictTools = strictTools, Documents = documents, CitationOptions = citationOptions, ResponseFormat = responseFormat, diff --git a/src/libs/Cohere/Generated/Cohere.ICohereApi.Chatv2.g.cs b/src/libs/Cohere/Generated/Cohere.ICohereApi.Chatv2.g.cs index c348b0b..c9c2758 100644 --- a/src/libs/Cohere/Generated/Cohere.ICohereApi.Chatv2.g.cs +++ b/src/libs/Cohere/Generated/Cohere.ICohereApi.Chatv2.g.cs @@ -35,6 +35,10 @@ public partial interface ICohereApi /// 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. /// + /// + /// When set to `true`, tool calls in the Assistant message will be forced to follow the tool definition strictly. Learn more in the [Strict Tools guide](https://docs.cohere.com/docs/structured-outputs-json#structured-outputs-tools).
+ /// **Note**: The first few requests with a new set of tools will take longer to process. + /// /// /// 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. /// @@ -82,7 +86,7 @@ public partial interface ICohereApi /// Used to reduce repetitiveness of generated tokens. Similar to `frequency_penalty`, except that this penalty is applied equally to all tokens that have already appeared, regardless of their exact frequencies. /// /// - /// Ensures that only the top `k` most likely tokens are considered for generation at each step. When `k` is set to `0`, k-sampling is disabled.
+ /// Ensures that only the top `k` most likely tokens are considered for generation at each step. When `k` is set to `0`, k-sampling is disabled.
/// Defaults to `0`, min value of `0`, max value of `500`.
/// Default Value: 0F /// @@ -101,6 +105,7 @@ public partial interface ICohereApi global::System.Collections.Generic.IList messages, string? xClientName = default, global::System.Collections.Generic.IList? tools = default, + bool? strictTools = default, global::System.Collections.Generic.IList>? documents = default, global::Cohere.CitationOptions? citationOptions = default, global::Cohere.ResponseFormatV2? responseFormat = default, diff --git a/src/libs/Cohere/Generated/Cohere.Models.Chatv2Request.g.cs b/src/libs/Cohere/Generated/Cohere.Models.Chatv2Request.g.cs index 0da0079..2de4206 100644 --- a/src/libs/Cohere/Generated/Cohere.Models.Chatv2Request.g.cs +++ b/src/libs/Cohere/Generated/Cohere.Models.Chatv2Request.g.cs @@ -32,6 +32,13 @@ public sealed partial class Chatv2Request [global::System.Text.Json.Serialization.JsonPropertyName("tools")] public global::System.Collections.Generic.IList? Tools { get; set; } + /// + /// When set to `true`, tool calls in the Assistant message will be forced to follow the tool definition strictly. Learn more in the [Strict Tools guide](https://docs.cohere.com/docs/structured-outputs-json#structured-outputs-tools).
+ /// **Note**: The first few requests with a new set of tools will take longer to process. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("strict_tools")] + public bool? StrictTools { 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. /// @@ -111,7 +118,7 @@ public sealed partial class Chatv2Request public float? PresencePenalty { get; set; } /// - /// Ensures that only the top `k` most likely tokens are considered for generation at each step. When `k` is set to `0`, k-sampling is disabled.
+ /// Ensures that only the top `k` most likely tokens are considered for generation at each step. When `k` is set to `0`, k-sampling is disabled.
/// Defaults to `0`, min value of `0`, max value of `500`.
/// Default Value: 0F ///
@@ -152,6 +159,10 @@ public sealed partial class Chatv2Request /// 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. /// + /// + /// When set to `true`, tool calls in the Assistant message will be forced to follow the tool definition strictly. Learn more in the [Strict Tools guide](https://docs.cohere.com/docs/structured-outputs-json#structured-outputs-tools).
+ /// **Note**: The first few requests with a new set of tools will take longer to process. + /// /// /// 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. /// @@ -199,7 +210,7 @@ public sealed partial class Chatv2Request /// Used to reduce repetitiveness of generated tokens. Similar to `frequency_penalty`, except that this penalty is applied equally to all tokens that have already appeared, regardless of their exact frequencies. /// /// - /// Ensures that only the top `k` most likely tokens are considered for generation at each step. When `k` is set to `0`, k-sampling is disabled.
+ /// Ensures that only the top `k` most likely tokens are considered for generation at each step. When `k` is set to `0`, k-sampling is disabled.
/// Defaults to `0`, min value of `0`, max value of `500`.
/// Default Value: 0F /// @@ -216,6 +227,7 @@ public Chatv2Request( string model, global::System.Collections.Generic.IList messages, global::System.Collections.Generic.IList? tools, + bool? strictTools, global::System.Collections.Generic.IList>? documents, global::Cohere.CitationOptions? citationOptions, global::Cohere.ResponseFormatV2? responseFormat, @@ -233,6 +245,7 @@ public Chatv2Request( this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model)); this.Messages = messages ?? throw new global::System.ArgumentNullException(nameof(messages)); this.Tools = tools; + this.StrictTools = strictTools; this.Documents = documents; this.CitationOptions = citationOptions; this.ResponseFormat = responseFormat; diff --git a/src/libs/Cohere/openapi.yaml b/src/libs/Cohere/openapi.yaml index 875f7a0..b11e869 100644 --- a/src/libs/Cohere/openapi.yaml +++ b/src/libs/Cohere/openapi.yaml @@ -769,6 +769,12 @@ paths: items: $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" + strict_tools: + type: boolean + description: "When set to `true`, tool calls in the Assistant message will be forced to follow the tool definition strictly. Learn more in the [Strict Tools guide](https://docs.cohere.com/docs/structured-outputs-json#structured-outputs-tools).\n\n**Note**: The first few requests with a new set of tools will take longer to process.\n" + x-fern-audiences: + - public + x-fern-availability: beta documents: type: array items: @@ -817,7 +823,7 @@ paths: maximum: 500 minimum: 0 type: number - description: "Ensures that only the top `k` most likely tokens are considered for generation at each step. When `k` is set to `0`, k-sampling is disabled. \nDefaults to `0`, min value of `0`, max value of `500`.\n" + description: "Ensures that only the top `k` most likely tokens are considered for generation at each step. When `k` is set to `0`, k-sampling is disabled.\nDefaults to `0`, min value of `0`, max value of `500`.\n" format: float default: 0 p: