mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-03-30 13:54:01 +00:00
chore: ensure empty message isnt sent
This commit is contained in:
parent
70881b2937
commit
c996f3d847
@ -476,7 +476,6 @@ export namespace MessageV2 {
|
||||
role: "assistant",
|
||||
parts: [],
|
||||
}
|
||||
result.push(assistantMessage)
|
||||
for (const part of msg.parts) {
|
||||
if (part.type === "text")
|
||||
assistantMessage.parts.push({
|
||||
@ -535,6 +534,9 @@ export namespace MessageV2 {
|
||||
})
|
||||
}
|
||||
}
|
||||
if (assistantMessage.parts.length > 0) {
|
||||
result.push(assistantMessage)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user