0
Fork 0
mirror of https://github.com/TanStack/ai.git synced 2026-11-16 19:38:41 +00:00
ai/docs/reference/functions/memoryStream.md
github-actions[bot] 5701bf5184
docs: regenerate API documentation (#1141)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-08-18 19:53:35 +02:00

1.2 KiB

id title
memoryStream memoryStream

Function: memoryStream()

function memoryStream(source, options?): UpsertableStreamDurability;

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

The zero-infrastructure delivery-durability backend. Its versioned cursor is deliberately private: callers and core only pass the returned string back.

Construct from the incoming Request (HTTP transports) or from an explicit MemoryStreamInit (server functions / direct calls that already know the run id).

Logs live in a process-global map, so this backend is for development, tests, and single-process deployments only. Completed runs are evicted after a grace window (see COMPLETED_LOG_TTL_MS); a resume of an evicted or unknown run fails loudly rather than hanging.

Parameters

source

Request | MemoryStreamInit

options?

MemoryStreamOptions = {}

Returns

UpsertableStreamDurability