fix: correct message concatenation logic
Wraps `system_message_dict` in a list to address a logic error in message concatenation. This ensures that the message list is correctly formatted, preventing potential runtime issues when processing the message sequence.
This commit is contained in:
parent
5fef1ab59c
commit
21edc48050
1 changed files with 1 additions and 1 deletions
|
@ -488,7 +488,7 @@ class OpenAI(BaseAI):
|
|||
}
|
||||
|
||||
return (
|
||||
system_message_dict
|
||||
[system_message_dict]
|
||||
+ [truncated_messages[0]]
|
||||
+ list(reversed(truncated_messages[1:]))
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue