Skip to content
providerkit
GitHub

useChat

function useChat(options): ChatValue;

Defined in: react/src/hooks.ts:121

A conversation: its messages, its run, and the commands the person gives.

const chat = useChat({ transport });
<button onClick={() => chat.send("Summarize this page.")}>Summarize</button>;
Parameter Type
options UseChatOptions

ChatValue