Spaces:
Runtime error
Runtime error
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 | |
def key(self) -> str: | |
"""Unique identifier for this message.""" | |
return f"slack:{self.channel_id}:{self.timestamp}" | |