Skip to content

adouglas20/AD331_ChatBot

Repository files navigation

ZebraLife ChatBot

ZebraLife Chatbot

AD331 - Artificial Intelligence

Realworld Project

North Seattle College (Fall 2025)

Table of Contents

  1. About the Project
  2. Key Security Feature
  3. Technologies
  4. How to Use
  5. Contributing
  6. License

About the Project

The ZebraLife Chatbot is a highly secure, intelligent, and exclusive virtual assistant built specifically for secret agent employees and administrators in ZebraLife Co. It is developed and maintained entirely in-house and provides real-time support for travel alerts and emergencies. The chatbot uses strict verification and zero-trust system, so only authorized users can access sensitive information. This helps keep all data safe, making sure our secret agents and their missions are always protected.

Key Security Feature

Architecture Diagram

Login Authentication

Technologies

The following technologies and tools have been selected to develop the chatbot system efficiently and effectively.

  • GitHub - this is used for team collaboration and version control. It allows multiple developers to work together on the project simultaneously, track changes, and manage code history. This allows our team to work smoothly and effectively and reduces the risk of conflicts in the codebase.
  • HTML (HyperText Markup Language) - this is used to create the structure and layout of the user interface of the website. This allows the chatbot interface to be organized and user-friendly, allowing the users to easily navigate and interact with the chatbot system.
  • CSS (Cascading Style Sheets) - this is used to style and design the user interface of the website. This allows the team to control the visual elements such as colors, fonts, position and spacing. This helps keep the chatbot system visually appealing and enhance the overall user experience.
  • JavaScript - this is one of the programming languages used to add functionality and interactivity to the chatbot website. This helps keep the website more dynamic and look more modern.
  • Python - this will be the primary programming language used for the chatbot system because everyone in the group knows it, it has extensive library support, and an active community. It has very easy to use frameworks which allow for making the project much easier.
  • Django - this is a full-stack Python web framework and will be used because of how powerful and flexible it is. With the ability to use it for both front and back end, it allows the team to use it for most aspects. Django is also used for authentication on the website.
  • PostgreSQL - this is the relational database we choose for all our storage needs due to its free and open-source nature. It offers more features and flexibility than MySQL. This will allow the chatbot system to store and manage data efficiently.
  • pgAdmin4 - this is a graphical interface for managing PostgreSQL databases. It will make it easier for our team to manage and maintain our data.
  • TinyLlama 1B model - this is the core LLM (Large Language Model) used in the chatbot system. It is lightweight with around 1 billion parameters or less, making it easier to run for development and testing purposes. It is also supported by Ollama allowing for easy use and installation. This allows our chatbot system to process user travel alert queries efficiently.
  • Ollama - this allows for easy management of LLM, including testing different models. It includes a Rest API backend that allows communication between the models and the other components of the project, making it easier to integrate, test, and deploy the AI functionality. This will help simplify tasks that would require extensive setup and technical knowledge.
  • VSC (Visual Studio Code) - is used as the primary code editor. This comes with features such as integrated debugging, syntax highlighting, and Git integration, making it an ideal tool for writing, testing, and managing code.
  • Apache - this web server allows for reliable hosting and management of websites and web applications both remotely and from the employee’s office. This will handle requests and serve content securely to users efficiently making it easier to deliver web services.

How to Use

1. Make sure you have the following installed:

Check installation in your VSC terminal by typing:

python --version
git --version
  • PostgreSQL

  • PgAdmin4

    • This project uses PgAdmin4 for managing PostgreSQL database.
    • Example to show existing Authorized User
    SELECT * FROM public.auth_user
    ORDER BY id ASC 
    
    • Example to INSERT INTO auth_user (Authorized User Table)
    INSERT INTO auth_user (username, password, first_name, last_name, email, is_staff, is_active, is_superuser, date_joined)
    VALUES
    ('admin', -- username
    'passwordHash,  -- password: hashedpassword
    'Jane', --first_name (required)
    'Doe', --last_name (optional)
    'admin@example.com',
    true,  -- is_staff (can access admin)
    true,   -- is_active (can log in)
    true,  -- is_superuser (admin)
    CURRENT_TIMESTAMP);
    
  • TinyLlama

    • To install TinyLlama you need to install the HuggingFace Transformers:
    pip install transformers torch
    
    • This project uses transformers 4.57.1

2. Set Up the Virtual Environment

  1. Create a Python virtual environment by typing in you VSC terminal:
python -m venv venv

IMPORTANT NOTE: Every time you open a new terminal (in VSCode, Git Bash, or any other terminal), you need to activate the virtual environment. The necessary packages won't be available outside of the environment.

  1. Activate the virtual environment:
  • On Windows:
.\venv\Scripts\activate
  • On macOS/Linux/GitBash:
source venv/bin/activate

3. Upgrade pip

  • If your pip is not up to date, update pip by typing the code below in your VSC terminal:
python -m pip install --upgrade pip

4. Install the Django Python Package

  • This project uses Django 5.2.8
pip install django

5. Install Dependencies

  • You can either install all dependecies listed in the requirement.txt file:
pip install -r requirements.txt

OR

  • You can install each dependencies manually, one by one:
pip install pgvector
pip install psycopg2-binary
pip install django-cors-headers
pip install numpy pandas requests python-dotenv
pip install torch transformers
pip install sentence-transformers
pip install django-crispy-forms
pip install crispy-bootstrap4
pip install torch

6. Install pgvector

  • Follow the instruction on this GitHub to install pgvector. This is necessary for PostgreSQL.

7. Update Database Login info

  • In VSC, open the settings.py file path: AD331_ChatBot/ragchat/settings.py

  • Update the USER and PASSWORD fields info in the DATABASES setting with your PostgreSQL login information.

DATABASES = {
    "default": {
        ...
        "USER": os.getenv("PGUSER", "Your_PostgreSQL_USERNAME"),
        "PASSWORD": os.getenv("PGPASSWORD", "Your_PostgreSQL_PASSWORD"),
        ...
    }
}

8. Run the Django Development Server

py manage.py runserver

9. Navigate to the Django Development Server

  • Open your browser and go to:
http://localhost:8000

Contributing

Jovy Ann Nelson (Project Manager)

  • README.md
  • Joke generation
  • Fixed navigation issues and website functionalities
  • Created proper structure for user login and implement user authentication function
  • Designed and styled the background, containers, and headers
  • Rationale
  • Detailed System Architecture Diagram
  • Stakeholders and Intended Users

Dmitriy Chernichenko (Django Framework Manager)

  • Initialized and set up the django framework
  • Set up the chatbot functionalities
  • Set up the Django Admin panel
  • Functional and Non-functional Requirements
  • Security and Data Protection plan

Andy Douuglas (Version Control Manager)

  • Setup the user login page and validation
  • implemented the backend logic for handling user authentication and session management
  • set up the the signup page
  • Research Summary
  • Technology and Tool Justification

Ingrid Arenas (Front-End Developer)

  • Designed the user interface
  • Structured the layout for the homepage, chatbot, and admin dashboard
  • Company Overview
  • Problem Statement
  • Components Description

License

This project is licensed under the MIT License. Please refer to the LICENSE

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •