feat: PFC谈话模式,可选择启用,实验性功能
This commit is contained in:
@@ -24,8 +24,8 @@ config_config = LogConfig(
|
||||
logger = get_module_logger("config", config=config_config)
|
||||
|
||||
#考虑到,实际上配置文件中的mai_version是不会自动更新的,所以采用硬编码
|
||||
mai_version_main = "0.6.0"
|
||||
mai_version_fix = "mmc-4"
|
||||
mai_version_main = "test-0.6.0"
|
||||
mai_version_fix = "snapshot-7"
|
||||
mai_version = f"{mai_version_main}-{mai_version_fix}"
|
||||
|
||||
def update_config():
|
||||
@@ -230,7 +230,8 @@ class BotConfig:
|
||||
|
||||
# experimental
|
||||
enable_friend_chat: bool = False # 是否启用好友聊天
|
||||
enable_think_flow: bool = False # 是否启用思考流程
|
||||
# enable_think_flow: bool = False # 是否启用思考流程
|
||||
enable_pfc_chatting: bool = False # 是否启用PFC聊天
|
||||
|
||||
# 模型配置
|
||||
llm_reasoning: Dict[str, str] = field(default_factory=lambda: {})
|
||||
@@ -333,7 +334,7 @@ class BotConfig:
|
||||
personality_config = parent["personality"]
|
||||
personality = personality_config.get("prompt_personality")
|
||||
if len(personality) >= 2:
|
||||
logger.debug(f"载入自定义人格:{personality}")
|
||||
logger.info(f"载入自定义人格:{personality}")
|
||||
config.PROMPT_PERSONALITY = personality_config.get("prompt_personality", config.PROMPT_PERSONALITY)
|
||||
|
||||
config.PERSONALITY_1 = personality_config.get("personality_1_probability", config.PERSONALITY_1)
|
||||
@@ -563,7 +564,9 @@ class BotConfig:
|
||||
def experimental(parent: dict):
|
||||
experimental_config = parent["experimental"]
|
||||
config.enable_friend_chat = experimental_config.get("enable_friend_chat", config.enable_friend_chat)
|
||||
config.enable_think_flow = experimental_config.get("enable_think_flow", config.enable_think_flow)
|
||||
# config.enable_think_flow = experimental_config.get("enable_think_flow", config.enable_think_flow)
|
||||
if config.INNER_VERSION in SpecifierSet(">=1.1.0"):
|
||||
config.enable_pfc_chatting = experimental_config.get("pfc_chatting", config.enable_pfc_chatting)
|
||||
|
||||
# 版本表达式:>=1.0.0,<2.0.0
|
||||
# 允许字段:func: method, support: str, notice: str, necessary: bool
|
||||
|
||||
Reference in New Issue
Block a user