INNER CODE UNIT · Python

install

adamyodinsky/TerminalGPT · terminalgpt/main.py:124

def install():
    """Install the terminalgpt openai api key and create app directories."""

    printer: Printer = PrinterFactory.get_printer(style="plain")
    enc_manager: EncryptionManager = EncryptionManager()

    # Get API key from user
    printer.printt(PrintUtils.INSTALL_WELCOME_MESSAGE)
    api_key = getpass.getpass(
        prompt=f"{Style.RESET_ALL}{Style.BRIGHT}Please enter your OpenAI API key:\n{Style.RESET_ALL}"
    )

    printer.printt(f"{Style.BRIGHT}{Fore.GREEN}Great!{Style.RESET_ALL}\n")
    time.sleep(0.5)

    models = list(config.MODELS.keys())
    printer.printt(
        f"{Style.BRIGHT}Please choose one of the models below to be your default model:"

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…