Edit online

Configure the AI Service Using a JSON File

The Oxygen AI Positron Assistant Enterprise add-on can automatically configure its AI service using a JSON file placed in the installation directory. This method initializes the connector on first start and hides the AI Service Configuration preferences page. As a result, users are restricted to using the company's approved AI service only.

Configuration File Example

Create a file named ai-service-configuration.json in the installation directory. The supported connectors are open-ai-connector, ms-azure-open-ai-connector, claude-ai-connector, google-gemini-ai-connector.

{
  "connector_id": "open-ai-connector",
  "connector_params": {
    "base_URL_param": "https://api.openai.com/",
    "model_param": "gpt-4",
    "streaming_param": true,
    "ai_key_param_encrypted_url": "http://127.0.0.1:6573/encrypted_key",
    "ai_key_param_seed_url": "http://127.0.0.1:6573/seed"
  }
}
{
  "connector_id": "claude-ai-connector",
  "connector_params": {
    "base_URL_param": "https://api.anthropic.com/",
    "model_param": "claude-3-opus-20240229",
    "streaming_param": true,
    "ai_key_param_encrypted_url": "http://127.0.0.1:6573/encrypted_key",
    "ai_key_param_seed_url": "http://127.0.0.1:6573/seed"
  }
}
{
  "connector_id": "google-gemini-ai-connector",
  "connector_params": {
    "base_URL_param": "https://generativelanguage.googleapis.com/",
    "model_param": "models/gemini-2.0-flash-lite",
    "streaming_param": true,
    "ai_key_param_encrypted_url": "http://127.0.0.1:6573/encrypted_key",
    "ai_key_param_seed_url": "http://127.0.0.1:6573/seed"
  }
}
{
  "connector_id": "ms-azure-open-ai-connector",
  "connector_params": {
    "base_URL_param": "https://oxygenxml-vision.openai.azure.com/",
    "deployment_param": "gpt-4o",
    "streaming_param": true,
    "ai_key_param_encrypted_url": "http://127.0.0.1:6573/encrypted_key",
    "ai_key_param_seed_url": "http://127.0.0.1:6573/seed"
  }
}

Behavior on First Start

When the configuration file is detected, the connector is initialized with its values when Oxygen XML starts for the first time. The Plugins > Oxygen AI Positron Assistant Enterprise > AI Service Configuration preferences page is then hidden. After setup, you can remove the encrypted key and seed endpoints if they are no longer needed.

How to Obtain the Encrypted Key

Install the Oxygen AI Positron API Key Encryption add-on to generate the encrypted API key. To install this add-on, follow these steps:

  1. Go to Help > Install new add-ons to open the add-on selection dialog box. Enter or paste https://www.oxygenxml.com/InstData/Addons/optional/updateSite.xml in the Show add-ons from field or select it from the drop-down menu.
  2. Select the Oxygen AI Positron API Key Encryption add-on and click Next.
  3. Read the end-user license agreement. Then select the I accept all terms of the end-user license agreement option and click Install.
  4. Restart the application.
To obtain the encrypted API key:
  1. Open the API Key Tools: In the main menu, select API Key Tools.
  2. Select the Encrypt Action: Choose Encrypt... from the API Key Tools menu.
  3. Enter Your API Key: Follow the prompts to enter your encryption key and the API key. The tool will encrypt the API key using the encryption key.
  4. Publish the encryption key and the encrypted API key: Publish the encryption key and the encrypted API key to the URLs referenced in the configuration file.