class ChatGPT::Config

Defined in:

chatgpt/config.cr

Constant Summary

BASE_DIR = if ENV.has_key?("CHATGPT_CLI_CONFIG") ENV["CHATGPT_CLI_CONFIG"] else if ENV.has_key?("HOME") "#{ENV["HOME"]}/.config/chatgpt-cli" else raise("Please set CHATGPT_CLI_CONFIG environment variable.") end end
CONFIG_FILE = "#{BASE_DIR}/config.json"
DEFAULT_CONFIG = {{ read_file("/srv/crystaldoc.info/github-kojix2-chatgpt-cli-v0.6.0/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 Method Summary

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Class Method Detail

def self.instance #

[View source]

Instance Method Detail

def code_block_pattern #

[View source]
def color(id : Symbol) #

[View source]
def command_pattern #

[View source]
def config_data : ConfigData #

[View source]
def create_default_config #

[View source]
def embedded_pattern(id : Symbol) #

[View source]
def embedded_patterns #

[View source]
def extraction_pattern(id : Symbol) #

[View source]
def extraction_patterns #

[View source]
def filepath_pattern #

[View source]
def load_config #

[View source]
def stderr_pattern #

[View source]
def stdout_pattern #

[View source]
def terminal_colors #

[View source]