diff --git a/wiki-vector-chat.py b/wiki-vector-chat.py index c3d0a76..b0d186c 100644 --- a/wiki-vector-chat.py +++ b/wiki-vector-chat.py @@ -152,12 +152,11 @@ async def search_vector(query: str, top_k: int = 5) -> str: return "" lines = [] for h in hits[:top_k]: - text = h.get("text", "")[:300] + text = h.get("content", "") or h.get("text", "") score = h.get("score", 0) source = h.get("source", "unknown") - meta = h.get("metadata", {}) - author = meta.get("author", "") - channel = meta.get("channel", "") + author = h.get("author", "") + channel = h.get("channel", "") preview = text.replace("\n", " ")[:200] lines.append(f"[{source}] @{author} in #{channel}: {preview} (score: {score:.2f})") return "\n\n".join(lines)