How heyysiri/namamigange works
Project type and purpose
• This is a full-stack AI/ML chatbot system:
• Backend: Rasa open-source conversational AI framework (NLU + Core)
• Custom actions server (Python, GPT-4-Free, OpenWeather calls)
• Frontend: React single-page application (my-react-app) providing animated UI/quiz
File structure
• Top-level Rasa files:
• config.yml, credentials.yml, endpoints.yml – Rasa configuration for pipelines, channels, action endpoints
• domain.yml – intents, entities, slots, responses
• data/ – NLU training data (nlu.yml), rules (rules.yml), stories (stories.yml)
• story_graph.dot – visual map of stories
• requirements.txt – Python dependencies
• rasa_feedback2.db – SQLite tracker store (if used)
• my-react-app/ – React UI
• public/ – static index.html, robots.txt
• src/ – components: Popup.js, Quiz1.js, blinking.js, talking.js, etc.
• package.json – React dependencies and scripts
• rasa-env/ – Python virtual environment containing the action server
• actions/actions.py – custom actions implementing GPT-4-Free and OpenWeather queries
• actions/gpt4free – cloned GPT-4-Free integration
• tests/ – any unit tests for actions
README for additional insights
• Overview: Chatbot “Cha-cha Chaudhary” educating on Namami Gange, quizzes, GPT-4-Free integration
• Setup: describes Rasa training/run, React npm start, action server run
• External services: GPT-4-Free, OpenWeather API
1. User (Browser)
2. React Frontend (my-react-app)
3. Rasa Server (rasa run)
4. Action Server (rasa run actions in rasa-env/actions)
5. SQLite Tracker Store (rasa_feedback2.db)
6. External Services:
– GPT-4-Free API
– OpenWeather API
1. User → React UI (HTTP/WebSocket)
2. React UI → Rasa REST endpoint (endpoints.yml, CORS enabled)
3. Rasa NLU & Core → reads domain.yml, data/*.yml
4. Rasa Core → calls Action Server (via endpoints.yml) for custom logic
5. Action Server → GPT-4-Free (local clone or remote)
6. Action Server → OpenWeather API (requires API key in actions.py)
7. Action Server → returns slot updates/messages → Rasa Core
8. Rasa Core → persists conversation tracker to SQLite → sends reply → React UI → User
c. Architectural patterns & principles:
– Microservice-like separation: Rasa Core vs. action server
– Clear API boundary: React ↔ Rasa REST, Rasa ↔ actions gRPC/HTTP
– Configuration-as-code: YAML files for pipeline, domain, credentials
– Virtual environment isolation for Python dependencies
d. Key technologies/frameworks:
– Rasa (NLU, Core)
– Python (v3.8) custom actions, GPT-4-Free integration
– React (hooks, components, CSS for animations)
– Node.js & npm for front end
– SQLite (or alternative) for tracker store