Skip to content

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.

@github-actions
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 a team and ymao1 May 22, 2025 09:51
@github-actions
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!

/**
* 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.

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

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

@kosabogi kosabogi requested a review from JoshMock May 27, 2025 09:30
@kosabogi kosabogi merged commit dc80ba5 into main May 28, 2025
8 checks passed
@kosabogi kosabogi deleted the szabosteve/issue-310 branch May 28, 2025 15:22
github-actions bot pushed a commit that referenced this pull request May 28, 2025
)

* Adds new embedding_type values to PUT Cohere inference endpoint.

* Adds values to the CohereEmbeddingType enum

---------

Co-authored-by: kosabogi <[email protected]>
Co-authored-by: kosabogi <[email protected]>
(cherry picked from commit dc80ba5)
@l-trotta
Copy link
Contributor

@szabosteve is this also supposted to be backported to 9.0?

github-actions bot pushed a commit that referenced this pull request May 30, 2025
)

* Adds new embedding_type values to PUT Cohere inference endpoint.

* Adds values to the CohereEmbeddingType enum

---------

Co-authored-by: kosabogi <[email protected]>
Co-authored-by: kosabogi <[email protected]>
(cherry picked from commit dc80ba5)
l-trotta added a commit that referenced this pull request May 30, 2025
) (#4432)

* Adds new embedding_type values to PUT Cohere inference endpoint.

* Adds values to the CohereEmbeddingType enum

---------



(cherry picked from commit dc80ba5)

Co-authored-by: István Zoltán Szabó <[email protected]>
Co-authored-by: kosabogi <[email protected]>
Co-authored-by: kosabogi <[email protected]>
Co-authored-by: Laura Trotta <[email protected]>
l-trotta added a commit that referenced this pull request May 30, 2025
) (#4419)

* Adds new embedding_type values to PUT Cohere inference endpoint.

* Adds values to the CohereEmbeddingType enum

---------



(cherry picked from commit dc80ba5)

Co-authored-by: István Zoltán Szabó <[email protected]>
Co-authored-by: kosabogi <[email protected]>
Co-authored-by: kosabogi <[email protected]>
Co-authored-by: Laura Trotta <[email protected]>
@szabosteve
Copy link
Contributor Author

szabosteve commented Jun 2, 2025

@l-trotta No, it's only for 9.1 and 8.19. I'll revert the 9.0 backport in a bit if you don't mind. And thanks for your help!

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.

7 participants