class ChatGPT::Config

Defined in:

chatgpt/config.cr

Constant Summary

BASE_DIR = if ENV.has_key?("CHATGPT_CLI_CONFIG") ENV["CHATGPT_CLI_CONFIG"] else "#{ENV["HOME"]}/.config/chatgpt-cli" end
CONFIG_FILE = "#{BASE_DIR}/config.json"
DEFAULT_CONFIG = {{ (`cat /srv/crystaldoc.info/gitlab-kojix2-chatgpt-cli-v0.2.1/src/chatgpt/../../config.json`).chomp.stringify }}
DEFAULT_PROMPTS = {{ (`cat /srv/crystaldoc.info/gitlab-kojix2-chatgpt-cli-v0.2.1/src/chatgpt/../../awesome-chatgpt-prompts/prompts.csv`).chomp.stringify }}
HISTORY_FILE = "#{ENV["HOME"]}/.chatgpt_history"
POST_DATA_FILE = "#{BASE_DIR}/post_data.json"
PROMPTS_FILE = "#{BASE_DIR}/prompts.csv"

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 color(id : Symbol) #

[View source]
def command_regex #

[View source]
def config_data : ConfigData #

[View source]
def file_regex #

[View source]
def load_config #

[View source]
def load_prompts #

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

[View source]
def select_id(id) #

[View source]
def stderr_regex #

[View source]
def stdout_regex #

[View source]
def substitute_patterns #

[View source]
def terminal_colors #

[View source]
def url_regex #

[View source]