Package org.springframework.ai.watsonx
Class WatsonxAiEmbeddingModel
java.lang.Object
org.springframework.ai.embedding.AbstractEmbeddingModel
org.springframework.ai.watsonx.WatsonxAiEmbeddingModel
- All Implemented Interfaces:
EmbeddingModel
,Model<EmbeddingRequest,
EmbeddingResponse>
EmbeddingModel
implementation for Watsonx.ai.
Watsonx.ai allows developers to run large language models and generate embeddings. It supports open-source models available on Watsonx.ai models.
Please refer to the official Watsonx.ai website for the most up-to-date information on available models.
- Since:
- 1.0.0
- Author:
- Pablo Sanchidrian Herrera
-
Field Summary
Fields inherited from class org.springframework.ai.embedding.AbstractEmbeddingModel
embeddingDimensions
-
Constructor Summary
ConstructorDescriptionWatsonxAiEmbeddingModel
(WatsonxAiApi watsonxAiApi) WatsonxAiEmbeddingModel
(WatsonxAiApi watsonxAiApi, WatsonxAiEmbeddingOptions defaultOptions) -
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.Methods inherited from class org.springframework.ai.embedding.AbstractEmbeddingModel
dimensions, dimensions
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.ai.embedding.EmbeddingModel
embed, embed, embed, embedForResponse
-
Constructor Details
-
WatsonxAiEmbeddingModel
-
WatsonxAiEmbeddingModel
-
-
Method Details
-
embed
Description copied from interface:EmbeddingModel
Embeds the given document's content into a vector.- Parameters:
document
- the document to embed.- Returns:
- the embedded vector.
-
call
Description copied from interface:Model
Executes 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
-