<!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> <!-- If this is a particularly complex change or feature addition, you can request a dedicated Nx release for this pull request branch. Mention someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they will confirm if the PR warrants its own release for testing purposes, and generate it for you if appropriate. --> ## Current Behavior <!-- This is the behavior we have today --> ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes # --------- Co-authored-by: Caleb Ukle <caleb@nrwl.io>
3.4 KiB
Explain with AI (beta)
"Explain with AI" in Nx Cloud leverages artificial intelligence to provide detailed explanations and insights for failed task outputs. This feature helps developers understand complex errors quickly and offers suggestions for improvements, making the debugging process more efficient.
With the power of Nx Cloud, all explanations will be provided with additional context from Nx targets and metadata. This ensures that the AI responses have the correct context related to your failed task. This means that if you're trying to debug failed Gradle tasks, the AI will know to help you specifically with Gradle.
What You Need to Enable This Feature
To use the "Explain with AI" feature, you need to enable AI features for your organization.
- For enterprise on-prem customers, this feature is not enabled by default. You need to explicitly enable AI features through environment flags.
- For public cloud users, the AI feature is enabled automatically, except for those in the EU due to regional restrictions.
- This feature is not available for hobby (free) plans on Nx Cloud.
How to Use
{% callout type="check" title="Authentication Required" %} If you don't see the "Explain with AI" button, make sure that you are logged into the application. {% /callout %}
-
Access the Task:
- First, navigate to the Nx Cloud dashboard and locate the task that failed.
- Click on the task to open the detailed view.
-
Initiate AI Explanation:
-
Review the Explanation:
-
Implement the Suggestions:
- Go through the AI-generated suggestions carefully.
- Apply the recommended changes to your codebase.
-
Verify the Fix:
- After making the changes, rerun the task to see if the issue is resolved.
-
Mark answer as not helpful (optional):
- If the suggested changes did not help you, click on "Set answer as not helpful". This allows us to continuously improve the responses.
How to Enable AI Features for Enterprise On-Prem Installations
To enable AI features for enterprise on-prem installations, add the following configuration to your helm-values.yaml file:
nxApi
deployment:
env:
- name: NX_CLOUD_AI_ENABLED
value: 'true'
frontend
deployment:
env:
- name: OPENAI_SECRET_KEY
valueFrom:
secretKeyRef:
name: open-ai-secrets
key: OPENAI_SECRET_KEY
- name: NX_CLOUD_AI_ENABLED
value: 'true'
Make sure your OpenAI secret key is correctly configured to provide the necessary credits for gpt-3.5-turbo and gpt-4o.
Regional Availability
This feature is not available for the EU cluster in public cloud installations due to regional restrictions. However, on-prem customers in the EU can still use this feature by providing their own OpenAI secret key and enabling the required environment variables.

