Tutorial: Improving your code with Libertai using PyCharm

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:

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.

2 Likes