__init__.py 1.47 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project


from fastapi import FastAPI


def register_vllm_serve_api_routers(app: FastAPI):
    from vllm.entrypoints.serve.lora.api_router import (
        attach_router as attach_lora_router,
    )

    attach_lora_router(app)
    from vllm.entrypoints.serve.elastic_ep.api_router import (
        attach_router as attach_elastic_ep_router,
    )

    attach_elastic_ep_router(app)

    from vllm.entrypoints.serve.profile.api_router import (
        attach_router as attach_profile_router,
    )

    attach_profile_router(app)

    from vllm.entrypoints.serve.sleep.api_router import (
        attach_router as attach_sleep_router,
    )

    attach_sleep_router(app)

    from vllm.entrypoints.serve.tokenize.api_router import (
        attach_router as attach_tokenize_router,
    )

    attach_tokenize_router(app)

    from vllm.entrypoints.serve.disagg.api_router import (
        attach_router as attach_disagg_router,
    )

    attach_disagg_router(app)

    from vllm.entrypoints.serve.rlhf.api_router import (
        attach_router as attach_rlhf_router,
    )

    attach_rlhf_router(app)

    from vllm.entrypoints.serve.instrumentator.metrics import (
        attach_router as attach_metrics_router,
    )

    attach_metrics_router(app)

    from vllm.entrypoints.serve.instrumentator.health import (
        attach_router as attach_health_router,
    )

    attach_health_router(app)