type OpenAiCostTrackerFetchInput = string | URL | Request; type OpenAiCostTrackerFetchInit = RequestInit | undefined; type OpenAiCostTrackerFetchResponse = Response; export type OpenAiCostTrackerCallback = (bucketId: string, input: string | URL | Request, init: RequestInit | undefined, response: Response) => Promise; export declare class OpenAiCostTracker { /** * This function returns a fetch function that can be passed to the OpenAI client. It is designed to track the usage of OpenAI API calls * It is aimed to allow the caller to compute the cost based on the usage information returned in the response. * * @param bucketId - an identifier for the tracker, used to group usage information (default: 'openai_call_bucket') * @param trackerCallback - a callback function that will be called with Response for each API call * @param originalFetch - the original fetch function to use for making API calls (default: global fetch) * @returns a fetch function that can be passed to the OpenAI client */ static getFetchFn(trackerCallback: OpenAiCostTrackerCallback, { bucketId, originalFetch }?: { bucketId?: string; originalFetch?: (input: OpenAiCostTrackerFetchInput, init?: OpenAiCostTrackerFetchInit) => Promise; }): Promise<(input: OpenAiCostTrackerFetchInput, init?: OpenAiCostTrackerFetchInit) => Promise>; private static _maybeInjectIncludeUsage; } export {};