We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9494c26 commit d1d3facCopy full SHA for d1d3fac
apps/sim/lib/knowledge/documents/service.ts
@@ -447,7 +447,16 @@ export async function processDocumentAsync(
447
448
logger.info(`[${documentId}] Status updated to 'processing', starting document processor`)
449
450
- const kbConfig = kb[0].chunkingConfig as { maxSize: number; minSize: number; overlap: number }
+ const rawConfig = kb[0].chunkingConfig as {
451
+ maxSize?: number
452
+ minSize?: number
453
+ overlap?: number
454
+ } | null
455
+ const kbConfig = {
456
+ maxSize: rawConfig?.maxSize ?? 1024,
457
+ minSize: rawConfig?.minSize ?? 100,
458
+ overlap: rawConfig?.overlap ?? 200,
459
+ }
460
461
await withTimeout(
462
(async () => {
0 commit comments