import type { MultimodalToolCallResult, ToolCallResult } from '@multimodal/agent-interface'; /** * Convert a ToolCallResult to MultimodalToolCallResult * * This function transforms the original tool call result into a multimodal format * that can be processed by LLMs supporting multimodal inputs. * * Handled cases: * - String content: Converted to text type content part * - Array content: * - Arrays containing objects with image data: Extracts images and preserves other data * - Arrays of primitive values or objects without images: Stringified and converted to text * - Object content with image data: Extracts image data and adds as image_url type * - Supports common image formats (PNG, JPEG, GIF, WEBP) * - Detects image data through explicit type declarations or base64 signatures * - Preserves non-image data from the object as additional text content * - Plain objects without image data: Stringified and converted to text type * - Null/undefined values: Converted to empty string * * Not handled cases: * - Nested multimodal content beyond one level (images in nested objects beyond first level) * - Binary image formats that aren't base64 encoded * - SVG or other vector image formats * - Video, audio or other non-image media types * - Complex hierarchical data structures that might benefit from custom formatting * * Error handling: * - Image processing errors default back to text representation * - Any unexpected errors during conversion result in an error message text * * @param toolCallResult The original tool call result * @returns The multimodal version of the tool call result containing text and/or image content parts */ export declare function convertToMultimodalToolCallResult(toolCallResult: ToolCallResult): MultimodalToolCallResult; //# sourceMappingURL=multimodal.d.ts.map