import { Result } from '../../../util/common/result';
import { CancellationToken } from '../../../util/vs/base/common/cancellation';
import { IAuthenticationService } from '../../authentication/common/authentication';
import { RequestId } from '../../networking/common/fetch';
import { IFetcherService, IHeaders, Response } from '../../networking/common/fetcherService';
import { IRequestLogger } from '../../requestLogger/common/requestLogger';
import { Completions, ICompletionsFetchService } from '../common/completionsFetchService';
import { ResponseStream } from '../common/responseStream';
export type FetchResponse = {
    status: number;
    statusText: string;
    headers: IHeaders;
    body: AsyncIterable<string>;
    requestId: RequestId;
    response: Response;
};
export interface IFetchRequestParams extends Completions.ModelParams {
}
export declare class CompletionsFetchService implements ICompletionsFetchService {
    private authService;
    private fetcherService;
    private readonly requestLogger;
    readonly _serviceBrand: undefined;
    constructor(authService: IAuthenticationService, fetcherService: IFetcherService, requestLogger: IRequestLogger);
    disconnectAll(): Promise<unknown>;
    fetch(url: string, secretKey: string, params: IFetchRequestParams, requestId: string, ct: CancellationToken, headerOverrides?: Record<string, string>): Promise<Result<ResponseStream, Completions.CompletionsFetchFailure>>;
    protected _fetchFromUrl(url: string, options: Completions.Internal.FetchOptions, ct: CancellationToken): Promise<Result<FetchResponse, Completions.CompletionsFetchFailure>>;
    private _logCompletionsRequest;
    private _emitCompletionsLogEntry;
    private getHeaders;
}
//# sourceMappingURL=completionsFetchServiceImpl.d.ts.map