@ckeditor/ckeditor5-ai
Version:
AI features for CKEditor 5.
50 lines (49 loc) • 1.91 kB
TypeScript
/**
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
*/
/**
* @module ai/aichat/model/aichatinteraction
*/
import { type AICapabilitiesConfig } from '../../aicore/model/aicapabilities.js';
import { AIInteraction, type AIInteractionOptions } from '../../aicore/model/aiinteraction.js';
import { type AIConnectorRequest } from '../../aicore/aiconnector.js';
import { type AIContextItem } from '../../aicore/model/aicontext.js';
import { type AIQuickActionRequestData } from '../../aiquickactions/aiquickactions.js';
export declare class AIChatInteraction extends AIInteraction {
/**
* The user message that was sent to the AI endpoint.
*/
readonly userMessage: string;
/**
* The ID of the {@link module:ai/aichat/model/aichatconversation~AIChatConversation conversation} that the interaction belongs to.
*/
readonly conversationId: string;
/**
* The context items that were sent to the AI endpoint.
*/
readonly contextItems: Map<string, AIContextItem>;
/**
* The capabilities settings that were sent to the AI endpoint.
*/
readonly capabilities: AICapabilitiesConfig;
/**
* The model of the interaction.
*/
readonly model: string;
/**
* The quick action data that was sent to the AI endpoint.
*/
readonly quickActionData?: AIQuickActionRequestData;
constructor(options: AIChatInteractionOptions);
sendRequest(): Promise<AIConnectorRequest>;
getDocumentContext(): AIContextItem | undefined;
}
export type AIChatInteractionOptions = {
conversationId: string;
contextItems: Map<string, AIContextItem>;
capabilities: AICapabilitiesConfig;
userMessage: string;
model: string;
quickActionData?: AIQuickActionRequestData;
} & AIInteractionOptions;