EmbeddingVector

@Serializable(with = EmbeddingVectorSerializer::class)
sealed interface EmbeddingVector

Vector representation returned by the API.

Inheritors

Types

Link copied to clipboard
@Serializable
value class Encoded(val value: String) : EmbeddingVector

Base64 representation of little-endian IEEE 754 float32 values.

Link copied to clipboard
@Serializable
value class Numeric(val value: List<Double>) : EmbeddingVector

Numeric JSON vector.

Functions

Link copied to clipboard
open fun values(): List<Double>

Read vector coordinates, decoding base64 float32 data when necessary. Throws IllegalArgumentException for invalid base64 or an incomplete float32 value.