Mercurial
diff mrjunejune/README.md @ 260:1f9877b637e9
Add Copilot-powered cyberpunk JRPG chat
Integrate the production JRPG chat with Seobeo streaming, Deita persistence, and a Bazel-managed Copilot SDK and LiteLLM inference stack.
Co-authored-by: Copilot <[email protected]>
| author | MrJuneJune <mrjunejune@users.noreply.github.com> |
|---|---|
| date | Wed, 05 Aug 2026 09:19:41 -0700 |
| parents | 667156fcd3e3 |
| children | b401627fc49e |
line wrap: on
line diff
--- a/mrjunejune/README.md Wed Aug 05 09:19:41 2026 -0700 +++ b/mrjunejune/README.md Wed Aug 05 09:19:41 2026 -0700 @@ -2,23 +2,52 @@ My personal website where I post my blogs / about me and resume. -## Development-only pages +## Copilot JRPG chat + +`/jrpg` streams stateful turns through Seobeo and Deita to a local Python +Copilot SDK/CLI runtime. The SDK uses a loopback LiteLLM Proxy configured with +the `github_copilot` provider. + +Python, Copilot CLI, LiteLLM, the web server, and their lockfiles are all +managed by Bazel. Do not create a virtualenv or install packages with pip. -Experimental pages are compiled and packaged only by the development target: +Authenticate LiteLLM once with the GitHub Copilot device flow: + +```bash +export GITHUB_COPILOT_TOKEN_DIR="$HOME/.local/state/mrjunejune/inference/litellm-copilot" +bazel run //mrjunejune/inference:litellm_proxy -- \ + --authenticate \ + --token-dir "$GITHUB_COPILOT_TOKEN_DIR" +``` + +Then start the complete local stack with one Bazel command: ```bash -bazel run //mrjunejune:mrjunejune_server_dev -c dbg +LITELLM_MASTER_KEY='<local proxy key>' \ + MRJUNEJUNE_ALLOW_ANONYMOUS_INFERENCE=1 \ + bazel run //mrjunejune:run_inference_stack ``` -The production server and the bundle used by `deploy.sh` omit their route -registrations and static assets: +Keep `GITHUB_COPILOT_TOKEN_DIR` exported when starting the stack so it reads the +same tokens. Without an override, both commands use +`$XDG_STATE_HOME/mrjunejune/inference/litellm-copilot`, or +`~/.local/state/mrjunejune/inference/litellm-copilot` when `XDG_STATE_HOME` is +unset. `MRJUNEJUNE_INFERENCE_STATE` moves all service-owned state. Internal +processes bind to loopback. Provider keys, OAuth tokens, conversation IDs, +prompts, and model output must not be committed or logged. + +Anonymous inference is disabled unless +`MRJUNEJUNE_ALLOW_ANONYMOUS_INFERENCE=1` is explicitly set. Enabling it exposes +paid inference without user authentication; keep the Seobeo rate/concurrency +limits and LiteLLM budget enabled. + +The production bundle includes the pinned Python environment, Copilot CLI, +LiteLLM, JRPG assets, and C server: ```bash bazel build -c opt //mrjunejune:mrjunejune_server_bundle ``` -`/jrpg` is currently development-only. - ## WebP assets Raster source images live under `mrjunejune/assets/png/` and `assets/png/`.