Skip to content

Allow admin mode to execute onready commands with .onready files #2219

@VL4DST3R

Description

@VL4DST3R

I spent a shameful amount of time trying to figure out why for the love of me I could not get a known good simple .bat to work via --onready anymore. Turns out it was due to me switching to admin mode configs and (thanks AI!) that, ahem:

At lines 9732-9733 in koboldcpp.py, there's a security measure that explicitly blocks onready commands from being loaded via config files:

if "onready" in config:
    config["onready"] = "" #do not allow onready commands from config

This means the --onready parameter can only be used from the command line, not from saved configuration files.

Why is this a thing? And why is it not specifically mentioned in the wiki that it is exclusive to only those?

How to use --onready

This is an advanced parameter intended for script or command line usage. You can pass a terminal command (e.g. start a python script) to be executed after Koboldcpp has finished loading. This runs as a subprocess, and can be useful for starting cloudflare tunnels, displaying URLs etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions