Merge pull request #504 from AidanTilgner/bugfix/puppeteer-chromium-not-found

fix: docker should install chromium and puppeteer should be no sandbox
This commit is contained in:
Ong Chung Yau
2023-07-08 20:32:14 +08:00
committed by GitHub
3 changed files with 16 additions and 1 deletions
@@ -73,7 +73,12 @@ class Puppeteer_DocumentLoaders implements INode {
const puppeteerLoader = async (url: string): Promise<any> => {
let docs = []
const loader = new PuppeteerWebBaseLoader(url)
const loader = new PuppeteerWebBaseLoader(url, {
launchOptions: {
args: ['--no-sandbox'],
headless: 'new'
}
})
if (textSplitter) {
docs = await loader.loadAndSplit(textSplitter)
} else {