Class MistralAiEmbeddingModel

java.lang.Object
dev.langchain4j.model.embedding.DimensionAwareEmbeddingModel
dev.langchain4j.model.mistralai.MistralAiEmbeddingModel
All Implemented Interfaces:
EmbeddingModel

public class MistralAiEmbeddingModel extends DimensionAwareEmbeddingModel
Represents a Mistral AI embedding model, such as mistral-embed. You can find description of parameters here.
  • Constructor Details

  • Method Details

    • embedAll

      public Response<List<Embedding>> embedAll(List<TextSegment> textSegments)
      Embeds a list of text segments using the Mistral AI embedding model.
      Parameters:
      textSegments - the list of text segments to embed
      Returns:
      a Response object containing the embeddings and token usage information
    • modelName

      public String modelName()
      Description copied from interface: EmbeddingModel
      Returns the name of the underlying embedding model.

      Implementations are encouraged to override this method and provide the actual model name. The default implementation returns "unknown", which indicates that the model name is unknown.

      Returns:
      the model name or a fallback value if not provided
    • builder