MCPcopy Create free account
hub / github.com/FlowiseAI/Flowise / handleDocumentLoaderOutput

Function handleDocumentLoaderOutput

packages/components/src/utils.ts:1349–1359  ·  view source on GitHub ↗
(docs: Document[], output: string)

Source from the content-addressed store, hash-verified

1347}
1348
1349export const handleDocumentLoaderOutput = (docs: Document[], output: string) => {
1350 if (output === 'document') {
1351 return docs
1352 } else {
1353 let finaltext = ''
1354 for (const doc of docs) {
1355 finaltext += `${doc.pageContent}\n`
1356 }
1357 return handleEscapeCharacters(finaltext, false)
1358 }
1359}
1360
1361export const parseDocumentLoaderMetadata = (metadata: object | string): object => {
1362 if (!metadata) return {}

Callers 6

initMethod · 0.90
initMethod · 0.90
initMethod · 0.90
initMethod · 0.90
initMethod · 0.90

Calls 1

handleEscapeCharactersFunction · 0.85

Tested by

no test coverage detected