UNPKG

agente-toolkit

Version:

A barebones TypeScript library for building AI agents with intelligent tool execution and self-correction capabilities

29 lines 1.09 kB
import { BaseAdapter, ToolExecutionResult } from '../base/base'; import { Tool } from '../../../core/tools/types/Tool'; /** * OpenAI adapter with native tool support * Uses OpenAI's built-in function calling when available */ export declare class OpenAIAdapter extends BaseAdapter { name: string; supportsNativeTools: boolean; private client; private model; constructor(apiKey?: string, model?: string); /** * Text completion for general prompts. * Supports structured JSON responses via OpenAI's response_format. * * options.json: boolean -> Request a JSON object (model validates JSON) * options.schema: object -> Provide a JSON schema; will request JSON schema mode if supported */ complete(prompt: string, options?: { json?: boolean; schema?: Record<string, any>; }): Promise<string>; /** * Execute tools with a prompt - uses native OpenAI function calling */ executeWithTools(prompt: string, tools: Tool[]): Promise<ToolExecutionResult>; } //# sourceMappingURL=openaiAdapter.d.ts.map