mirror of
https://github.com/voideditor/void
synced 2026-05-23 09:28:23 +00:00
fix anthropic empty err message
This commit is contained in:
parent
f4c1321f25
commit
6df3b588df
1 changed files with 1 additions and 0 deletions
|
|
@ -418,6 +418,7 @@ const prepareOpenAIOrAnthropicMessages = ({
|
|||
else {
|
||||
// allowed to be empty if has a tool in it or following it
|
||||
if (currMsg.content.find(c => c.type === 'tool_result' || c.type === 'tool_use')) {
|
||||
currMsg.content = currMsg.content.filter(c => !(c.type === 'text' && !c.text)) as any
|
||||
continue
|
||||
}
|
||||
if (nextMsg?.role === 'tool') continue
|
||||
|
|
|
|||
Loading…
Reference in a new issue