/** * Internal dependencies */ import GenerativeAiModel from './generative-ai-model'; import type { Content, Part, ChatSessionOptions } from '../types'; /** * Class representing a chat session with a generative model. * * @since 0.1.0 */ export default class ChatSession { model: GenerativeAiModel; history: Content[]; /** * Constructor. * * @since 0.1.0 * * @param model - Generative AI model. * @param options - Chat options. */ constructor(model: GenerativeAiModel, options: ChatSessionOptions); /** * Gets the chat history. * * @since 0.1.0 * * @returns Chat history. */ getHistory(): Content[]; /** * Sends a chat message to the model. * * @since 0.1.0 * * @param content - Chat message content. * @returns The response content. */ sendMessage(content: string | Part[] | Content): Promise; /** * Sends a chat message to the model, streaming the response. * * @since 0.3.0 * * @param content - Chat message content. * @returns The generator that yields chunks of the response content. */ streamSendMessage(content: string | Part[] | Content): Promise>; } //# sourceMappingURL=chat-session.d.ts.map