Dive into the world of AI tutoring by building a personal tutor using DeepSeek! Learn how to send queries, tweak API settings, manage tutoring sessions, and craft effective system prompts—all to offer tailored educational guidance. With DeepSeek's API (compatible with the OpenAI SDK), you can quickly transition from theory to an interactive tutoring solution.
Overview
Syllabus
- Unit 1: Sending a Simple Query to DeepSeek Using PHP
- Sending Your First Fun Fact Request to DeepSeek API
- Switching DeepSeek API Models for Better Reasoning
- Fixing Array Access in DeepSeek API Response
- Implementing DeepSeek AI Chat Completion in PHP
- Unit 2: Exploring Model Parameters in DeepSeek with PHP
- Testing DeepSeek AI API Default Behavior
- Adding max_tokens Parameter to Control Response Length
- Adding Temperature Parameter to Control AI Creativity
- Increasing AI Response Randomness by Setting Temperature to 1.7
- Adding Presence Penalty Parameter to Enhance Response Diversity
- Implementing Frequency Penalty to Minimize Response Repetition
- Unit 3: Message Types and Session History in DeepSeek with PHP
- Initialize Conversation History for DeepSeek API
- Calling the AI API with Conversation History
- Building Contextual Conversations with DeepSeek API
- Displaying Conversation History in PHP
- Enhancing Chat API Function with Conversation History Management
- Unit 4: Personalizing Your Tutor with System Prompts in PHP
- Creating Custom AI Personas with System Prompts
- Testing AI Persona Consistency Across Multiple Interactions
- Fix System Prompt Role in PHP Chat Application
- Creating a Custom AI Persona with System Prompts in PHP
- Unit 5: Managing Multiple Tutoring Sessions with DeepSeek Using PHP
- Creating and Managing PHP Chat Sessions
- Implementing a PHP Chat Message Handler Function
- Integrating DeepSeek API with PHP Chatbot
- Managing Multiple Chat Sessions