Skip to content

Commit

Permalink
fix images not being added to chat request
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Joseph Petro committed Nov 24, 2024
1 parent 26296ae commit e67dd54
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions smart-chats/smart_message.js
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,8 @@ export class SmartMessage extends SmartBlock {
url: `data:image/${file.extension};base64,${base64}`
}
});
}else{
console.warn(`Image file not found: ${image.img_path}`);
}
}
if(this_message.content.trim().length > 0){
Expand All @@ -427,6 +429,7 @@ export class SmartMessage extends SmartBlock {
text: this_message.content,
});
}
this_message.content = content;
}
if (this.tool_calls?.length) this_message.tool_calls = this.tool_calls;
if (this.tool_call_id) this_message.tool_call_id = this.tool_call_id;
Expand Down

0 comments on commit e67dd54

Please sign in to comment.