mirror of
https://github.com/Balshgit/gpt_chat_bot.git
synced 2025-12-15 16:10:39 +03:00
add speech to text command (#6)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user