GenAI Studio
Reach the GenAI Studio backend running on a board (run.sh, port 5000 by default) through Insight, so the browser never calls the board directly. Configure the board address once, then call the Studio's own API under /api/genai/. /api/genai-setup installs, prepares and starts GenAI Studio on the selected board.
Get the GenAI Studio board settings
Returns the board address Insight relays GenAI calls to, whether it was configured or derived (`127.0.0.1` on a board, otherwise the paired DevKit's `DEVKIT_SYNC_DEVKIT_IP`).
Set the GenAI Studio board settings
Sets or clears the board address. An empty string clears it; an omitted field is unchanged. The address must be `http(s)://host[:port]` with no path. Settings persist in Insight's `cfg.json`.
Relay a GET to the board's GenAI Studio backend
Forwards the request, with its query string, to the configured board and streams the response back unchanged: status, body, content type and the Studio's `X-*` headers. Server-sent event streams such as `models/logs/stream` pass through unbuffered, and binary answers such as the JPEG from `board-camera/snapshot?device=/dev/videoN` byte for byte. The board's self-signed certificate is accepted for the configured address only.
Relay a POST to the board's GenAI Studio backend
Forwards the request body as sent (JSON or multipart audio uploads) to the configured board and streams the response back, so streamed chat replies arrive token by token.
Get GenAI Studio's setup state on the selected board
Reads, on the board Insight is connected to, whether GenAI Studio is installed (`/media/nvme/prebuilt-apps/examples/genai/neat-genai-studio`), prepared (`setup.sh` has run) and running, and the progress of a setup job started with `POST /api/genai-setup/run`. A failed step carries the cause, the fixes and the command to run by hand; a running step with no new output for a while carries a `stall` note.
Install, prepare and start GenAI Studio on the selected board
Starts one detached job on the board running every step that is not done yet, in order: `NEAT_APPS_SKIP_DEPENDENCIES=1 NEAT_APPS_OVERWRITE=1 sima-cli neat install apps` from `/media/nvme` (the running Insight is never reinstalled; an Insight built from develop or any branch other than main installs `apps@develop`, and a GenAI Studio from another channel or built for an older Neat Library line is replaced, its files kept in `/media/nvme/.prebuilt-apps-backup`), `setup.sh` without a terminal (default voice languages), then `run.sh`, which keeps running. NVMe must be mounted at `/media/nvme`; caches and temporary files use `/media/nvme/.cache/neat-genai-studio`. The job outlives the request, the SSH session and Insight; its logs are in `~/.neat-insight/genai-setup/` on the board. Refuses while a step runs or GenAI Studio is still starting (`setup_running`), when everything is done (`setup_done`), or when a step's prerequisite is missing (`setup_blocked`, with the step and the fix). `{'redo': 'prepare'}` runs `setup.sh` again and restarts GenAI Studio, for example after fixing what it warned about; GenAI Studio is stopped first. A GenAI Studio still running while an earlier step failed or was stopped is also stopped first, and started again after that step.
Stop the GenAI Studio setup job
Ends the running setup step and the steps queued after it; the step is reported as failed with the message that it was stopped. During the start step this stops GenAI Studio with `run.sh stop`, and the start step waits to be run again. Does nothing when no job runs.
Stop GenAI Studio on the board
Stops GenAI Studio with `run.sh stop`, whether the setup job or a shell on the board started it, and waits until it has ended. The start step then waits to be run again. Refused with `setup_running` while a setup step is in progress; does nothing when GenAI Studio is not running.