UNPKG

ai.libx.js

Version:

Unified API bridge for various AI models (LLMs, image/video generation, TTS, STT) - stateless, edge-compatible

20 lines (19 loc) 665 B
import { ChatOptions, ChatResponse, StreamChunk } from './types'; import { RequestLogger } from './utils/request-logger'; export interface AIClientConfig { apiKeys?: Record<string, string>; baseUrls?: Record<string, string>; cloudflareAccountId?: string; enableLogging?: boolean; } export declare class AIClient { private config; private adapters; private logger; constructor(config?: AIClientConfig); chat(options: ChatOptions): Promise<ChatResponse | AsyncIterable<StreamChunk>>; private getAdapter; clearAdapters(): void; getLogger(): RequestLogger; getStats(): import("./utils/request-logger").LoggerStats; }