StreamingMiddlewareContext
Defined in: packages/ai.matey.types/src/middleware.ts:62
Context for streaming middleware.
Extends
Section titled “Extends”Properties
Section titled “Properties”backend?
Section titled “backend?”
readonlyoptionalbackend:BackendAdapter<unknown,unknown>
Defined in: packages/ai.matey.types/src/middleware.ts:36
Backend that will process (or processed) the request. Available after routing decision.
Inherited from
Section titled “Inherited from”backendName?
Section titled “backendName?”
readonlyoptionalbackendName:string
Defined in: packages/ai.matey.types/src/middleware.ts:41
Backend name/identifier.
Inherited from
Section titled “Inherited from”chunk?
Section titled “chunk?”
optionalchunk:IRStreamChunk
Defined in: packages/ai.matey.types/src/middleware.ts:68
Current stream chunk being processed.
chunksProcessed
Section titled “chunksProcessed”
readonlychunksProcessed:number
Defined in: packages/ai.matey.types/src/middleware.ts:73
Total chunks processed so far.
config
Section titled “config”
readonlyconfig:Record<string,unknown>
Defined in: packages/ai.matey.types/src/middleware.ts:51
Configuration from bridge.
Inherited from
Section titled “Inherited from”isStreaming
Section titled “isStreaming”
readonlyisStreaming:true
Defined in: packages/ai.matey.types/src/middleware.ts:63
Whether this is a streaming request.
Overrides
Section titled “Overrides”request
Section titled “request”request:
IRChatRequest
Defined in: packages/ai.matey.types/src/middleware.ts:25
The IR request being processed. Middleware can inspect and modify this.
Inherited from
Section titled “Inherited from”signal?
Section titled “signal?”
readonlyoptionalsignal:AbortSignal
Defined in: packages/ai.matey.types/src/middleware.ts:56
Abort signal for request cancellation.
Inherited from
Section titled “Inherited from”
readonlystate:Record<string,unknown>
Defined in: packages/ai.matey.types/src/middleware.ts:46
Shared state object for passing data between middleware.
Inherited from
Section titled “Inherited from”streamComplete
Section titled “streamComplete”
readonlystreamComplete:boolean
Defined in: packages/ai.matey.types/src/middleware.ts:78
Whether stream has completed.