toResult
Converts an instance of AIAgentEnvironmentToolResultToAgentContent to a ReceivedToolResult.
Return
A ReceivedToolResult containing the tool call identifier, tool name, message content, and optional tool result extracted from the current instance.
Throws
if the instance is not of type AIAgentEnvironmentToolResultToAgentContent.
Converts an instance of AIAgentEnvironmentToolResultToAgentContent
to a ReceivedToolResult
.
Return
A ReceivedToolResult
containing the tool call identifier, tool name, message content, and the result of the tool execution.