docs(kb-retrieval): rozdzial torow embed takze w docstringu embed_batch

Uzasadnienie "backfill bez fallbacku na PIHA" bylo dotad tylko w docstringu
modulu. Czytelnik ogladajacy help(embed_batch) go nie widzial, a to wlasnie ta
funkcja jest miejscem, w ktorym ktos moglby "uzupelnic brakujacy failover".

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
oskar 2026-08-05 12:32:43 +02:00
parent 241ce6aecd
commit a5e13ca0ca

View file

@ -108,6 +108,11 @@ async def embed_batch(
indexes a vector that doesn't match the `document_chunk.embedding VECTOR(1024)` column. indexes a vector that doesn't match the `document_chunk.embedding VECTOR(1024)` column.
Transport failures propagate as `TRANSIENT_EMBED_ERRORS` -- no built-in retry (see Transport failures propagate as `TRANSIENT_EMBED_ERRORS` -- no built-in retry (see
`embed_batch_resilient`). `embed_batch_resilient`).
No backend failover: this is the backfill path, and it must NOT fall back to Ollama@PIHA the
way `kb-query`'s `embed_router` does for online queries. ~271k chunks at PIHA's ~790 ms/embed
CPU is ~60 h on an 8 GB node shared with Home Assistant, Paperless and kb-postgres. See the
module docstring for the full argument -- the two paths are separate by decision.
""" """
kwargs = {} kwargs = {}
if timeout_s is not None: if timeout_s is not None: