An open API service indexing awesome lists of open source software.

https://github.com/logankilpatrick/chatgpt-simple

Build a simple locally hosted version of ChatGPT in less than 100 lines of code
https://github.com/logankilpatrick/chatgpt-simple

chatgpt

Last synced: 14 days ago
JSON representation

Build a simple locally hosted version of ChatGPT in less than 100 lines of code

Awesome Lists containing this project

README

        

# ChatGPT-Simple

Build a simple locally hosted version of ChatGPT in less than 100 lines of code. Note: This is an unofficial ChatGPT repo and is not associated with OpenAI in anyway!

## Getting started

To run the example code, you need to create an [OpenAI API key](https://platform.openai.com/account/api-keys)

1. Install requirments using
```bash
$ pip install -r requirements.txt
```
2. Create a .env file and paste your API key there
```.env
OPENAI_API_KEY = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXx
```
3. Run the code and Enjoy
```bash
$ python server.py
```

## The best part

This code was written by GPT-4 : )