Skip to content

Commit 45c5b6c

Browse files
committed
fix: add blank line between tool calls and before answer in query output
1 parent 0b07a8e commit 45c5b6c

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

openkb/agent/query.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,10 @@ async def run_query(question: str, kb_dir: Path, model: str, stream: bool = Fals
113113
if item.type == "tool_call_item":
114114
raw = item.raw_item
115115
args = getattr(raw, "arguments", "{}")
116-
sys.stdout.write(f"\n[tool call] {raw.name}({args})\n")
116+
sys.stdout.write(f"[tool call] {raw.name}({args})\n\n")
117117
sys.stdout.flush()
118118
elif item.type == "tool_call_output_item":
119-
output = str(item.output)
120-
preview = output[:200] + "..." if len(output) > 200 else output
121-
sys.stdout.write(f"[tool output] {preview}\n\n")
122-
sys.stdout.flush()
119+
pass
123120
sys.stdout.write("\n")
124121
sys.stdout.flush()
125122
return "".join(collected) if collected else result.final_output or ""

0 commit comments

Comments
 (0)