register<T extends ChatCapability> static method
Register a provider factory
factory - The factory to register
Throws InvalidRequestError if a provider with the same ID is already registered
Implementation
static void register<T extends ChatCapability>(
LLMProviderFactory<T> factory) {
if (_factories.containsKey(factory.providerId)) {
throw InvalidRequestError(
'Provider with ID "${factory.providerId}" is already registered');
}
_factories[factory.providerId] = factory;
}