Giter Club home page Giter Club logo

gptchat's Introduction

gptChat

Intro:

Simple scripts to mimic a chat function using OpenAI's api and other fun things. Note that you will need an OpenAI API to run this.

Alternatively, if you have a local LLM backend that uses an OpenAI-compatible API (Ollama, LocalAI), then you can refer to their documentation to find out what minor tweaks you need in order to use these scripts with local LLM models.

General Setup:

I recommend running these scripts in a virtual environment. I'll assume you know how to set one up and activate it. If not, refer to the docs: https://docs.python.org/3/library/venv.html

For all scripts, first use pip to install the requirements.txt, then you can open a script in a text editor to tweak the variable values to your liking. Usually, that ends up being the api key, as well as temperature, prompt, delimiters, etc.

Refer to the individual folder READMEs for more specific instructions on how to load in the API keys, or how to even start the script.

Types of scripts:

Refer to the folder names for the scripts described here.

  • erma: The latest generation. Features a persistent memory, which summarizes itself, and also the ability to selectively save conersation summaries into a "garden" for recall later on. Erma was designed to be run either standalone in a terminal, or as a server with integration to other services, such as discord.

  • legacy: The first generation of scripts. They are generally written poorly and not very efficient. They still do work but have not been updated for the most recent OpenAI pip module. Refer to the README in there for more details.

Logic behind my scripts:

The basic logic is that the scripts is that they query the api for a response based off of some sort of input. To retain "memory", these scripts will create two files to store previous conversations. This could be something like a neuralcloud_backup.ncb (ncb for neural cloud backup). This ncb is basically the chatbot's memory, and logs user inputs, API responses, and the summer garden in Erma's case. To reset the model "personality", remove the ncb file and other files created by the script. This applies to all models.

Again, refer to each individual README.md for more information.

Note the neural cloud backup files are generally not cross-compatible between the scripts.


gptchat's People

Contributors

kittyjosh111 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

gptchat's Issues

erma discord

for erma's discord bridge, have a way to pass in AI_FILE and USER_FILE so they aren't hardcoded in

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.