Class MistralAiEmbeddingModel
java.lang.Object
dev.langchain4j.model.embedding.DimensionAwareEmbeddingModel
dev.langchain4j.model.mistralai.MistralAiEmbeddingModel
- All Implemented Interfaces:
EmbeddingModel
Represents a Mistral AI embedding model, such as mistral-embed.
You can find description of parameters here.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Field Summary
Fields inherited from class DimensionAwareEmbeddingModel
dimension -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionbuilder()embedAll(List<TextSegment> textSegments) Embeds a list of text segments using the Mistral AI embedding model.Returns the name of the underlying embedding model.Methods inherited from class DimensionAwareEmbeddingModel
dimension, knownDimensionMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface EmbeddingModel
embed, embed
-
Constructor Details
-
MistralAiEmbeddingModel
-
-
Method Details
-
embedAll
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
Description copied from interface:EmbeddingModelReturns 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
-