optimize with new transformer rmodel
This commit is contained in:
@@ -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.")
|
||||
|
||||
Reference in New Issue
Block a user