Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat:Update openapi.yaml structure in src/libs/Cohere directory #115

Merged
merged 1 commit into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/libs/Cohere/Generated/Cohere.CohereApi.Chatv2.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,10 @@ partial void ProcessChatv2ResponseContent(
/// A list of available tools (functions) that the model may suggest invoking before producing a text response.<br/>
/// 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.
/// </param>
/// <param name="strictTools">
/// 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/>
/// **Note**: The first few requests with a new set of tools will take longer to process.
/// </param>
/// <param name="documents">
/// 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.
/// </param>
Expand Down Expand Up @@ -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.
/// </param>
/// <param name="k">
/// 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/>
/// 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/>
/// Defaults to `0`, min value of `0`, max value of `500`.<br/>
/// Default Value: 0F
/// </param>
Expand All @@ -586,6 +590,7 @@ partial void ProcessChatv2ResponseContent(
global::System.Collections.Generic.IList<global::Cohere.ChatMessageV2> messages,
string? xClientName = default,
global::System.Collections.Generic.IList<global::Cohere.ToolV2>? tools = default,
bool? strictTools = default,
global::System.Collections.Generic.IList<global::Cohere.OneOf<string, global::Cohere.Document>>? documents = default,
global::Cohere.CitationOptions? citationOptions = default,
global::Cohere.ResponseFormatV2? responseFormat = default,
Expand All @@ -606,6 +611,7 @@ partial void ProcessChatv2ResponseContent(
Model = model,
Messages = messages,
Tools = tools,
StrictTools = strictTools,
Documents = documents,
CitationOptions = citationOptions,
ResponseFormat = responseFormat,
Expand Down
7 changes: 6 additions & 1 deletion src/libs/Cohere/Generated/Cohere.ICohereApi.Chatv2.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.<br/>
/// 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.
/// </param>
/// <param name="strictTools">
/// 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/>
/// **Note**: The first few requests with a new set of tools will take longer to process.
/// </param>
/// <param name="documents">
/// 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.
/// </param>
Expand Down Expand Up @@ -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.
/// </param>
/// <param name="k">
/// 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/>
/// 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/>
/// Defaults to `0`, min value of `0`, max value of `500`.<br/>
/// Default Value: 0F
/// </param>
Expand All @@ -101,6 +105,7 @@ public partial interface ICohereApi
global::System.Collections.Generic.IList<global::Cohere.ChatMessageV2> messages,
string? xClientName = default,
global::System.Collections.Generic.IList<global::Cohere.ToolV2>? tools = default,
bool? strictTools = default,
global::System.Collections.Generic.IList<global::Cohere.OneOf<string, global::Cohere.Document>>? documents = default,
global::Cohere.CitationOptions? citationOptions = default,
global::Cohere.ResponseFormatV2? responseFormat = default,
Expand Down
17 changes: 15 additions & 2 deletions src/libs/Cohere/Generated/Cohere.Models.Chatv2Request.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ public sealed partial class Chatv2Request
[global::System.Text.Json.Serialization.JsonPropertyName("tools")]
public global::System.Collections.Generic.IList<global::Cohere.ToolV2>? Tools { get; set; }

/// <summary>
/// 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/>
/// **Note**: The first few requests with a new set of tools will take longer to process.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("strict_tools")]
public bool? StrictTools { get; set; }

/// <summary>
/// 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.
/// </summary>
Expand Down Expand Up @@ -111,7 +118,7 @@ public sealed partial class Chatv2Request
public float? PresencePenalty { get; set; }

/// <summary>
/// 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/>
/// 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/>
/// Defaults to `0`, min value of `0`, max value of `500`.<br/>
/// Default Value: 0F
/// </summary>
Expand Down Expand Up @@ -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.<br/>
/// 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.
/// </param>
/// <param name="strictTools">
/// 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/>
/// **Note**: The first few requests with a new set of tools will take longer to process.
/// </param>
/// <param name="documents">
/// 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.
/// </param>
Expand Down Expand Up @@ -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.
/// </param>
/// <param name="k">
/// 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/>
/// 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/>
/// Defaults to `0`, min value of `0`, max value of `500`.<br/>
/// Default Value: 0F
/// </param>
Expand All @@ -216,6 +227,7 @@ public Chatv2Request(
string model,
global::System.Collections.Generic.IList<global::Cohere.ChatMessageV2> messages,
global::System.Collections.Generic.IList<global::Cohere.ToolV2>? tools,
bool? strictTools,
global::System.Collections.Generic.IList<global::Cohere.OneOf<string, global::Cohere.Document>>? documents,
global::Cohere.CitationOptions? citationOptions,
global::Cohere.ResponseFormatV2? responseFormat,
Expand All @@ -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;
Expand Down
8 changes: 7 additions & 1 deletion src/libs/Cohere/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
Loading