File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed
examples/studio/conversational-rag Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ if (isBrowser) {
113
113
} else {
114
114
console . log ( `File found: ${ filePath } ` ) ;
115
115
}
116
-
116
+
117
117
await uploadGetUpdateDelete ( filePath , Date . now ( ) . toString ( ) ) ;
118
118
console . log ( '=== First operation completed ===\n' ) ;
119
119
await sleep ( 2000 ) ;
Original file line number Diff line number Diff line change @@ -22,14 +22,14 @@ export class NodeFilesHandler extends BaseFilesHandler {
22
22
async prepareFormDataRequest ( file : FilePathOrFileObject ) : Promise < FormDataRequest > {
23
23
console . log ( 'Preparing form data request for Node.js' ) ;
24
24
try {
25
- const FormData = await import ( 'form-data' ) . then ( m => m . default || m ) ;
25
+ const FormData = await import ( 'form-data' ) . then ( ( m ) => m . default || m ) ;
26
26
console . log ( 'Successfully imported form-data module' ) ;
27
-
27
+
28
28
const formData = new FormData ( ) ;
29
29
console . log ( 'Created new FormData instance' ) ;
30
30
31
31
if ( typeof file === 'string' ) {
32
- const fs = await import ( 'fs' ) . then ( m => m . default || m ) ;
32
+ const fs = await import ( 'fs' ) . then ( ( m ) => m . default || m ) ;
33
33
if ( ! fs . existsSync ( file ) ) {
34
34
throw new Error ( `File not found: ${ file } ` ) ;
35
35
}
Original file line number Diff line number Diff line change @@ -24,15 +24,19 @@ export const isNode =
24
24
25
25
export function createFetchInstance ( ) : Fetch {
26
26
if ( isBrowser || isWebWorker ) {
27
+ console . log ( 'Creating BrowserFetch instance' ) ;
27
28
return new BrowserFetch ( ) ;
28
29
}
29
30
31
+ console . log ( 'Creating NodeFetch instance' ) ;
30
32
return new NodeFetch ( ) ;
31
33
}
32
34
33
35
export function createFilesHandlerInstance ( ) : BaseFilesHandler {
34
36
if ( isBrowser || isWebWorker ) {
37
+ console . log ( 'Creating BrowserFilesHandler instance' ) ;
35
38
return new BrowserFilesHandler ( ) ;
36
39
}
40
+ console . log ( 'Creating NodeFilesHandler instance' ) ;
37
41
return new NodeFilesHandler ( ) ;
38
42
}
You can’t perform that action at this time.
0 commit comments