call-ai
Version:
Lightweight library for making AI API calls with streaming support
5 lines (4 loc) • 445 B
TypeScript
import { CallAIOptions, Message, SchemaStrategy } from "./types.js";
declare function createStreamingGenerator(response: Response, options: CallAIOptions, schemaStrategy: SchemaStrategy, model: string): AsyncGenerator<string, string, unknown>;
declare function callAIStreaming(prompt: string | Message[], options?: CallAIOptions, isRetry?: boolean): AsyncGenerator<string, string, unknown>;
export { createStreamingGenerator, callAIStreaming };