Skip to content

rhpds/OpenChatBot

Repository files navigation

Overview

A simple LangChain based chatbot that offers two types of interaction

  • Simple chatbot directly using ollama to run mistral

  • Simple RAG Chatbot adding Chroma, Hugging Face Embeddings

Usage

  1. Install ollama on your machine:

    curl -fsSL https://ollama.com/install.sh | sh
    Note
    If you are running on Mac/Windows, just download from Ollama website: ollama for mac ollama for windows
  2. Download your desired module:

    ollama pull mistral
    
    # optional models
    ollama pull sroecker/granite-7b-lab
    ollama pull sroecker/merlinite
  3. Create a new virtual environment (or if you are comfortable with it, use an existing environment)

    python3.11 -m venv venv
    source venv/bin/activate
  4. Install the dependencies

    pip install -r requirements.txt
  5. Run the Chainlit application

    chainlit run -h src/main.py

Frameworks and Libraries

  • LangChain

  • Chainlit

  • Ollama/Mistral

RAG Stack additions

  • Chroma

  • Hugging Face Embeddings lib

Acknowledgments and Thanks

  • Thanks to the authors of the following examples, libraries, patterns, and tools:

  • langchain-chatbot