UNPKG

@measey/mycoder-agent

Version:

Agent module for mycoder - an AI-powered software development assistant

41 lines 1.18 kB
/** * Provider registry and factory implementations */ import { ProviderOptions, GenerateOptions, LLMResponse } from './types.js'; /** * Interface for LLM providers */ export interface LLMProvider { /** * Provider name (e.g., 'openai', 'anthropic', etc.) */ name: string; /** * Provider-specific identifier (e.g., 'openai.chat', 'anthropic.messages', etc.) */ provider: string; /** * Model name (e.g., 'gpt-4', 'claude-3', etc.) */ model: string; /** * Generate text using this provider * * @param options Generation options * @returns Response with text and/or tool calls */ generateText(options: GenerateOptions): Promise<LLMResponse>; } export type ProviderConfig = { keyName?: string; docsUrl?: string; baseUrl?: string; model: string; factory: (model: string, options: ProviderOptions) => LLMProvider; }; export declare const providerConfig: Record<string, ProviderConfig>; /** * Create a provider instance */ export declare function createProvider(provider: string, model?: string, options?: ProviderOptions): LLMProvider; //# sourceMappingURL=provider.d.ts.map