fix(ingestion): correggi path chunks da step-6/ a chunks/
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+4
-4
@@ -2,14 +2,14 @@
|
|||||||
"""
|
"""
|
||||||
Step 8 — Vettorizzazione
|
Step 8 — Vettorizzazione
|
||||||
|
|
||||||
Legge i chunk prodotti da step-6, genera gli embedding tramite Ollama
|
Legge i chunk prodotti da chunks/, genera gli embedding tramite Ollama
|
||||||
e li indicizza in ChromaDB (persistente).
|
e li indicizza in ChromaDB (persistente).
|
||||||
|
|
||||||
Il modello di embedding viene letto da config.py (EMBED_MODEL).
|
Il modello di embedding viene letto da config.py (EMBED_MODEL).
|
||||||
Puoi sovrascriverlo con --model, ma deve corrispondere al modello che
|
Puoi sovrascriverlo con --model, ma deve corrispondere al modello che
|
||||||
userai in rag.py — altrimenti riesegui con --force dopo aver cambiato.
|
userai in rag.py — altrimenti riesegui con --force dopo aver cambiato.
|
||||||
|
|
||||||
Input: step-6/<stem>/chunks.json
|
Input: chunks/<stem>/chunks.json
|
||||||
Output: chroma_db/<stem> (collection ChromaDB)
|
Output: chroma_db/<stem> (collection ChromaDB)
|
||||||
|
|
||||||
Uso:
|
Uso:
|
||||||
@@ -33,7 +33,7 @@ import chromadb
|
|||||||
|
|
||||||
project_root = Path(__file__).parent.parent
|
project_root = Path(__file__).parent.parent
|
||||||
|
|
||||||
CHUNKS_DIR = project_root / "step-6"
|
CHUNKS_DIR = project_root / "chunks"
|
||||||
CHROMA_DIR = project_root / "chroma_db"
|
CHROMA_DIR = project_root / "chroma_db"
|
||||||
|
|
||||||
sys.path.insert(0, str(project_root))
|
sys.path.insert(0, str(project_root))
|
||||||
@@ -213,7 +213,7 @@ def main() -> int:
|
|||||||
|
|
||||||
stems = [args.stem] if args.stem else find_stems()
|
stems = [args.stem] if args.stem else find_stems()
|
||||||
if not stems:
|
if not stems:
|
||||||
print("❌ Nessun chunks.json trovato in step-6/")
|
print("❌ Nessun chunks.json trovato in chunks/")
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
print()
|
print()
|
||||||
|
|||||||
Reference in New Issue
Block a user