Package org.springframework.ai.embedding
Class EmbeddingResponse
java.lang.Object
org.springframework.ai.embedding.EmbeddingResponse
- All Implemented Interfaces:
ModelResponse<Embedding>
Embedding response object.
-
Constructor Summary
ConstructorDescriptionEmbeddingResponse
(List<Embedding> embeddings) Creates a newEmbeddingResponse
instance with empty metadata.EmbeddingResponse
(List<Embedding> embeddings, EmbeddingResponseMetadata metadata) Creates a newEmbeddingResponse
instance. -
Method Summary
-
Constructor Details
-
EmbeddingResponse
Creates a newEmbeddingResponse
instance with empty metadata.- Parameters:
embeddings
- the embedding data.
-
EmbeddingResponse
Creates a newEmbeddingResponse
instance.- Parameters:
embeddings
- the embedding data.metadata
- the embedding metadata.
-
-
Method Details
-
getMetadata
Description copied from interface:ModelResponse
Retrieves the response metadata associated with the AI model's response.- Specified by:
getMetadata
in interfaceModelResponse<Embedding>
- Returns:
- Get the embedding metadata.
-
getResult
Description copied from interface:ModelResponse
Retrieves the result of the AI model.- Specified by:
getResult
in interfaceModelResponse<Embedding>
- Returns:
- the result generated by the AI model
-
getResults
Description copied from interface:ModelResponse
Retrieves the list of generated outputs by the AI model.- Specified by:
getResults
in interfaceModelResponse<Embedding>
- Returns:
- Get the embedding data.
-
equals
-
hashCode
public int hashCode() -
toString
-