PyCharm 2024.3 Help

AI Assistant

AI Assistant provides AI-powered features for software development. It can explain code, answer questions about code fragments, provide code suggestions, generate documentation, commit messages, and much more.

The AI Assistant plugin is not bundled and is not enabled in PyCharm by default.

AI Assistant will not be active and will not have access to your code unless you install the plugin, acquire a JetBrains AI Service license and give your explicit consent to JetBrains AI Terms of Service and JetBrains AI Acceptable Use Policy while installing the plugin.

JetBrains AI Service licensing

The AI Assistant plugin is powered by the JetBrains AI Service. This service transparently connects you, as a product user, to different large language models (LLMs) and enables specific AI-powered features within many JetBrains products.

You can acquire the AI Assistant license at the JetBrains AI Service website. Before acquiring the license, you can sign up for a limited trial. The AI Assistant license or your free trial will be linked to your JetBrains Account.

For more information about licensing plans and features' availability, refer to the FAQ at the JetBrains AI Service website.

If you need any help regarding your license, you can contact our support team.

Enable the AI Assistant plugin

Install the AI Assistant plugin

  1. Click AI Assistant icon Install AI Assistant on the right toolbar to open the AI Assistant installation tool window and then click Install Plugin.

    AI Assistant installation tool window

    Alternatively, open Settings | Plugins | Marketplace and type AI Assistant in the search field, then click Install.

    AI Assistant in the list of available plugins in the marketplace
  2. Restart PyCharm and activate your license.

Get and activate the AI Assistant license

  1. Click AI Assistant on the right toolbar to open the AI Assistant tool window.

  2. If you are not logged in to your JetBrains account, click Log in to JetBrains Account.

    The AI Assistant tool window with an option to log in to JetBrains account

    On the JetBrains Account website that opens, enter your credentials. After the authorization, close the page and go back to PyCharm.

  3. If you have already got your license at jetbrains.com/ai, PyCharm should verify and activate it automatically.

    After that you will see a confirmation message and the Get Started button.

    Get Started button

    If you do not have a license yet, you will see two options in the AI Assistant tool window:

    • Click Get JetBrains AI Pro, get the license at jetbrains.com/ai, and then go back to PyCharm.

      After PyCharm automatically checks the license, you will see a confirmation message and the Get Started button.

    • Click Start Free Trial to sign up for a limited trial.

For more information about enabling and disabling AI Assistant on a company level, refer to How to enable AI Assistant for companies.

You can disable AI Assistant any time you want.

Use AI Assistant features

Here is how you can work with AI Assistant:

You can always check the list of features with demos in the AI Assistant tool window by clicking Options and selecting Discover Features.

AI Chat options

How we handle your code and data

When you use AI features, PyCharm needs to send your requests and pieces of your code to the LLM (Large Language Model) provider. Besides the prompts you type, it may send additional details, such as file types, frameworks used, and any other information that may be necessary for providing context to the LLM.

In addition, PyCharm builds with the AI Assistant plugin perform opt-in collection of detailed data about the usage of AI features, including the full communication between you and the LLM (both text and code fragments). This data is kept strictly confidential and is used by JetBrains for product improvement purposes only. It is never shared with any external parties, and it will not be used for training any ML models that generate code or text, or revealed in any form to any other users. The option that controls detailed data collection can be found in the IDE Settings under Tools | AI Assistant | Data Sharing | Allow detailed data collection and is disabled by default.

For more information about our data collection policies, refer to Data Collection and Use Policy.

Review the data sent to external services

AI Assistant logs prompts that are sent to the LLM provider. You can review them in the ai-assistant-requests.md file.

Open AI Assistant requests log

  1. In the main menu, go to Navigate | Search Everywhere or press Shift twice to open the search window.

  2. Type Open AI Assistant Requests Log in Editor and press Enter.

    Action in Search Everywhere for opening AI Assistant requests log
  3. Review log in the ai-assistant-requests.md file that opens.

    Logs are stored during the current PyCharm session.

Clean up AI Assistant requests log

  1. In the main menu, go to Navigate | Search Everywhere or press Shift twice to open the search window.

  2. To clean up the entire AI Assistant requests log, type Clean Up AI Assistant Requests Log and press Enter.

    Action in Search Everywhere for cleaning up AI Assistant requests log

    To clean up the requests log only for the current project, type Clean Up AI Assistant Requests Log for Current Project and press Enter.

Last modified: 11 November 2024