NMar33 / GPT_ChatHist

GPT_ChatHist is an app for interacting with OpenAI's GPT-3.5-turbo via a local web interface. It saves your dialogue history locally, allowing you to continue multiple chat sessions.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GPT_ChatHist

Hello 😃, thank you for being here! GPT_ChatHist is a small app that allows you to interact with OpenAI's GPT-3.5-turbo through a local web interface. It saves your dialogue history locally, allowing you to continue multiple chat sessions. If you prefer a version without a web interface, check out GPT_ChatHist_no_web.

Why it can be useful

  1. Easily resume your dialogue with ChatGPT.
  2. Access dialogue history to analyze, review, or utilize past conversations for various purposes.
  3. OpenAI does not use data submitted by customers via the API to train or improve models unless you explicitly opt-in to share your data. OpenAI's API Data Usage Policies.

Installation

  1. Clone the repository or download the source code.
  2. Create a virtual environment
python -m venv .venv
  1. Activate the virtual environment:
  • Windows:

    .venv\Scripts\activate.bat
    
  • Linux/Mac:

    source .venv/bin/activate
    
  1. Install the required packages:
pip install -r requirements.txt
  1. Change OPEN_API_KEY in config.yaml to your OpenAI API Key If you do not have an Open AI API key, please follow the Open AI blogpost.

How to use

  1. Activate the virtual environment (if not already active).
  2. Run the app:
python web_chat.py
  1. Open a web browser and navigate to http://127.0.0.1:5000/ to access the app interface. Enter your preferred chat name and start interacting with the AI.

Warnings

Every message you send will contain all previous chat history.

  1. Keep in mind that the model has a token limit (e.g., 4096 tokens for GPT-3). If your conversation exceeds this limit, you will need to truncate or remove some messages from the list to fit within the allowed token count.
  2. If your conversation is very large, it can consume a significant portion of your token limit.

About

GPT_ChatHist is an app for interacting with OpenAI's GPT-3.5-turbo via a local web interface. It saves your dialogue history locally, allowing you to continue multiple chat sessions.


Languages

Language:Python 50.6%Language:HTML 49.4%