mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-01-31 03:27:44 +01:00
Fix chat completion not recognizing 0-position
This commit is contained in:
parent
dd7f326460
commit
21b37950e4
@ -1106,7 +1106,7 @@ class ChatCompletion {
|
||||
this.validateMessageCollection(collection);
|
||||
this.checkTokenBudget(collection, collection.identifier);
|
||||
|
||||
if (position) {
|
||||
if (null !== position && -1 !== position) {
|
||||
this.messages.collection[position] = collection;
|
||||
} else {
|
||||
this.messages.collection.push(collection);
|
||||
|
Loading…
x
Reference in New Issue
Block a user