modelmix 2.2.0 → 2.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -159,13 +159,13 @@ class MessageHandler {
|
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
async execute() {
|
|
162
|
+
this.messages = this.messages.slice(-this.config.max_history);
|
|
162
163
|
this.messages = this.groupByRoles(this.messages);
|
|
163
164
|
|
|
164
165
|
if (this.messages.length === 0) {
|
|
165
166
|
throw new Error("No user messages have been added. Use addMessage(prompt) to add a message.");
|
|
166
167
|
}
|
|
167
168
|
|
|
168
|
-
this.messages = this.messages.slice(-this.config.max_history);
|
|
169
169
|
this.options.messages = this.messages;
|
|
170
170
|
|
|
171
171
|
return new Promise((resolve, reject) => {
|