add: /konele/status
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
python-multipart
|
python-multipart
|
||||||
fastapi
|
fastapi
|
||||||
uvicorn
|
uvicorn[standard]
|
||||||
whisper_ctranslate2
|
whisper_ctranslate2
|
||||||
opencc
|
opencc
|
||||||
prometheus-fastapi-instrumentator
|
prometheus-fastapi-instrumentator
|
||||||
|
|||||||
@@ -109,6 +109,15 @@ def get_options(*, initial_prompt=""):
|
|||||||
return options
|
return options
|
||||||
|
|
||||||
|
|
||||||
|
@app.websocket("/konele/status")
|
||||||
|
async def konele_status(
|
||||||
|
websocket: WebSocket,
|
||||||
|
):
|
||||||
|
await websocket.accept()
|
||||||
|
await websocket.send_json(dict(num_workers_available=1))
|
||||||
|
await websocket.close()
|
||||||
|
|
||||||
|
|
||||||
@app.websocket("/konele/ws")
|
@app.websocket("/konele/ws")
|
||||||
async def konele_ws(
|
async def konele_ws(
|
||||||
websocket: WebSocket,
|
websocket: WebSocket,
|
||||||
|
|||||||
Reference in New Issue
Block a user