[]
Ƭ AIRequestCallback: (config: IAIConfig) => Promise<any>
▸ (config): Promise<any>
Callback function type for sending an AI request.
| Name | Type | Description |
|---|---|---|
config |
IAIConfig |
Request parameters to forward to the AI provider. |
Promise<any>
Promise that resolves with the provider response.
Ƭ IAIConfig: Object
Simplified request body passed to the AI provider. This shape is compatible with the OpenAI Chat Completions API request body used by this plugin, while allowing additional OpenAI-compatible fields to pass through as custom properties.
property {{ role: string; content: string }[]} [messages] - Array of message objects containing role and content pairs for conversation history
property [temperature] - Sampling temperature for the generated response. Higher values make output more random.
property [max_tokens] - Legacy maximum output token limit.
property [stream] - Whether to return the response as a server-sent event stream (SSE).
property [key: string] - Additional provider-specific or OpenAI-compatible request properties, such as model or max_completion_tokens.
▪ [key: string]: any
| Name | Type |
|---|---|
max_tokens? |
number |
messages |
{ content: string ; role: string }[] |
stream? |
boolean |
temperature? |
number |
Ƭ IAIEnvironment: Object
Environment configuration for the AI service endpoint.
property model - Model identifier added to the outbound request body, for example an OpenAI chat model name.
property key - API key used in the Authorization: Bearer request header.
property basePath - HTTP endpoint that receives the JSON request body, for example a server route or OpenAI-compatible API URL.
| Name | Type | Description |
|---|---|---|
basePath |
string |
HTTP endpoint that receives the JSON request body, for example a server route or OpenAI-compatible API URL. |
key |
string |
API key used in the Authorization: Bearer request header. |
model |
string |
Model identifier added to the outbound request body, for example an OpenAI chat model name. |