1
0
mirror of https://github.com/ijaric/voice_assistant.git synced 2025-05-24 14:33:26 +00:00
voice_assistant/src/fastapi_app/lib/models/broker_message.py
2023-10-03 16:09:23 +03:00

30 lines
537 B
Python

import pydantic
class BrokerMessagePayload(pydantic.BaseModel):
"""
Message payload.
Attributes:
message: Message text.
direction: Message direction (Telegram, Mobile app, etc.).
sender: Message sender (who should I send the answer to).
"""
message: str
direction: str
sender: str
class BrokerMessage(pydantic.BaseModel):
"""
Message.
Attributes:
payload: Message payload.
queue: Queue name.
"""
payload: BrokerMessagePayload
queue: str