UNPKG

@langchain/core

Version:
1 lines 1.9 kB
{"version":3,"file":"document.d.ts","names":["DocumentInput","Metadata","Record","DocumentInterface","Document"],"sources":["../../src/documents/document.d.ts"],"sourcesContent":["export interface DocumentInput<Metadata extends Record<string, any> = Record<string, any>> {\n pageContent: string;\n metadata?: Metadata;\n /**\n * An optional identifier for the document.\n *\n * Ideally this should be unique across the document collection and formatted\n * as a UUID, but this will not be enforced.\n */\n id?: string;\n}\nexport interface DocumentInterface<Metadata extends Record<string, any> = Record<string, any>> {\n pageContent: string;\n metadata: Metadata;\n /**\n * An optional identifier for the document.\n *\n * Ideally this should be unique across the document collection and formatted\n * as a UUID, but this will not be enforced.\n */\n id?: string;\n}\n/**\n * Interface for interacting with a document.\n */\nexport declare class Document<Metadata extends Record<string, any> = Record<string, any>> implements DocumentInput, DocumentInterface {\n pageContent: string;\n metadata: Metadata;\n /**\n * An optional identifier for the document.\n *\n * Ideally this should be unique across the document collection and formatted\n * as a UUID, but this will not be enforced.\n */\n id?: string;\n constructor(fields: DocumentInput<Metadata>);\n}\n//# sourceMappingURL=document.d.ts.map"],"mappings":";UAAiBA,+BAA+BE,sBAAsBA;EAArDF,WAAAA,EAAAA,MAAa;EAAkBE,QAAAA,CAAAA,EAEjCD,QAFiCC;EAAsBA;;AAE/C;AASvB;;;EAEcD,EAAAA,CAAAA,EAAAA,MAAAA;AAAQ;AAYDG,UAdJD,iBAcYF,CAAA,iBAduBC,MAcvB,CAAA,MAAA,EAAA,GAAA,CAAA,GAd6CA,MAc7C,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA,CAAA;EAAkBA,WAAAA,EAAAA,MAAAA;EAAsBA,QAAAA,EAZvDD,QAYuDC;EAEvDD;;;;;AAFuH;;;;;;cAAhHG,0BAA0BF,sBAAsBA,gCAAgCF,eAAeG;;YAEtGF;;;;;;;;sBAQUD,cAAcC"}