使用 PHP、MySQL JS 创建您自己的 ChatGPT 和自定义机器人
- 1. Introduction
- 1. Introduction
- 2. Setting up Local Web Server
- 3. Creating Folders for Our WebApp
- 2. Creating Bots
- 1. Creating Index Page
- 2. Create Database & the Table
- 3. Creating our first php class to handle database
- 4. Creating Function to Display Chat Bots
- 5. Displaying the bots in the index page
- 3. Creating the Main ChatRoom and Functions
- 1. Creating Chat page and display the bots
- 2. Creating a Method To get Bot data
- 3. Creating a method to display chat messages
- 4. Creating New Table for Chat
- 5. Creating js function to check if user typed in text input
- 6. Creating Method to send Ajax Request
- 7. Creating Method to Store Messages In the Database
- 4. Creating AI methods
- 1. Creating method to display AI messages
- 3. Downloading the 3rd party repository
- 4. Generating serect key for API
- 5. Getting the reponse from the AI
- 6. Storing AI message in database and making sure AI rememebers the chat
- 7. Creating Method to Hightlight Code block
- 8. Creating Method to Get Recent Chat
- 9. Creating method to scroll down to new message
- 10. Creating Method to add a Typing Effect
- 11. Creating js Method to hightlight code while typing just like chatGPT
- 12. 27 Setting a role for the AI to follow