class OpenAI::Client
- OpenAI::Client
- Reference
- Object
Defined in:
openai/client.crConstructors
Instance Method Summary
- #api_key=(api_key : String)
- #completions(prompt : String | Nil = nil, max_tokens : Int32 | Nil = nil, temperature : Float64 | Nil = nil, top_p : Float64 | Nil = nil, n : Int32 | Nil = nil, logprobs : Int32 | Nil = nil, echo : Bool | Nil = nil, stop : String | Nil | Array(String) = nil, presence_penalty : Float64 | Nil = nil, frequency_penalty : Float64 | Nil = nil, engine : String = default_engine)
- #completions(prompt : String | Nil = nil, max_tokens : Int32 | Nil = nil, temperature : Float64 | Nil = nil, top_p : Float64 | Nil = nil, n : Int32 | Nil = nil, logprobs : Int32 | Nil = nil, echo : Bool | Nil = nil, stop : String | Nil | Array(String) = nil, presence_penalty : Float64 | Nil = nil, frequency_penalty : Float64 | Nil = nil, engine : String = default_engine, &block : Completion -> _)
- #default_engine : String
- #default_engine=(default_engine : String)
- #engine(id : String = default_engine)
- #engines
- #last_response : LastResponse | Nil
- #search(documents : Array(String), query : String, engine : String = default_engine)
Constructor Detail
Instance Method Detail
def completions(prompt : String | Nil = nil, max_tokens : Int32 | Nil = nil, temperature : Float64 | Nil = nil, top_p : Float64 | Nil = nil, n : Int32 | Nil = nil, logprobs : Int32 | Nil = nil, echo : Bool | Nil = nil, stop : String | Nil | Array(String) = nil, presence_penalty : Float64 | Nil = nil, frequency_penalty : Float64 | Nil = nil, engine : String = default_engine)
#
def completions(prompt : String | Nil = nil, max_tokens : Int32 | Nil = nil, temperature : Float64 | Nil = nil, top_p : Float64 | Nil = nil, n : Int32 | Nil = nil, logprobs : Int32 | Nil = nil, echo : Bool | Nil = nil, stop : String | Nil | Array(String) = nil, presence_penalty : Float64 | Nil = nil, frequency_penalty : Float64 | Nil = nil, engine : String = default_engine, &block : Completion -> _)
#
def search(documents : Array(String), query : String, engine : String = default_engine)
#