Make companion respond in the selected language (EN/FR)
Claude
Unverified signature
60bcd69
The frontend now sends the current language to the backend.
The system prompt includes a language instruction so the LLM
responds in English or French matching the UI language.
https://claude.ai/code/session_015z3yZxNNfXF63JuQDuPbEG
Interface is now in English by default with a FR button in the
top-right corner to switch to French. All UI labels, placeholders,
error messages, and analysis scores are translated. The toggle
switches instantly without page reload.
https://claude.ai/code/session_015z3yZxNNfXF63JuQDuPbEG
Hide phase indicator UI from learner view
Claude
Unverified signature
68432fb
The 0-1-2-3-4 progress dots and labels are hidden from the chat
screen as they are confusing for the learner. Phase tracking
continues server-side internally.
https://claude.ai/code/session_015z3yZxNNfXF63JuQDuPbEG
Reapply all fixes on main after merge overwrite
Claude
Unverified signature
4a021be
- Strip env vars (.strip()) to handle trailing newlines
- Default model: openrouter/free
- Server-side phase progression (2 turns per phase max)
- System prompt: ban suggested examples, ban excessive validation
- Frontend: strip phase marker from chat, proper error handling
- Add /download endpoint for corpus files
- Add LLM call logging and timeout
https://claude.ai/code/session_015z3yZxNNfXF63JuQDuPbEG
Merge branch 'main' of http://127.0.0.1:46517/git/Rochikh/aim
Claude
Unverified signature
7e288e3
Hide phase marker from chat and ban excessive validation
Claude
Unverified signature
b31b87f
Fix 1: Frontend strips "---\nPhase: ..." block from assistant
messages before rendering. The marker is still produced by the
LLM for backend tracking but never shown to the learner.
Fix 2: System prompt now explicitly forbids enthusiastic
expressions (Excellent, Très bien, Parfait, Bravo, Super,
Absolument, Exactement). Only brief neutral acknowledgments
are allowed before the next question.
https://claude.ai/code/session_015z3yZxNNfXF63JuQDuPbEG
Fix phase progression and ban suggested examples
Claude
Unverified signature
3092594
1. Phase progression is now server-driven: advances after 2 learner
turns per phase (0->1->2->3->4). The LLM no longer controls phase
numbers — the backend computes them deterministically.
2. System prompt now explicitly forbids the companion from offering
examples, lists of options, or multiple-choice suggestions. The
learner must produce all content. Only open-ended questions allowed.
https://claude.ai/code/session_015z3yZxNNfXF63JuQDuPbEG
Use openrouter/free as default model for reliable free inference
Claude
Unverified signature
b9f143f
The specific Mistral model IDs were returning 404 on OpenRouter.
openrouter/free is an auto-router that selects available free models.
https://claude.ai/code/session_015z3yZxNNfXF63JuQDuPbEG
Strip whitespace from env vars and add LLM call logging
Claude
Unverified signature
87554a0
Fixes issue where trailing newline in LLM_MODEL env var caused
API errors. Also adds timeout and logging to LLM calls.
https://claude.ai/code/session_015z3yZxNNfXF63JuQDuPbEG
Frontend now properly detects HTTP errors and displays meaningful
error messages instead of showing a stuck typing indicator. Backend
logs API key presence and request details for easier debugging.
https://claude.ai/code/session_015z3yZxNNfXF63JuQDuPbEG
Add error logging and debug endpoints for LLM troubleshooting
Add file upload for RAG: PDF, PPTX, TXT, ZIP support with drag & drop
Claude
Unverified signature
6e796e2
- Upload zone on setup screen with drag & drop and multi-file select
- ZIP extraction: auto-extracts supported files from nested folders
- Dynamic RAG indexing without server restart
- Document list with delete capability
- PPTX support via python-pptx
- Doc count badge in chat header
https://claude.ai/code/session_015z3yZxNNfXF63JuQDuPbEG
Add GitHub Action to sync with Hugging Face Spaces
* Rewrite app: strict Socratic questioning engine with FastAPI backend
- Remove standalone client-side index.html (violated spec)
- Use openai Python library with configurable base_url (no hardcoded provider)
- System prompts verbatim from spec: one question per response, never direct answers
- Stateless sessions: no localStorage, no cookies, no persistence
- No dashboard/usage statistics — only end-of-session analysis report
- RAG: ChromaDB + sentence-transformers, 3 chunks injected per turn
- 5-phase protocol: Ciblage/Clarification/Mecanisme/Verification/Stress-test
- Two modes: TUTOR (accompaniment) and CRITIC (devil's advocate)
- JSON export of full session (messages + scores + timestamps)
- Docker + docker-compose with volume-mounted /corpus
- README: dual config (OpenRouter test / Ollama production)
- No hardcoded references to any LLM provider in code
https://claude.ai/code/session_015z3yZxNNfXF63JuQDuPbEG
* Add Render deployment config for online demo
- render.yaml Blueprin…
- render.yaml Blueprint: auto-configures service, env vars, persistent disk
- Dockerfile: install PyTorch CPU-only to reduce image size (~800MB vs ~2.5GB)
- README: deployment instructions for Render
https://claude.ai/code/session_015z3yZxNNfXF63JuQDuPbEG
Rewrite app: strict Socratic questioning engine with FastAPI backend
Claude
Unverified signature
1e29076
- Remove standalone client-side index.html (violated spec)
- Use openai Python library with configurable base_url (no hardcoded provider)
- System prompts verbatim from spec: one question per response, never direct answers
- Stateless sessions: no localStorage, no cookies, no persistence
- No dashboard/usage statistics — only end-of-session analysis report
- RAG: ChromaDB + sentence-transformers, 3 chunks injected per turn
- 5-phase protocol: Ciblage/Clarification/Mecanisme/Verification/Stress-test
- Two modes: TUTOR (accompaniment) and CRITIC (devil's advocate)
- JSON export of full session (messages + scores + timestamps)
- Docker + docker-compose with volume-mounted /corpus
- README: dual config (OpenRouter test / Ollama production)
- No hardcoded references to any LLM provider in code
https://claude.ai/code/session_015z3yZxNNfXF63JuQDuPbEG
Use Mistral Small 3.1 (paid tier) for GDPR compliance
Claude
Unverified signature
dbd0ec1
Professional use requires GDPR-compliant European model.
Mistral (French company) is the right choice. Using paid
tier avoids rate limiting on free endpoints.
https://claude.ai/code/session_015z3yZxNNfXF63JuQDuPbEG
Switch to google/gemma-3-4b-it:free model
Claude
Unverified signature
af82ee5
Previous model was rate-limited. Gemma 3 4B is free and more
reliably available on OpenRouter.
https://claude.ai/code/session_015z3yZxNNfXF63JuQDuPbEG
Fix: use Headers API for auth, add key validation
Claude
Unverified signature
e16c0bf
Use explicit Headers object instead of plain object to ensure
Authorization header is properly sent. Add early validation
for missing/short API keys.
https://claude.ai/code/session_015z3yZxNNfXF63JuQDuPbEG
Fix: add HTTP-Referer header required by OpenRouter from browser
Claude
Unverified signature
aa3c7f0
OpenRouter requires HTTP-Referer and X-Title headers for
browser-based API calls.
https://claude.ai/code/session_015z3yZxNNfXF63JuQDuPbEG
Fix: use available Mistral model on OpenRouter
Claude
Unverified signature
262cfcb
mistral-7b-instruct no longer exists on OpenRouter.
Switch to mistral-small-3.1-24b-instruct:free.
https://claude.ai/code/session_015z3yZxNNfXF63JuQDuPbEG
Fix: rewrite HTML/CSS to ensure styles apply correctly
Claude
Unverified signature
4b2a012
Rewrote with explicit class names, !important on screen visibility,
type="text/css" on style tag, no special unicode in CSS selectors,
and wrapped JS in IIFE. Should fix unstyled rendering on Chromebook.
https://claude.ai/code/session_015z3yZxNNfXF63JuQDuPbEG
Add standalone single-file HTML app (no backend required)
Claude
Unverified signature
1c03885
Self-contained index.html that calls OpenRouter directly from the browser.
Includes all CSS, JS, system prompts, corpus, and RAG (keyword-based).
Just open in Chrome and enter an OpenRouter API key to start.
https://claude.ai/code/session_015z3yZxNNfXF63JuQDuPbEG
Switch from Ollama to OpenRouter for LLM inference
Claude
Unverified signature
02fd291
Replace local Ollama calls with OpenRouter API (OpenAI-compatible).
Configurable via OPENROUTER_API_KEY and LLM_MODEL env vars.
Default model: mistralai/mistral-7b-instruct.
https://claude.ai/code/session_015z3yZxNNfXF63JuQDuPbEG
Build AIM Learning Companion - Socratic AI tutor for professional training
Claude
Unverified signature
87344df
Single-page web app with:
- FastAPI backend with RAG pipeline (ChromaDB + sentence-transformers)
- Ollama integration (mistral:instruct) for local LLM inference
- 5-phase Socratic protocol (Ciblage → Stress-test)
- TUTOR and CRITIC modes with French system prompts
- Vanilla HTML/CSS/JS frontend with phase indicator and session analysis
- Docker + docker-compose setup with volume-mounted /corpus
- End-of-session cognitive assessment with 6 scored dimensions
- JSON export, no external API calls, full privacy
https://claude.ai/code/session_015z3yZxNNfXF63JuQDuPbEG