mirror of
https://github.com/FuQuan233/nonebot-plugin-llmchat.git
synced 2025-09-06 19:40:44 +00:00
♻️ code format
This commit is contained in:
parent
6db55055a2
commit
e8db066647
1 changed files with 11 additions and 5 deletions
|
@ -285,7 +285,9 @@ async def process_messages(group_id: int):
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
await handler.send(f"合并转发消息发送失败:\n{e!s}\n"+reasoning_content)
|
await handler.send(
|
||||||
|
f"合并转发消息发送失败:\n{e!s}\n" + reasoning_content
|
||||||
|
)
|
||||||
|
|
||||||
assert reply is not None
|
assert reply is not None
|
||||||
logger.info(
|
logger.info(
|
||||||
|
@ -369,6 +371,7 @@ async def handle_reset(event: GroupMessageEvent, args: Message = CommandArg()):
|
||||||
group_states[group_id].history.clear()
|
group_states[group_id].history.clear()
|
||||||
await reset_handler.finish("记忆已清空")
|
await reset_handler.finish("记忆已清空")
|
||||||
|
|
||||||
|
|
||||||
set_prob_handler = on_command(
|
set_prob_handler = on_command(
|
||||||
"设置主动回复概率",
|
"设置主动回复概率",
|
||||||
priority=99,
|
priority=99,
|
||||||
|
@ -457,7 +460,10 @@ async def load_state():
|
||||||
state.last_active = state_data["last_active"]
|
state.last_active = state_data["last_active"]
|
||||||
state.group_prompt = state_data["group_prompt"]
|
state.group_prompt = state_data["group_prompt"]
|
||||||
state.output_reasoning_content = state_data["output_reasoning_content"]
|
state.output_reasoning_content = state_data["output_reasoning_content"]
|
||||||
state.random_trigger_prob = (state_data.get("random_trigger_prob") or plugin_config.random_trigger_prob)
|
state.random_trigger_prob = (
|
||||||
|
state_data.get("random_trigger_prob")
|
||||||
|
or plugin_config.random_trigger_prob
|
||||||
|
)
|
||||||
group_states[int(gid)] = state
|
group_states[int(gid)] = state
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue