Class ToolResponseAttachment
java.lang.Object
uno.anahata.asi.agi.tool.ToolResponseAttachment
- All Implemented Interfaces:
Displayable
Represents a binary attachment associated with a tool's response.
This is used to capture non-textual output from tool execution, such as
images, PDFs, or other data blobs.
- Author:
- anahata
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionToolResponseAttachment(byte[] data, String mimeType) Constructs a ToolResponseAttachment from raw byte data and MIME type.ToolResponseAttachment(byte[] data, String mimeType, Path sourcePath) Constructs a ToolResponseAttachment with source file path traceability. -
Method Summary
Modifier and TypeMethodDescriptionReturns the human-readable display value representing this entity in UI views.toString()
-
Field Details
-
data
private final byte[] dataThe raw binary data of the attachment. -
mimeType
The MIME type of the data (e.g., "image/png"). -
sourcePath
The source file path if this attachment was created from a local file. Can be null.
-
-
Constructor Details
-
ToolResponseAttachment
Constructs a ToolResponseAttachment from raw byte data and MIME type.- Parameters:
data- The raw binary data of the attachment.mimeType- The MIME type of the data.
-
ToolResponseAttachment
Constructs a ToolResponseAttachment with source file path traceability.- Parameters:
data- The raw binary data of the attachment.mimeType- The MIME type of the data.sourcePath- The original source path on disk, or null.
-
-
Method Details
-
toString
-
getDisplayValue
Returns the human-readable display value representing this entity in UI views.Returns a concise human-readable display string representing this attachment, showing the file name (if available), formatted byte size, and MIME type.
- Specified by:
getDisplayValuein interfaceDisplayable- Returns:
- The display string.
-

