The hardest part of using ChatGPT is to provide it with the right context. This is especially true when talking about code. This is where Smolex comes in. Smolex is a GPT that can be used to retrieve code entities from a codebase.
- Writing test based on existing tests.
- Updating suggested code based on existing classes / methods.
- "Look at this code, is there a way to improve it?"
We parse the codebase and create an AST for each file that we store in a SQLite database for fast lookups. At the moment Smolex is Python only, but it should be possible to extend it to other languages. ;)
pip install -r requirements.txt
app/main.py --index-root /Users/alice/code/smolex/
- Set up a new GPT.
- Add the openapi.yml as an action.
- Run server and profit.