Files
mai-bot/src/chat/replyer/maisaka_replyer_factory.py
2026-04-03 13:43:49 +08:00

22 lines
643 B
Python

from typing import Type
from src.config.config import global_config
def get_maisaka_replyer_class() -> Type[object]:
"""根据配置返回 Maisaka replyer 类。"""
generator_type = global_config.maisaka.replyer_generator_type
if generator_type == "multi":
from .maisaka_generator_multi import MaisakaReplyGenerator
return MaisakaReplyGenerator
from .maisaka_generator import MaisakaReplyGenerator
return MaisakaReplyGenerator
def get_maisaka_replyer_generator_type() -> str:
"""返回当前配置的 Maisaka replyer 生成器类型。"""
return global_config.maisaka.replyer_generator_type