Claude: Don't send empty text with images

This commit is contained in:
Cohee 2024-10-15 10:53:07 +03:00
parent bb9700b478
commit 3471d0be93
1 changed files with 2 additions and 1 deletions

View File

@ -195,7 +195,8 @@ export function convertClaudeMessages(messages, prefillString, useSysPrompt, use
content.text = `${message.name}: ${content.text}`;
}
return content;
// If the text is empty, replace it with a zero-width space
return { type: 'text', text: content.text || '\u200b' };
}
return content;