tasks.py 616 Bytes
Newer Older
1
2
3
4
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
from typing import Literal, get_args

5
GenerationTask = Literal["generate", "transcription", "realtime"]
6
GENERATION_TASKS: tuple[GenerationTask, ...] = get_args(GenerationTask)
7

8
9
10
PoolingTask = Literal[
    "embed", "classify", "score", "token_embed", "token_classify", "plugin"
]
11
POOLING_TASKS: tuple[PoolingTask, ...] = get_args(PoolingTask)
12

13
14
15
16
FrontendTask = Literal["render"]
FRONTEND_TASKS: tuple[FrontendTask, ...] = get_args(FrontendTask)

SupportedTask = Literal[GenerationTask, PoolingTask, FrontendTask]