Represents the embedding results of a model. Typically used as a result for embedding tasks.
Public Constructors
Public Methods
static EmbeddingResult | |
static EmbeddingResult |
createFromProto(EmbeddingsProto.EmbeddingResult proto)
Creates a
EmbeddingResult object from a ERROR(/EmbeddingsProto.EmbeddingResult)
protobuf message. |
abstract List<Embedding> |
embeddings()
The embedding results for each head of the model.
|
abstract Optional<Long> |
timestampMs()
The optional timestamp (in milliseconds) of the start of the chunk of data corresponding to
these results.
|
Inherited Methods
Public Constructors
public EmbeddingResult ()
Public Methods
public static EmbeddingResult create (List<Embedding> embeddings, Optional<Long> timestampMs)
Creates a EmbeddingResult
instance.
Parameters
embeddings | the list of Embedding objects containing the embedding for each head
of the model. |
---|---|
timestampMs | the optional timestamp (in milliseconds) of the start of the chunk of data corresponding to these results. |
public static EmbeddingResult createFromProto (EmbeddingsProto.EmbeddingResult proto)
Creates a EmbeddingResult
object from a ERROR(/EmbeddingsProto.EmbeddingResult)
protobuf message.
Parameters
proto | the ERROR(/EmbeddingsProto.EmbeddingResult) protobuf message to convert.
|
---|
public abstract Optional<Long> timestampMs ()
The optional timestamp (in milliseconds) of the start of the chunk of data corresponding to these results.
This is only used for embedding extraction on time series (e.g. audio embedder). In these use cases, the amount of data to process might exceed the maximum size that the model can process: to solve this, the input data is split into multiple chunks starting at different timestamps.