Skip to content

Adds new embedding_type values to PUT Cohere inference endpoint #4403

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 4 commits into from
May 28, 2025
Merged
Changes from 3 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
2 changes: 2 additions & 0 deletions specification/inference/_types/CommonTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,8 @@ export class CohereServiceSettings {
api_key: string
/**
* For a `text_embedding` task, the types of embeddings you want to get back.
* Use `binary` for binary embeddings, which are encoded as bytes with signed int8 precision.
* Use `bit` for binary embeddings, which are encoded as bytes with signed int8 precision (this is a synonym of `binary`).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll also want to add these two new values to the enum CohereEmbeddingType list a bit further down in the file so that they are treated as valid options in code generated from the spec.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @JoshMock, I picked this up since @szabosteve is out this week. I’ve updated the PR based on your suggestion - could you please take a look and approve it if everything looks good?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks for adding that.

* Use `byte` for signed int8 embeddings (this is a synonym of `int8`).
* Use `float` for the default float embeddings.
* Use `int8` for signed int8 embeddings.
Expand Down