taolib.testing.multi_agent.llm.registry#
LLM模型注册表。
管理和注册所有可用的LLM模型提供商。
Classes#
LLM模型注册表。 |
Module Contents#
- class taolib.testing.multi_agent.llm.registry.ModelRegistry#
LLM模型注册表。
- _providers: dict[taolib.testing.multi_agent.models.ModelProvider, Type[taolib.testing.multi_agent.llm.protocols.BaseLLMProvider]]#
- classmethod register(provider_type: taolib.testing.multi_agent.models.ModelProvider, provider_class: Type[taolib.testing.multi_agent.llm.protocols.BaseLLMProvider]) None#
注册模型提供商。
- 参数:
provider_type -- 模型提供商类型
provider_class -- 提供商类
- classmethod get_provider_class(provider_type: taolib.testing.multi_agent.models.ModelProvider) Type[taolib.testing.multi_agent.llm.protocols.BaseLLMProvider]#
获取模型提供商类。
- 参数:
provider_type -- 模型提供商类型
- 返回:
提供商类
- 返回类型:
Type[BaseLLMProvider]
- 抛出:
ValueError -- 提供商未注册
- classmethod create_provider(config: taolib.testing.multi_agent.models.ModelConfig) taolib.testing.multi_agent.llm.protocols.BaseLLMProvider#
创建模型提供商实例。
- 参数:
config -- 模型配置
- 返回:
提供商实例
- 返回类型:
- classmethod get_available_providers() list[taolib.testing.multi_agent.models.ModelProvider]#
获取所有已注册的提供商。
- 返回:
提供商列表
- 返回类型: