[ResponseAPI] Further polish message serialization and unit tests (#26728)

Signed-off-by: Jialin Ouyang <Jialin.Ouyang@gmail.com>
This commit is contained in:
Jialin Ouyang
2025-10-13 23:31:35 +00:00
committed by GitHub
parent fa96fb9c70
commit 35bc22f23c
3 changed files with 37 additions and 32 deletions
+1 -1
View File
@@ -2110,7 +2110,7 @@ def serialize_message(msg):
"""
if isinstance(msg, dict):
return msg
elif hasattr(msg, "__dict__"):
elif hasattr(msg, "to_dict"):
return msg.to_dict()
else:
# fallback to pyandic dump