Package org.springframework.ai.embedding
Class Embedding
java.lang.Object
org.springframework.ai.embedding.Embedding
- All Implemented Interfaces:
ModelResult<List<Double>>
Represents a single embedding vector.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
Embedding
Creates a newEmbedding
instance.- Parameters:
embedding
- the embedding vector values.index
- the embedding index in a list of embeddings.
-
-
Method Details
-
getOutput
Description copied from interface:ModelResult
Retrieves the output generated by the AI model.- Specified by:
getOutput
in interfaceModelResult<List<Double>>
- Returns:
- Get the embedding vector values.
-
getIndex
- Returns:
- Get the embedding index in a list of embeddings.
-
getMetadata
Description copied from interface:ModelResult
Retrieves the metadata associated with the result of an AI model.- Specified by:
getMetadata
in interfaceModelResult<List<Double>>
- Returns:
- Get the metadata associated with the embedding.
-
equals
-
hashCode
public int hashCode() -
toString
-