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.

17 lines (16 loc) 714 B
import { LLMConfig } from '../types'; import { RetryHandler } from '../strategies/retry/expo'; import { Readable } from 'stream'; export declare class HttpClient { private config; private retryHandler; constructor(config: LLMConfig, baseUrl: string, retryHandler?: RetryHandler); request<T>(options: RequestInit | undefined, isStream: boolean | undefined, endPointPath: string): Promise<T>; streamRequest(options: RequestInit | undefined, endPointPath: string): Promise<Readable>; private handleErrorResponse; private isRetryableStatusCode; private getStatusText; private createTimeoutSignal; updateConfig(newConfig: Partial<LLMConfig>): void; getConfig(): LLMConfig; }