add speech to text command (#6)

This commit is contained in:
Dmitry Afanasyev
2023-09-26 05:30:27 +03:00
committed by GitHub
parent 29355722fa
commit 9aca4c2aeb
13 changed files with 150 additions and 68 deletions

View File

@@ -1,7 +1,7 @@
from fastapi import APIRouter, Request
from fastapi.responses import ORJSONResponse
from settings.config import get_settings
from starlette import status
from starlette.responses import Response
router = APIRouter()
settings = get_settings()
@@ -10,10 +10,10 @@ settings = get_settings()
@router.post(
f"/{settings.TELEGRAM_API_TOKEN}",
name="system:process_bot_updates",
response_class=Response,
status_code=status.HTTP_202_ACCEPTED,
summary="process bot updates",
include_in_schema=False,
)
async def process_bot_updates(request: Request) -> ORJSONResponse:
async def process_bot_updates(request: Request) -> None:
await request.app.state.queue.put_updates_on_queue(request)
return ORJSONResponse(content=None, status_code=status.HTTP_202_ACCEPTED)