52 lines
1.3 KiB
Python
52 lines
1.3 KiB
Python
# SPDX-License-Identifier: Apache-2.0
|
|
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
|
|
|
from typing import TypeAlias
|
|
|
|
from vllm.entrypoints.pooling.classify.protocol import (
|
|
ClassificationChatRequest,
|
|
ClassificationCompletionRequest,
|
|
ClassificationResponse,
|
|
)
|
|
from vllm.entrypoints.pooling.embed.protocol import (
|
|
EmbeddingBytesResponse,
|
|
EmbeddingChatRequest,
|
|
EmbeddingCompletionRequest,
|
|
EmbeddingResponse,
|
|
)
|
|
from vllm.entrypoints.pooling.pooling.protocol import (
|
|
IOProcessorRequest,
|
|
PoolingChatRequest,
|
|
PoolingCompletionRequest,
|
|
PoolingResponse,
|
|
)
|
|
from vllm.entrypoints.pooling.score.protocol import (
|
|
RerankRequest,
|
|
ScoreRequest,
|
|
ScoreResponse,
|
|
)
|
|
|
|
PoolingCompletionLikeRequest: TypeAlias = (
|
|
EmbeddingCompletionRequest
|
|
| ClassificationCompletionRequest
|
|
| RerankRequest
|
|
| ScoreRequest
|
|
| PoolingCompletionRequest
|
|
)
|
|
|
|
PoolingChatLikeRequest: TypeAlias = (
|
|
EmbeddingChatRequest | ClassificationChatRequest | PoolingChatRequest
|
|
)
|
|
|
|
AnyPoolingRequest: TypeAlias = (
|
|
PoolingCompletionLikeRequest | PoolingChatLikeRequest | IOProcessorRequest
|
|
)
|
|
|
|
AnyPoolingResponse: TypeAlias = (
|
|
ClassificationResponse
|
|
| EmbeddingResponse
|
|
| EmbeddingBytesResponse
|
|
| PoolingResponse
|
|
| ScoreResponse
|
|
)
|