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…
Reference in New Issue