Skip to content

Commit a17354f

Browse files
Backport: docs: fix agent streaming response example (#9799)
This is an automated backport of #9785 to the release-v5.0 branch. Co-authored-by: Nico Albanese <[email protected]>
1 parent b36ca9b commit a17354f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

content/docs/00-introduction/01-announcing-ai-sdk-6-beta.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,14 @@ Agents integrate seamlessly with React and other UI frameworks:
9595

9696
```typescript
9797
// Server-side API route
98-
import { createAgentUIStreamResponse, convertToModelMessages } from 'ai';
98+
import { createAgentUIStreamResponse } from 'ai';
9999

100100
export async function POST(request: Request) {
101101
const { messages } = await request.json();
102102

103103
return createAgentUIStreamResponse({
104104
agent: weatherAgent,
105-
messages: convertToModelMessages(messages),
105+
messages,
106106
});
107107
}
108108
```

0 commit comments

Comments
 (0)