@langchain/core
Version:
Core LangChain.js abstractions and schemas
1 lines • 4.34 kB
Source Map (JSON)
{"version":3,"file":"multimodal.d.cts","names":["BaseContentBlock","Multimodal","KNOWN_BLOCK_TYPES","TMetadata","BaseDataRecord","Uint8Array","DataRecordFileId","DataRecordUrl","DataRecordBase64","Record","DataRecord","Data","Image","Video","Audio","PlainText","File"],"sources":["../../../src/messages/content/multimodal.d.ts"],"sourcesContent":["import { BaseContentBlock } from \"./base.js\";\nexport type Multimodal = never;\nexport declare const KNOWN_BLOCK_TYPES: string[];\nexport declare namespace Multimodal {\n type BaseDataRecord = {\n /**\n * MIME type of the file.\n *\n * @see https://www.iana.org/assignments/media-types/media-types.xhtml#image\n */\n mimeType?: string | undefined;\n };\n type DataRecordFileId = BaseDataRecord & {\n /**\n * ID of the data file, e.g. from a provider's file api\n */\n fileId: string;\n url?: never;\n data?: never;\n };\n type DataRecordUrl = BaseDataRecord & {\n fileId?: never;\n /**\n * URL of the data file\n */\n url: string;\n data?: never;\n };\n type DataRecordBase64 = BaseDataRecord & {\n fileId?: never;\n url?: never;\n /**\n * MIME type of the file. Required for base64 encoding.\n *\n * @see https://www.iana.org/assignments/media-types/media-types.xhtml#image\n */\n mimeType: string;\n /**\n * Base64 encoded string or binary data of the data\n */\n data: string | Uint8Array;\n };\n type DataRecord = DataRecordFileId | DataRecordUrl | DataRecordBase64;\n /** Content block for multimodal data */\n type Data<TMetadata = Record<string, unknown>> = BaseContentBlock & DataRecord & {\n /**\n * MIME type of the file. Required for base64 encoding.\n */\n mimeType?: string;\n /**\n * Metadata of the file\n */\n metadata?: TMetadata;\n /**\n * Content block identifier for multimodal content, e.g. image, video, audio, file or plain text. This can be either:\n * - generated by the provider (e.g., an OpenAI block ID)\n * - generated by LangChain upon creation\n */\n id?: string;\n };\n /** Content block for image data */\n type Image = Data & {\n /** Type of the content block */\n readonly type: \"image\";\n };\n /** Content block for video data */\n type Video = Data & {\n /** Type of the content block */\n readonly type: \"video\";\n };\n /** Content block for audio data */\n type Audio = Data & {\n /** Type of the content block */\n readonly type: \"audio\";\n };\n /** Content block for plain text data */\n type PlainText = Data & {\n /** Type of the content block */\n readonly type: \"text-plain\";\n /**\n * Plaintext content. This is optional if the data is base64 encoded.\n */\n text?: string;\n /**\n * Title of the file, e.g. the title of a document\n */\n title?: string;\n /**\n * Context for the text, e.g. a description or a summary of the text's content\n */\n context?: string;\n };\n /** Content block for file data */\n type File = Data & {\n /**\n * Non-descript multimodal content block\n *\n * This block is intended for files that aren't covered by existing content block types.\n */\n readonly type: \"file\";\n };\n type Standard = Image | Video | Audio | PlainText | File;\n}\n//# sourceMappingURL=multimodal.d.ts.map"],"mappings":";;;KACYC,UAAAA;AAAAA,kBAEaA,UAAAA,CAFH;EAEGA,KAAAA,cAAUE,GAAAA;IASPC;;;;;IA8BaG,QAAAA,CAAAA,EAAAA,MAAAA,GAAAA,SAAAA;EAAgBC,CAAAA;EAE/BC,KAAAA,gBAAAA,GAhCEL,cAgCFK,GAAAA;IAA2BT;;;IAiBpCW,MAAAA,EAAAA,MAAAA;IAKAA,GAAAA,CAAAA,EAAAA,KAAAA;IAKAA,IAAAA,CAAAA,EAAAA,KAAAA;EAKIA,CAAAA;EAiBLA,KAAAA,aAAAA,GAzESP,cAyETO,GAAAA;IAQIC,MAAAA,CAAAA,EAAAA,KAAAA;IAAQC;;;IAA4BG,GAAAA,EAAAA,MAAAA;IAAI,IAAA,CAAA,EAAA,KAAA;;0BAzEhCZ;;;;;;;;;;;;mBAYLC;;oBAEDC,mBAAmBC,gBAAgBC;;wBAE/BC,2BAA2BT,mBAAmBU;;;;;;;;eAQrDP;;;;;;;;;eASFQ;;;;;eAKAA;;;;;eAKAA;;;;;mBAKIA;;;;;;;;;;;;;;;;;cAiBLA;;;;;;;;kBAQIC,QAAQC,QAAQC,QAAQC,YAAYC"}