Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
8601300b
Unverified
Commit
8601300b
authored
Apr 28, 2025
by
mlmz
Committed by
GitHub
Apr 28, 2025
Browse files
fix: fix the error where the content is None when reasoning and tool … (#5838)
parent
6fa6f38e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
python/sglang/srt/openai_api/adapter.py
python/sglang/srt/openai_api/adapter.py
+2
-0
No files found.
python/sglang/srt/openai_api/adapter.py
View file @
8601300b
...
...
@@ -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
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment