/** * OpenAI LLM Client Implementation * * Implements the LLMClient interface for OpenAI's GPT models. * Supports chat, streaming, function calling, and token counting. */ import { LLMClient, LLMClientConfig, ChatParams, ChatResponse, ChatChunk, Message } from '../client'; /** * OpenAI Client implementing LLMClient interface */ export declare class OpenAIClient implements LLMClient { readonly provider = "openai"; private client; private config; constructor(config: LLMClientConfig); /** * Generate a chat completion */ chat(params: ChatParams): Promise; /** * Generate a streaming chat completion */ chatStream(params: ChatParams): AsyncIterableIterator; /** * Count tokens in a message or text */ countTokens(input: string | Message[], model: string): Promise; /** * List available OpenAI models */ listModels(): Promise; /** * Validate API credentials */ validateCredentials(): Promise; /** * Convert our ChatParams to OpenAI format */ private convertChatParams; /** * Convert our Message format to OpenAI format */ private convertMessages; /** * Convert our ToolDefinition format to OpenAI format */ private convertTools; /** * Convert OpenAI ChatCompletion to our ChatResponse format */ private convertChatResponse; /** * Convert OpenAI stream chunk to our ChatChunk format */ private convertStreamChunk; /** * Convert OpenAI finish reason to our format */ private convertFinishReason; /** * Estimate token count when tiktoken is unavailable */ private estimateTokens; /** * Handle and convert OpenAI errors to our error types */ private handleError; } //# sourceMappingURL=openai.d.ts.map