mirror of
https://github.com/RockChinQ/QChatGPT.git
synced 2024-11-16 11:42:44 +08:00
35 lines
643 B
Python
35 lines
643 B
Python
import abc
|
|
|
|
|
|
class ConfigFile(metaclass=abc.ABCMeta):
|
|
"""配置文件抽象类"""
|
|
|
|
config_file_name: str = None
|
|
"""配置文件名"""
|
|
|
|
template_file_name: str = None
|
|
"""模板文件名"""
|
|
|
|
template_data: dict = None
|
|
"""模板数据"""
|
|
|
|
@abc.abstractmethod
|
|
def exists(self) -> bool:
|
|
pass
|
|
|
|
@abc.abstractmethod
|
|
async def create(self):
|
|
pass
|
|
|
|
@abc.abstractmethod
|
|
async def load(self, completion: bool=True) -> dict:
|
|
pass
|
|
|
|
@abc.abstractmethod
|
|
async def save(self, data: dict):
|
|
pass
|
|
|
|
@abc.abstractmethod
|
|
def save_sync(self, data: dict):
|
|
pass
|