/ai-persona-chat

Primary LanguageJavaScriptMIT LicenseMIT


AI Persona Chat

A Multi-Persona AI Chatbot

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. License
  6. Contact
  7. Acknowledgments

About The Project

Overview

The Multi-Persona AI Chatbot is a user-friendly platform that allows users to interact with AI through various predefined personas. Depending on the selected persona, the chatbot can function as a friendly companion or a helpful assistant. The project utilizes React for the frontend and FastAPI for the backend, encapsulated within a Docker container for streamlined deployment and scalability.

Features

Persona Selection:

Persona Gallery: A feature that allows users to choose from different personas, each with a distinct style of interaction.

Dynamic Interaction: The chatbot modifies its responses based on the chosen persona, offering a varied chat experience.

Chat Interface:

Responsive Design: A flexible interface that adapts to different device screens, enhancing user engagement.

Real-Time Chat: A chat window that supports real-time conversation with the selected persona, complemented with appropriate avatars and message formats.

Backend Integration:

API Integration: The backend, developed with FastAPI, manages persona data and chat history efficiently.

Error Handling: Mechanisms in place to handle errors and ensure a smooth user experience.

Customizable Settings:

User Profiles: Users can create and manage profiles to personalize their interactions with the chatbot.

Chat History Management: A feature that enables users to manage their chat history, including options to delete previous conversations.

Chat History:

MongoDB Integration: The project utilizes MongoDB to manage chat histories securely, facilitating quick data retrieval and management.

History Deletion: Users can delete chat history, ensuring privacy and data security.

Development Process

  • The project began with the establishment of a React frontend, integrated with APIs for persona data and chat history management.

  • Various components such as PersonaList and ChatComponent were developed to build a cohesive application.

  • The application was designed to adapt to different devices, adjusting layout and elements based on screen size.

  • The development process included testing phases to identify and fix bugs, ensuring a seamless user experience.

  • Feedback was incorporated to enhance functionalities and improve UI elements.



Collaborative Development

This project was undertaken individually, showcasing the ability to manage and execute a comprehensive development project independently.

Technologies Used

  • Frontend: React, Bootstrap for responsive design
  • Backend: FastAPI
  • Database: MongoDB for chat history storage
  • API: openai chatgpt 3.5 Turbo
  • Containerization: Docker Compose for orchestrating multi-container Docker applications

Conclusion

The Multi-Persona AI Chatbot offers a unique platform for users to experience AI chat with a personalized touch. It combines technology and predefined persona models to provide a varied and engaging chat experience.




Autotrackr screenshot

Autotrackr screenshot

Autotrackr screenshot

Autotrackr screenshot

(back to top)

Built With

  • React - Frontend library for building user interfaces.
  • Bootstrap - Frontend toolkit for developing with HTML, CSS, and JS.
  • FastAPI - A modern, high-performance web framework for building APIs with Python.
  • MongoDB - NoSQL database for storing chat histories.
  • Docker - Platform to build, deploy, and manage containerized applications.

(back to top)

Getting Started

Fork and clone repository

Prerequisites

Install Docker, Python, Requests

Installation

  1. Clone the repo
git clone https://gitlab.com/your_repo_name/ai-persona-chat
  1. Build the Docker images and Start the containers
docker-compose up --build
  1. Remove the .example in on the .env file and add your chatGPT openai api key to the file. File is located at /app

  2. In the terminal at the root project folder you can load the peremade personas from personas.json.

python .\load_persona_json.py
  1. In your browser goto: http://localhost:3000/ - for the homepage http://localhost:8000/docs - fastapi endpoints http://localhost:8081/ - Mongo Express

Usage

Can be used or adapted any way you would like. Feel free to clone and change it up to your specifications.

Roadmap

Coming soon ...

(back to top)

Contributing

Coming soon ...

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information. -->

Contact

John Blanton - hello@johnblanton.com

Project Link: https://gitlab.com/johnbjr76/Autotrackr

Acknowledgments

(back to top)