llm: marimo notebook helper #573

Closed
opened 2026-07-16 19:26:09 +00:00 by kert · 2 comments
Owner

Notebook-side client following the lake/OPPS helper pattern.

Scope

  • client module: search/query against the llm service from notebooks
  • example notebook: semantic search over a docket, side-by-side with the DuckDB comments view

Acceptance

  • example notebook runs green in the notebooks container (nb-watcher clean)

Spec: docs/superpowers/specs/2026-07-16-llm-module-design.md

Notebook-side client following the lake/OPPS helper pattern. **Scope** - [ ] client module: search/query against the llm service from notebooks - [ ] example notebook: semantic search over a docket, side-by-side with the DuckDB comments view **Acceptance** - example notebook runs green in the notebooks container (nb-watcher clean) Spec: [`docs/superpowers/specs/2026-07-16-llm-module-design.md`](https://git.fhirworx.io/homelab/stack/src/branch/main/docs/superpowers/specs/2026-07-16-llm-module-design.md)
kert added this to the P34: LLM Query — RAG API, CLI, notebook client milestone 2026-07-16 19:26:09 +00:00
kert added the notebooksllm labels 2026-07-16 19:26:09 +00:00
Author
Owner

Status audit (2026-08-13, repo-verified): NOT DONE. No notebook-side llm client module and no notebook imports llm anywhere in notebooks/.

**Status audit (2026-08-13, repo-verified):** NOT DONE. No notebook-side llm client module and no notebook imports llm anywhere in notebooks/.
Author
Owner

Done (222a1cd, merged to main): src/llm/client.py — an httpx-only LlmClient (search / similar / chat SSE / health) that imports without the llm extra, so it works in the notebooks container; base URL from LLM_URL, else http://llm:8000 when the compose name resolves, else localhost. notebooks/llm_search.py: docket picker, query box, /search results beside the DuckDB skin_subs.rulemaking_comments view for the same docket, every access guarded into notes. Tests: 18 client tests on httpx.MockTransport, notebook degrade tests, the lazy-import probe extended to llm.client. The nightly notebook set globs notebooks/*.py, so it is included automatically; the live path (service on the gateway network) is exercised there after the llm image is rolled.

Done (222a1cd, merged to main): src/llm/client.py — an httpx-only LlmClient (search / similar / chat SSE / health) that imports without the llm extra, so it works in the notebooks container; base URL from LLM_URL, else http://llm:8000 when the compose name resolves, else localhost. notebooks/llm_search.py: docket picker, query box, /search results beside the DuckDB skin_subs.rulemaking_comments view for the same docket, every access guarded into notes. Tests: 18 client tests on httpx.MockTransport, notebook degrade tests, the lazy-import probe extended to llm.client. The nightly notebook set globs notebooks/*.py, so it is included automatically; the live path (service on the gateway network) is exercised there after the llm image is rolled.
kert closed this issue 2026-09-11 21:27:48 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: homelab/stack#573