UNPKG

llmforge

Version:

One API, every AI model, instant switching. Change from GPT-4 to Gemini to local models with a single config update. LLMForge is the lightweight, TypeScript-first solution for multi-provider AI applications with zero vendor lock-in.

31 lines (30 loc) 922 B
import { Config, Content, GenerateContentResponse } from 'index'; export interface streamResponse { type: 'delta' | 'done' | 'completed'; token: string; } export interface streamResponseComplete extends streamResponse { completeOutput?: string; thinkingOutput?: string; model?: string; usage?: { input_tokens?: number; output_tokens?: number; total_tokens?: number; }; status?: string; fallback?: { isUsed: boolean; reason?: string; } | null; } export declare class RunnerClient { private readonly config; private LLMClients; private constructor(); static create(config: Config): Promise<RunnerClient>; private setLLMConfigToDefault; private loadLLMClients; run(content: Content[]): Promise<GenerateContentResponse | AsyncGenerator<any> | streamResponse[]>; } export type { Content, Config } from './types/index';