feat: 初始化

This commit is contained in:
hackrobot
2024-03-04 18:39:54 +08:00
parent fffeba0b3d
commit e6a5cd45a2
28 changed files with 33048 additions and 62 deletions

26
constants.py Normal file
View File

@@ -0,0 +1,26 @@
from enum import IntEnum, unique
@unique
class ChatType(IntEnum):
# UnKnown = 0 # 未知, 即未设置
TIGER_BOT = 1 # TigerBot
CHATGPT = 2 # ChatGPT
XINGHUO_WEB = 3 # 讯飞星火
CHATGLM = 4 # ChatGLM
BardAssistant = 5 # Google Bard
ZhiPu = 6 # ZhiPu
@staticmethod
def is_in_chat_types(chat_type: int) -> bool:
if chat_type in [ChatType.TIGER_BOT.value, ChatType.CHATGPT.value,
ChatType.XINGHUO_WEB.value, ChatType.CHATGLM.value,
ChatType.BardAssistant.value]:
return True
# return False
return False
@staticmethod
def help_hint() -> str:
return str({member.value: member.name for member in ChatType}).replace('{', '').replace('}', '')