struct
AI::OpenAI::OpenAIEmbeddingResponse
- AI::OpenAI::OpenAIEmbeddingResponse
- Struct
- Value
- Object
Overview
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.
Included Modules
- JSON::Serializable
Defined in:
ai/openai/embedding/openai_embedding_api.crConstructors
- .new(pull : JSON::PullParser)
- .new(data : Array(OpenAIEmbeddingData), usage : OpenAIEmbeddingUsage | Nil = nil)
- .new(*, __pull_for_json_serializable pull : JSON::PullParser)
Instance Method Summary
-
#data : Array(OpenAIEmbeddingData)
Array of embedding data objects.
-
#usage : OpenAIEmbeddingUsage | Nil
Usage information (optional).