BUGFIX: FAISS Phase-1 TypeError float+str in adapter_integration.py:292
Root cause: RoomIndexManager.stats() returns a dict with mixed types (bool, int, float, str). sum() iterated over all values and crashed when hitting built_at_iso (str) after built_at (float). Fix: Replace stats() call with direct .size and .room_ids properties. Also commit FAISS Phase-1 files (booster.py, room_index.py, seed_data.py) that were deployed to Gateway but not yet in repo. Tests: 58 passed (0 failures)
This commit is contained in:
@@ -286,11 +286,12 @@ class ArchivarMessageHandler:
|
||||
if self._room_index is not None and self._booster is not None:
|
||||
try:
|
||||
self._room_index.build_index()
|
||||
index_stats = self._room_index.stats()
|
||||
room_count = self._room_index.size
|
||||
room_ids = self._room_index.room_ids
|
||||
logger.info(
|
||||
"FAISS Phase-1: Index gebaut — %d Vektoren in %d Räumen: %s",
|
||||
sum(index_stats.values()), len(index_stats),
|
||||
", ".join(f"{rid[:12]}…={n}" for rid, n in index_stats.items())
|
||||
room_count, room_count,
|
||||
", ".join(f"{rid[:12]}…" for rid in room_ids)
|
||||
)
|
||||
# Router mit FAISS-Objekten neu erstellen
|
||||
self._router = BidirectionalRouter(
|
||||
|
||||
Reference in New Issue
Block a user