class OpenAI::GPT

Defined in:

open_ai/gpt.cr

Class Method Summary

Instance Method Summary

Class Method Detail

def self.driver_interface : String #

Instance Method Detail

def chat(model : String, message : Message | Array(Message)) #

creates a completion for the chat message


[View source]
def completion_tokens : Int64 #

[View source]
def model(id : String) #

returns the details of the provided model id


[View source]
def models #

returns the available models for the current key


[View source]
def on_load #

[View source]
def on_update #

[View source]
def prompt_tokens : Int64 #

[View source]
def total_tokens : Int64 #

[View source]