Skip to content

Commit 89b7552

Browse files
authoredJun 21, 2024··
chore (ai): remove deprecation from ai/react imports, add experimental_useObject (#2051)
1 parent 9090661 commit 89b7552

File tree

71 files changed

+103
-116
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+103
-116
lines changed
 

‎.changeset/poor-cycles-cry.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'ai': patch
3+
---
4+
5+
chore (ai): remove deprecation from ai/react imports, add experimental_useObject

‎content/docs/02-getting-started/02-nextjs-app-router.mdx

+5-5
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ Install `ai` and `@ai-sdk/openai`, the Vercel AI package and Vercel AI SDK's [ O
5050
<div className="my-4">
5151
<Tabs items={['pnpm', 'npm', 'yarn']}>
5252
<Tab>
53-
<Snippet text="pnpm install ai @ai-sdk/openai @ai-sdk/react zod" dark />
53+
<Snippet text="pnpm install ai @ai-sdk/openai zod" dark />
5454
</Tab>
5555
<Tab>
56-
<Snippet text="npm install ai @ai-sdk/openai @ai-sdk/react zod" dark />
56+
<Snippet text="npm install ai @ai-sdk/openai zod" dark />
5757
</Tab>
5858
<Tab>
59-
<Snippet text="yarn add ai @ai-sdk/openai @ai-sdk/react zod" dark />
59+
<Snippet text="yarn add ai @ai-sdk/openai zod" dark />
6060
</Tab>
6161
</Tabs>
6262
</div>
@@ -125,7 +125,7 @@ Update your root page (`app/page.tsx`) with the following code to show a list of
125125
```tsx filename="app/page.tsx"
126126
'use client';
127127

128-
import { useChat } from '@ai-sdk/react';
128+
import { useChat } from 'ai/react';
129129

130130
export default function Chat() {
131131
const { messages, input, handleInputChange, handleSubmit } = useChat();
@@ -223,7 +223,7 @@ To access this data on the frontend, the `useChat` hook returns an optional valu
223223
```tsx filename="app/page.tsx" highlight="6, 9"
224224
'use client';
225225

226-
import { useChat } from '@ai-sdk/react';
226+
import { useChat } from 'ai/react';
227227

228228
export default function Chat() {
229229
const { messages, input, handleInputChange, handleSubmit, data } = useChat();

0 commit comments

Comments
 (0)
Please sign in to comment.