struct AI::OpenAI::OpenAIEmbeddingUsage

Overview

Usage information from OpenAI embedding API response.

Included Modules

Defined in:

ai/openai/embedding/openai_embedding_api.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.new(prompt_tokens : Int32 | Nil = nil) #

[View source]
def self.new(*, __pull_for_json_serializable pull : JSON::PullParser) #

[View source]

Instance Method Detail

def prompt_tokens : Int32 | Nil #

The number of tokens used for the prompt.


[View source]