feat(agent): align the document tools with the harness-trained shape — ls, read(path), grep(pattern, path?)
This commit is contained in:
@@ -39,7 +39,7 @@ def _chunk(content: str) -> SimpleNamespace:
|
||||
|
||||
def _tool_chunk() -> SimpleNamespace:
|
||||
"""One chunk carrying a malformed-arguments tool call (index 0)."""
|
||||
fn = SimpleNamespace(name="read_document", arguments='{"source": "Homelab",')
|
||||
fn = SimpleNamespace(name="read", arguments='{"path": "Homelab",')
|
||||
tc = SimpleNamespace(index=0, id="call_x", function=fn)
|
||||
delta = SimpleNamespace(content=None, tool_calls=[tc])
|
||||
return SimpleNamespace(choices=[SimpleNamespace(delta=delta)])
|
||||
@@ -194,7 +194,7 @@ def test_llm_error_materialization_passes_through_and_closes() -> None:
|
||||
async def drain() -> None:
|
||||
async for _ in llm.chat_stream(
|
||||
[{"role": "user", "content": "q"}],
|
||||
tools=[{"type": "function", "function": {"name": "read_document"}}],
|
||||
tools=[{"type": "function", "function": {"name": "read"}}],
|
||||
):
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user