AbstractApiPlugin

Abstract base class for AI API integration plugins.

Configs

9

Common

disabledInstancePlugin
listenersEvents

Misc

clientInstancePlugin
localeClassLocalizable
localizableLocalizable

Other

Properties

16

Common

disabledInstancePlugin

Class hierarchy

isAbstractApiPlugin: Boolean= truereadonly
Identifies an object as an instance of AbstractApiPlugin class, or subclass thereof.
isAbstractApiPlugin: Boolean= truereadonlystatic
Identifies an object as an instance of AbstractApiPlugin class, or subclass thereof.
isEventsEvents
isInstancePluginInstancePlugin
isLocalizableLocalizable

Other

isApiPlugin: boolean

Indicates that this class is an AI API plugin.

Lifecycle

configBase

Misc

clientInstancePlugin
localeHelperLocalizable
localeManagerLocalizable

Functions

31

Other

Converts training data to match the API's expected format before applying it. This method must be implemented by subclasses. The trainingData array must be modified in place.

ParameterTypeDescription
traningDataAITrainingDataEntry[]

The original training data content

Converts the body content of the fetch request to match the API's expected format. This method must be implemented by subclasses. The body object must be modified in place.

ParameterTypeDescription
bodyObject

The original request body.

Extracts the message from the AI response, converting it to the format expected by the AI feature. This method must be implemented by subclasses.

ParameterTypeDescription
responseObject

The raw response from the AI API.

Returns: AIMessage -

The extracted and converted message.

LstaticLocalizable
onEvents
relayAllEvents
triggerEvents
unEvents

Configuration

applyDefaultsstaticBase

Events

Lifecycle

destroystaticBase

Misc

doDisableInstancePlugin
initClassstaticBase
isOfTypeNamestaticBase
mixinstaticBase
optionalLstaticLocalizable

Events

5
catchAllEvents
destroyEvents
disableInstancePlugin
enableInstancePlugin

Event handlers

5
onDestroyEvents
onDisableInstancePlugin
onEnableInstancePlugin

Typedefs

6

An object which will form the body content of the fetch call to the configured promptUrl

ParameterTypeDescription
messagesAIMessage[]

An array of messages forming the conversation

systemMessagesAIMessage[]

An array of system messages providing context

toolsAITool[]

An array of tool definitions available for use

modelString

The AI model to use for the request

maxTokensNumber

The maximum number of tokens for the response

temperatureNumber

The sampling temperature for the response

Represents a complete message send by the AI API

ParameterTypeDescription
roleString

The role of the message sender (e.g., 'user', 'assistant', 'tool')

contentString

The text content of the message

descriptionString

Only useful when part of a training data entry

toolCallsAIToolCall[]

An array of tool call objects if the message involves tool usage

An object describing an AI tool

ParameterTypeDescription
nameString

The name of the tool

descriptionString

A description of what the tool does

parametersObject

The parameters schema for the tool

Represents a tool call sent by the AI API

ParameterTypeDescription
nameString

The name of the tool being called

argumentsObject

The arguments for the tool call

idString

An optional unique identifier for the tool call

descriptionString

Only useful when part of a training data entry

Contains an array of messages forming a training example

ParameterTypeDescription
messagesAIMessage[]

An array of messages forming a training example