Skip to content

YahuiZo/object_1_chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Psychotherapist Chat Bot

This project is a psychotherapist chatbot using the LangChain library with the Llama-2 model. The bot assists users with psychological counselling by engaging in a conversation, recognizing emotions, and managing chat history.

Features

  • Emotion recognition in user input.
  • Management of chat history.
  • Handling of edge cases and invalid input.

Requirements

  • Python 3.8+
  • Required Python libraries (see requirements.txt)

Installation

  1. Create a virtual environment and activate it:

    python -m venv venv
    source venv/bin/activate  # On Windows, use `venv\Scripts\activate`
  2. Install the required libraries:

    pip install -r requirements.txt
  3. Ensure you have the Llama-2 model files in the correct directory (model/llama-2-7b-chat.Q4_0.gguf). If you don't, create a folder called 'model' and download from here.

Usage

  1. Run the chat bot:

    python main.py
  2. The bot will prompt you to enter your questions. Type your questions and press Enter. Type 'exit' to end the conversation.

Testing

Run the unit tests using unittest:

python -m unittest discover

Alternative Solution

This repository also includes a more complicated solution using Flask, located in the chatbot folder.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages