From cf9f67d3f2986e3cb9cb1d792cc01a2731983a4f Mon Sep 17 00:00:00 2001 From: HexatomicRing <54496918+HexatomicRing@users.noreply.github.com> Date: Wed, 12 Mar 2025 19:05:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=A6=82=E7=8E=87=E8=AE=A1?= =?UTF-8?q?=E7=AE=97bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plugins/chat/prompt_builder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/chat/prompt_builder.py b/src/plugins/chat/prompt_builder.py index dd7204e8..7930dbf5 100644 --- a/src/plugins/chat/prompt_builder.py +++ b/src/plugins/chat/prompt_builder.py @@ -20,7 +20,7 @@ def choose_personality(): i_person = 0 for i_person, probability in enumerate(probabilities): choice_base += probability - if personality_choice < probability: + if personality_choice < choice_base: break if i_person < len(personality): logger.info(f"正在用人格{i_person + 1}回答")