Spaces:
Runtime error
Runtime error
File size: 465 Bytes
005a292 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
from pydantic import BaseModel, Field
from typing import Optional, List, Dict, Any
class SlackMessage(BaseModel):
"""Represents a message from Slack after adaptation."""
channel_id: str
user_id: str
text: str
thread_ts: Optional[str] = None
timestamp: str
is_question: bool = False
@property
def key(self) -> str:
"""Unique identifier for this message."""
return f"slack:{self.channel_id}:{self.timestamp}"
|