@mastra/core
Version:
11 lines • 574 B
TypeScript
import type { FilePart, ImagePart, TextPart, UIMessage } from '../../../_types/@internal_ai-sdk-v4@0.0.98/dist/index.js';
type ContentPart = TextPart | ImagePart | FilePart;
export type Attachment = NonNullable<UIMessage['experimental_attachments']>[number];
/**
* Converts a list of attachments to a list of content parts
* for consumption by `ai/core` functions.
* Currently only supports images and text attachments.
*/
export declare function attachmentsToParts(attachments: Attachment[]): ContentPart[];
export {};
//# sourceMappingURL=attachments-to-parts.d.ts.map