import type { OpenAI } from 'openai'; import type { ChatCompletionMessageParam } from 'openai/resources/chat'; import { type LLMAssistanceMessage, type LLMCompletionMessage, type LLMHistoryEntry, type LLMToolResultImage } from '../../LLMService.typedefs'; export declare class LLMAPIEntity { static getChatCompletionMessageParam(options: { messages: LLMCompletionMessage[]; modelName: string; }): ChatCompletionMessageParam[]; 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 getCompletionContentParts; /** * LLMAPI has no audio content part of its own: a Gemini route reads a * recording only when its url arrives under `image_url`, which it fetches * server-side. Every other route answers such a request from nothing at all * rather than rejecting it, so it is refused here. */ private static buildAudioUrlPart; 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; }