Skip to content

Commit

Permalink
feat: Updated OpenAPI spec
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Nov 27, 2024
1 parent f9dc0b0 commit 1269e0d
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/libs/Cohere/Generated/Cohere.CohereApi.Chatv2.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,12 @@ partial void ProcessChatv2ResponseContent(
/// Follow the [Migration Guide](https://docs.cohere.com/v2/docs/migrating-v1-to-v2) for instructions on moving from API v1 to API v2.
/// </summary>
/// <param name="xClientName"></param>
/// <param name="stream">
/// Defaults to `false`.<br/>
/// When `true`, the response will be a SSE stream of events. The final event will contain the complete response, and will have an `event_type` of `"stream-end"`.<br/>
/// Streaming is beneficial for user interfaces that render the contents of the response piece by piece, as it gets generated.<br/>
/// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments
/// </param>
/// <param name="model">
/// The name of a compatible [Cohere model](https://docs.cohere.com/v2/docs/models) (such as command-r or command-r-plus) or the ID of a [fine-tuned](https://docs.cohere.com/v2/docs/chat-fine-tuning) model.
/// </param>
Expand Down Expand Up @@ -593,6 +599,7 @@ partial void ProcessChatv2ResponseContent(
string model,
global::System.Collections.Generic.IList<global::Cohere.ChatMessageV2> messages,
string? xClientName = default,
bool? stream = 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,
Expand All @@ -612,6 +619,7 @@ partial void ProcessChatv2ResponseContent(
{
var __request = new global::Cohere.Chatv2Request
{
Stream = stream,
Model = model,
Messages = messages,
Tools = tools,
Expand Down
7 changes: 7 additions & 0 deletions src/libs/Cohere/Generated/Cohere.ICohereApi.Chatv2.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ public partial interface ICohereApi
/// Follow the [Migration Guide](https://docs.cohere.com/v2/docs/migrating-v1-to-v2) for instructions on moving from API v1 to API v2.
/// </summary>
/// <param name="xClientName"></param>
/// <param name="stream">
/// Defaults to `false`.<br/>
/// When `true`, the response will be a SSE stream of events. The final event will contain the complete response, and will have an `event_type` of `"stream-end"`.<br/>
/// Streaming is beneficial for user interfaces that render the contents of the response piece by piece, as it gets generated.<br/>
/// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments
/// </param>
/// <param name="model">
/// The name of a compatible [Cohere model](https://docs.cohere.com/v2/docs/models) (such as command-r or command-r-plus) or the ID of a [fine-tuned](https://docs.cohere.com/v2/docs/chat-fine-tuning) model.
/// </param>
Expand Down Expand Up @@ -104,6 +110,7 @@ public partial interface ICohereApi
string model,
global::System.Collections.Generic.IList<global::Cohere.ChatMessageV2> messages,
string? xClientName = default,
bool? stream = 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,
Expand Down
17 changes: 17 additions & 0 deletions src/libs/Cohere/Generated/Cohere.Models.Chatv2Request.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ namespace Cohere
/// </summary>
public sealed partial class Chatv2Request
{
/// <summary>
/// Defaults to `false`.<br/>
/// When `true`, the response will be a SSE stream of events. The final event will contain the complete response, and will have an `event_type` of `"stream-end"`.<br/>
/// Streaming is beneficial for user interfaces that render the contents of the response piece by piece, as it gets generated.<br/>
/// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("stream")]
public bool? Stream { get; set; }

/// <summary>
/// The name of a compatible [Cohere model](https://docs.cohere.com/v2/docs/models) (such as command-r or command-r-plus) or the ID of a [fine-tuned](https://docs.cohere.com/v2/docs/chat-fine-tuning) model.
/// </summary>
Expand Down Expand Up @@ -148,6 +157,12 @@ public sealed partial class Chatv2Request
/// <summary>
/// Initializes a new instance of the <see cref="Chatv2Request" /> class.
/// </summary>
/// <param name="stream">
/// Defaults to `false`.<br/>
/// When `true`, the response will be a SSE stream of events. The final event will contain the complete response, and will have an `event_type` of `"stream-end"`.<br/>
/// Streaming is beneficial for user interfaces that render the contents of the response piece by piece, as it gets generated.<br/>
/// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments
/// </param>
/// <param name="model">
/// The name of a compatible [Cohere model](https://docs.cohere.com/v2/docs/models) (such as command-r or command-r-plus) or the ID of a [fine-tuned](https://docs.cohere.com/v2/docs/chat-fine-tuning) model.
/// </param>
Expand Down Expand Up @@ -226,6 +241,7 @@ public sealed partial class Chatv2Request
public Chatv2Request(
string model,
global::System.Collections.Generic.IList<global::Cohere.ChatMessageV2> messages,
bool? stream,
global::System.Collections.Generic.IList<global::Cohere.ToolV2>? tools,
bool? strictTools,
global::System.Collections.Generic.IList<global::Cohere.OneOf<string, global::Cohere.Document>>? documents,
Expand All @@ -244,6 +260,7 @@ public Chatv2Request(
{
this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model));
this.Messages = messages ?? throw new global::System.ArgumentNullException(nameof(messages));
this.Stream = stream;
this.Tools = tools;
this.StrictTools = strictTools;
this.Documents = documents;
Expand Down
5 changes: 5 additions & 0 deletions src/libs/Cohere/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,11 @@ paths:
- model
type: object
properties:
stream:
type: boolean
description: "Defaults to `false`.\n\nWhen `true`, the response will be a SSE stream of events. The final event will contain the complete response, and will have an `event_type` of `\"stream-end\"`.\n\nStreaming is beneficial for user interfaces that render the contents of the response piece by piece, as it gets generated.\n\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n"
x-fern-audiences:
- public
model:
type: string
description: 'The name of a compatible [Cohere model](https://docs.cohere.com/v2/docs/models) (such as command-r or command-r-plus) or the ID of a [fine-tuned](https://docs.cohere.com/v2/docs/chat-fine-tuning) model.'
Expand Down

0 comments on commit 1269e0d

Please sign in to comment.