struct

AI::OpenAI::OpenAIEmbeddingResponse

Inherits JSON::Serializable < Struct < Value < Object

Response from OpenAI embedding API.

This is a minimal version of the schema, focused on what is needed for the implementation. This approach limits breakages when the API changes and increases efficiency.

Constructors

new(data : Array(OpenAIEmbeddingData), usage : OpenAIEmbeddingUsage | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

data

Array of embedding data objects.

Source
usage

Usage information (optional).

Source