API ReferenceRuntime Hooks
ContentPartRuntime
useContentPart
Access the content part state:
ContentPartState
part:
Readonly<ContentPartState>
The current content part.
status:
MessageStatus
The current content part status.
MessageStatus
type:
'running' | 'requires-action' | 'complete' | 'incomplete'
The status.
finish-reason?:
'stop' | 'cancelled' | 'length' | 'content-filter' | 'tool-calls' | 'other' | 'unknown'
The finish reason if the status is 'incomplete'.
error?:
unknown
The error object if the status is 'error'.