vercel/ai/examples/next-google-vertex

Vercel AI SDK's Google Vertex template using Next

reactnexttailwindtypescriptai
Loading...
vercel

AI SDK, Next.js, and Google Vertex AI Edge Example

This example shows how to use the AI SDK with Next.js and Google Vertex AI to validate that the AI SDK's Google Vertex provider can run successfully in the Edge runtime.

Deploy your own

Deploy the example using Vercel:

Deploy with Vercel

How to use

Execute create-next-app with npm, Yarn, or pnpm to bootstrap the example:

npx create-next-app --example https://github.com/vercel/ai/tree/main/examples/next-google-vertex-edge next-vertex-edge-app

To run the example locally you need to:

  1. Set up a Google Cloud Project
  2. Enable the Vertex AI API
  3. Create a service account and download credentials
  4. Set the required environment variables as shown in .env.local.example
  5. pnpm install to install the required dependencies
  6. pnpm dev to launch the development server

Learn More

To learn more about Google Vertex AI, Next.js, and the AI SDK take a look at the following resources: