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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

szabosteve
Copy link
Contributor

@szabosteve szabosteve commented May 22, 2025

Overview

Related to elastic/docs-content#310

Two new embedding types are supported via elastic/elasticsearch#120751. This PR expands the embedding_type value description of the PUT Cohere inference endpoint to reflect the changes.

Copy link
Contributor

Following you can find the validation results for the APIs you have changed.

API Status Request Response
inference.chat_completion_unified Missing test Missing test
inference.completion Missing test Missing test
inference.delete Missing test Missing test
inference.get 🟢 1/1 1/1
inference.inference Missing test Missing test
inference.put_alibabacloud Missing test Missing test
inference.put_amazonbedrock Missing test Missing test
inference.put_anthropic Missing test Missing test
inference.put_azureaistudio Missing test Missing test
inference.put_azureopenai Missing test Missing test
inference.put_cohere Missing test Missing test
inference.put_elasticsearch Missing test Missing test
inference.put_elser Missing test Missing test
inference.put_googleaistudio Missing test Missing test
inference.put_googlevertexai Missing test Missing test
inference.put_hugging_face Missing test Missing test
inference.put_jinaai Missing test Missing test
inference.put_mistral Missing test Missing test
inference.put_openai Missing test Missing test
inference.put_voyageai Missing test Missing test
inference.put_watsonx Missing test Missing test
inference.put Missing test Missing test
inference.rerank Missing test Missing test
inference.sparse_embedding Missing test Missing test
inference.stream_completion Missing test Missing test
inference.text_embedding Missing test Missing test
inference.update Missing test Missing test

You can validate these APIs yourself by using the make validate target.

@szabosteve szabosteve changed the title Adds new embedding_type values to PUT Cohere inference endpoint Adds new embedding_type values to PUT Cohere inference endpoint May 22, 2025
@szabosteve szabosteve requested review from ymao1 and a team May 22, 2025 09:51
Copy link
Contributor

Following you can find the validation results for the APIs you have changed.

API Status Request Response
inference.chat_completion_unified Missing test Missing test
inference.completion Missing test Missing test
inference.delete Missing test Missing test
inference.get 🟢 1/1 1/1
inference.inference Missing test Missing test
inference.put_alibabacloud Missing test Missing test
inference.put_amazonbedrock Missing test Missing test
inference.put_anthropic Missing test Missing test
inference.put_azureaistudio Missing test Missing test
inference.put_azureopenai Missing test Missing test
inference.put_cohere Missing test Missing test
inference.put_elasticsearch Missing test Missing test
inference.put_elser Missing test Missing test
inference.put_googleaistudio Missing test Missing test
inference.put_googlevertexai Missing test Missing test
inference.put_hugging_face Missing test Missing test
inference.put_jinaai Missing test Missing test
inference.put_mistral Missing test Missing test
inference.put_openai Missing test Missing test
inference.put_voyageai Missing test Missing test
inference.put_watsonx Missing test Missing test
inference.put Missing test Missing test
inference.rerank Missing test Missing test
inference.sparse_embedding Missing test Missing test
inference.stream_completion Missing test Missing test
inference.text_embedding Missing test Missing test
inference.update Missing test Missing test

You can validate these APIs yourself by using the make validate target.

Copy link
Contributor

@ymao1 ymao1 left a comment

Choose a reason for hiding this comment

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

LGTM thanks!

@@ -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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants