INNER CODE UNIT · Python
welcome_message
adamyodinsky/TerminalGPT · terminalgpt/chat.py:198
def welcome_message(self, messages: list):
"""Prints the welcome message."""
print()
try:
welcome_message = self.get_user_answer(messages)
self.__printer.print_assistant_message(
welcome_message.choices[0].message.content
)
except KeyboardInterrupt:
self.__printer.print_assistant_message(
PrintUtils.choose_random_message(PrintUtils.STOPPED_MESSAGES),
color=Fore.YELLOW + Style.RESET_ALL,
)
sys.exit(0)
except Exception as error:
self.__printer.print_assistant_message(
str(error), color=Back.RED + Style.BRIGHT
)