Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.
/ codebot Public archive

This is a chatbot based on the openAI chatGPT API using a Pinecone DB for long-term memory

Notifications You must be signed in to change notification settings

csymonds/codebot

Repository files navigation

*** This repo has been retired, please see https://github.com/csymonds/chatbot ***

This is a chatGPT bot with long term memory using Pinecone

It also uses the Whisper API to do speech to text

Setup

  1. If you don’t have Python installed, install it from here

    You will need to create an account on Pinecone and follow their registration procedures.

    Pinecone also has documentation you can follow for integration with OpenAI if you want to try your own.

    Documentation for the OpenAI chatGPT API is available here.

  2. Clone this repository

    $ git clone [email protected]:csymonds/codebot.git
  3. Navigate into the project directory

    $ cd codebot

Virtual environment and dependency installation

  1. Virtualize (Note: Windows users will see venv/Scripts/activate)

    $ python -m venv venv
    $ . venv/bin/activate
    
  2. Install the library dependencies

    $ pip3 install -r requirements.txt

    In addition to the library dependencies, there are some additional runtime dependencies like pytorch

    The below install version assumes you have CUDA 11.7 installed.

    The necessary CUDA installers are found here.

    Additional PyTorch installers are found here.

    $ pip3 install keyboard torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu117
  3. Add keys

    Step 1: Make a copy of the example environment variables files

    $ cp example_key_openai.txt key_openai.txt
    $ cp example_key_pinecone.txt key_pinecone.txt

    Step 2: Copy in your key to the respective file

    Add your OpenAI API key to the newly created key_openai.txt file

    Add your Pinecone API key to the newly created key_pinecone.txt file

  4. Deactivate

    $ deactivate
    

Tips: sounddevice defaults to your default communications devices in order to record/playback

To check/modify what those defaults are, use

python -m sounddevice

PLEASE NOTE: You will get a warning about model parameters missing when you run this. It is harmless, and can be suppressed by setting the ignore_warnings parameter to True

About

This is a chatbot based on the openAI chatGPT API using a Pinecone DB for long-term memory

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages