Variable: StreamMessageSchema
const
StreamMessageSchema:ZodObject
<{parts
:ZodOptional
<ZodArray
<ZodUnion
<[ZodObject
<{additionalData
:ZodOptional
<ZodAny
>;isCompleted
:ZodOptional
<ZodBoolean
>;text
:ZodString
;type
:ZodLiteral
<"text"
>; },"strip"
,ZodTypeAny
, {additionalData
:any
;isCompleted
:boolean
;text
:string
;type
:"text"
; }, {additionalData
:any
;isCompleted
:boolean
;text
:string
;type
:"text"
; }>,ZodObject
<{additionalData
:ZodOptional
<ZodAny
>;isCompleted
:ZodOptional
<ZodBoolean
>;toolInvocation
:ZodObject
<{args
:ZodAny
;result
:ZodOptional
<...>;state
:ZodString
;toolCallId
:ZodString
;toolName
:ZodString
; },"strip"
,ZodTypeAny
, {args
:any
;result
:any
;state
:string
;toolCallId
:string
;toolName
:string
; }, {args
:any
;result
:any
;state
:string
;toolCallId
:string
;toolName
:string
; }>;type
:ZodLiteral
<"tool-invocation"
>; },"strip"
,ZodTypeAny
, {additionalData
:any
;isCompleted
:boolean
;toolInvocation
: {args
:any
;result
:any
;state
:string
;toolCallId
:string
;toolName
:string
; };type
:"tool-invocation"
; }, {additionalData
:any
;isCompleted
:boolean
;toolInvocation
: {args
:any
;result
:any
;state
:string
;toolCallId
:string
;toolName
:string
; };type
:"tool-invocation"
; }>,ZodObject
<{additionalData
:ZodOptional
<ZodAny
>;isCompleted
:ZodOptional
<ZodBoolean
>;type
:ZodString
; },"passthrough"
,ZodTypeAny
,objectOutputType
<{additionalData
:ZodOptional
<ZodAny
>;isCompleted
:ZodOptional
<ZodBoolean
>;type
:ZodString
; },ZodTypeAny
,"passthrough"
>,objectInputType
<{additionalData
:ZodOptional
<ZodAny
>;isCompleted
:ZodOptional
<ZodBoolean
>;type
:ZodString
; },ZodTypeAny
,"passthrough"
>>]>,"many"
>>; },"strip"
,ZodTypeAny
, {parts
: ({additionalData
:any
;isCompleted
:boolean
;text
:string
;type
:"text"
; } | {additionalData
:any
;isCompleted
:boolean
;toolInvocation
: {args
:any
;result
:any
;state
:string
;toolCallId
:string
;toolName
:string
; };type
:"tool-invocation"
; } |objectOutputType
<{additionalData
:ZodOptional
<ZodAny
>;isCompleted
:ZodOptional
<ZodBoolean
>;type
:ZodString
; },ZodTypeAny
,"passthrough"
>)[]; }, {parts
: ({additionalData
:any
;isCompleted
:boolean
;text
:string
;type
:"text"
; } | {additionalData
:any
;isCompleted
:boolean
;toolInvocation
: {args
:any
;result
:any
;state
:string
;toolCallId
:string
;toolName
:string
; };type
:"tool-invocation"
; } |objectInputType
<{additionalData
:ZodOptional
<ZodAny
>;isCompleted
:ZodOptional
<ZodBoolean
>;type
:ZodString
; },ZodTypeAny
,"passthrough"
>)[]; }>
Defined in: packages/core/src/types.ts:165
Type of StreamMessageSchema
Param
The parts of the message. This is the text that happens after the tool calls.