Files
project-lyra/.env.example
T
serversdown 03aceec6fa feat(P3): mind/mouth split — separate voice model for the final reply (seam, default off)
The mind (chat backend/model) decides, reasons, and runs tools → a draft; the mouth
re-voices that draft in her character. Default: no mouth configured → the mind's
draft IS the reply, bit-for-bit the old behavior (and old streaming path untouched).

- config: MOUTH_BACKEND / MOUTH_MODEL. The slot for an eventual fine-tuned voice.
- chat: _mind_loop (tool/generation loop, non-stream, returns draft + tools_run),
  _voice_pass / mind.voice_messages (re-voice the draft, keep every fact/number),
  _mouth_target (active only when configured AND != mind). respond + respond_stream
  branch: mouth off = stream the mind directly (unchanged); mouth on = mind decides
  + runs tools, then the mouth streams the re-voiced reply. Falls back to the draft
  on any mouth failure (chat never breaks).
- Key payoff: the mouth needs no tool support (the mind handles tools), so it can be
  a non-tool character model (Dolphin / Claude / fine-tune). Makes the fine-tune
  easy: teach a small model to *sound* like Lyra, not to be smart.
- tests: mouth target on/off, voice_messages shape, voice_pass revoice+fallback.
  Suite 96 green, ruff clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 06:08:06 +00:00

54 lines
2.4 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
# --- Introspection backend (reflect/think) — her *voice*, may differ from consolidation ---
# Defaults to SUMMARY_BACKEND. Set to run her reflections/thoughts on a steerable model.
INTROSPECTION_BACKEND=
INTROSPECTION_MODEL=
PING_AUTO_SALIENCE=0.8 # a thought this salient auto-pings even without an explicit reach-out
PING_COOLDOWN_MIN=60 # min minutes between AUTO pings (explicit reach-outs bypass)
DIGEST_HOUR=18 # local hour to send her daily "what I've been thinking" digest
CHAT_DELIBERATE=true # think privately before answering substantive chat turns (false = faster, shallower)
MOUTH_BACKEND= # mind/mouth split: separate character/voice model for the final reply (empty = mind speaks)
MOUTH_MODEL=