mirror of
https://github.com/ParisNeo/lollms.git
synced 2024-12-18 20:27:58 +00:00
bugfix
This commit is contained in:
parent
04248e848c
commit
633837a2a1
@ -52,6 +52,12 @@ class MainMenu:
|
||||
print(f" {ASCIIColors.color_red}├{ASCIIColors.color_reset} stop_log: stops logging the discussion to a text file")
|
||||
print(f" {ASCIIColors.color_red}├{ASCIIColors.color_reset} send_file: uploads a file to the AI")
|
||||
print(f" {ASCIIColors.color_red}└{ASCIIColors.color_reset} exit: exists the console")
|
||||
|
||||
if self.conversation.personality.help !="":
|
||||
print(f"Personality help:")
|
||||
print(f"{self.conversation.personality.help}")
|
||||
|
||||
|
||||
|
||||
def show_menu(self, options):
|
||||
print("Menu:")
|
||||
@ -301,7 +307,7 @@ class Conversation:
|
||||
print(f"{ASCIIColors.color_reset}")
|
||||
|
||||
if show_welcome_message and self.personality.welcome_message:
|
||||
print(self.personality.name+": ", end="")
|
||||
ASCIIColors.red(self.personality.name+": ", end="")
|
||||
print(self.personality.welcome_message)
|
||||
|
||||
def ask_override_file(self):
|
||||
|
@ -30,24 +30,49 @@ class ASCIIColors:
|
||||
color_bright_orange = '\u001b[38;5;208m'
|
||||
|
||||
@staticmethod
|
||||
def print(text, color=color_bright_red):
|
||||
print(f"{color}{text}{ASCIIColors.color_reset}")
|
||||
def print(text, color=color_bright_red, end="\n", flush=False):
|
||||
print(f"{color}{text}{ASCIIColors.color_reset}", end=end, flush=flush)
|
||||
|
||||
@staticmethod
|
||||
def warning(text):
|
||||
print(f"{ASCIIColors.color_bright_orange}{text}{ASCIIColors.color_reset}")
|
||||
def warning(text, end="\n", flush=False):
|
||||
print(f"{ASCIIColors.color_bright_orange}{text}{ASCIIColors.color_reset}", end=end, flush=flush)
|
||||
|
||||
@staticmethod
|
||||
def error(text):
|
||||
print(f"{ASCIIColors.color_bright_red}{text}{ASCIIColors.color_reset}")
|
||||
def error(text, end="\n", flush=False):
|
||||
print(f"{ASCIIColors.color_bright_red}{text}{ASCIIColors.color_reset}", end=end, flush=flush)
|
||||
|
||||
@staticmethod
|
||||
def success(text):
|
||||
print(f"{ASCIIColors.color_green}{text}{ASCIIColors.color_reset}")
|
||||
def success(text, end="\n", flush=False):
|
||||
print(f"{ASCIIColors.color_green}{text}{ASCIIColors.color_reset}", end=end, flush=flush)
|
||||
|
||||
@staticmethod
|
||||
def info(text):
|
||||
print(f"{ASCIIColors.color_blue}{text}{ASCIIColors.color_reset}")
|
||||
def info(text, end="\n", flush=False):
|
||||
print(f"{ASCIIColors.color_blue}{text}{ASCIIColors.color_reset}", end=end, flush=flush)
|
||||
|
||||
@staticmethod
|
||||
def red(text, end="\n", flush=False):
|
||||
print(f"{ASCIIColors.color_red}{text}{ASCIIColors.color_reset}", end=end, flush=flush)
|
||||
@staticmethod
|
||||
def green(text, end="\n", flush=False):
|
||||
print(f"{ASCIIColors.color_green}{text}{ASCIIColors.color_reset}", end=end, flush=flush)
|
||||
|
||||
@staticmethod
|
||||
def blue(text, end="\n", flush=False):
|
||||
print(f"{ASCIIColors.color_blue}{text}{ASCIIColors.color_reset}", end=end, flush=flush)
|
||||
|
||||
@staticmethod
|
||||
def yellow(text, end="\n", flush=False):
|
||||
print(f"{ASCIIColors.color_yellow}{text}{ASCIIColors.color_reset}", end=end, flush=flush)
|
||||
|
||||
@staticmethod
|
||||
def magenta(text, end="\n", flush=False):
|
||||
print(f"{ASCIIColors.color_magenta}{text}{ASCIIColors.color_reset}", end=end, flush=flush)
|
||||
|
||||
@staticmethod
|
||||
def cyan(text, end="\n", flush=False):
|
||||
print(f"{ASCIIColors.color_cyan}{text}{ASCIIColors.color_reset}", end=end, flush=flush)
|
||||
|
||||
|
||||
|
||||
class BaseConfig():
|
||||
def __init__(self, exceptional_keys=[], config = None):
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 59441921d285c978d7d14a90ae2ff2c8b5abcde6
|
||||
Subproject commit 7b97bc6b466c4dce75450b34c33a1c774cd9b966
|
@ -329,7 +329,7 @@ Date: {{date}}
|
||||
|
||||
# Disclaimer
|
||||
self._disclaimer: str = ""
|
||||
|
||||
self._help: str = ""
|
||||
|
||||
# Default model parameters
|
||||
self._model_temperature: float = 0.8 # higher: more creative, lower more deterministic
|
||||
@ -421,6 +421,7 @@ Date: {{date}}
|
||||
self._anti_prompts = config.get("anti_prompts", self._anti_prompts)
|
||||
self._dependencies = config.get("dependencies", self._dependencies)
|
||||
self._disclaimer = config.get("disclaimer", self._disclaimer)
|
||||
self._help = config.get("help", self._help)
|
||||
self._model_temperature = config.get("model_temperature", self._model_temperature)
|
||||
self._model_n_predicts = config.get("model_n_predicts", self._model_n_predicts)
|
||||
self._model_top_k = config.get("model_top_k", self._model_top_k)
|
||||
@ -529,6 +530,7 @@ Date: {{date}}
|
||||
"anti_prompts": self._anti_prompts,
|
||||
"dependencies": self._dependencies,
|
||||
"disclaimer": self._disclaimer,
|
||||
"help": self._help,
|
||||
"model_temperature": self._model_temperature,
|
||||
"model_n_predicts": self._model_n_predicts,
|
||||
"model_top_k": self._model_top_k,
|
||||
@ -567,6 +569,7 @@ Date: {{date}}
|
||||
"anti_prompts": self._anti_prompts,
|
||||
"dependencies": self._dependencies,
|
||||
"disclaimer": self._disclaimer,
|
||||
"help": self._help,
|
||||
"model_temperature": self._model_temperature,
|
||||
"model_n_predicts": self._model_n_predicts,
|
||||
"model_top_k": self._model_top_k,
|
||||
@ -846,6 +849,25 @@ Date: {{date}}
|
||||
"""
|
||||
self._disclaimer = disclaimer
|
||||
|
||||
@property
|
||||
def help(self) -> str:
|
||||
"""Getter method for the help attribute.
|
||||
|
||||
Returns:
|
||||
str: The help text.
|
||||
"""
|
||||
return self._help
|
||||
|
||||
@help.setter
|
||||
def help(self, help: str):
|
||||
"""Setter method for the help attribute.
|
||||
|
||||
Args:
|
||||
help (str): The help text.
|
||||
"""
|
||||
self._help = help
|
||||
|
||||
|
||||
@property
|
||||
def model_temperature(self) -> float:
|
||||
"""Get the model's temperature."""
|
||||
|
Loading…
Reference in New Issue
Block a user