Skip to content

Commit bf2c696

Browse files
Merge pull request #118 from tryAGI/bot/update-openapi_202411272118
feat:Update openapi.yaml file in src/libs/Cohere directory
2 parents f9dc0b0 + 1269e0d commit bf2c696

File tree

4 files changed

+37
-0
lines changed

4 files changed

+37
-0
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,12 @@ partial void ProcessChatv2ResponseContent(
513513
/// Follow the [Migration Guide](https://docs.cohere.com/v2/docs/migrating-v1-to-v2) for instructions on moving from API v1 to API v2.
514514
/// </summary>
515515
/// <param name="xClientName"></param>
516+
/// <param name="stream">
517+
/// Defaults to `false`.<br/>
518+
/// 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/>
519+
/// Streaming is beneficial for user interfaces that render the contents of the response piece by piece, as it gets generated.<br/>
520+
/// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments
521+
/// </param>
516522
/// <param name="model">
517523
/// 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.
518524
/// </param>
@@ -593,6 +599,7 @@ partial void ProcessChatv2ResponseContent(
593599
string model,
594600
global::System.Collections.Generic.IList<global::Cohere.ChatMessageV2> messages,
595601
string? xClientName = default,
602+
bool? stream = default,
596603
global::System.Collections.Generic.IList<global::Cohere.ToolV2>? tools = default,
597604
bool? strictTools = default,
598605
global::System.Collections.Generic.IList<global::Cohere.OneOf<string, global::Cohere.Document>>? documents = default,
@@ -612,6 +619,7 @@ partial void ProcessChatv2ResponseContent(
612619
{
613620
var __request = new global::Cohere.Chatv2Request
614621
{
622+
Stream = stream,
615623
Model = model,
616624
Messages = messages,
617625
Tools = tools,

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ public partial interface ICohereApi
2424
/// Follow the [Migration Guide](https://docs.cohere.com/v2/docs/migrating-v1-to-v2) for instructions on moving from API v1 to API v2.
2525
/// </summary>
2626
/// <param name="xClientName"></param>
27+
/// <param name="stream">
28+
/// Defaults to `false`.<br/>
29+
/// 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/>
30+
/// Streaming is beneficial for user interfaces that render the contents of the response piece by piece, as it gets generated.<br/>
31+
/// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments
32+
/// </param>
2733
/// <param name="model">
2834
/// 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.
2935
/// </param>
@@ -104,6 +110,7 @@ public partial interface ICohereApi
104110
string model,
105111
global::System.Collections.Generic.IList<global::Cohere.ChatMessageV2> messages,
106112
string? xClientName = default,
113+
bool? stream = default,
107114
global::System.Collections.Generic.IList<global::Cohere.ToolV2>? tools = default,
108115
bool? strictTools = default,
109116
global::System.Collections.Generic.IList<global::Cohere.OneOf<string, global::Cohere.Document>>? documents = default,

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@ namespace Cohere
1010
/// </summary>
1111
public sealed partial class Chatv2Request
1212
{
13+
/// <summary>
14+
/// Defaults to `false`.<br/>
15+
/// 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/>
16+
/// Streaming is beneficial for user interfaces that render the contents of the response piece by piece, as it gets generated.<br/>
17+
/// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments
18+
/// </summary>
19+
[global::System.Text.Json.Serialization.JsonPropertyName("stream")]
20+
public bool? Stream { get; set; }
21+
1322
/// <summary>
1423
/// 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.
1524
/// </summary>
@@ -148,6 +157,12 @@ public sealed partial class Chatv2Request
148157
/// <summary>
149158
/// Initializes a new instance of the <see cref="Chatv2Request" /> class.
150159
/// </summary>
160+
/// <param name="stream">
161+
/// Defaults to `false`.<br/>
162+
/// 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/>
163+
/// Streaming is beneficial for user interfaces that render the contents of the response piece by piece, as it gets generated.<br/>
164+
/// Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments
165+
/// </param>
151166
/// <param name="model">
152167
/// 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.
153168
/// </param>
@@ -226,6 +241,7 @@ public sealed partial class Chatv2Request
226241
public Chatv2Request(
227242
string model,
228243
global::System.Collections.Generic.IList<global::Cohere.ChatMessageV2> messages,
244+
bool? stream,
229245
global::System.Collections.Generic.IList<global::Cohere.ToolV2>? tools,
230246
bool? strictTools,
231247
global::System.Collections.Generic.IList<global::Cohere.OneOf<string, global::Cohere.Document>>? documents,
@@ -244,6 +260,7 @@ public Chatv2Request(
244260
{
245261
this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model));
246262
this.Messages = messages ?? throw new global::System.ArgumentNullException(nameof(messages));
263+
this.Stream = stream;
247264
this.Tools = tools;
248265
this.StrictTools = strictTools;
249266
this.Documents = documents;

src/libs/Cohere/openapi.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -759,6 +759,11 @@ paths:
759759
- model
760760
type: object
761761
properties:
762+
stream:
763+
type: boolean
764+
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"
765+
x-fern-audiences:
766+
- public
762767
model:
763768
type: string
764769
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.'

0 commit comments

Comments
 (0)