Top Level Namespace

Defined in:

Constant Summary

CONFIG_DEFAULTS = {"wss_url" => "wss://chat.petals.dev/api/v2/generate", "model" => "stabilityai/StableBeluga2", "stop_sequence" => "###", "extra_stop_sequences" => ["</s>"], "start_prompt" => "A chat between a curious human and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.###Assistant: Hi! How can I help you?###", "input_prompt" => "Human: {args}{stop_sequence}Assistant:", "do_sample" => 1, "temperature" => 0.2, "top_p" => 0.9, "max_length" => 2048, "max_new_tokens" => 1}

Default values (Used for program reset or first start)

CONFIG_DIR_PATH = Path["~/.wilt"].expand(home: true)

File & directory path

CONFIG_FILE_PATH = Path["~/.wilt/config.json"].expand(home: true)
HISTORY_FILE_PATH = Path["~/.wilt/history.txt"].expand(home: true)
VERSION = "v0.0.1-alpha"

Program version

Method Summary

Method Detail

def check_mkdir(path) #

[View source]
def get_config #

Return the contents of the config file parsed as JSON


[View source]
def get_history #

Return the string contents of the history file


[View source]
def init_config_file #

Make sure the configuration file exists


[View source]
def init_history_file #

Make sure the history file exists


[View source]
def mkfile(path, contents) #

[View source]