struct OpenAI::Client::Config
- OpenAI::Client::Config
- Struct
- Value
- Object
Defined in:
openai/config.crConstructors
- .new(api_key : String, api_base : String, org_id : String, api_type : ApiType, api_version : String | Nil = nil, empty_msg_limit : Int32 = EMPTY_MESSAGES_LIMIT, model_mapper : Proc(String, String) | Nil = nil, proxy : ProxyConfig | Nil = nil)
- .new(api_key : String, api_base : String, proxy : OpenAI::Client::ProxyConfig | Nil = nil)
Class Method Summary
- .azure(api_key : String | Nil, api_base : String | Nil, api_type : ApiType = :azure, model_mapper : Proc(String, String) | Nil = nil, proxy = nil)
- .default(api_key : String | Nil = nil, proxy = nil)
Instance Method Summary
- #api_base : String
- #api_key : String
- #api_type : ApiType
- #api_version : String | Nil
- #azure_deployment_by_model(model : String) : String
- #clone
- #copy_with(api_key _api_key = @api_key, api_base _api_base = @api_base, org_id _org_id = @org_id, api_type _api_type = @api_type, api_version _api_version = @api_version, empty_msg_limit _empty_msg_limit = @empty_msg_limit, model_mapper _model_mapper = @model_mapper, proxy _proxy = @proxy)
- #empty_msg_limit : Int32
- #model_mapper : Proc(String, String) | Nil
- #org_id : String
- #proxy : ProxyConfig | Nil
- #req_headers
-
#to_s(io : IO) : Nil
Same as
#inspect(io)
.
Constructor Detail
def self.new(api_key : String, api_base : String, org_id : String, api_type : ApiType, api_version : String | Nil = nil, empty_msg_limit : Int32 = EMPTY_MESSAGES_LIMIT, model_mapper : Proc(String, String) | Nil = nil, proxy : ProxyConfig | Nil = nil)
#
def self.new(api_key : String, api_base : String, proxy : OpenAI::Client::ProxyConfig | Nil = nil)
#
Class Method Detail
def self.azure(api_key : String | Nil, api_base : String | Nil, api_type : ApiType = :azure, model_mapper : Proc(String, String) | Nil = nil, proxy = nil)
#
Instance Method Detail
def copy_with(api_key _api_key = @api_key, api_base _api_base = @api_base, org_id _org_id = @org_id, api_type _api_type = @api_type, api_version _api_version = @api_version, empty_msg_limit _empty_msg_limit = @empty_msg_limit, model_mapper _model_mapper = @model_mapper, proxy _proxy = @proxy)
#