This project consists of a chatbot designed to interact with users experiencing various emotional and mental health issues. The chatbot uses predefined scenarios to guide conversations and provide support based on user input.
- ui1.py: Contains the user interface code for interacting with the chatbot.
- chatbot.py: Contains the core logic and functionalities of the chatbot, including how it processes user input and navigates through different scenarios.
- scenarios.json: A structured file that outlines different conversational scenarios the chatbot can handle. It includes nested scenarios to address a wide range of user concerns.
- user_interactions.log: Logs the interactions between users and the chatbot for further analysis and improvement.
The scenarios.json file contains a comprehensive set of scenarios that the chatbot can use to guide conversations. Some key scenarios include:
- Anxiety
- Trouble sleeping
- Overwhelming workload
- Relationship problems
- Loneliness and isolation
- Depression
- Panic attacks
- Grief and loss
Each scenario can branch into sub-scenarios, allowing for deeper exploration of the user's feelings and experiences.
A scenario is structured with prompts and visible text to guide the conversation. For instance, the "I am feeling very anxious lately" scenario contains sub-scenarios like "Can you tell me more about what is making you feel anxious?" and "Do you experience physical symptoms as well?".
- Installation: Ensure you have the necessary Python libraries installed to run the chatbot and UI scripts.
- Running the Chatbot:
- Execute
frontend.pyto start the user interface. - The chatbot will use
chatbot.pyto process interactions.
- Execute
- Using the Scenarios: The chatbot utilizes the
scenarios.jsonfile to navigate conversations based on user input. Modify this file to add or update conversational paths.
- The chatbot starts with a general question or statement and uses user responses to navigate through different scenarios.
- Each user input triggers a search within the scenario structure to find the most relevant follow-up prompt.
Contributions to this project are welcome. To add new scenarios, update the scenarios.json file following the existing structure.
This project is licensed under LICENSE.