optimize with new transformer rmodel

This commit is contained in:
team2
2026-02-26 18:36:57 +01:00
parent 5b4e0ad4c3
commit 8a97bd41e6
5 changed files with 24 additions and 29 deletions

View File

@@ -77,13 +77,14 @@ with open(index_path, "r", encoding="utf-8") as f:
if not text or not chunk_id:
continue
texts.append(text)
# -------------------------------------------------
# E5 requires "passage:" prefix for document chunks
# -------------------------------------------------
texts.append(f"passage: {text}")
ids.append(chunk_id)
if not texts:
print("No chunks found. Removing vector index.")
# Entferne final erst später in PHP atomar
sys.exit(0)
print(f"Loaded {len(texts)} chunks.")