mirror of
https://github.com/AstrBotDevs/AstrBot.git
synced 2026-09-24 16:39:52 +08:00
fix: clarify logic for skipping initial system messages in conversation
This commit is contained in:
@@ -417,8 +417,8 @@ class InternalAgentSubStage(Stage):
|
||||
skipped_initial_system = False
|
||||
for message in all_messages:
|
||||
if message.role == "system" and not skipped_initial_system:
|
||||
continue # skip all system messages until the first non-system message
|
||||
skipped_initial_system = True
|
||||
skipped_initial_system = True
|
||||
continue # skip first system message
|
||||
if message.role in ["assistant", "user"] and getattr(
|
||||
message, "_no_save", None
|
||||
):
|
||||
|
||||
Reference in New Issue
Block a user