mirror of
https://github.com/NCBM/plyngent.git
synced 2026-11-07 23:47:54 +08:00
core/tools: use run_argv names in truncation docs
This commit is contained in:
@@ -61,7 +61,7 @@ async def get_truncated(token: str, *, max_chars: int = DEFAULT_TOOL_RESULT_MAX_
|
|||||||
"""Fetch the next chunk of a truncated result using its ``truncate_token``.
|
"""Fetch the next chunk of a truncated result using its ``truncate_token``.
|
||||||
|
|
||||||
Pass the token shown at the end of a truncated ``read_file``, ``fetch``,
|
Pass the token shown at the end of a truncated ``read_file``, ``fetch``,
|
||||||
``run_command``, or earlier ``get_truncated`` result to keep reading without
|
``run_argv``, or earlier ``get_truncated`` result to keep reading without
|
||||||
re-requesting the whole source or raising limits. Truncated output carries a
|
re-requesting the whole source or raising limits. Truncated output carries a
|
||||||
fresh token, so chunks chain indefinitely. File chunks resume in the same
|
fresh token, so chunks chain indefinitely. File chunks resume in the same
|
||||||
view as the original read: numbered reads continue as numbered lines
|
view as the original read: numbered reads continue as numbered lines
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
"""Truncate-token cursors for resuming truncated tool results.
|
"""Truncate-token cursors for resuming truncated tool results.
|
||||||
|
|
||||||
Every truncation site (the agent loop's generic tool-result cap,
|
Every truncation site (the agent loop's generic tool-result cap,
|
||||||
``run_command`` / ``run_command_batch`` per-stream caps, ``read_file``,
|
``run_argv`` / ``run_argv_batch`` per-stream caps, ``read_file``,
|
||||||
``fetch``, and request-time compact shrinks) appends the same compact marker
|
``fetch``, and request-time compact shrinks) appends the same compact marker
|
||||||
when output is cut short::
|
when output is cut short::
|
||||||
|
|
||||||
@@ -13,7 +13,7 @@ chunk carries a fresh token, so ``get_truncated`` keeps resuming until the
|
|||||||
source is exhausted (then no marker is emitted).
|
source is exhausted (then no marker is emitted).
|
||||||
|
|
||||||
Resumable sources (``file`` / ``http``) are re-read by ``location`` +
|
Resumable sources (``file`` / ``http``) are re-read by ``location`` +
|
||||||
``offset``. Arbitrary tool output (run_command stdout, todo renders, …) has no
|
``offset``. Arbitrary tool output (run_argv stdout, todo renders, …) has no
|
||||||
resumable source, so its remainder lives in a short-lived in-memory store
|
resumable source, so its remainder lives in a short-lived in-memory store
|
||||||
(``kind="memory"``) that is forgotten when the agent process exits — the model
|
(``kind="memory"``) that is forgotten when the agent process exits — the model
|
||||||
must re-run the tool after that.
|
must re-run the tool after that.
|
||||||
|
|||||||
Reference in New Issue
Block a user