For testing the demo you have to add the api-key.
- Got to /ai-examples
- Click on the Set API Key button
And save it.
Once you are done testing you can remove the key from here:
For developement you have to save the Api-Key on the .env file with the following name
OPENAI_API_KEY=YOUR_API_KEY
By default we are using the gpt-3.5-turbo
model.
If you want to use other model you can do that too.
To change the model, open up the template in your code editor. Then go to the route.ts file under ai-examples and add your prefered model
Note: You can find all the model from here: https://platform.openai.com/docs/models/overview
You must follow the documentation setp by step in this order to do a successful installation and configuration.
If you are using a GitHub repo then you can go with free-of-cost and easy-to-use options like Vercel, or Netlify they offer decent-free tiers for Next.js hosting.
Make sure to edit build command like this while you use Prisma as ORM while deploying to Vercel.