Skip to content

Commit

Permalink
[CI/Build] mypy: check vllm/entrypoints (vllm-project#9194)
Browse files Browse the repository at this point in the history
Signed-off-by: Russell Bryant <[email protected]>
Signed-off-by: Maxime Fournioux <[email protected]>
  • Loading branch information
russellb authored and mfournioux committed Nov 20, 2024
1 parent 82727fd commit 1f172c3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tools/mypy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ run_mypy vllm/attention
#run_mypy vllm/core
run_mypy vllm/distributed
run_mypy vllm/engine
#run_mypy vllm/entrypoints
run_mypy vllm/entrypoints
run_mypy vllm/executor
#run_mypy vllm/inputs
run_mypy vllm/logging
Expand Down
7 changes: 5 additions & 2 deletions vllm/entrypoints/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,10 +514,13 @@ def chat(
# Handle multi and single conversations
if is_list_of(messages, list):
# messages is List[List[...]]
list_of_messages = messages
list_of_messages = cast(List[List[ChatCompletionMessageParam]],
messages)
else:
# messages is List[...]
list_of_messages = [messages]
list_of_messages = [
cast(List[ChatCompletionMessageParam], messages)
]

prompts: List[Union[TokensPrompt, TextPrompt]] = []

Expand Down

0 comments on commit 1f172c3

Please sign in to comment.