Skip to content

Commit

Permalink
[CI/Build] mypy: check vllm/entrypoints (#9194)
Browse files Browse the repository at this point in the history
Signed-off-by: Russell Bryant <[email protected]>
  • Loading branch information
russellb authored Oct 9, 2024
1 parent ca77dd7 commit cdca899
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 cdca899

Please sign in to comment.