-
Notifications
You must be signed in to change notification settings - Fork 25.2k
[ML] Bedrock Cohere support for embedding types #126565
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
base: main
Are you sure you want to change the base?
Conversation
Add support for passing embedding types in the service settings, enabling float, int8, and binary embeddings returned in the response. Close elastic#126526
Hi @prwhelan, I've created a changelog YAML for you. |
Pinging @elastic/ml-core (Team:ML) |
@@ -71,6 +76,15 @@ private static AmazonBedrockEmbeddingsServiceSettings embeddingSettingsFromMap( | |||
|
|||
Boolean dimensionsSetByUser = extractOptionalBoolean(map, DIMENSIONS_SET_BY_USER, validationException); | |||
|
|||
var embeddingType = extractOptionalEnum( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a tricky one as the embedding type option depends on the provider but it must go in the service settings as the type cannot change. We can rely on the validate step to catch any cases where the setting must be set but isn't and where the value is not supported.
#126540 is a community contribution that addresses the same missing embedding type problem for Titan. They have added an AmazonBedrockEmbeddingType
class, we could map that type to the specific supported values for the provider. And if the provider does not support that type then the validation will fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't mind waiting until after their change is in, and then we can work from there?
Add support for passing embedding types in the service settings, enabling float, int8, and binary embeddings returned in the response.
Close #126526