• Stars
    star
    337
  • Rank 125,272 (Top 3 %)
  • Language
    Go
  • License
    MIT License
  • Created over 1 year ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A GPT-4 client which gives your favourite AI a memory and tools for self-improvement

GPTChat

GPTChat is a client which gives GPT-4 some unique tools to be a better AI.

With GPTChat, GPT-4 can:

  • remember useful information and recall it later
  • recall information without knowing it's previously remembered it
  • write it's own plugins and call them
  • decide to write plugins without being prompted
  • complete tasks by combining memories and plugins
  • use multi-step commands to complete complex tasks

Getting started

You'll need:

  • A working installation of Go (which you download from https://go.dev/)
  • An OpenAI account
  • An API key with access to the GPT-4 API

If you don't have an API key, you can get one here: https://platform.openai.com/account/api-keys

If you haven't joined the GPT-4 API waitlist, you can do that here: https://openai.com/waitlist/gpt-4-api

Once you're ready:

  1. Set the OPENAI_API_KEY environment variable to avoid the API key prompt on startup
  2. Run GPTChat with go run . from the gptchat directory
  3. Have fun!

Memory

GPT-4's context window is pretty small.

GPTChat adds a long term memory which GPT-4 can use to remember useful information.

For example, if you tell GPT-4 what pets you have, it'll remember and can recall that information to answer questions even when the context is gone.

See a GPT-4 memory demo on YouTube

Plugins

GPT-4 can write its own plugins to improve itself.

For example, GPT-4 is pretty bad at math and generating random numbers.

With the plugin system, you can ask GPT-4 to generate two random numbers and add them together, and it'll write a plugin to do just that.

See a GPT-4 plugin demo on YouTube

ℹ️ Plugins are only supported on unix based systems like Linux and MacOS - to get plugins working on Windows, you'll need to use something like WSL2.

Contributing

PRs to add new features are welcome.

Be careful of prompt changes - small changes can disrupt GPT-4's ability to use the commands correctly.

Disclaimer

You should supervise GPT-4's activity.

In one experiment, GPT-4 gave itself internet access with a HTTP client plugin - this seemed like a bad idea.

Supervised mode

GPTChat will run in supervised mode by default.

This doesn't restrict any functionality, but does require user confirmation before compiling and executing any plugin code written by GPT, giving users a chance to review the code for safety before executing it.

⚠️ Code written by GPT is untrusted code from the internet and potentially dangerous

All code is compiled and executed as your user, with the same level of permissions your user has. It may be safer to run this in a container or virtual machine.

Supervised mode can be disabled but I wouldn't recommend it.

License

See LICENSE.md for more information.

Copyright (c) 2023 Ian Kent

More Repositories

1

gofigure

Go configuration made easy!
Go
67
star
2

linkio

Simulate network link speed
Go
53
star
3

go-log

A logger, for Go
Go
42
star
4

purl

Perl, but fluffy like a cat!
Go
40
star
5

goose

Server-Sent Events in Go
Go
34
star
6

ikettle2

Hacks for the Smarter iKettle 2.0
Java
18
star
7

MailHog

Inspired by MailCatcher, based on M3MTA
Perl
14
star
8

vagrant-scala-play-mongodb

Vagrant build for Ubuntu with Scala, Play Framework and MongoDB
13
star
9

gopan

Perl dependency management toolchain
Go
12
star
10

envconf

Configure Go applications from the environment
Go
11
star
11

production-ready-go

Code samples from Production Ready Go talk at Golang UK 2017
Go
10
star
12

M3MTA

Experimental Mojolicious IOLoop mail transfer agent with MongoDB backend
Perl
7
star
13

atom-gradient-syntax-theme

Animated gradient syntax highlighting
CSS
5
star
14

cachebot

A Slack bot for CloudFlare
Go
4
star
15

cardiff-go-production-ready-go

Go
3
star
16

ssbs

Super Simple Build Server
Go
3
star
17

alexa

Go library for creating Amazon Alexa skills with Apex
Go
3
star
18

go-angularjs-jquery-bootstrap-boilerplate

Go + AngularJS + jQuery + Bootstrap boilerplate web application
Go
3
star
19

gotcha

A cloud-friendly web application framework in Go
Go
2
star
20

service.go

A microservice framework for Go
Go
2
star
21

RhUnit

A qUnit compatible javascript unit testing framework for Rhino
JavaScript
2
star
22

go-webapp

Demonstration Go web application
Go
1
star
23

ktee

Tee to a Kafka topic (see https://github.com/ian-kent/ktail)
Go
1
star
24

sfs

Static File Server
Go
1
star
25

bash-env

Bash environment configuration
Shell
1
star
26

dp-florence-api

POC for replacement Florence API
Go
1
star
27

automated-docs

JavaScript
1
star
28

htmlform

HTML form handling for Go
Go
1
star
29

imagestore

S3 backed imagestore for Marathon
Go
1
star
30

packer-ansible-centos-minimal

CentOS 6.5 minimal packer build with ansible install
Shell
1
star
31

civil-service-competency-framework

The (UK) Civil Service Competency Framework - in JSON and TOML
Go
1
star
32

ian-kent.github.io

CSS
1
star
33

learning-elm

Me learning Elm
Elm
1
star
34

vagrant-perl-mojolicious-mongodb

Vagrant build for Ubuntu with Perl, Mojolicious and MongoDB
Shell
1
star