Skip to content

An example of building an AI chat app using the Vercel AI SDK and Next.js

Notifications You must be signed in to change notification settings

komzweb/vercel-ai-sdk-nextjs

Repository files navigation

Vercel AI SDK Next.js Example

An example of building an AI chat app using the Vercel AI SDK and Next.js

Setup

  1. Clone the repo:
git clone https://github.com/komzweb/vercel-ai-sdk-nextjs.git
  1. Add your OpenAI API key:
cd vercel-ai-sdk-nextjs
cp .env.local.example .env.local

Set your secret API key to OPENAI_API_KEY in the .env.local file.

  1. Install dependencies:
npm install
  1. Run the server:
npm run dev

Open http://localhost:3000 with your browser to see the result.