nemo_gym.core.tool_output_images
nemo_gym.core.tool_output_images
Images that a tool returns next to its JSON reply.
A Resources Server tool route can list images under tool_output_images in its JSON reply. Each entry is a
ToolOutputImage: a base64 data: URL of a PNG, JPEG, GIF or WebP image, checked as MediaFile checks prompt
images, and an optional label, which the model gets as text before the image.
simple_agent sends the rest of the reply as the tool output and each image in a user message after the turn’s
tool outputs. The MCP endpoint returns the images as image content after the tool result’s text. An agent that
does not read the key, such as simple_agent_with_compaction, passes the whole reply to the model as text,
base64 data included.
Module Contents
Classes
Functions
Data
API
Bases: BaseModel
One image in a tool reply.
The image’s base64 data, without the data: prefix.
The image’s media type, such as image/png.
Return a tool reply without its tool_output_images, and those images.
A reply that is not a JSON object, or has no tool_output_images key, comes back unchanged with no images.
A null image list means no images. A malformed image list raises pydantic.ValidationError: it is a fault of
the tool, not of the model.