struct

OpenRouter::EmbeddingData

Inherits Struct < Value < Object

A single embedding vector in the response data array

Constructors

new(object : String, index : Int32, raw_embedding : Array(Float64) | String)
Source

Instance methods

embedding_base64

Returns the raw base64 string. Raises if the embedding is an array of floats.

Source
embedding_floats

Returns the embedding as floats. Raises if the embedding is base64 encoded.

Source
index
Source
object
Source
to_json(json : JSON::Builder)
Source