mirror of
https://github.com/ijaric/voice_assistant.git
synced 2025-05-24 14:33:26 +00:00
30 lines
537 B
Python
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
|