struct
AI::OpenAI::OpenAIChatResponse
- AI::OpenAI::OpenAIChatResponse
- Struct
- Value
- Object
Overview
Full chat completion response.
Included Modules
- JSON::Serializable
Defined in:
ai/openai/chat/openai_chat_api.crConstructors
- .new(pull : JSON::PullParser)
- .new(choices : Array(OpenAIChatResponseChoice), id : String | Nil = nil, created : Int64 | Nil = nil, model : String | Nil = nil, usage : OpenAIChatUsage | Nil = nil)
- .new(*, __pull_for_json_serializable pull : JSON::PullParser)
Instance Method Summary
- #choices : Array(OpenAIChatResponseChoice)
- #created : Int64 | Nil
- #id : String | Nil
- #model : String | Nil
- #usage : OpenAIChatUsage | Nil
Constructor Detail
def self.new(choices : Array(OpenAIChatResponseChoice), id : String | Nil = nil, created : Int64 | Nil = nil, model : String | Nil = nil, usage : OpenAIChatUsage | Nil = nil)
#