Skip to content

ChatGPT Integration#

Introduction#

The ChatGPT integration provides users with insight and potential solutions on their alerts. To access this feature, users need to set up their own API key and integrate it as an environment variable during the setup process.

image

Enable ChatGPT#

To enable the ChatGPT recommendation feature, follow these steps:

Obtain an API Key: To use the ChatGPT API, sign up or log into your account on https://openai.com to generate your unique API key.

Configuration:

  • Open the docker-compose.yaml file located in the unryo-setup directory. Within this file, find the appropriate section for alerts.
  • In the docker-compose.yaml file, ensure that the UNRYO_GPT_API_KEY field is present: UNRYO_GPT_API_KEY: ${UNRYO_GPT_API_KEY:-}
  • API Key Integration: In the .env file, add the same variable with your API key: UNRYO_GPT_API_KEY: Your API key

How to Use#

Once the ChatGPT integration is set up with your API key, you can interact with it seamlessly via the app's user interface.

  • Click on the 3-dots icon (right side of any alert) > Alert details > AI Chat

    The feature will enable you to to select between predefined questions regarding any errors you encounter, and ChatGPT will respond with insightful recommendations. The first prompt explains the alert, the second explains the causes, and the third describes a solution. Once you click on the corresponding buttons, the request will be sent to the OpenAI API and one of your tokens will be used per request.

If you don't see the action column: go to the alerts console, select the drop down with 3 lines on the right, and click configure. Enable actions (if it isn’t enabled already).

Security Considerations#

The security of your API key is of utmost importance. Treat it as a confidential credential and avoid sharing it publicly or including it in version control systems. Additionally, keep your app and its dependencies updated to prevent security vulnerabilities.

Disable ChatGPT integration#

If you don’t plan on using the ChatGPT integration and you want it to not be visible, you can delete the placeholder within the docker-compose.yaml file, or your entered key within the .env file, leaving it blank.