diff --git a/packages/server/src/utils/index.ts b/packages/server/src/utils/index.ts index dafe612c..6864cf28 100644 --- a/packages/server/src/utils/index.ts +++ b/packages/server/src/utils/index.ts @@ -328,6 +328,14 @@ export const buildLangchain = async ( logger.debug(`[server]: Finished upserting ${reactFlowNode.data.label} (${reactFlowNode.data.id})`) break } else { + // skip initializing web scraper nodes during prediction since they would have already run as a part of upsert + if ( + reactFlowNode.data.name === 'cheerioWebScraper' || + reactFlowNode.data.name === 'playwrightWebScraper' || + reactFlowNode.data.name === 'puppeteerWebScraper' + ) { + continue + } logger.debug(`[server]: Initializing ${reactFlowNode.data.label} (${reactFlowNode.data.id})`) let outputResult = await newNodeInstance.init(reactFlowNodeData, question, { chatId,