修复代码重构造成的无法向前兼容在node中发送简单文本信息的问题

This commit is contained in:
邹永赫
2025-06-23 18:17:37 +09:00
parent 7c3d98acbe
commit ed4609ebe5
+7
View File
@@ -610,6 +610,13 @@ class Node(BaseMessageComponent):
"data": {"file": f"base64://{bs64}"},
}
)
elif isinstance(comp, str):
data_content.append(
{
"type": "text",
"data": {"text": comp.strip()}
}
)
elif isinstance(comp, File):
# For File segments, we need to handle the file differently
d = await comp.to_dict()