embed abstract method

Future<List<double>> embed(
  1. EmbeddingInput input,
  2. TaskType taskType
)

The FINAL vector for input — pooled and L2-normalised, of length EmbeddingPassInfo.dimension.

Core guarantees before calling: load succeeded; input.modalities is a subset of the model's modalities; it has one part (one text, one image or one audio clip) unless EmbeddingPassInfo.combinedInputs; every media part's sniffed format is in EmbeddingPassInfo.imageFormats / audioFormats; one call at a time.

The pass owns tokenization and the prefix: text parts get taskType.prefix, media parts never do. Throws EmbeddingInputTooLongException when the input exceeds EmbeddingPassInfo.maxInputTokens, and EmbeddingEngineException for any other failure (anything else thrown is reported as one).

Implementation

Future<List<double>> embed(EmbeddingInput input, TaskType taskType);