fix: fix the error where the content is None when reasoning and tool … (#5838)

This commit is contained in:
mlmz
2025-04-28 23:36:08 +08:00
committed by GitHub
parent 6fa6f38ed3
commit 8601300beb

View File

@@ -971,6 +971,8 @@ def v1_chat_generate_request(
)
for message in request.messages:
if message.content is None:
message.content = ""
if isinstance(message.content, str):
openai_compatible_messages.append(
{"role": message.role, "content": message.content}