[KongchangAI]
Product

useChat

A composable API provided by the Vercel AI SDK in its Vue adapter package, used to implement conversational AI interfaces within Vue components. It internally maintains reactive variables such as the message list and loading state.

Core Facts

Timeline (last 90 days)

Oct 13

useChat targets message-streaming conversation scenarios, where the output is usually text or a message array appended character by character; useObject targets streaming generation of structured objects, relying on streamObject underneath, which progressively parses the model output according to a JSON Schema into a continuously completed JavaScript object.

Unverified50%
Oct 13

The useChat and useCompletion provided by @ai-sdk/vue internally maintain reactive variables such as the message list, loading state, and error information, and expose methods such as sendMessage and stop.

Unverified50%
Oct 9

Both useChat and useCompletion are designed based on Vue's reactivity system, so developers do not need to manually handle the parsing of SSE or ReadableStream.

Unverified50%
Oct 9

Both useChat and useCompletion rely on the streaming parsing capabilities provided by the underlying ai core package.

Unverified50%
Oct 8

useChat internally encapsulates logic such as streaming communication with AI models, message history maintenance, and loading state tracking, so developers do not need to manually handle SSE or ReadableStream parsing.

Unverified50%
Oct 7

@ai-sdk/vue provides developers with capabilities such as streaming conversation, tool calling, and structured output in the form of composables (e.g., useChat, useCompletion).

Unverified50%
Oct 1

@ai-sdk/vue abstracts the underlying Server-Sent Events or ReadableStream into reactive state through Vue 3 composition functions such as useChat and useCompletion.

Unverified50%
Sep 30

Both useChat and useCompletion support specifying a custom backend route via the api parameter, where the backend calls the model provider API, thereby avoiding exposure of keys on the frontend.

Unverified50%
Sep 25

@ai-sdk/react is the official adapter package for the React ecosystem, encapsulating Hooks such as useChat and useCompletion.

Unverified50%
Sep 25

Both useChat and useCompletion abstract the consumption logic of Server-Sent Events (SSE) and are deeply integrated with Next.js's Route Handlers or Edge Functions.

Unverified50%

10 more timeline events

All Facts (20)

Verified

The core composables useChat and useCompletion in @ai-sdk/vue are designed following the React version's useChat hook to ensure cross-framework API consistency.

90%
Unverified

useChat and useCompletion are the two core composable APIs provided by @ai-sdk/vue.

70%
Unverified

Both useChat and useCompletion implement streaming output based on the Web Streams API.

70%
Unverified

useChat targets message-streaming conversation scenarios, where the output is usually text or a message array appended character by character; useObject targets streaming generation of structured objects, relying on streamObject underneath, which progressively parses the model output according to a JSON Schema into a continuously completed JavaScript object.

50%
Unverified

The useChat and useCompletion provided by @ai-sdk/vue internally maintain reactive variables such as the message list, loading state, and error information, and expose methods such as sendMessage and stop.

50%
Unverified

Both useChat and useCompletion are designed based on Vue's reactivity system, so developers do not need to manually handle the parsing of SSE or ReadableStream.

50%
Unverified

Both useChat and useCompletion rely on the streaming parsing capabilities provided by the underlying ai core package.

50%
Unverified

useChat internally encapsulates logic such as streaming communication with AI models, message history maintenance, and loading state tracking, so developers do not need to manually handle SSE or ReadableStream parsing.

50%
Unverified

@ai-sdk/vue provides developers with capabilities such as streaming conversation, tool calling, and structured output in the form of composables (e.g., useChat, useCompletion).

50%
Unverified

@ai-sdk/vue abstracts the underlying Server-Sent Events or ReadableStream into reactive state through Vue 3 composition functions such as useChat and useCompletion.

50%
Unverified

Both useChat and useCompletion support specifying a custom backend route via the api parameter, where the backend calls the model provider API, thereby avoiding exposure of keys on the frontend.

50%
Unverified

@ai-sdk/react is the official adapter package for the React ecosystem, encapsulating Hooks such as useChat and useCompletion.

50%
Unverified

Both useChat and useCompletion abstract the consumption logic of Server-Sent Events (SSE) and are deeply integrated with Next.js's Route Handlers or Edge Functions.

50%
Unverified

Both useChat and useCompletion are built on Vue 3's Composition API and can be called directly within <script setup>.

50%
Unverified

useCompletion targets single-turn text completion scenarios, while useChat targets multi-turn conversation scenarios.

50%
Unverified

The message update throttling feature allows developers to control the frequency of useChat message updates to achieve a balance between smoothness and performance.

50%
Unverified

Both useChat and useCompletion are designed based on Vue 3's Composition API, and internally implement token-by-token streaming output via SSE or ReadableStream.

50%
Unverified

useChat and useCompletion rely on the browser's Fetch Streaming API at the underlying level, implementing incremental text rendering via SSE or ReadableStream.

50%
Unverified

React Hooks such as useChat and useCompletion in the Vercel AI SDK encapsulate the complete lifecycle management of streaming responses.

50%
Unverified

@ai-sdk/[email protected] introduced configurable message update throttling for useChat.

50%

Source Articles