Skip to content

[ML] Bedrock Cohere should support embedding_type #126526

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
prwhelan opened this issue Apr 9, 2025 · 1 comment · May be fixed by #126565
Open

[ML] Bedrock Cohere should support embedding_type #126526

prwhelan opened this issue Apr 9, 2025 · 1 comment · May be fixed by #126565
Assignees
Labels
>enhancement :ml Machine learning Team:ML Meta label for the ML team v8.19.0 v9.1.0

Comments

@prwhelan
Copy link
Member

prwhelan commented Apr 9, 2025

Request should support one of byte, float, int8 as per https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-cohere.html

PUT _inference/text_embedding/multilingual-cohere-v3-search
{
  "service": "amazonbedrock",
  "service_settings": {
    "access_key": "***",
    "secret_key": "***",
    "region": "us-east-1",
    "provider": "Cohere",
    "model": "cohere.embed-multilingual-v3",
    "embedding_type": "float"
  }
}

We currently only support parsing float: AmazonBedrockEmbeddingsResponse

We should be able to reuse this code: CohereEmbeddingsResponseEntity

https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters-embed.html

@prwhelan prwhelan added :ml Machine learning >enhancement Team:ML Meta label for the ML team v8.19.0 v9.1.0 labels Apr 9, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/ml-core (Team:ML)

@prwhelan prwhelan self-assigned this Apr 9, 2025
prwhelan added a commit to prwhelan/elasticsearch that referenced this issue Apr 9, 2025
Add support for passing embedding types in the service settings,
enabling float, int8, and binary embeddings returned in the response.

Close elastic#126526
@prwhelan prwhelan linked a pull request Apr 9, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement :ml Machine learning Team:ML Meta label for the ML team v8.19.0 v9.1.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants