struct

AI::Provider::EmbeddingModel::Result

Inherits JSON::Serializable < Struct < Value < Object

The result of an embedding model doEmbed call.

Constructors

new(embeddings : Array(Embedding), warnings : Array(Shared::Warning), usage : Usage | Nil = nil, provider_metadata : Shared::ProviderMetadata | Nil = nil, response : ResultResponse | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

embeddings

Generated embeddings. They are in the same order as the input values.

Source
provider_metadata

Additional provider-specific metadata.

Source
response

Optional response information for debugging purposes.

Source
usage

Token usage. We only have input tokens for embeddings.

Source
warnings

Warnings for the call, e.g. unsupported settings.

Source