This project allows you to train GPT-3/4 on custom data using LlamaIndex and have a Q/A like conversation with it using discord (or refer to telegram version) as it's interface. Specifically this repo is trained on Pyth Network documentation, GitHub repos, blog articles and the Pyth whitepaper.
- Setup your .env variables. In
main.py
you will needDISCORD_API_KEY
(https://discord.com/developers/applications), inpythgpt.py
addOPENAI_API_KEY
and for importing repos from GitHub also addGITHUB_API_KEY
. - Import your custom data into the
data
folder and changeowner
repos
branch
variables insidebuild_index()
function to your desired GitHub repos. - Edit the
base_prompt
variable with your own desired ChatGPT system prompt. - Open
pythgpt.py
and run thebuild_index()
function to build index over the custom data provided in Step 2. This will create new index files in thestorage
folder. - After creating your discord bot in Step 1, invite it to your desired discord server and run
main.py
- Have fun!