5dbcfc7ccf
Her remaining two wishes from the 6-19 sketch: Proactive reach-out (#6, literal): lyra/notify.py pushes to ntfy so she can reach Brian when he's not in the app. thoughts.maybe_ping gates on salience, a cooldown, and local quiet hours (all config-tunable; eager defaults), uses ntfy JSON publish (UTF-8 titles/messages), links to /thoughts, and marks the thread surfaced so chat won't also re-raise it. Disabled unless NTFY_URL is set. External input feed (#1): lyra/feeds.py pulls configurable RSS/Atom feeds (stdlib ElementTree, no new dep; tolerant of RSS 2.0 + Atom), dedupes seen items in a feed_items table, and hands think() one fresh item at a time. New 'react' mode: a would-be new thread instead reacts to a world item (FEED_REACT_PROB). Dream cycle refreshes feeds on its cadence; failures degrade to no item. Config: NTFY_URL/NTFY_TOPIC/LYRA_WEB_URL, PING_SALIENCE/COOLDOWN/QUIET_HOURS, LYRA_TIMEZONE, LYRA_FEEDS, FEED_REACT_PROB (+ .env.example). thought_meta table for ping cooldown. 10 new tests (feeds parse, react mode, ping gating); suite 65. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
43 lines
1.7 KiB
Bash
43 lines
1.7 KiB
Bash
# Local backend (Ollama) — free, private. Point this at your home-lab Ollama.
|
|
LOCAL_BASE_URL=http://localhost:11434
|
|
LOCAL_MODEL=qwen2.5:7b-instruct
|
|
|
|
# MI50 backend — OpenAI-compatible llama.cpp server on the home-lab GPU box (CT202).
|
|
MI50_BASE_URL=http://10.0.0.42:8080/v1
|
|
MI50_MODEL=local-gpu
|
|
|
|
# Cloud backend (OpenAI) — higher quality, costs money.
|
|
OPENAI_API_KEY=
|
|
CLOUD_MODEL=gpt-4o-mini # cheap model for bulk consolidation (summaries/profile/etc.)
|
|
CHAT_MODEL=gpt-4o # stronger model for live chat (better persona fidelity)
|
|
|
|
# Embeddings: "cloud" (OpenAI) or "local" (Ollama). A database is tied to whichever
|
|
# backend created it — don't switch this against an existing DB (vector spaces differ).
|
|
EMBED_BACKEND=cloud
|
|
EMBED_MODEL=text-embedding-3-small
|
|
LOCAL_EMBED_MODEL=nomic-embed-text
|
|
|
|
# Backend used to compact old sessions into summaries ("local" keeps it free).
|
|
SUMMARY_BACKEND=local
|
|
|
|
# Where Lyra stores her memory.
|
|
LYRA_DB_PATH=data/lyra.db
|
|
|
|
# Optional: run embeddings on a separate always-on Ollama (decoupled from
|
|
# LOCAL_BASE_URL, which serves local chat). Defaults to LOCAL_BASE_URL if unset.
|
|
# EMBED_BASE_URL=http://127.0.0.1:11434
|
|
|
|
# --- Thought-loop reach-out (ntfy push) ---
|
|
# Leave NTFY_URL empty to disable proactive pings entirely.
|
|
NTFY_URL=
|
|
NTFY_TOPIC=lyra
|
|
LYRA_WEB_URL=
|
|
PING_SALIENCE=0.7 # min thought salience to push (eager)
|
|
PING_COOLDOWN_MIN=0 # min minutes between pushes (0 = none)
|
|
PING_QUIET_HOURS=1-9 # local hours to stay silent
|
|
LYRA_TIMEZONE=America/New_York
|
|
|
|
# --- External input feeds (RSS/Atom, comma-separated) ---
|
|
LYRA_FEEDS=https://hnrss.org/frontpage,https://www.pokernews.com/rss.php
|
|
FEED_REACT_PROB=0.5 # chance a new thought reacts to a feed item
|