INNER CODE UNIT · Python

safety_buffer

adamyodinsky/TerminalGPT · terminalgpt/main.py:92

    safety_buffer = token_limit * 0.25
    ctx.ensure_object(dict)

    ctx.obj["TOKEN_LIMIT"] = token_limit
    ctx.obj["STYLE"] = style
    ctx.obj["PRINTER"] = PrinterFactory.get_printer(style)
    ctx.obj["MODEL"] = model
    ctx.obj["ENC_MNGR"] = EncryptionManager()
    ctx.obj["CONV_MANAGER"] = ConversationManager(
        printer=ctx.obj["PRINTER"],
    )

    ctx.obj["SESSION"] = PromptSession(
        style=PromptStyle.from_dict({"prompt": "bold"}),
        message="\nUser: ",
    )

    ctx.obj["CHAT"] = ChatManager(

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…