mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-02 20:36:49 +01:00
Don't add items of unknown type to chat completion
This commit is contained in:
parent
4e55126606
commit
2f5e7778cc
@ -1982,8 +1982,7 @@ class ChatCompletion {
|
||||
const message = { role: item.role, content: item.content, ...(item.name ? { name: item.name } : {}) };
|
||||
chat.push(message);
|
||||
} else {
|
||||
this.log(`Item ${item} has an unknown type. Adding as-is`);
|
||||
chat.push(item);
|
||||
console.warn('Invalid message in collection', item);
|
||||
}
|
||||
}
|
||||
return chat;
|
||||
|
Loading…
x
Reference in New Issue
Block a user