Skip to content

Commit 811902e

Browse files
feat: add AI Teaching Assistant component with chat functionality (#814)
* feat: add AI Teaching Assistant component with chat functionality - Implemented AITeachingAssistant component for interactive AI chat. - Created API endpoint for chat interactions with AI providers. - Integrated multiple AI providers (Google Gemini, Azure, OpenAI, Phi-3) with fallback mechanism. - Added offline fallback script for improved user experience. - Enhanced user interface with responsive design and error handling. * Update src/pages/courses/web-development/[moduleId]/[lessonId].tsx Co-authored-by: Copilot <[email protected]> * Update src/components/ai-assistant/AITeachingAssistant.tsx Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
1 parent 3f388cc commit 811902e

File tree

10 files changed

+963
-359
lines changed

10 files changed

+963
-359
lines changed

.env.example

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,23 @@ GITHUB_CLIENT_SECRET="your-github-client-secret"
1414

1515
# Optional: Other OAuth providers
1616
# GOOGLE_CLIENT_ID="your-google-client-id"
17-
# GOOGLE_CLIENT_SECRET="your-google-client-secret"
17+
# GOOGLE_CLIENT_SECRET="your-google-client-secret"
18+
19+
# AI Teaching Assistant (J0d!e) - Phase 5
20+
# Primary AI provider: gemini | azure | openai | phi3
21+
PRIMARY_AI_PROVIDER="gemini"
22+
23+
# Google Gemini (recommended for cost-effectiveness)
24+
GOOGLE_GENERATIVE_AI_API_KEY="your-google-ai-api-key"
25+
26+
# Azure OpenAI (GPT-4)
27+
AZURE_OPENAI_API_KEY="your-azure-openai-key"
28+
AZURE_OPENAI_ENDPOINT="https://your-resource.openai.azure.com"
29+
AZURE_OPENAI_DEPLOYMENT="your-gpt4-deployment-name"
30+
31+
# OpenAI (GPT-4)
32+
OPENAI_API_KEY="your-openai-api-key"
33+
34+
# Phi-3 (optional - for local/Azure AI Studio deployment)
35+
PHI3_ENDPOINT="your-phi3-endpoint"
36+
PHI3_API_KEY="your-phi3-api-key"

0 commit comments

Comments
 (0)