A simple Next.js chatbot app to demonstrate the use of the Vercel AI Gateway with the AI SDK.
- Clone this repository with the Deploy button above
- Install the Vercel CLI if you don't already have it
- Clone the repository you created above:
git clone <repo-url>
- Link it to a Vercel project under your account:
vc link
- Visit the linked Vercel project to enable an authentication token for use with AI Gateway (we're working on automating this):
- visit the project settings page (rightmost tab in your project's dashboard)
- search for 'OIDC' in settings
- toggle the button under "Secure Backend Access with OIDC Federation" to Enabled and click the "Save" button
- Fetch the project's OIDC authentication token locally via
vc env pull
. The token expiry is 12h. You'll need to re-run this command to fetch a new token when it expires (we're working on automating this). pnpm i
(ornpm i
oryarn i
) andvc dev
- Open http://localhost:3000 to try the chatbot.
This repository is maintained by the Vercel team and community contributors.
Contributions are welcome! Feel free to open issues or submit pull requests to enhance functionality or fix bugs.