fix: constants name
This commit is contained in:
@@ -3,20 +3,20 @@ from enum import IntEnum, unique
|
|||||||
|
|
||||||
@unique
|
@unique
|
||||||
class ChatType(IntEnum):
|
class ChatType(IntEnum):
|
||||||
UnKnown = 0 # 未知, 即未设置
|
# UnKnown = 0 # 未知, 即未设置
|
||||||
TIGER_BOT = 1 # TigerBot
|
TIGER_BOT = 1 # TigerBot
|
||||||
CHATGPT = 2 # ChatGPT
|
CHATGPT = 2 # ChatGPT
|
||||||
XINGHUO_WEB = 3 # 讯飞星火
|
XINGHUO_WEB = 3 # 讯飞星火
|
||||||
ChatGLM = 4 # ChatGLM
|
CHATGLM = 4 # ChatGLM
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def is_in_chat_types(chat_type: int) -> bool:
|
def is_in_chat_types(chat_type: int) -> bool:
|
||||||
if chat_type in [ChatType.TIGER_BOT.value, ChatType.CHATGPT.value,
|
if chat_type in [ChatType.TIGER_BOT.value, ChatType.CHATGPT.value,
|
||||||
ChatType.XINGHUO_WEB.value, ChatType.ChatGLM.value]:
|
ChatType.XINGHUO_WEB.value, ChatType.CHATGLM.value]:
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def help_hint():
|
def help_hint() -> str:
|
||||||
return str({member.value: member.name for member in ChatType}).replace('{', '').replace('}', '')
|
return str({member.value: member.name for member in ChatType}).replace('{', '').replace('}', '')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user