Skip to content

Commit 11717c2

Browse files
Merge pull request #115 from tryAGI/bot/update-openapi_202411270140
feat:Update openapi.yaml structure in src/libs/Cohere directory
2 parents 1183b5b + 662a0e6 commit 11717c2

File tree

4 files changed

+35
-5
lines changed

4 files changed

+35
-5
lines changed

src/libs/Cohere/Generated/Cohere.CohereApi.Chatv2.g.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,10 @@ partial void ProcessChatv2ResponseContent(
520520
/// A list of available tools (functions) that the model may suggest invoking before producing a text response.<br/>
521521
/// 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.
522522
/// </param>
523+
/// <param name="strictTools">
524+
/// 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).<br/>
525+
/// **Note**: The first few requests with a new set of tools will take longer to process.
526+
/// </param>
523527
/// <param name="documents">
524528
/// 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.
525529
/// </param>
@@ -567,7 +571,7 @@ partial void ProcessChatv2ResponseContent(
567571
/// 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.
568572
/// </param>
569573
/// <param name="k">
570-
/// 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. <br/>
574+
/// 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.<br/>
571575
/// Defaults to `0`, min value of `0`, max value of `500`.<br/>
572576
/// Default Value: 0F
573577
/// </param>
@@ -586,6 +590,7 @@ partial void ProcessChatv2ResponseContent(
586590
global::System.Collections.Generic.IList<global::Cohere.ChatMessageV2> messages,
587591
string? xClientName = default,
588592
global::System.Collections.Generic.IList<global::Cohere.ToolV2>? tools = default,
593+
bool? strictTools = default,
589594
global::System.Collections.Generic.IList<global::Cohere.OneOf<string, global::Cohere.Document>>? documents = default,
590595
global::Cohere.CitationOptions? citationOptions = default,
591596
global::Cohere.ResponseFormatV2? responseFormat = default,
@@ -606,6 +611,7 @@ partial void ProcessChatv2ResponseContent(
606611
Model = model,
607612
Messages = messages,
608613
Tools = tools,
614+
StrictTools = strictTools,
609615
Documents = documents,
610616
CitationOptions = citationOptions,
611617
ResponseFormat = responseFormat,

src/libs/Cohere/Generated/Cohere.ICohereApi.Chatv2.g.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ public partial interface ICohereApi
3535
/// A list of available tools (functions) that the model may suggest invoking before producing a text response.<br/>
3636
/// 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.
3737
/// </param>
38+
/// <param name="strictTools">
39+
/// 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).<br/>
40+
/// **Note**: The first few requests with a new set of tools will take longer to process.
41+
/// </param>
3842
/// <param name="documents">
3943
/// 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.
4044
/// </param>
@@ -82,7 +86,7 @@ public partial interface ICohereApi
8286
/// 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.
8387
/// </param>
8488
/// <param name="k">
85-
/// 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. <br/>
89+
/// 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.<br/>
8690
/// Defaults to `0`, min value of `0`, max value of `500`.<br/>
8791
/// Default Value: 0F
8892
/// </param>
@@ -101,6 +105,7 @@ public partial interface ICohereApi
101105
global::System.Collections.Generic.IList<global::Cohere.ChatMessageV2> messages,
102106
string? xClientName = default,
103107
global::System.Collections.Generic.IList<global::Cohere.ToolV2>? tools = default,
108+
bool? strictTools = default,
104109
global::System.Collections.Generic.IList<global::Cohere.OneOf<string, global::Cohere.Document>>? documents = default,
105110
global::Cohere.CitationOptions? citationOptions = default,
106111
global::Cohere.ResponseFormatV2? responseFormat = default,

src/libs/Cohere/Generated/Cohere.Models.Chatv2Request.g.cs

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ public sealed partial class Chatv2Request
3232
[global::System.Text.Json.Serialization.JsonPropertyName("tools")]
3333
public global::System.Collections.Generic.IList<global::Cohere.ToolV2>? Tools { get; set; }
3434

35+
/// <summary>
36+
/// 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).<br/>
37+
/// **Note**: The first few requests with a new set of tools will take longer to process.
38+
/// </summary>
39+
[global::System.Text.Json.Serialization.JsonPropertyName("strict_tools")]
40+
public bool? StrictTools { get; set; }
41+
3542
/// <summary>
3643
/// 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.
3744
/// </summary>
@@ -111,7 +118,7 @@ public sealed partial class Chatv2Request
111118
public float? PresencePenalty { get; set; }
112119

113120
/// <summary>
114-
/// 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. <br/>
121+
/// 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.<br/>
115122
/// Defaults to `0`, min value of `0`, max value of `500`.<br/>
116123
/// Default Value: 0F
117124
/// </summary>
@@ -152,6 +159,10 @@ public sealed partial class Chatv2Request
152159
/// A list of available tools (functions) that the model may suggest invoking before producing a text response.<br/>
153160
/// 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.
154161
/// </param>
162+
/// <param name="strictTools">
163+
/// 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).<br/>
164+
/// **Note**: The first few requests with a new set of tools will take longer to process.
165+
/// </param>
155166
/// <param name="documents">
156167
/// 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.
157168
/// </param>
@@ -199,7 +210,7 @@ public sealed partial class Chatv2Request
199210
/// 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.
200211
/// </param>
201212
/// <param name="k">
202-
/// 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. <br/>
213+
/// 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.<br/>
203214
/// Defaults to `0`, min value of `0`, max value of `500`.<br/>
204215
/// Default Value: 0F
205216
/// </param>
@@ -216,6 +227,7 @@ public Chatv2Request(
216227
string model,
217228
global::System.Collections.Generic.IList<global::Cohere.ChatMessageV2> messages,
218229
global::System.Collections.Generic.IList<global::Cohere.ToolV2>? tools,
230+
bool? strictTools,
219231
global::System.Collections.Generic.IList<global::Cohere.OneOf<string, global::Cohere.Document>>? documents,
220232
global::Cohere.CitationOptions? citationOptions,
221233
global::Cohere.ResponseFormatV2? responseFormat,
@@ -233,6 +245,7 @@ public Chatv2Request(
233245
this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model));
234246
this.Messages = messages ?? throw new global::System.ArgumentNullException(nameof(messages));
235247
this.Tools = tools;
248+
this.StrictTools = strictTools;
236249
this.Documents = documents;
237250
this.CitationOptions = citationOptions;
238251
this.ResponseFormat = responseFormat;

src/libs/Cohere/openapi.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,12 @@ paths:
769769
items:
770770
$ref: '#/components/schemas/ToolV2'
771771
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"
772+
strict_tools:
773+
type: boolean
774+
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"
775+
x-fern-audiences:
776+
- public
777+
x-fern-availability: beta
772778
documents:
773779
type: array
774780
items:
@@ -817,7 +823,7 @@ paths:
817823
maximum: 500
818824
minimum: 0
819825
type: number
820-
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"
826+
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"
821827
format: float
822828
default: 0
823829
p:

0 commit comments

Comments
 (0)