hashbrown

UiChatResourceRef

A reference to the UI chat resource.

API

UiChatResourceRef
@typeTools
Chat.AnyTool
lastAssistantMessage
Signal<UiAssistantMessage<Tools> | undefined>

The last assistant message for the UI chat resource.

resendMessages
() => void

Cause current messages to be resent. Can be used after an error in chat.

sendMessage
(message: Chat.UserMessage) => void

Send a new user message to the chat.

stop
(clearStreamingMessage?: boolean) => void

Stops any currently-streaming message.