import { OpenAI } from 'openai'; import type { LLMCompletionResult, LLMInstanceOptions, LLMSendMessageOptions, LLMStructuredResult } from '../../../LLMService.typedefs'; import { LLMProviders } from '../../../LLMService.typedefs'; import { type LLMLoggerInterface } from '../../../utilities/logger'; import { type LLMReporterInterface } from '../../../utilities/reporter'; import { OpenAICompatibleCompletionService } from '../../../providers/OpenAICompatible/OpenAICompatibleCompletion.service'; import { type LLMSchemaInterface } from '../../../utilities/schema'; export declare class LLMAPICompletionService | undefined> extends OpenAICompatibleCompletionService { constructor(logger: LLMLoggerInterface | undefined, reporter: Reporter, options?: LLMInstanceOptions[LLMProviders.LLMAPI]); get instance(): OpenAI; private combineInstructions; protected sendTextMessage(options: LLMSendMessageOptions): Promise; protected sendStructuredMessage(options: LLMSendMessageOptions & { schema: LLMSchemaInterface; }): Promise; /** * Builds the provider-native message array and the response format before the * request is attempted, so the success and the error path trace the same * transcript rather than one of them falling back to a raw * `{ message, history }` object. It runs outside the request's `try` on * purpose: combining messages and rendering the schema is local work, and its * failure is a configuration error rather than a provider one. */ private prepareStructuredRequest; }