Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

MemoryStreamInit.md

40 lines1.1 KB

Defined in: packages/ai/src/stream-durability.ts:308

Explicit construction for memoryStream, for callers that don't have the incoming Request — e.g. a TanStack Start server function implementing a joinRun replay for a run id it received as call data:

const durability = memoryStream({ runId })
for await (const chunk of replayRunStream(durability)) yield chunk

Properties

offset?

optional offset?: string | null;

Defined in: packages/ai/src/stream-durability.ts:315

Resume offset captured by the consumer (resumeFrom() returns it). Defaults to null (a producer / from-start reader).


runId

runId: string;

Defined in: packages/ai/src/stream-durability.ts:310

The run this durability adapter attaches to.