feat: decouple embeddings from the local-chat backend (EMBED_BASE_URL)
Embeddings shared LOCAL_BASE_URL with the local chat backend (the 3090's Ollama), so the 3090 being powered off killed all chat (every turn embeds to recall + to store). Add a separate EMBED_BASE_URL (defaults to LOCAL_BASE_URL, so existing setups are unchanged) and use it in llm.embed. Deployed: a user-level Ollama (CPU) now runs nomic-embed-text on lyra-cortex itself; EMBED_BASE_URL points at 127.0.0.1:11434 while LOCAL_BASE_URL still points the local chat backend at the 3090. Local embeddings verified identical to the 3090's (cosine 0.999994, 768-dim) so existing vectors stay valid — no re-embed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -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,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user