feat(web): iPhone PWA fixes (M1) + warm RTO redesign (M2) #3

Merged
serversdown merged 19 commits from dev into main 2026-06-21 02:10:53 -04:00
3 changed files with 9 additions and 1 deletions
Showing only changes of commit df591e4e01 - Show all commits
+4
View File
@@ -22,3 +22,7 @@ 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
+4
View File
@@ -22,6 +22,7 @@ class Config:
embed_backend: str # "cloud" (OpenAI) or "local" (Ollama)
embed_model: str # OpenAI embedding model
local_embed_model: str # Ollama embedding model
embed_base_url: str # Ollama endpoint for embeddings (own box, decoupled from local chat)
summary_backend: str # "local" or "cloud" — backend used to compact memory
db_path: Path
@@ -38,6 +39,9 @@ def load() -> Config:
embed_backend=os.getenv("EMBED_BACKEND", "cloud").lower(),
embed_model=os.getenv("EMBED_MODEL", "text-embedding-3-small"),
local_embed_model=os.getenv("LOCAL_EMBED_MODEL", "nomic-embed-text"),
# Embeddings can live on their own always-on box, separate from the local
# chat backend. Defaults to LOCAL_BASE_URL so existing setups are unchanged.
embed_base_url=os.getenv("EMBED_BASE_URL", os.getenv("LOCAL_BASE_URL", "http://localhost:11434")),
summary_backend=os.getenv("SUMMARY_BACKEND", "local").lower(),
db_path=Path(os.getenv("LYRA_DB_PATH", "data/lyra.db")),
)
+1 -1
View File
@@ -173,7 +173,7 @@ def embed(texts: list[str]) -> list[list[float]]:
cfg = load()
if cfg.embed_backend == "local":
resp = httpx.post(
f"{cfg.local_base_url}/api/embed",
f"{cfg.embed_base_url}/api/embed",
json={"model": cfg.local_embed_model, "input": texts},
timeout=120,
)