Next.js 与 ChatGPT - 开发指南
- 1. Introduction
- 1. Introduction
- 2. What to expect from the course
- 3. How to resolve issues or skip lecture
- 2. Layout Preparation
- 1. Init Project
- 2. Tailwind init
- 3. Center content
- 4. Json data and assets
- 5. Render Stacks
- 6. Border hover classes
- 3. Stack Page
- 1. Stack Page
- 2. Adds header
- 3. Message layout
- 4. Textarea for prompt
- 5. Move code to components
- 6. Different classes for messages
- 7. Handle prompt value
- 8. Add messages
- 9. Scroll to bottom
- 4. Completion API Route
- 1. Completion Api route
- 2. Send data to Api
- 3. Get response from request
- 4. Add ai message
- 5. Typewriter effect
- 6. Blinking cursor
- 7. Disable typewriter
- 5. OpenAI - ChatGPT
- 1. OpenAI Account + Api keys
- 2. Completion API
- 3. ChatGPT Params
- 4. Debug config
- 5. Make better prompt
- 6. Hardcode response
- 6. Markdown
- 1. React markdown
- 2. Code highlight
- 3. Code cleanup
- 4. Use Effect Fix
- 5. Fix typewriter styles
- 7. Sessions - Cookies
- 1. Session keys
- 2. Set active session
- 3. Init iron sessions
- 4. Api endpoint to store session
- 5. Storing user in session
- 8. Get User
- 1. Retrieve user in Post endpoint
- 2. Fetch user client side
- 3. Move fetch user to hook
- 4. Display uid in ui
- 5. Set active session on reload
- 6. Select default session
- 9. Message History
- 1. Init lowDb
- 2. Cache DB
- 3. Store message history
- 4. Save data to DB
- 5. Feed history to chatGPT
- 6. Message history memory size
- 7. Clear history on chat enter
- 8. Different bots
- 9. Handle case when no messages
- 10. Deployment
- 1. Github repo
- 2. Deploy app to vercel
- 3. Store in-memory & Course Finish