18 lines
580 B
Python
18 lines
580 B
Python
from fastapi import FastAPI
|
|
from app.api.v1.endpoints import chat, model, websocket_service,speaker
|
|
|
|
app = FastAPI()
|
|
|
|
# websocket_service
|
|
app.include_router(websocket_service.router, prefix="", tags=["websocket_service"])
|
|
# Chat服务
|
|
app.include_router(chat.router, prefix="/v1/chat", tags=["chat"])
|
|
# 获取模型列表服务
|
|
app.include_router(model.router, prefix="/v1/model", tags=["model_list"])
|
|
app.include_router(speaker.router, prefix="/v1/speaker", tags=["speaker_list"])
|
|
|
|
if __name__ == "__main__":
|
|
import uvicorn
|
|
|
|
uvicorn.run(app, host="127.0.0.1", port=8000)
|