import type { AIDataExtractionResponse, AIUsageInfo, Rect, ServiceExtractOption, UIContext } from '../types';
import type { IModelConfig } from '@midscene/shared/env';
import type { LocateResultElement } from '@midscene/shared/types';
import type { ChatCompletionSystemMessageParam, ChatCompletionUserMessageParam } from 'openai/resources/index';
import type { TMultimodalPrompt, TUserPrompt } from '../common';
import { callAIWithObjectResponse } from './service-caller/index';
export type AIArgs = [
    ChatCompletionSystemMessageParam,
    ...ChatCompletionUserMessageParam[]
];
export declare function AiLocateElement(options: {
    context: UIContext;
    targetElementDescription: TUserPrompt;
    searchConfig?: Awaited<ReturnType<typeof AiLocateSection>>;
    modelConfig: IModelConfig;
    abortSignal?: AbortSignal;
}): Promise<{
    parseResult: {
        elements: LocateResultElement[];
        errors?: string[];
    };
    rect?: Rect;
    rawResponse: string;
    usage?: AIUsageInfo;
    reasoning_content?: string;
}>;
export declare function AiLocateSection(options: {
    context: UIContext;
    sectionDescription: TUserPrompt;
    modelConfig: IModelConfig;
    abortSignal?: AbortSignal;
}): Promise<{
    rect?: Rect;
    imageBase64?: string;
    scale?: number;
    error?: string;
    rawResponse: string;
    usage?: AIUsageInfo;
}>;
export declare function AiExtractElementInfo<T>(options: {
    dataQuery: string | Record<string, string>;
    multimodalPrompt?: TMultimodalPrompt;
    context: UIContext;
    pageDescription?: string;
    extractOption?: ServiceExtractOption;
    modelConfig: IModelConfig;
}): Promise<{
    parseResult: AIDataExtractionResponse<T>;
    rawResponse: string;
    usage: AIUsageInfo | undefined;
    reasoning_content: string | undefined;
}>;
export declare function AiJudgeOrderSensitive(description: string, callAIFn: typeof callAIWithObjectResponse<{
    isOrderSensitive: boolean;
}>, modelConfig: IModelConfig): Promise<{
    isOrderSensitive: boolean;
    usage?: AIUsageInfo;
}>;
