[frontend] dump openai responses type by alias (#38262)
Signed-off-by: cjackal <44624812+cjackal@users.noreply.github.com>
This commit is contained in:
@@ -105,8 +105,8 @@ def serialize_message(msg):
|
||||
elif hasattr(msg, "to_dict"):
|
||||
return msg.to_dict()
|
||||
else:
|
||||
# fallback to pyandic dump
|
||||
return msg.model_dump_json()
|
||||
# fallback to pydantic dump
|
||||
return msg.model_dump_json(by_alias=True)
|
||||
|
||||
|
||||
def serialize_messages(msgs):
|
||||
|
||||
Reference in New Issue
Block a user