It is a terminal-based chatbot, where you can converse with your bot. The bot is currently capable of solving mathematical expressions and can have an introductory chat. More functionalities are under construction.
Technologies used:
- Python (3.11.1)
- AIML (python-aiml)
- Neo4j (py2neo)
- Xformers (Xformers will show a warning message for Python version < 3.11.3)
- NLTK (NLP)
- ChatGPT
Capabilities:
- User Authentication
- Episodic Memory
- Storing user chat to train ML model
- Solving mathematical expressions
- Sentimental Analysis (using 'nlptown/bert-base-multilingual-uncased-sentiment' model for sentiment analysis)
The bot will ask for the user's name, if he wants to provide he can, if he doesn't then he's free to move on. But if the user tells the bot his name, the bot will assign a unique id to the user (make sure to remember it or keep it safe because if it's gone; it's gone)
At every user input, a bot response will be returned from the aiml file, if there is no response or the bot doesn't know the answer, it'll request the GPT for a response. Whether the response is from the bot or the GPT, all the conversational records are stored in the memory.
There are 2 types of memories available:
- Long Term
- Short Term
Personal Memory is currently unavailable
Long Term
Long Term memory is used to store known users' data and their conversations with a bot. The memory is stored in the form of episodes.
Short Term
Short Term memory is used to store unknown users' data and their conversations with the bot. Same, the bot stores the conversation in the form of episodes.
The difference is, there is only one folder named anonymous and it contains all the anonymous users. While in the case of long-term memory, all the user's data is stored in their respective folders with their id.
The sample data is available in the memory folder. Your output should look like this for known users:
And this should be your output for unknown users:
At every moment of the conversation, the bot is analyzing the user's mood and does a conversation based on it. If the conversation has <= 3 stars more than 3 times then the bot will assume your mood is OFF. So it will switch the conversation. As I am using 'nlptown/bert-base-multilingual-uncased-sentiment' model for sentiment analysis, your language doesn't matter.