UNPKG

ggai

Version:

OpenAI LLM Agent Interface

42 lines (36 loc) 828 B
declare module 'ggai' { type ToolConfig = { type: 'function', function: { name: string, description: string, parameters: { type: 'object', properties: { [key: string]: { type: string, description: string items?: string[] } }, required: string[] } } } type AgentConfig = { model?: string; temperature?: number; systemPrompt?: string; historyLimit?: number; config?: ToolConfig[]; tools?: Record<string, Function>, streamingIndicators?: boolean; verbose?: boolean; }; class Agent { cost: number; constructor(config?: AgentConfig); send(input: string, skipInput?: boolean): Promise<string>; } function ask(question: string): Promise<string>; }