PyCharm and the Jetbrains IDEs are popular amongst our team at aleph.im. We love open-source and decentralization, and we’d like to share how we leverage aleph.im’s decentralized network and Libertai’s AI capabilities to improve the quality of our code using open-source.
CodeGPT is a plugin for Jetbrain IDEs (CodeGPT Plugin page on jetbrains.com CodeGPT source Repository ) that helps developers use large language models (LLM) directly from their IDE.
Selecting the Model and API
After installing the plugin, we configure it to use an open model provided by Libertai on their Text Generation API page Text Generation | Libertai
DeepSeek Coder 6.7B is a model tuned for source code, so we copy it’s API URL from
Configure CodeGPT
In the settings of your IDE, search for “CodeGPT”, open the main section and use the following:
- Base host: The URL of the model you selected. The URL for DeepSeek Code 6.7B is https://curated.aleph.cloud/vm/b950fef19b109ef3770c89eb08a03b54016556c171b9a32475c085554b594c94
- API key: According the the Libertai documentation on the OpenAI-compatible API, you should use the key
libertai
.
Leave the rest of the settings as is.
Use CodeGPT
You can now right-click code from your IDE to have it Optimized, Refactored, Explained or to write tests or find bugs automatically.
CodeGPT appears with an interactive chat in the sidebar of your IDE. It features handy buttons to replace the selection you just reworked with the new code generated by the model.