OptionalapiOptionalapiThe URL of the API to use.
The ID of the assistant to use.
OptionalcallerCustom call options, such as custom fetch implementation.
OptionalclientClient used to send requests.
OptionaldefaultDefault headers to send with requests.
OptionalfetchWhether 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.
OptionalinitialInitial 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.
OptionalmessagesSpecify the key within the state that contains messages. Defaults to "messages".
OptionalonCallback that is called when a checkpoints event is received.
OptionalonCallback that is called when a new stream is created.
OptionalonCallback that is called when a custom event is received.
OptionalonCallback that is called when an error occurs.
OptionalonCallback that is called when the stream is finished.
OptionalonCallback that is called when a LangChain event is received.
OptionalonCallback that is called when a metadata event is received.
OptionalonCallback 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.
OptionalonCallback that is called when a tasks event is received.
OptionalonCallback that is called when the thread ID is updated (ie when a new thread is created).
OptionalonCallback that is called when an update event is received.
OptionalreconnectWill reconnect the stream on mount
OptionalthreadManage the thread state externally.
OptionalthreadThe ID of the thread to fetch history and current values from.
OptionalthrottleThrottle the stream.
If a number is provided, the stream will be throttled to the given number of milliseconds.
If true, updates are batched in a single macrotask.
If false, updates are not throttled or batched.
The API key to use.