How skonda29/chatbot works
Project type and purpose
• This is a backend engine for an AI-driven mental health chatbot (ReachOut).
• It exposes HTTP endpoints via FastAPI, orchestrates several AI services, performs crisis detection, and logs interactions.
File structure
• Top-level files:
• main.py — FastAPI app and routing
• chat_engine.py — wraps Gemini API calls for empathetic chat
• doc_engine.py — LlamaIndex-based document Q&A
• huggingface_engine.py — builds HuggingFace semantic embeddings
• crisis.py — crisis detection logic
• logger.py — custom logging/auditing
• models.py — Pydantic models for requests and responses
• data/ — domain documents (stress_management.txt) for Q&A
• nltk_data/ — tokenizers for text preprocessing
• requirements.txt sets Python dependencies.
README for additional insights
• Features: conversational engine, document Q&A, crisis detection, embeddings, logging.
• Tech stack: FastAPI, Gemini API, LlamaIndex, HuggingFace sentence transformers, NLTK.