修复错误返回时SDK对象和dict冲突

This commit is contained in:
Panda-eyes123
2026-06-14 21:54:22 +08:00
parent 20e7cbb72c
commit 4e594bb84a
8 changed files with 16 additions and 2 deletions

View File

@@ -1013,6 +1013,8 @@ if __name__ == "__main__":
for block in history[-1]["content"]:
if getattr(block, "type", None) == "text":
print(block.text)
elif isinstance(block, dict) and block.get("type") == "text":
print(block.get("text", ""))
inbox = consume_lead_inbox(route_protocol=True)
if inbox: