dev-resources.site
for different kinds of informations.
introducing new Vercel AI SDK
Published at
6/15/2023
Categories
nextjs
javascript
webdev
ai
Author
Dom Sipowicz
Main Article
- What is the new frontend AI library?
- How to start new AI web app?
npm i ai
TL;DR:
- build your own custom AI Chat on your website fast
- Streaming First UI Helpers
- edge-ready software development kit for AI apps
- built with React and Svelte.
'use client'
import { useChat } from 'ai/react'
export default function Chat() {
const { messages, input, handleInputChange, handleSubmit } = useChat()
return (
<div>
{messages.length > 0
? messages.map(m => (
<div key={m.id}>
{m.role === 'user' ? 'User: ' : 'AI: '}
{m.content}
</div>
))
: null}
<form onSubmit={handleSubmit}>
<input
value={input}
placeholder="Say something..."
onChange={handleInputChange}
/>
</form>
</div>
)
}
SDK docs:
Vercel AI Playgroud:
Godspeed
PS. Follow me on Twitter or LinkedIn
https://twitter.com/dom_sipowicz
https://www.linkedin.com/in/dominiksipowicz/
Articles
12 articles in total
Top 11 AI Predictions for Web Development in 2025
read article
Can You Serve Only Data to AI Crawlers?
read article
Optimizing Codebases for AI Development Era
read article
Can AI be conscious? Can AI ever be sentient?
read article
Google Gemini: in 7 Questions and Answers
read article
Q&A on AWS Keynote Speech at re:Invent
read article
OpenAI DevDay Digest: Developer's Q&A with a Twist
read article
What I use for development?(Top11 dev AI tools)
read article
The Potato Prompt
read article
What is the best way to start your first AI project as a frontend developer?
read article
New Llama v2
read article
introducing new Vercel AI SDK
currently reading
Featured ones: