Skip to content

Commit

Permalink
Fix(llm): Do not try to process an email without message contents
Browse files Browse the repository at this point in the history
  • Loading branch information
andris9 committed Dec 7, 2023
1 parent 1ec4000 commit 9e4cbdc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mailbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -1088,7 +1088,7 @@ class Mailbox {
if (messageInfo.messageSpecialUse === '\\Inbox' && (!this.connection.notifyFrom || messageData.internalDate >= this.connection.notifyFrom)) {
let messageData = Object.assign({ account: this.connection.account }, messageInfo);

let canUseLLM = await llmPreProcess.run(messageData);
let canUseLLM = (await llmPreProcess.run(messageData)) && messageInfo.text;

if (canUseLLM && (messageInfo.text.plain || messageInfo.text.html)) {
if (canUseLLM.generateEmailSummary) {
Expand Down

0 comments on commit 9e4cbdc

Please sign in to comment.