Merge pull request #1904 from zouyonghe/master
修复代码重构造成的无法向前兼容在node中发送简单文本信息的问题
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user