This project generates a description of an house using OpenAI GPT-3 API (text-davinci-003
) and Vercel Edge functions with streaming. It constructs a prompt based on the form and user input, sends it to the GPT-3 API via a Vercel Edge function, then streams the response back to the application.
- Next.js (React framework)
- Tailwind CSS (utility-first CSS framework)
- Vercel Edge functions (streaming support!)
- OpenAI GPT-3 API (
text-davinci-003
) - Framer Motion (animations)
- Headless UI (React components using tailwind css)
- ESLint (linter)
- Prettier (code formatter)
- Draw.io (for diagrams)
- React Hot Toast (toasts)
- Zod (schema validation)
- React Hook Form (form management)
- Heroicons (icons)
- Multiple Layouts with Next.js
- SEO with Next.js
If you want to see the implementation without streaming, check this commit.
Make sure that you have a .env
file with your OpenAI API key (OPENAI_API_KEY
)
yarn dev
Open http://localhost:3000 with your browser to see the result.