Tip
Do you want to learn how to build a similar AI web application? Contact me at [email protected] and I'll help you get started. Visit escuela.dev to learn more about one-on-one mentoring classes.
Deploy the example using Vercel:
- browserless/chromium Docker image
- on Fly.io
Install the fly.io CLI and Docker Desktop (it's needed to build the Docker image). Maybe there is no need if you set Fly.io to use an Docker image that's already available (https://fly.io/docs/reference/configuration/#specify-a-docker-image).
brew install fly docker
fly launch # create a new app on Fly.io (the first time)
# then
fly deploy
To run the example locally you need to:
- Sign up at OpenAI's Developer Platform.
- Go to OpenAI's dashboard and create an API KEY.
- If you choose to use external files for attachments, then create a Vercel Blob Store.
- Set the required environment variable as the token value as shown the example env file but in a new file called
.env.local
npm install
to install the required dependencies.npm dev
to launch the development server.
To learn more about OpenAI, Next.js, and the AI SDK take a look at the following resources:
- Add advance text editor like OpenAI's ChatGPT Canvas (docs
- more