AI Docs
API
Class References
Function References
- text
- textOptions
- combineStrategies
- convertMessagesToModelMessages
- convertZodToJsonSchema
- createReplayStream
- embedding
- generateMessageId
- maxIterations
- messages
- modelMessageToUIMessage
- modelMessagesToUIMessages
- normalizeToUIMessage
- parsePartialJSON
- summarize
- toServerSentEventsStream
- toServerSentEventsResponse
- toolDefinition
- uiMessageToModelMessages
- realtimeToken
- untilFinishReason
Interface References
- AIAdapter
- AIAdapterConfig
- AgentLoopState
- ApprovalRequestedStreamChunk
- AudioPart
- AudioVisualization
- BaseStreamChunk
- TextCompletionChunk
- TextOptions
- ChunkRecording
- ChunkStrategy
- ClientTool
- ContentPartSource
- ContentStreamChunk
- DefaultMessageMetadataByModality
- DocumentPart
- DoneStreamChunk
- EmbeddingOptions
- EmbeddingResult
- ErrorStreamChunk
- ImagePart
- InternalToolCallState
- JSONParser
- ModelMessage
- ProcessorResult
- ProcessorState
- RealtimeAdapter
- RealtimeClientOptions
- RealtimeConnection
- RealtimeMessage
- RealtimeSessionConfig
- RealtimeToken
- RealtimeTokenAdapter
- RealtimeTokenOptions
- ResponseFormat
- ServerTool
- StreamProcessorEvents
- StreamProcessorHandlers
- StreamProcessorOptions
- SummarizationOptions
- SummarizationResult
- TextPart
- ThinkingPart
- ThinkingStreamChunk
- Tool
- ToolCall
- ToolCallPart
- ToolCallStreamChunk
- ToolConfig
- ToolDefinition
- ToolDefinitionConfig
- ToolDefinitionInstance
- ToolInputAvailableStreamChunk
- ToolResultPart
- ToolResultStreamChunk
- UIMessage
- VideoPart
Type Alias References
- AgentLoopStrategy
- AnyClientTool
- TextStreamOptionsForModel
- TextStreamOptionsUnion
- ConstrainedContent
- ConstrainedModelMessage
- ContentPart
- ContentPartForModalities
- ExtractModalitiesForModel
- ExtractModelsFromAdapter
- InferToolInput
- InferToolName
- InferToolOutput
- MessagePart
- RealtimeEvent
- RealtimeMessagePart
- RealtimeMode
- RealtimeStatus
- ModalitiesArrayToUnion
- Modality
- StreamChunk
- StreamChunkType
- ToolCallState
- ToolResultState
Variable References
AI/LLM: This documentation page is available in plain markdown format at/ai/latest/docs/reference/interfaces/StreamProcessorOptions.md
Interface References
StreamProcessorOptions
Defined in: packages/ai/src/activities/chat/stream/processor.ts:155
Options for StreamProcessor
Properties#
chunkStrategy?#
ts
optional chunkStrategy?: ChunkStrategy;Defined in: packages/ai/src/activities/chat/stream/processor.ts:156
events?#
ts
optional events?: StreamProcessorEvents;Defined in: packages/ai/src/activities/chat/stream/processor.ts:158
Event-driven handlers
initialMessages?#
ts
optional initialMessages?: UIMessage<unknown>[];Defined in: packages/ai/src/activities/chat/stream/processor.ts:165
Initial messages to populate the processor
jsonParser?#
ts
optional jsonParser?: object;Defined in: packages/ai/src/activities/chat/stream/processor.ts:159
parse#
ts
parse: (jsonString) => any;Parameters#
jsonString#
string
Returns#
any
recording?#
ts
optional recording?: boolean;Defined in: packages/ai/src/activities/chat/stream/processor.ts:163
Enable recording for replay testing
subagentRunId?#
ts
optional subagentRunId?: string;Defined in: packages/ai/src/activities/chat/stream/processor.ts:170
Set on the processor of a subagent card. Chunks tagged with this id are the card's own; chunks for an id no card holds are dropped.