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
Class Method Detail
Instance Method Detail
def
create_default_config
#
def
embedded_pattern(id : Symbol)
#