Обновить tools.py

This commit is contained in:
2026-05-28 13:33:05 +00:00
parent 1748a39f01
commit c9d4cd453b
+1 -2
View File
@@ -19,9 +19,8 @@ def search_knowledge_base(query: str, max_results: int = 5) -> str:
output_lines = [f"Found {len(results)} result(s):\n"]
for i, r in enumerate(results, 1):
title = r["metadata"].get("title", "Unknown")
score = r["score"]
content = r["content"]
output_lines.append(f"[{i}] Title: {title} | Score: {score}")
output_lines.append(f"[{i}] Title: {title}")
output_lines.append(f" {content}\n")
return "\n".join(output_lines)