Edit online

Oxygen AI Positron Custom Connector Add-on

The Oxygen AI Positron Custom Connector add-on contributes a custom connector for the Oxygen AI Positron Assistant. The connector, named Custom AI Service, enables integration with a custom AI service that exposes a REST API, similar to OpenAI's chat-completion API. Unlike the built-in Open AI connector, this supports the OAuth Client Credentials Flow for authentication and offers more flexibility by letting you set query parameters.
Note:
The Oxygen AI Positron Custom Connector add-on is compatible with Oxygen XML Editor/Author/Developer version 27.1 or newer.

Installation

To install this add-on, follow this procedure:
  1. Go to Help > Install new add-ons to open an add-on selection dialog box. Enter or paste https://www.oxygenxml.com/InstData/Addons/default/updateSite.xml in the Show add-ons from field or select it from the drop-down menu.
  2. Select the Oxygen AI Positron Custom Connector 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 Finish.
  4. Restart the application.

Result: The custom AI service will be available from the AI Connector combo menu in the Plugins > Oxygen AI Positron Assistant Enterprise > AI Service Configuration preferences page.

The add-on can also be installed using the following alternative installation procedure:
  1. Go to the Releases page and download the oxygen-ai-positron-custom-connector-addon-{version}-plugin.jar file.
  2. Unzip it inside {oXygenInstallDir}/plugins. Make sure you do not create any intermediate folders. After unzipping the archive, the file system should look like this: {oXygenInstallDir}/plugins/oxygen-ai-positron-custom-connector-addon-x.y.z, and inside this folder, there should be a plugin.xml file.

How to Use the Connector Add-on

When the Custom AI Service is selected from the AI Service Configuration preferences page, the following options are available to configure the connector:

Address
The web address of the custom AI service. By default, it is https://api.openai.com/v1.
API Key
The API key necessary to work with the connector. If you do not specify an API key, the add-on will try to use environmental variables or system properties to authenticate using the OAuth Client Credential Flow. These are the environmental variables or system properties that should be specified:
  • POSITRON_CONNECTOR_AUTH_DOMAIN - The domain for the authorization server (e.g. example-123abc.us.auth0.com).
  • POSITRON_CONNECTOR_AUTH_CLIENT_ID - The ID of the requesting client.
  • POSITRON_CONNECTOR_AUTH_CLIENT_SECRET - The secret of the client.
  • POSITRON_CONNECTOR_AUTH_AUDIENCE - (Optional) The audience for the token, typically the API or service you are accessing.
  • POSITRON_CONNECTOR_AUTH_ORGANIZATION - (Optional) The organization name or identifier.

You can find more information about how you can find these values in Auth0 here: Auth0 Client Credentials Flow Parameters.

Model
The model to use.
Enable Text Moderation
This setting applies moderation to both the input text sent to the AI service and the response received from the AI service. It is enabled by default. By default, when executing an action using this connector, three requests are made:
  • A moderation on the input content request to configured_address/moderations.
  • A completion request to configured_address/chat/completions.
  • A moderation on content returned by the AI to configured_address/moderations.
Note:
If your AI service does not require moderation (for example, moderation is already made by the chat/completions endpoint), you can disable it by deselecting this option.
Enable Streaming
When this option is disabled, the connector will only execute requests without streaming to the AI service. It is useful when the AI service does not support streaming. It is enabled by default.
Extra Headers
Extra name/value parameters to set in the headers of the AI requests.