Skip to content

Commit ea4ecba

Browse files
FeiDaLIAias00
authored andcommitted
feat(app): add direct execution support for local development (vllm-project#341)
Signed-off-by: liuhy <[email protected]>
1 parent 05fc2b1 commit ea4ecba

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tools/mock-vllm/app.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import time
33
from typing import List, Optional
44

5+
import uvicorn
56
from fastapi import FastAPI
67
from pydantic import BaseModel
78

@@ -79,3 +80,7 @@ def estimate_tokens(text: str) -> int:
7980
# Some SDKs look for token_usage; keep it as an alias for convenience.
8081
"token_usage": usage,
8182
}
83+
84+
85+
if __name__ == "__main__":
86+
uvicorn.run(app, host="0.0.0.0", port=8000)

0 commit comments

Comments
 (0)