perf: conditional batch embedding — batch for API, sequential for local

This commit is contained in:
CREDO23 2026-03-09 19:12:43 +02:00
parent a49a4db6d6
commit 6eabfe2396
2 changed files with 7 additions and 3 deletions

View file

@ -327,6 +327,7 @@ class Config:
EMBEDDING_MODEL,
**embedding_kwargs,
)
is_local_embedding_model = "://" not in (EMBEDDING_MODEL or "")
chunker_instance = RecursiveChunker(
chunk_size=getattr(embedding_model_instance, "max_seq_length", 512)
)