agentlang
Version:
The easiest way to build the most reliable AI agents - enterprise-grade teams of AI agents that collaborate with each other and humans
20 lines • 771 B
JavaScript
import { OpenAIProvider } from './impl/openai.js';
import { AnthropicProvider } from './impl/anthropic.js';
const Providers = new Map().set('openai', OpenAIProvider).set('anthropic', AnthropicProvider);
export function provider(service) {
const requestedService = service.toLowerCase();
const p = Providers.get(requestedService);
if (p) {
// Return the requested provider - let it handle API key validation
return p;
}
else {
throw new Error(`No provider found for ${service}`);
}
}
export function getDefaultLLMService() {
// Always default to OpenAI when no service is explicitly specified
// This is the DEFAULT service, not based on available API keys
return 'openai';
}
//# sourceMappingURL=registry.js.map