The oxygen-ai-positron-api artifact provides the types used to
declare a connector, expose UI parameters, and implement the runtime service.
AIConnector
- Declares a connector that appears in Preferences and links the UI
configuration to an
AIService implementation. It does the
following:
- Defines the identity and display name (
getConnectorId,
getConnectorName).
- Exposes the list of UI parameters
(
getParametersList).
- Creates the runtime service (
createAIService).
- Optionally adapts outgoing requests
(
configureCompletionRequest).
AIService
- Encapsulates calls to the AI backend (chat completions in streaming and
non-streaming mode, moderation).
ConnectorParamBase parameters
- Typed parameters drive both the Preferences UI and, when relevant, the AI
Positron side-view. Common types:
TextFieldConnectorParam (e.g. base URL, model)
PasswordTextFieldConnectorParam (e.g. API key)
CheckBoxConnectorParam (e.g. moderation,
streaming)
KeyValueTableConnectorParam (e.g. extra headers, extra
query params)
ModelsComboConnectorParam (supplies the model combo in
Preferences and the side-view)
For a code-level example of a connector class, see https://github.com/oxygenxml/oxygen-ai-positron-custom-connector-addon/blob/main/src/main/java/com/oxygenxml/positron/custom/connector/CustomAIConnector.java.