ReferenceIntegrations
@assistant-ui/react-ai-sdk
Vercel AI SDK integration for assistant-ui.
API Reference
useVercelUseChatRuntime
Convert Vercel AI SDK chat helpers into a AssistantRuntime
.
chat?:
ReturnType<typeof useChat>
The UseChatHelpers from ai/react.
useVercelUseAssistantRuntime
Convert Vercel AI SDK assistant helpers into a AssistantRuntime
.
assistant?:
ReturnType<typeof useAssistant>
The UseAssistantHelpers from ai/react.
useVercelRSCRuntime
Convert Vercel RSC runtime into a AssistantRuntime
.
adapter?:
VercelRSCAdapter<TMessage>
The Vercel RSC adapter to use.
VercelRSCAdapter<TMessage>
messages?:
readonly ThreadMessage[]
The messages in the thread.
onNew?:
(message: AppendMessage) => Promise<void>
A function to append a message to the thread.
onEdit?:
(message: AppendMessage) => Promise<void>
A function to edit a message.
onReload?:
(parentId: string | null) => Promise<void>
A function to reload a message.
convertMessage?:
(message: TMessage) => VercelRSCMessage
A function to convert messages to the VercelRSCMessage format. Only required if your message objects are not already compatible with Vercel RSC.