Inspiration
All four of us realized that even with incredible advances in AI, we still spent hours copying and pasting, and copying and pasting, and (you guessed it!) copying and pasting code into ChatGPT every single day. Ironically, 90% of that tedious, soul-destroying copy-pasting was simply needed to provide ChatGPT with the context of the code we are working on.
If only the AI could read our codebase. Now it can!
What it does
When you (as a developer) start a new conversation with ChatGPT, our plugin connects to your codebase, analyzes it, and immediately gives ChatGPT context of what you are working on. This way you can go straight to asking ChatGPT your complex question because it already has all the context.
When you ask a question, ChatGPT knows your codebase, it understands your project, the functions or classes that your need to modify, and how these are related to the rest of your code. As if by magic, ChatGPT knows the project that you work on better than you do, which saves you a huge amount of time.
How we built it
Our tool is built using Pinecone, LangChain, and OpenAI and is powered by AWS and Vercel.
When a user creates a repo, they can add it to our tool. That activates an AWS Lambda function that retrieves the files from the repo, vectorizes the codebase, and stores those vectors in Pinecone.
Without a vector database, none of this would be possible.
When a user creates a new chat on ChatGPT, they can activate our plugin, which will provide the chat with the context of the codebase.
If the questions are related to one of these codebases, the ChatGPT plugin will make a request to one of our endpoints, which will analyze the user's request and find relevant parts of the code for answering the query.
Under the hood, our custom agent will seek to analyze the purpose of the codebase, settings, and configurations that might be related to the issue. Then it will try to understand the question and the functions/classes that are linked to it.
To prevent bugs and break, it will also look for all the functions and classes that could constrain or may be directly or indirectly related. This context is then returned to ChatGPT to enhance its ability to provide coding assistance.
The exchange continues, making the experience feel insightful and personalized.
To keep ChatGPT aware of the local changes, we have created a VSCode extension that grabs changes and pushes them to the cloud database on save, thus keeping ChatGPT up-to-date with your code as you write it.
This also allows makes it very easy to pick up wherever you left off later on.
Challenges we ran into
- AWS lambda size limitations made it difficult to deploy as most AI-related packages are quite large
- No access to OpenAI's Plugins beta required us to improvise to be able to demo
Accomplishments that we're proud of
- Being able to build a tool that all 4 of us are going to use on a day-to-day basis.
What we learned
We learned a lot about ourselves and our teammates.
We believe that Pinecone, LangChain, and OpenAI are fantastic tools and developers will be able to create amazing projects using them.
We are very interested in becoming experts in these technologies.
What's next for Codextranauts
After seeing the potential of our tool, we realize that we are at the beginning of the adventure. Right now we have a thousand ideas for how to improve our product. We are only at a proof of concept, and we can't wait to continue this adventure!
It's a product that even other teams in the hackathon would love to use, so we have high hopes for it!
Built With
- amazon-web-services
- chatgpt-plugin
- github
- langchain
- openai
- pinecone
- python
- typescript
Log in or sign up for Devpost to join the conversation.