@langchain/community
Version:
Third-party integrations for LangChain.js
1 lines • 2.24 kB
Source Map (JSON)
{"version":3,"file":"browserbase.d.ts","names":["Document","DocumentInterface","BaseDocumentLoader","DocumentLoader","Browserbase","LoadOptions","ClientOptions","BrowserbaseLoaderOptions","BrowserbaseLoader","Promise","AsyncGenerator"],"sources":["../../../src/document_loaders/web/browserbase.d.ts"],"sourcesContent":["import { Document, type DocumentInterface } from \"@langchain/core/documents\";\nimport { BaseDocumentLoader, type DocumentLoader } from \"@langchain/core/document_loaders/base\";\nimport { Browserbase, type LoadOptions, type ClientOptions } from \"@browserbasehq/sdk\";\ntype BrowserbaseLoaderOptions = ClientOptions & LoadOptions;\n/**\n * Load pre-rendered web pages using a headless browser hosted on Browserbase.\n *\n * Depends on `@browserbasehq/sdk` package.\n * Get your API key from https://browserbase.com\n *\n * @example\n * ```typescript\n * import { BrowserbaseLoader } from \"@langchain/classic/document_loaders/web/browserbase\";\n *\n * const loader = new BrowserbaseLoader([\"https://example.com\"], {\n * apiKey: process.env.BROWSERBASE_API_KEY,\n * textContent: true,\n * });\n *\n * const docs = await loader.load();\n * ```\n *\n * @param {string[]} urls - The URLs of the web pages to load.\n * @param {BrowserbaseLoaderOptions} [options] - Browserbase client options.\n */\nexport declare class BrowserbaseLoader extends BaseDocumentLoader implements DocumentLoader {\n urls: string[];\n options: BrowserbaseLoaderOptions;\n browserbase: Browserbase;\n constructor(urls: string[], options?: BrowserbaseLoaderOptions);\n /**\n * Load pages from URLs.\n *\n * @returns {Promise<DocumentInterface[]>} - A promise which resolves to a list of documents.\n */\n load(): Promise<DocumentInterface[]>;\n /**\n * Load pages from URLs.\n *\n * @returns {Generator<DocumentInterface>} - A generator that yields documents.\n */\n lazyLoad(): AsyncGenerator<Document<{\n url: string;\n }>, void, unknown>;\n}\nexport {};\n//# sourceMappingURL=browserbase.d.ts.map"],"mappings":";;;;;KAGKO,wBAAAA,GAA2BD,gBAAgBD;;AADuC;AAuBvF;;;;;;;;;;AAA2F;;;;;;;;;cAAtEG,iBAAAA,SAA0BN,kBAAAA,YAA8BC;;WAEhEI;eACIH;wCACyBG;;;;;;UAM9BE,QAAQR;;;;;;cAMJS,eAAeV"}