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
f7f88b70
You need to sign in or sign up before continuing.
Unverified
Commit
f7f88b70
authored
Mar 13, 2025
by
David Carreto Fidalgo
Committed by
GitHub
Mar 12, 2025
Browse files
HotFix: json serialization error when using OAI v1/batches endpoint with logprobs (#3896)
parent
18c27131
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
python/sglang/srt/openai_api/adapter.py
python/sglang/srt/openai_api/adapter.py
+1
-1
No files found.
python/sglang/srt/openai_api/adapter.py
View file @
f7f88b70
...
@@ -1147,7 +1147,7 @@ def v1_chat_generate_response(
...
@@ -1147,7 +1147,7 @@ def v1_chat_generate_response(
"tool_calls"
:
tool_calls
,
"tool_calls"
:
tool_calls
,
"reasoning_content"
:
reasoning_text
,
"reasoning_content"
:
reasoning_text
,
},
},
"logprobs"
:
choice_logprobs
,
"logprobs"
:
choice_logprobs
.
model_dump
()
if
choice_logprobs
else
None
,
"finish_reason"
:
(
finish_reason
[
"type"
]
if
finish_reason
else
""
),
"finish_reason"
:
(
finish_reason
[
"type"
]
if
finish_reason
else
""
),
"matched_stop"
:
(
"matched_stop"
:
(
finish_reason
[
"matched"
]
finish_reason
[
"matched"
]
...
...
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