How l4ntly/english-learning-chatbot works
This repository is an English-learning assistant with two main workflows: a Streamlit chat that sends teaching prompts to a local Ollama model, and a batch process that selects vocabulary without questions, generates quiz content, and saves it. A separate import workflow loads vocabulary and example translations into SQL Server. The README also describes the database-backed quiz capability. Connections shown are supported by the excerpts or README; database schema details and runtime deployment wiring were not inspected.
Main entry points: database.py Vocabulary store · main.py Quiz generator · import_dataset.py Vocabulary import · app.py Chat interface
Components 15
Learning experience
- Chat interface
src/app.py - Teaching prompt
src/app.py - Chat response
src/llm.py
Vocabulary and quizzes
- Vocabulary CSV
data/dataset1.csv - Translation CSV
data/dataset2.csv - Vocabulary import
src/import_dataset.py - Translation update
src/import_dataset.py - Quiz generator
src/main.py - Quiz generation
src/llm.py - Quiz records
database_setup.sql
Model and persistence
- Vocabulary store
src/database.py - SQL Server
- Ollama Llama 3.2
Other components
- Learner
- Dataset operator
Connections 15
- Learner → Chat interface: sends prompt
src/app.py - Chat interface → Teaching prompt: formats request
src/app.py - Teaching prompt → Chat response: requests response
src/app.py - Chat response → Ollama Llama 3.2: calls chat API
src/llm.py - Dataset operator → Vocabulary import: starts import
- Vocabulary CSV → Vocabulary import: provides words
src/import_dataset.py - Translation CSV → Translation update: provides translations
src/import_dataset.py - Vocabulary import → Vocabulary store: inserts words
src/import_dataset.py - Translation update → Vocabulary store: updates translations
src/import_dataset.py - Quiz generator → Vocabulary store: gets unenriched words
src/main.py - Quiz generator → Quiz generation: requests question
src/main.py - Quiz generation → Ollama Llama 3.2: calls chat API
src/llm.py - Quiz generator → Quiz records: saves questions
src/main.py - Vocabulary store → SQL Server: queries and writes
src/database.py - Quiz records → SQL Server: stored in