(cls, config: LLMConfig)
| 122 | @classmethod |
| 123 | @lru_cache(maxsize=32) |
| 124 | def create_llm(cls, config: LLMConfig) -> BaseLLM: |
| 125 | llm_class = cls._llm_types.get(config.model_type) |
| 126 | if not llm_class: |
| 127 | raise ValueError(f"Unsupported LLM type: {config.model_type}") |
| 128 | return llm_class(config) |
| 129 | |
| 130 | @classmethod |
| 131 | def register_llm(cls, model_type: str, llm_class: Type[BaseLLM]): |