import { WrapExtras, WrappedFn, WrappedReturn, cJSON } from './types.js'; import OpenAI from 'openai'; import { APIPromise } from 'openai/core'; import OpenAIStreaming from 'openai/streaming'; type WrappedOldOpenAi = Omit & { createChatCompletion: WrappedFn; }; type CreateFunction = (body: T, options?: OpenAI.RequestOptions) => U; type WrapCreateFunction = (body: T, options?: OpenAI.RequestOptions) => WrappedReturn>; type NewParams = { tags?: string[]; userProps?: cJSON; }; type WrapCreate = { chat: { completions: { create: WrapCreateFunction> & WrapCreateFunction>> & WrapCreateFunction> | APIPromise>; }; }; }; type WrappedOpenAi = Omit & WrapCreate; declare function openAIv3(openai: T, params?: WrapExtras): WrappedOldOpenAi; declare function monitorOpenAI(openai: T, params?: WrapExtras): WrappedOpenAi; export { monitorOpenAI, openAIv3 };