struct

Crig::Providers::ChatGPT::ChatGPTBuilder

Inherits Struct < Value < Object

Constructors

new(access_token : String | Nil = nil, account_id : String | Nil = nil, base_url : String = CHATGPT_API_BASE_URL, default_instructions : String | Nil = DEFAULT_INSTRUCTIONS, originator : String = DEFAULT_ORIGINATOR, user_agent : String | Nil = nil)
Source

Instance methods

access_token(token : String) : self
Source
access_token
Source
account_id(id : String) : self
Source
account_id
Source
auth_file
Source
auth_file=(auth_file : String | Nil)
Source
base_url(url : String) : self
Source
base_url
Source
build
Source
default_instructions(instructions : String) : self
Source
default_instructions
Source
device_code_handler
Source
device_code_handler=(device_code_handler : Proc(OAuth::DeviceCodePrompt, Nil) | Nil)
Source
oauth

Enable OAuth device-code authentication instead of access-token auth.

Source
on_device_code

Set a callback for displaying the device code prompt to the user.

Source
originator(originator : String) : self
Source
originator
Source
token_dir(path : String) : self
Source
user_agent(agent : String) : self
Source
user_agent
Source