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
ConstructorsConstructorDescriptionEmbeddingResponse(List<Embedding> embeddings) Creates a newEmbeddingResponseinstance with empty metadata.EmbeddingResponse(List<Embedding> embeddings, EmbeddingResponseMetadata metadata) Creates a newEmbeddingResponseinstance. -
Method Summary
-
Constructor Details
-
EmbeddingResponse
Creates a newEmbeddingResponseinstance with empty metadata.- Parameters:
embeddings- the embedding data.
-
EmbeddingResponse
Creates a newEmbeddingResponseinstance.- Parameters:
embeddings- the embedding data.metadata- the embedding metadata.
-
-
Method Details
-
getMetadata
Description copied from interface:ModelResponseRetrieves the response metadata associated with the AI model's response.- Specified by:
getMetadatain interfaceModelResponse<Embedding>- Returns:
- Get the embedding metadata.
-
getResult
Description copied from interface:ModelResponseRetrieves the result of the AI model.- Specified by:
getResultin interfaceModelResponse<Embedding>- Returns:
- the result generated by the AI model
-
getResults
Description copied from interface:ModelResponseRetrieves the list of generated outputs by the AI model.- Specified by:
getResultsin interfaceModelResponse<Embedding>- Returns:
- Get the embedding data.
-
equals
-
hashCode
public int hashCode() -
toString
-