diff --git a/tools/mypy.sh b/tools/mypy.sh index 4e358faafe8de..e6187a08ffd98 100755 --- a/tools/mypy.sh +++ b/tools/mypy.sh @@ -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 diff --git a/vllm/entrypoints/llm.py b/vllm/entrypoints/llm.py index 7ad352cd87526..2010381076c7d 100644 --- a/vllm/entrypoints/llm.py +++ b/vllm/entrypoints/llm.py @@ -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]] = []