MCPcopy Index your code
hub / github.com/simstudioai/sim / buildJobPayload

Function buildJobPayload

apps/sim/lib/knowledge/documents/service.ts:378–396  ·  view source on GitHub ↗
(
  doc: DocumentData,
  knowledgeBaseId: string,
  processingOptions: ProcessingOptions,
  requestId: string
)

Source from the content-addressed store, hash-verified

376const TRIGGER_BATCH_SIZE = 1000
377
378function buildJobPayload(
379 doc: DocumentData,
380 knowledgeBaseId: string,
381 processingOptions: ProcessingOptions,
382 requestId: string
383): DocumentProcessingPayload {
384 return {
385 knowledgeBaseId,
386 documentId: doc.documentId,
387 docData: {
388 filename: doc.filename,
389 fileUrl: doc.fileUrl,
390 fileSize: doc.fileSize,
391 mimeType: doc.mimeType,
392 },
393 processingOptions,
394 requestId,
395 }
396}
397
398/**
399 * Dispatches document processing jobs via Trigger.dev's `batchTrigger` when

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected