Package org.springframework.ai.minimax
Class MiniMaxEmbeddingModel
java.lang.Object
org.springframework.ai.embedding.AbstractEmbeddingModel
org.springframework.ai.minimax.MiniMaxEmbeddingModel
- All Implemented Interfaces:
 EmbeddingModel,Model<EmbeddingRequest,EmbeddingResponse> 
MiniMax Embedding Model implementation.
- Since:
 - 1.0.0
 - Author:
 - Geng Rong, Thomas Vitale, Soby Chacko
 
- 
Field Summary
Fields inherited from class org.springframework.ai.embedding.AbstractEmbeddingModel
embeddingDimensions - 
Constructor Summary
ConstructorsConstructorDescriptionMiniMaxEmbeddingModel(MiniMaxApi miniMaxApi) Constructor for the MiniMaxEmbeddingModel class.MiniMaxEmbeddingModel(MiniMaxApi miniMaxApi, MetadataMode metadataMode) Initializes a new instance of the MiniMaxEmbeddingModel class.MiniMaxEmbeddingModel(MiniMaxApi miniMaxApi, MetadataMode metadataMode, MiniMaxEmbeddingOptions miniMaxEmbeddingOptions) Initializes a new instance of the MiniMaxEmbeddingModel class.MiniMaxEmbeddingModel(MiniMaxApi miniMaxApi, MetadataMode metadataMode, MiniMaxEmbeddingOptions miniMaxEmbeddingOptions, org.springframework.retry.support.RetryTemplate retryTemplate) Initializes a new instance of the MiniMaxEmbeddingModel class.MiniMaxEmbeddingModel(MiniMaxApi miniMaxApi, MetadataMode metadataMode, MiniMaxEmbeddingOptions options, org.springframework.retry.support.RetryTemplate retryTemplate, io.micrometer.observation.ObservationRegistry observationRegistry) Initializes a new instance of the MiniMaxEmbeddingModel class. - 
Method Summary
Modifier and TypeMethodDescriptioncall(EmbeddingRequest request) Executes a method call to the AI model.float[]Embeds the given document's content into a vector.voidsetObservationConvention(EmbeddingModelObservationConvention observationConvention) Methods 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
- 
MiniMaxEmbeddingModel
Constructor for the MiniMaxEmbeddingModel class.- Parameters:
 miniMaxApi- The MiniMaxApi instance to use for making API requests.
 - 
MiniMaxEmbeddingModel
Initializes a new instance of the MiniMaxEmbeddingModel class.- Parameters:
 miniMaxApi- The MiniMaxApi instance to use for making API requests.metadataMode- The mode for generating metadata.
 - 
MiniMaxEmbeddingModel
public MiniMaxEmbeddingModel(MiniMaxApi miniMaxApi, MetadataMode metadataMode, MiniMaxEmbeddingOptions miniMaxEmbeddingOptions) Initializes a new instance of the MiniMaxEmbeddingModel class.- Parameters:
 miniMaxApi- The MiniMaxApi instance to use for making API requests.metadataMode- The mode for generating metadata.miniMaxEmbeddingOptions- The options for MiniMax embedding.
 - 
MiniMaxEmbeddingModel
public MiniMaxEmbeddingModel(MiniMaxApi miniMaxApi, MetadataMode metadataMode, MiniMaxEmbeddingOptions miniMaxEmbeddingOptions, org.springframework.retry.support.RetryTemplate retryTemplate) Initializes a new instance of the MiniMaxEmbeddingModel class.- Parameters:
 miniMaxApi- The MiniMaxApi instance to use for making API requests.metadataMode- The mode for generating metadata.miniMaxEmbeddingOptions- The options for MiniMax embedding.retryTemplate- - The RetryTemplate for retrying failed API requests.
 - 
MiniMaxEmbeddingModel
public MiniMaxEmbeddingModel(MiniMaxApi miniMaxApi, MetadataMode metadataMode, MiniMaxEmbeddingOptions options, org.springframework.retry.support.RetryTemplate retryTemplate, io.micrometer.observation.ObservationRegistry observationRegistry) Initializes a new instance of the MiniMaxEmbeddingModel class.- Parameters:
 miniMaxApi- - The MiniMaxApi instance to use for making API requests.metadataMode- - The mode for generating metadata.options- - The options for MiniMax embedding.retryTemplate- - The RetryTemplate for retrying failed API requests.observationRegistry- - The ObservationRegistry used for instrumentation.
 
 - 
 - 
Method Details
- 
embed
Description copied from interface:EmbeddingModelEmbeds the given document's content into a vector.- Parameters:
 document- the document to embed.- Returns:
 - the embedded vector.
 
 - 
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
 
 - 
setObservationConvention
 
 -