File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
packages/components/nodes/documentloaders/Jsonlines Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -37,9 +37,8 @@ class Jsonlines_DocumentLoaders implements INode {
3737 label : 'Pointer Extraction' ,
3838 name : 'pointerName' ,
3939 type : 'string' ,
40- description : 'Extracting the pointer' ,
4140 placeholder : 'Enter pointer name' ,
42- optional : true
41+ optional : false
4342 } ,
4443 {
4544 label : 'Metadata' ,
@@ -60,6 +59,8 @@ class Jsonlines_DocumentLoaders implements INode {
6059 let alldocs = [ ]
6160 let files : string [ ] = [ ]
6261
62+ let pointer = '/' + pointerName . trim ( )
63+
6364 if ( jsonLinesFileBase64 . startsWith ( '[' ) && jsonLinesFileBase64 . endsWith ( ']' ) ) {
6465 files = JSON . parse ( jsonLinesFileBase64 )
6566 } else {
@@ -71,7 +72,7 @@ class Jsonlines_DocumentLoaders implements INode {
7172 splitDataURI . pop ( )
7273 const bf = Buffer . from ( splitDataURI . pop ( ) || '' , 'base64' )
7374 const blob = new Blob ( [ bf ] )
74- const loader = new JSONLinesLoader ( blob , pointerName )
75+ const loader = new JSONLinesLoader ( blob , pointer )
7576
7677 if ( textSplitter ) {
7778 const docs = await loader . loadAndSplit ( textSplitter )
You can’t perform that action at this time.
0 commit comments