UNPKG

@directus/api

Version:

Directus is a real-time API and App dashboard for managing SQL database content

16 lines (15 loc) 680 B
import { type LanguageModelUsage, type Tool, type UIMessage, type StreamTextResult } from 'ai'; export interface CreateUiStreamOptions { provider: 'openai' | 'anthropic'; model: string; tools: { [x: string]: Tool; }; apiKeys: { openai: string | null; anthropic: string | null; }; systemPrompt?: string; onUsage?: (usage: Pick<LanguageModelUsage, 'inputTokens' | 'outputTokens' | 'totalTokens'>) => void | Promise<void>; } export declare const createUiStream: (messages: UIMessage[], { provider, model, tools, apiKeys, systemPrompt, onUsage }: CreateUiStreamOptions) => StreamTextResult<Record<string, Tool<any, any>>, any>;