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
zhaoyu6
sglang
Commits
dcb82325
"git@developer.sourcefind.cn:change/sglang.git" did not exist on "60abdb3e7c21b1f461a9c5a5751680bd8ca09241"
Unverified
Commit
dcb82325
authored
Apr 21, 2025
by
AmadeusW
Committed by
GitHub
Apr 20, 2025
Browse files
Fix ChatCompletionMessageGenericParam to allow for None content (#5452)
parent
66c0ff9e
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/protocol.py
python/sglang/srt/openai_api/protocol.py
+1
-1
No files found.
python/sglang/srt/openai_api/protocol.py
View file @
dcb82325
...
@@ -252,7 +252,7 @@ ChatCompletionMessageContentPart = Union[
...
@@ -252,7 +252,7 @@ ChatCompletionMessageContentPart = Union[
class
ChatCompletionMessageGenericParam
(
BaseModel
):
class
ChatCompletionMessageGenericParam
(
BaseModel
):
role
:
Literal
[
"system"
,
"assistant"
,
"tool"
]
role
:
Literal
[
"system"
,
"assistant"
,
"tool"
]
content
:
Union
[
str
,
List
[
ChatCompletionMessageContentTextPart
]]
content
:
Union
[
str
,
List
[
ChatCompletionMessageContentTextPart
]
,
None
]
class
ChatCompletionMessageUserParam
(
BaseModel
):
class
ChatCompletionMessageUserParam
(
BaseModel
):
...
...
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