Type Alias: IngestionOutcome
@kortexya/reasoninglayer / IngestionOutcome
Type Alias: IngestionOutcome<S, R>
Section titled “Type Alias: IngestionOutcome<S, R>”IngestionOutcome<
S,R> =IngestionQueued<S> |IngestionInline<R>
Defined in: src/resources/ingestion.ts:202
What a sync: false ingestion produced, on a route where the engine may
either queue the work or run it inline.
Type Parameters
Section titled “Type Parameters”S extends IngestionSessionHandle
R
Remarks
Section titled “Remarks”The SDK decides by the HTTP status the engine sent, never by the sync
flag it asked for: 202 is queued, 200 and 201 are inline.
ingestMarkdownandingestMarkdownBatchrun inline (201) on a deployment without a task queue.ingestDocumentwithparseOnly: trueingests nothing, so it answers 200 inline whateversyncis.
Example
Section titled “Example”const outcome = await client.ingestion.ingestMarkdown(request, { sync: false });if (outcome.kind === 'queued') { await outcome.session.waitForCompletion();} else { console.log(outcome.result.stats.entitiesCreated);}