Skip to content

Type Alias: IngestionOutcome

@kortexya/reasoninglayer


@kortexya/reasoninglayer / IngestionOutcome

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.

S extends IngestionSessionHandle

R

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.

  • ingestMarkdown and ingestMarkdownBatch run inline (201) on a deployment without a task queue.
  • ingestDocument with parseOnly: true ingests nothing, so it answers 200 inline whatever sync is.
const outcome = await client.ingestion.ingestMarkdown(request, { sync: false });
if (outcome.kind === 'queued') {
await outcome.session.waitForCompletion();
} else {
console.log(outcome.result.stats.entitiesCreated);
}