Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] ArtGPT! (v0) #503

Draft
wants to merge 55 commits into
base: main
Choose a base branch
from
Draft

[WIP] ArtGPT! (v0) #503

wants to merge 55 commits into from

Conversation

jakerockland
Copy link
Contributor

@jakerockland jakerockland commented Apr 27, 2023

ArtBotGPT utilizes the OpenAI GPT-3.5turbo API and OpenAI embeddings, combined with PineconeAI for vector database management.

The bot is integrated into the Discord platform, initially covering two GitHub repositories: https://github.com/ArtBlocks/artblocks-docs and https://github.com/ArtBlocks/artblocks-contracts.

The system is rate-limited to 50 queries per hour to prevent abuse.

Screenshot 2023-04-28 at 3 46 18 PM


Pair-programmed w/ @lyaunzbe

Additional Resources

@jakerockland jakerockland changed the title [DRAFT] Add basic art GPT ArtGPT! (v0) Apr 28, 2023
@jakerockland jakerockland changed the title ArtGPT! (v0) [WIP] ArtGPT! (v0) Apr 28, 2023
@jakerockland
Copy link
Contributor Author

Leaving this in draft mode for now, as there are some minor param/config optimizations/modifications that @lyaunzbe and I are still adjusting.

However, I think the fundamental structure and architecture here is to a point where we can get an initial review pass from you @grantoesterling when you have the bandwidth to do so 🙏

Initial thinking is rolling this out on a pretty limited basis (may just be in the internal sever and in a private channel for internal purposes), so would encourage a review with that context in mind.

Copy link
Contributor

@grantoesterling grantoesterling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (conditional ofc on yall adding the env vars to Heroku) - a few nits

this is so sick - great work!

src/Classes/ArtGPTBot.ts Outdated Show resolved Hide resolved
const ARTBOT_MAX_CHARS_RESPONSE = 4000

// Discord consts
const DISCORD_TEST_SERVER_ID = '785144843986665472'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I imagine this will be included in the remaining config changes you mentioned, but these should be pulled from the channels.json - perhaps we can add an optional field for channels where we want this enabled?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that's a good point – we definitely could add this information to be exposed via projectConfig.ts rather than being inline directly, is that your suggestion/preference @grantoesterling ? I don't have a strong opinion on this.

src/Classes/ArtGPTBot.ts Outdated Show resolved Hide resolved
src/Classes/ArtGPTBot.ts Outdated Show resolved Hide resolved
src/Classes/ArtGPTBot.ts Show resolved Hide resolved
src/ProjectConfig/channels.json Show resolved Hide resolved
src/Utils/ArtGPT/dataIngestor.ts Show resolved Hide resolved
/**
* Helper to initialize langchain setup.
*/
async initializeLangchain() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm i think an essential part of this is that people should be able to run/develop artbot still without needing to have these new GPT env vars set. Looking at the deployment, it seems langchain is throwing an error due to no OpenAI API key and crashing the whole program

Can you please make sure this fails gracefully when no env vars are set?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants