[Frontend] Move engine/protocol.py out openai folder (#54492)
Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io> Signed-off-by: wang.yuqi <noooop@126.com> Co-authored-by: Cyrus Leung <cyrus.tl.leung@gmail.com>
This commit is contained in:
@@ -2,13 +2,10 @@
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
from http import HTTPStatus
|
||||
|
||||
from vllm.entrypoints.openai.engine.protocol import (
|
||||
ErrorInfo,
|
||||
ErrorResponse,
|
||||
GenerationError,
|
||||
)
|
||||
from vllm.exceptions import GenerationError
|
||||
from vllm.logger import init_logger
|
||||
|
||||
from ..engine.protocol import ErrorInfo, ErrorResponse
|
||||
from .utils import sanitize_message
|
||||
|
||||
logger = init_logger(__name__)
|
||||
|
||||
@@ -5,7 +5,7 @@ from http import HTTPStatus
|
||||
from fastapi import HTTPException, Request
|
||||
from starlette.responses import JSONResponse
|
||||
|
||||
from vllm.entrypoints.openai.engine.protocol import ErrorInfo, ErrorResponse
|
||||
from vllm.entrypoints.serve.engine.protocol import ErrorInfo, ErrorResponse
|
||||
from vllm.logger import init_logger
|
||||
|
||||
from ..utils import sanitize_message
|
||||
|
||||
@@ -8,7 +8,7 @@ from fastapi import Request
|
||||
from fastapi.exceptions import RequestValidationError
|
||||
from starlette.responses import JSONResponse
|
||||
|
||||
from vllm.entrypoints.openai.engine.protocol import ErrorInfo, ErrorResponse
|
||||
from vllm.entrypoints.serve.engine.protocol import ErrorInfo, ErrorResponse
|
||||
from vllm.exceptions import VLLMValidationError
|
||||
from vllm.logger import init_logger
|
||||
|
||||
|
||||
@@ -5,8 +5,7 @@ from fastapi import Request
|
||||
from starlette.responses import JSONResponse
|
||||
|
||||
from vllm.entrypoints.launchers.launcher import terminate_if_errored
|
||||
from vllm.entrypoints.openai.engine.protocol import GenerationError
|
||||
from vllm.exceptions import VLLMError
|
||||
from vllm.exceptions import GenerationError, VLLMError
|
||||
from vllm.logger import init_logger
|
||||
from vllm.v1.engine.exceptions import EngineDeadError, EngineGenerateError
|
||||
|
||||
|
||||
Reference in New Issue
Block a user