Package org.springframework.ai.mistralai
Class MistralAiEmbeddingModel
java.lang.Object
org.springframework.ai.embedding.AbstractEmbeddingModel
org.springframework.ai.mistralai.MistralAiEmbeddingModel
- All Implemented Interfaces:
EmbeddingModel,Model<EmbeddingRequest,EmbeddingResponse>
Provides the Mistral AI Embedding Model.
- Since:
- 1.0.0
- Author:
- Ricken Bazolo, Thomas Vitale, Jason Smith
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class org.springframework.ai.embedding.AbstractEmbeddingModel
embeddingDimensions -
Constructor Summary
ConstructorsConstructorDescriptionMistralAiEmbeddingModel(MistralAiApi mistralAiApi) Deprecated.MistralAiEmbeddingModel(MistralAiApi mistralAiApi, MetadataMode metadataMode) Deprecated.MistralAiEmbeddingModel(MistralAiApi mistralAiApi, MetadataMode metadataMode, MistralAiEmbeddingOptions options, org.springframework.retry.support.RetryTemplate retryTemplate) Deprecated.MistralAiEmbeddingModel(MistralAiApi mistralAiApi, MetadataMode metadataMode, MistralAiEmbeddingOptions options, org.springframework.retry.support.RetryTemplate retryTemplate, io.micrometer.observation.ObservationRegistry observationRegistry) MistralAiEmbeddingModel(MistralAiApi mistralAiApi, MistralAiEmbeddingOptions options) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()call(EmbeddingRequest request) Executes a method call to the AI model.float[]Embeds the given document's content into a vector.voidsetObservationConvention(EmbeddingModelObservationConvention observationConvention) Use the provided convention for reporting observation dataMethods inherited from class org.springframework.ai.embedding.AbstractEmbeddingModel
dimensions, dimensionsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.ai.embedding.EmbeddingModel
embed, embed, embed, embedForResponse
-
Constructor Details
-
MistralAiEmbeddingModel
Deprecated. -
MistralAiEmbeddingModel
Deprecated. -
MistralAiEmbeddingModel
@Deprecated public MistralAiEmbeddingModel(MistralAiApi mistralAiApi, MistralAiEmbeddingOptions options) Deprecated. -
MistralAiEmbeddingModel
@Deprecated public MistralAiEmbeddingModel(MistralAiApi mistralAiApi, MetadataMode metadataMode, MistralAiEmbeddingOptions options, org.springframework.retry.support.RetryTemplate retryTemplate) Deprecated. -
MistralAiEmbeddingModel
public MistralAiEmbeddingModel(MistralAiApi mistralAiApi, MetadataMode metadataMode, MistralAiEmbeddingOptions options, org.springframework.retry.support.RetryTemplate retryTemplate, io.micrometer.observation.ObservationRegistry observationRegistry)
-
-
Method Details
-
call
Description copied from interface:ModelExecutes a method call to the AI model.- Parameters:
request- the request object to be sent to the AI model- Returns:
- the response from the AI model
-
embed
Description copied from interface:EmbeddingModelEmbeds the given document's content into a vector.- Parameters:
document- the document to embed.- Returns:
- the embedded vector.
-
setObservationConvention
Use the provided convention for reporting observation data- Parameters:
observationConvention- The provided convention
-
builder
-