init commit

This commit is contained in:
YuanHui
2025-12-25 21:07:25 +08:00
commit 8098976eed
8 changed files with 9266 additions and 0 deletions

17
main.py Normal file
View File

@@ -0,0 +1,17 @@
from fastapi import FastAPI
from fastapi.responses import FileResponse
import json
app = FastAPI(title="Mock Server", version="1.0")
@app.get("/v1/models")
async def get_models():
return FileResponse('models.json', media_type='application/json')
if __name__ == "__main__":
import uvicorn
# 3000端口推荐
uvicorn.run(app, host="0.0.0.0", port=80)
# 80端口需要管理员权限
# uvicorn.run(app, host="0.0.0.0", port=80)