import { ChatFetchError } from '../../../platform/chat/common/commonTypes';
import { IChatEndpoint, IChatRequestTelemetryProperties, IEndpointBody } from '../../../platform/networking/common/networking';
import { ChatCompletion } from '../../../platform/networking/common/openai';
import { ITelemetryService } from '../../../platform/telemetry/common/telemetry';
import { TelemetryData } from '../../../platform/telemetry/common/telemetryData';
export interface IChatMLFetcherSuccessfulData {
    requestId: string;
    chatCompletion: ChatCompletion;
    baseTelemetry: TelemetryData | undefined;
    userInitiatedRequest: boolean | undefined;
    chatEndpointInfo: IChatEndpoint | undefined;
    requestBody: IEndpointBody;
    maxResponseTokens: number;
    promptTokenCount: number;
    timeToFirstToken: number;
    timeToFirstTokenEmitted: number;
    hasImageMessages: boolean;
}
export interface IChatMLFetcherCancellationProperties {
    source: string;
    requestId: string;
    model: string;
    apiType: string | undefined;
    associatedRequestId?: string;
    retryAfterErrorCategory?: string;
    retryAfterError?: string;
    connectivityTestError?: string;
    retryAfterFilterCategory?: string;
}
export interface IChatMLFetcherCancellationMeasures {
    totalTokenMax: number;
    promptTokenCount: number;
    tokenCountMax: number;
    timeToFirstToken: number | undefined;
    timeToFirstTokenEmitted?: number;
    timeToCancelled: number;
    isVisionRequest: number;
    isBYOK: number;
    isAuto: number;
}
export declare class ChatMLFetcherTelemetrySender {
    static sendSuccessTelemetry(telemetryService: ITelemetryService, { requestId, chatCompletion, baseTelemetry, userInitiatedRequest, chatEndpointInfo, requestBody, maxResponseTokens, promptTokenCount, timeToFirstToken, timeToFirstTokenEmitted, hasImageMessages }: IChatMLFetcherSuccessfulData): void;
    static sendCancellationTelemetry(telemetryService: ITelemetryService, { source, requestId, model, apiType, associatedRequestId, retryAfterErrorCategory, retryAfterError, connectivityTestError, retryAfterFilterCategory, }: IChatMLFetcherCancellationProperties, { totalTokenMax, promptTokenCount, tokenCountMax, timeToFirstToken, timeToFirstTokenEmitted, timeToCancelled, isVisionRequest, isBYOK, isAuto }: IChatMLFetcherCancellationMeasures): void;
    static sendResponseErrorTelemetry(telemetryService: ITelemetryService, processed: ChatFetchError, telemetryProperties: IChatRequestTelemetryProperties | undefined, ourRequestId: string, chatEndpointInfo: IChatEndpoint, requestBody: IEndpointBody, tokenCount: number, maxResponseTokens: number, timeToFirstToken: number, isVisionRequest: boolean): void;
}
//# sourceMappingURL=chatMLFetcherTelemetry.d.ts.map