mirror of
https://github.com/HeyPuter/puter.git
synced 2026-08-23 06:26:55 +00:00
fix: let messages with tool_calls have content=null
This commit is contained in:
@@ -18,6 +18,9 @@ module.exports = class Messages {
|
||||
message.role = params.role;
|
||||
}
|
||||
if ( ! message.content ) {
|
||||
if ( message.tool_calls ) {
|
||||
return message;
|
||||
}
|
||||
throw new Error(`each message must have a 'content' property`);
|
||||
}
|
||||
if ( whatis(message.content) !== 'array' ) {
|
||||
|
||||
Reference in New Issue
Block a user