Class CohereEmbeddingModel

java.lang.Object
dev.langchain4j.model.embedding.DimensionAwareEmbeddingModel
dev.langchain4j.model.cohere.CohereEmbeddingModel
All Implemented Interfaces:
EmbeddingModel

public class CohereEmbeddingModel extends DimensionAwareEmbeddingModel
An implementation of an EmbeddingModel that uses Cohere Embed API.
  • Constructor Details

  • Method Details

    • withApiKey

      @Deprecated(forRemoval=true) public static CohereEmbeddingModel withApiKey(String apiKey)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Please use builder() instead, and explicitly set the model name and, if necessary, other parameters.
    • embedAll

      public Response<List<Embedding>> embedAll(List<TextSegment> textSegments)
      Description copied from interface: EmbeddingModel
      Embeds the text content of a list of TextSegments.
      Parameters:
      textSegments - the text segments to embed.
      Returns:
      the embeddings.