import type { OpenAI } from 'openai'; import type { ChatCompletionMessageParam } from 'openai/resources/chat'; import { type LLMAssistanceMessage, type LLMHistoryEntry, type LLMToolResultImage } from '../../LLMService.typedefs'; export declare class LLMAPIEntity { static convertAssistanceMessageToCompletion(message: LLMAssistanceMessage): ChatCompletionMessageParam; static convertAssistanceHistoryToCompletions(history: LLMAssistanceMessage[]): ChatCompletionMessageParam[]; /** * Replays a restored conversation as Chat Completions messages: a past tool * round becomes an assistant message carrying `tool_calls` followed by the * `tool`-role results it was answered with, and a context entry becomes a * mid-conversation system message. A tool result is emitted with the call it * answers, so a result entry contributes no message of its own. */ static convertHistoryToCompletions(options: { history: LLMHistoryEntry[]; modelName: string; }): ChatCompletionMessageParam[]; static buildToolImageMessageParts(images: LLMToolResultImage[]): OpenAI.ChatCompletionContentPart[]; private static buildToolRoundMessages; private static buildToolCall; private static buildToolCallMessage; private static buildToolResultMessage; /** * Chat Completions cannot carry images in a `tool`-role message, so images a * restored tool result holds are surfaced the way the live loop surfaces * them: one user message after the round's results. */ private static buildToolResultImageMessages; }