Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
9d59b755
Unverified
Commit
9d59b755
authored
Nov 05, 2024
by
zifeitong
Committed by
GitHub
Nov 06, 2024
Browse files
[Bugfix] Remove CustomChatCompletionContentPartParam multimodal input type (#10054)
Signed-off-by:
Zifei Tong
<
zifeitong@gmail.com
>
parent
ea928f60
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
11 deletions
+2
-11
vllm/entrypoints/chat_utils.py
vllm/entrypoints/chat_utils.py
+2
-11
No files found.
vllm/entrypoints/chat_utils.py
View file @
9d59b755
...
...
@@ -22,7 +22,6 @@ from openai.types.chat import (ChatCompletionMessageToolCallParam,
ChatCompletionToolMessageParam
)
# yapf: enable
# pydantic needs the TypedDict from typing_extensions
from
pydantic
import
ConfigDict
from
transformers
import
PreTrainedTokenizer
,
PreTrainedTokenizerFast
from
typing_extensions
import
Required
,
TypeAlias
,
TypedDict
...
...
@@ -52,17 +51,10 @@ class ChatCompletionContentPartAudioParam(TypedDict, total=False):
"""The type of the content part."""
class
CustomChatCompletionContentPartParam
(
TypedDict
,
total
=
False
):
__pydantic_config__
=
ConfigDict
(
extra
=
"allow"
)
# type: ignore
type
:
Required
[
str
]
"""The type of the content part."""
class
CustomChatCompletionContentSimpleImageParam
(
TypedDict
,
total
=
False
):
"""A simpler version of the param that only accepts a plain image_url.
This is supported by OpenAI API, although it is not documented.
Example:
{
"image_url": "https://example.com/image.jpg"
...
...
@@ -73,7 +65,7 @@ class CustomChatCompletionContentSimpleImageParam(TypedDict, total=False):
class
CustomChatCompletionContentSimpleAudioParam
(
TypedDict
,
total
=
False
):
"""A simpler version of the param that only accepts a plain audio_url.
Example:
{
"audio_url": "https://example.com/audio.mp3"
...
...
@@ -85,7 +77,6 @@ class CustomChatCompletionContentSimpleAudioParam(TypedDict, total=False):
ChatCompletionContentPartParam
:
TypeAlias
=
Union
[
OpenAIChatCompletionContentPartParam
,
ChatCompletionContentPartAudioParam
,
ChatCompletionContentPartRefusalParam
,
CustomChatCompletionContentPartParam
,
CustomChatCompletionContentSimpleImageParam
,
CustomChatCompletionContentSimpleAudioParam
,
str
]
...
...
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