class

ChatGPT::Config

Inherits Reference / Object

Constants

BASE_DIR = if ENV.has_key?("CHATGPT_CLI_CONFIG") ENV["CHATGPT_CLI_CONFIG"] elsif ENV.has_key?("HOME") "#{ENV["HOME"]}/.config/chatgpt-cli" else raise("Please set CHATGPT_CLI_CONFIG environment variable.") end
CONFIG_FILE = "#{BASE_DIR}/config.json"
DEFAULT_CONFIG = {{ read_file("/tmp/tmp.ENGAel/src/src/chatgpt/../../config.json") }}
HISTORY_FILE = if ENV.has_key?("HOME") "#{ENV["HOME"]}/.chatgpt_history" else "#{BASE_DIR}/chatgpt_history" end
POST_DATA_FILE = "#{BASE_DIR}/post_data.json"

Constructors

Class methods

instance
Source

Instance methods

code_block_pattern
Source
color(id : Symbol)
Source
command_pattern
Source
config_data
Source
create_default_config
Source
embedded_pattern(id : Symbol)
Source
embedded_patterns
Source
extraction_pattern(id : Symbol)
Source
extraction_patterns
Source
filepath_pattern
Source
load_config
Source
stderr_pattern
Source
stdout_pattern
Source
terminal_colors
Source

Nested types