hashbrown

ChatResourceRef

Represents the reactive chat resource, including current messages and control methods.

@interface ChatResourceRef @template Tools @extends {Resource<Chat.Message<string, Tools>[]>} @property {(message: Chat.UserMessage) => void} sendMessage - Send a new user message to the chat. @property {() => boolean} reload - Remove the last assistant response and re-send the previous user message. Returns true if a reload was performed.

API

ChatResourceRef
@typeTools
Chat.AnyTool