UNPKG

call-ai

Version:

Lightweight library for making AI API calls with streaming support

8 lines (7 loc) 588 B
import { AIResult, CallAIOptions, Message, SchemaStrategy } from "./types.js"; import { PACKAGE_VERSION } from "./version.js"; declare const FALLBACK_MODEL = "openrouter/auto"; declare function callAINonStreaming(prompt: string | Message[], options?: CallAIOptions, isRetry?: boolean): Promise<string>; declare function extractContent(result: AIResult, schemaStrategy: SchemaStrategy): string; declare function extractClaudeResponse(response: Response): Promise<NonNullable<unknown>>; export { callAINonStreaming, extractContent, extractClaudeResponse, PACKAGE_VERSION, FALLBACK_MODEL };