初始化生成器 Args: config: 配置字典
(self, config: Dict[str, Any])
| 7 | """图片生成器抽象基类""" |
| 8 | |
| 9 | def __init__(self, config: Dict[str, Any]): |
| 10 | """ |
| 11 | 初始化生成器 |
| 12 | |
| 13 | Args: |
| 14 | config: 配置字典 |
| 15 | """ |
| 16 | self.config = config |
| 17 | self.api_key = config.get('api_key') |
| 18 | self.base_url = config.get('base_url') |
| 19 | |
| 20 | @abstractmethod |
| 21 | def generate_image( |