/Streamlit-API-Flask-Mistral

Flask API with a Streamlit ChatBot, this project provides a dynamic interface for database interaction and AI-driven user engagement, featuring secure, Docker-deployed components and advanced GPT-3.5 integration.

Primary LanguagePython

Chatbot

Introduction

This project integrates two main components: a Flask-based API and a Streamlit ChatBot. The Flask API is designed to facilitate interactions between the application and a MongoDB NoSQL database. It is containerized using Docker and deployed on a Synology DS224+ as a Docker container, with a tunnel established to Ngrok for external access. The ChatBot, developed using Streamlit, interacts with the user and the API, offering advanced features like RAG and Q&A models, feedback systems, and integration with various AI technologies.

Technologies and Tools

  • Python: Primary language for both backend and frontend.
  • Flask: Micro web framework for the API.
  • MongoDB: NoSQL database for storing data and vector embeddings.
  • JWT (JSON Web Tokens): For secure API communication.
  • Streamlit: For creating the ChatBot web app.
  • OpenAI: Utilizing GPT-3.5 Turbo and GPT-3.5 Finetuned models.
  • Mistral-7B: OpenSource Model for Q&A and Chatbot.
  • Helicone: For feedback on chatbot responses.
  • Lakera: For detecting inappropriate messages.
  • Llama-Index: For creating document embeddings.
  • Langchain: For creating word embeddings.
  • Streamlit-Echarts: For visualizing data using Apache ECharts.

Key Features

  • API with Flask: Containerized and deployed for database interaction.
  • ChatBot with Streamlit: Interactive user interface with AI-driven responses.
  • Data Handling: Preparation and automatic connection scripts for training and fine-tuning.
  • Advanced Analytics: Incorporating Streamlit-Echarts for graphical data representation.
  • Security and Feedback: Using Helicone and Lakera for user interaction safety and response improvement.
  • Enhanced Chatting: Utilizing AI models for dynamic and context-aware chatting experiences.