What a tool's execute() returns: text and images for the model, details kept in the
transcript but never sent to a model, and value, the R object handed to R callers of the
member (kept in memory only, never persisted).
Usage
gptr_tool_result(
text = NULL,
images = NULL,
details = NULL,
is_error = FALSE,
value = NULL
)Arguments
- text
Character vector, joined with newlines into one text block, or
NULL.- images
Image blocks, PNG/JPEG/GIF/WebP file paths or raw PNG vectors, supplied as a list; also accepts a character vector of paths, one raw PNG vector or
NULL.- details
Named list of details, or
NULL.- is_error
TRUEwhen the result reports a failure.- value
Any R value returned to R callers.
Value
A gptr_tool_result list with content, details, is_error, value, spill,
out_id, truncated and terminate.
Examples
gptr_tool_result("3 rows", details = list(n = 3L), value = 3L)
#> 3 rows