Skip to main content

Interface: MakeLangChainDocumentLoaderDataSourceParams

sources.MakeLangChainDocumentLoaderDataSourceParams

Properties

documentLoader

documentLoader: DocumentLoader

Langchain document loader to use to load documents.

Defined in

mongodb-rag-ingest/src/sources/LangchainDocumentLoaderDataSource.ts:10


metadata

Optional metadata: PageMetadata

Metadata to use in the page metadata of all documents.

Page.metadata generated with transformLangchainDocumentToPage() overrides this metadata if the properties have the same key.

Defined in

mongodb-rag-ingest/src/sources/LangchainDocumentLoaderDataSource.ts:23


name

name: string

Name of the data source used by MongoDB RAG Ingest.

Defined in

mongodb-rag-ingest/src/sources/LangchainDocumentLoaderDataSource.ts:15

Methods

transformLangchainDocumentToPage

transformLangchainDocumentToPage(doc): Promise<Omit<Page, "sourceName">>

Take the LangchainDocument returned by the documentLoader and transform it into the Page persisted in the PageStore.

Parameters

NameType
docDocument<Record<string, any>>

Returns

Promise<Omit<Page, "sourceName">>

Defined in

mongodb-rag-ingest/src/sources/LangchainDocumentLoaderDataSource.ts:29