Skip to content

Support embeddingTypes for Cohere embed #11272

@exentrich

Description

@exentrich

Description

Currently, the @ai-sdk/cohere package hard-codes the embedding type to float, with no way to configure it. The source code even claims that Cohere does not support any embedding types other than float, which is incorrect.

https://github.com/vercel/ai/blob/main/packages/cohere/src/cohere-embedding-model.ts

// The AI SDK only supports 'float' embeddings which are also the only ones
// the Cohere API docs state are supported for all models.
// https://docs.cohere.com/v2/reference/embed#request.body.embedding_types
embedding_types: ['float'],

AI SDK Version

  • ai: ^6.0.0-beta.148
  • @ai-sdk/cohere: ^3.0.0-beta.48

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions