Whether to fetch the history of the thread.
If true, the history will be fetched from the server. Defaults to 10 entries.
If false, only the last state will be fetched from the server.
Initial values to display immediately when loading a thread.
Useful for displaying cached thread data while official history loads.
These values will be replaced when official thread data is fetched.
Note: UI components from initialValues will render immediately if they're
predefined in LoadExternalComponent's components prop, providing instant
cached UI display without server fetches.
OptionalmessagesKey
messagesKey?:string
Specify the key within the state that contains messages.
Defaults to "messages".
Default
"messages"
OptionalonCheckpointEvent
onCheckpointEvent?:((data, options) => void)
Callback that is called when a checkpoints event is received.
Callback that is called when a metadata event is received.
Type declaration
(data): void
Parameters
data: { run_id: string; thread_id: string; }
run_id: string
thread_id: string
Returns void
OptionalonStop
onStop?:((options) => void)
Callback that is called when the stream is stopped by the user.
Provides a mutate function to update the stream state immediately
without requiring a server roundtrip.
The API key to use.