AbstractApiPlugin
Abstract base class for AI API integration plugins.
Configs
9
Configs
9Misc
Other
Properties
16
Properties
16Common
Class hierarchy
Other
Indicates that this class is an AI API plugin.
Functions
31
Functions
31Other
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.
| Parameter | Type | Description |
|---|---|---|
traningData | AITrainingDataEntry[] | 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.
| Parameter | Type | Description |
|---|---|---|
body | Object | 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.
| Parameter | Type | Description |
|---|---|---|
response | Object | The raw response from the AI API. |
The extracted and converted message.
Configuration
Events
Misc
Events
5
Events
5Event handlers
5
Event handlers
5Typedefs
6
Typedefs
6An object which will form the body content of the fetch call to the configured promptUrl
| Parameter | Type | Description |
|---|---|---|
messages | AIMessage[] | An array of messages forming the conversation |
systemMessages | AIMessage[] | An array of system messages providing context |
tools | AITool[] | An array of tool definitions available for use |
model | String | The AI model to use for the request |
maxTokens | Number | The maximum number of tokens for the response |
temperature | Number | The sampling temperature for the response |
Represents a complete message send by the AI API
| Parameter | Type | Description |
|---|---|---|
role | String | The role of the message sender (e.g., 'user', 'assistant', 'tool') |
content | String | The text content of the message |
description | String | Only useful when part of a training data entry |
toolCalls | AIToolCall[] | An array of tool call objects if the message involves tool usage |
An object describing an AI tool
| Parameter | Type | Description |
|---|---|---|
name | String | The name of the tool |
description | String | A description of what the tool does |
parameters | Object | The parameters schema for the tool |
Represents a tool call sent by the AI API
| Parameter | Type | Description |
|---|---|---|
name | String | The name of the tool being called |
arguments | Object | The arguments for the tool call |
id | String | An optional unique identifier for the tool call |
description | String | Only useful when part of a training data entry |
Contains an array of messages forming a training example
| Parameter | Type | Description |
|---|---|---|
messages | AIMessage[] | An array of messages forming a training example |