Обновить tools.py
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user