Unverified Commit 8601300b authored by mlmz's avatar mlmz Committed by GitHub
Browse files

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

parent 6fa6f38e
...@@ -971,6 +971,8 @@ def v1_chat_generate_request( ...@@ -971,6 +971,8 @@ def v1_chat_generate_request(
) )
for message in request.messages: for message in request.messages:
if message.content is None:
message.content = ""
if isinstance(message.content, str): if isinstance(message.content, str):
openai_compatible_messages.append( openai_compatible_messages.append(
{"role": message.role, "content": message.content} {"role": message.role, "content": message.content}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment