Skip to content

feat:Add texts as required field in EmbedByTypeResponse schema in OpenAPI #176

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

Merged
merged 1 commit into from
Apr 15, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ public sealed partial class EmbedByTypeResponse
/// The text entries for which embeddings were returned.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("texts")]
public global::System.Collections.Generic.IList<string>? Texts { get; set; }
[global::System.Text.Json.Serialization.JsonRequired]
public required global::System.Collections.Generic.IList<string> Texts { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
Expand Down Expand Up @@ -75,18 +76,18 @@ public sealed partial class EmbedByTypeResponse
#endif
public EmbedByTypeResponse(
string id,
global::System.Collections.Generic.IList<string> texts,
global::System.Collections.Generic.IList<global::Cohere.Image>? images,
global::Cohere.ApiMeta? meta,
global::Cohere.EmbedByTypeResponseResponseType? responseType,
global::System.Collections.Generic.IList<string>? texts,
global::Cohere.EmbedByTypeResponseEmbeddings embeddings = default!)
{
this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id));
this.Texts = texts ?? throw new global::System.ArgumentNullException(nameof(texts));
this.Embeddings = embeddings;
this.Images = images;
this.Meta = meta;
this.ResponseType = responseType;
this.Texts = texts;
}

/// <summary>
Expand Down
1 change: 1 addition & 0 deletions src/libs/Cohere/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12851,6 +12851,7 @@ components:
required:
- id
- embeddings
- texts
- api_version
type: object
properties:
Expand Down
Loading