This is for Aixiom Education
The website includes a dedicated AI chat page at /ai-chat.
Students should not add any API key. They just click the top-right AI Chat button and start asking questions.
Set server-side environment variables in your deployment platform (for example Netlify):
OPENROUTER_API_KEY=your_key_here
OPENROUTER_MODEL=openai/gpt-4o-mini
OPENROUTER_API_URL=https://openrouter.ai/api/v1/chat/completions
PUBLIC_SITE_URL=https://your-domain.comThe frontend sends requests to /api/economics-chat, which is handled by the Netlify function at netlify/functions/economics-chat.js.
- Copy
.env.exampleto.env. - Optionally add
VITE_OPENROUTER_API_KEYonly for local fallback testing.
VITE_OPENROUTER_API_KEY=your_key_here- Start the app:
npm install
npm run devUsers can open the AI chat from the top-right AI Chat button in the header.
- Exam Mode toggle for mark-scheme style answers.
- Persistent chat history in browser local storage.
- Export chat to
.txtrevision notes.