This is a demo app for the following blog posts:
- Creating App Features Using AI Assistant Structured Output
- AI Assistant Output with End to End Type Safety
- An AI Assistant Development Lifecycle
- Clone this repo, run
npm install
- Go to OpenAI, create an Assistant (see below).
- Go to Upstash, and create a Redis database.
- Make a copy of the
.env.example
file and rename it to.env
- Add the api keys, assistant Ids, etc listed in the
.env
file. - Run
npm run dev
to run the app locally
- Create assistants:
npm run asst:create
- this will create an assistant for each environment in OpenAI and store the respective ids from OpenAi in upstash, using the assistant name as a a key. - Update assistants:
npm run asst:update
- this will update the "development" assistant based on local config changes. - "Deploy" assistants:
npm run asst:deploy
- this will update the assistants for all environments, including production.