/** * The following code is modified based on * https://github.com/token-js/token.js/blob/main/src/handlers/utils.ts * * MIT License * Copyright (c) 2024 RPate97 * https://github.com/token-js/token.js/blob/main/LICENSE */ import OpenAI from 'openai'; import { LLMProvider } from '../chat/index.js'; import { ConfigOptions } from '../userTypes/index.js'; import { BaseHandler } from './base.js'; import { MIMEType } from './types.js'; export declare const Handlers: Record any>; export declare const getHandler: (provider: LLMProvider, opts: ConfigOptions) => BaseHandler; export declare const getTimestamp: () => number; export declare const fetchImageAsBase64: (url: string) => Promise; export declare const getMimeType: (url: string) => string; export declare const fetchThenParseImage: (urlOrBase64Image: string) => Promise<{ content: string; mimeType: MIMEType; }>; export declare const isSupportedMIMEType: (value: string) => value is MIMEType; export declare const parseImage: (image: string) => { content: string; mimeType: MIMEType; }; export declare const consoleWarn: (message: string) => void; export declare const isEmptyObject: (variable: any) => boolean; export declare const isObject: (variable: any) => boolean; export declare const convertMessageContentToString: (messageContent: OpenAI.Chat.Completions.ChatCompletionMessageParam["content"]) => string; //# sourceMappingURL=utils.d.ts.map