This package contains GenAIScript-powered tools for generating burger restaurant data, including the menu and images. The generated data is then used by the burger API service.
The data generated includes:
- Burger menu data (names, descriptions, prices, toppings)
- High-quality food images for burgers and toppings
- Run
npm installto install the necessary dependencies. - Make sure you have access to a large language model (LLM) like
gpt-4o,gpt-4.1orgpt-5on either OpenAI or Azure OpenAI for the text data generation, to a model likegpt-image-1ordall-e-3for image generation.
- See this guide for deploying a text generation model on Azure OpenAI.
- See this guide for deploying an image generation model on Azure OpenAI.
- Set these environment variables or add them to a
.envfile:
GENAISCRIPT_DEFAULT_MODEL="azure:gpt-5" # or "openai:gpt-5"
GENAISCRIPT_IMAGE_MODEL="azure:gpt-image-1" # or "openai:gpt-image-1"
# For Azure OpenAI, set the following variables:
AZURE_OPENAI_API_KEY="your-azure-openai-api-key"
AZURE_OPENAI_API_ENDPOINT="https://your-azure-openai-endpoint.openai.azure.com"
# For OpenAI, set the following variable:
OPENAI_API_KEY="your-openai-api-key"npm run generate:burgersGenerates a complete burger menu with original burgers and toppings.
npm run generate:imagesGenerates realistic food images for the menu items using AI image generation.
Note
You first need to generate the burger menu data before generating images, as the image generation script uses the generated menu data.
Open the scripts in scripts/ to see how GenAIScript is used along with TypeScript to generate the data. The scripts use prompts to guide the LLM in creating realistic and appealing burger names, descriptions, prices, and images.
- Structured outputs: We use zod schemas to defined the expected JSON output structure, which helps ensure the generated data is valid and consistent.
- LLM-generated prompts: We use the LLM to dynamically create prompts for generating appealing images.
- Sanity checks: We perform basic sanity checks on the generated data to detect any invalid content.