Skip to content

Commit 0118d2d

Browse files
committed
fix: add self-talk before tool calls and fix output formatting
1 parent 45c5b6c commit 0118d2d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

openkb/agent/query.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
to read specific pages. The summary shows document tree structure with page ranges.
2929
5. Synthesise a clear, well-cited answer grounded in wiki content.
3030
31+
Before each tool call, briefly state what you are about to do.
32+
3133
If you cannot find relevant information, say so clearly.
3234
"""
3335

@@ -113,7 +115,7 @@ async def run_query(question: str, kb_dir: Path, model: str, stream: bool = Fals
113115
if item.type == "tool_call_item":
114116
raw = item.raw_item
115117
args = getattr(raw, "arguments", "{}")
116-
sys.stdout.write(f"[tool call] {raw.name}({args})\n\n")
118+
sys.stdout.write(f"\n[tool call] {raw.name}({args})\n\n")
117119
sys.stdout.flush()
118120
elif item.type == "tool_call_output_item":
119121
pass

0 commit comments

Comments
 (0)