Skip to content

messages

framewise_meet_client.models.messages

BaseMessage

Bases: BaseModel

Base class for all message types.

Source code in framewise_meet_client/models/messages.py
 7
 8
 9
10
11
12
13
14
class BaseMessage(BaseModel):
    """Base class for all message types."""
    message_type: ClassVar[str] = ""

    def model_post_init(self, __context):
        """Log successful object creation."""
        logger.debug(f"Created {self.__class__.__name__} object")
        return super().model_post_init(__context) if hasattr(super(), 'model_post_init') else None

model_post_init(__context)

Log successful object creation.

Source code in framewise_meet_client/models/messages.py
11
12
13
14
def model_post_init(self, __context):
    """Log successful object creation."""
    logger.debug(f"Created {self.__class__.__name__} object")
    return super().model_post_init(__context) if hasattr(super(), 'model_post_init') else None

UserInfo

Bases: BaseModel

Information about a user in a meeting.

Source code in framewise_meet_client/models/messages.py
17
18
19
class UserInfo(BaseModel):
    """Information about a user in a meeting."""
    meeting_id: str = Field(..., description="The ID of the meeting")

JoinEvent

Bases: BaseModel

Event data for a user joining a meeting.

Source code in framewise_meet_client/models/messages.py
22
23
24
class JoinEvent(BaseModel):
    """Event data for a user joining a meeting."""
    user_joined: UserInfo = Field(..., description="User joining information")

ExitEvent

Bases: BaseModel

Event data for a user exiting a meeting.

Source code in framewise_meet_client/models/messages.py
27
28
29
class ExitEvent(BaseModel):
    """Event data for a user exiting a meeting."""
    user_exited: Optional[Union[UserInfo, str, Dict[str, Any]]] = Field(None, description="User exiting information")

TranscriptContent

Bases: BaseModel

Content of a transcript message.

Source code in framewise_meet_client/models/messages.py
31
32
33
34
class TranscriptContent(BaseModel):
    """Content of a transcript message."""
    text: str = Field("", description="The transcribed text")
    is_final: bool = Field(False, description="Whether this is a final transcript")

MCQQuestionData

Bases: BaseModel

Data for an MCQ question element.

Source code in framewise_meet_client/models/messages.py
37
38
39
40
41
42
class MCQQuestionData(BaseModel):
    """Data for an MCQ question element."""
    id: str = Field(..., description="Unique identifier for the question")
    question: str = Field(..., description="The question text")
    options: List[str] = Field(..., description="List of answer options")
    response: Optional[str] = Field(None, description="The user's selected response")

MCQQuestionResponseData

Bases: BaseModel

Data for an MCQ question response.

Source code in framewise_meet_client/models/messages.py
45
46
47
48
49
50
51
class MCQQuestionResponseData(BaseModel):
    """Data for an MCQ question response."""
    id: str = Field(..., description="Unique identifier for the question")
    question: str = Field(..., description="The question text")
    selectedOption: str = Field(..., description="The selected option text")
    selectedIndex: int = Field(..., description="The selected option index (0-based)")
    options: Optional[List[str]] = Field(None, description="List of answer options")

CustomUIElementData

Bases: BaseModel

Data for a custom UI element response.

Source code in framewise_meet_client/models/messages.py
53
54
55
56
57
58
59
60
61
class CustomUIElementData(BaseModel):
    """Data for a custom UI element response."""
    type: str = Field(..., description="Type of UI element")
    data: Union[MCQQuestionResponseData, Dict[str, Any]] = Field(..., description="Element-specific data")

    @model_validator(mode='after')
    def validate_data_type(self):
        """Validate that data matches the declared type."""
        return self

validate_data_type()

Validate that data matches the declared type.

Source code in framewise_meet_client/models/messages.py
58
59
60
61
@model_validator(mode='after')
def validate_data_type(self):
    """Validate that data matches the declared type."""
    return self

MessagePayload

Bases: BaseModel

Generic message payload that can contain any type of content.

Source code in framewise_meet_client/models/messages.py
63
64
65
66
67
class MessagePayload(BaseModel):
    """Generic message payload that can contain any type of content."""
    type: str = Field(..., description="Message type identifier")
    content: Union[JoinEvent, ExitEvent, TranscriptContent, CustomUIElementData, Dict[str, Any]] = Field(
        ..., description="Message content")

JoinMessage

Bases: BaseMessage

Message for a user joining event.

Source code in framewise_meet_client/models/messages.py
71
72
73
74
75
class JoinMessage(BaseMessage):
    """Message for a user joining event."""
    message_type: ClassVar[str] = "on_join"
    type: Literal["on_join"] = "on_join"
    content: JoinEvent

ExitMessage

Bases: BaseMessage

Message for a user exiting event.

Source code in framewise_meet_client/models/messages.py
78
79
80
81
82
class ExitMessage(BaseMessage):
    """Message for a user exiting event."""
    message_type: ClassVar[str] = "on_exit"
    type: Literal["on_exit"] = "on_exit"
    content: ExitEvent

TranscriptMessage

Bases: BaseMessage

Message for a transcript event.

Source code in framewise_meet_client/models/messages.py
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
class TranscriptMessage(BaseMessage):
    """Message for a transcript event."""
    message_type: ClassVar[str] = "transcript"
    type: Literal["transcript"] = "transcript"
    content: TranscriptContent = Field(default_factory=TranscriptContent)

    # For backward compatibility
    transcript: Optional[str] = None
    is_final: Optional[bool] = None

    @model_validator(mode='after')
    def _normalize_transcript(self):
        """Support old format where transcript and is_final were at the top level."""
        if self.transcript is not None and not self.content.text:
            logger.debug(f"Converting legacy transcript format: '{self.transcript}' to content.text")
            self.content.text = self.transcript
        if self.is_final is not None:
            logger.debug(f"Converting legacy is_final format: {self.is_final} to content.is_final")
            self.content.is_final = self.is_final
        return self

_normalize_transcript()

Support old format where transcript and is_final were at the top level.

Source code in framewise_meet_client/models/messages.py
 95
 96
 97
 98
 99
100
101
102
103
104
@model_validator(mode='after')
def _normalize_transcript(self):
    """Support old format where transcript and is_final were at the top level."""
    if self.transcript is not None and not self.content.text:
        logger.debug(f"Converting legacy transcript format: '{self.transcript}' to content.text")
        self.content.text = self.transcript
    if self.is_final is not None:
        logger.debug(f"Converting legacy is_final format: {self.is_final} to content.is_final")
        self.content.is_final = self.is_final
    return self

CustomUIElementMessage

Bases: BaseMessage

Message for a custom UI element response.

Source code in framewise_meet_client/models/messages.py
107
108
109
110
111
class CustomUIElementMessage(BaseMessage):
    """Message for a custom UI element response."""
    message_type: ClassVar[str] = "custom_ui_element_response" 
    type: Literal["custom_ui_element_response"] = "custom_ui_element_response"
    content: CustomUIElementData

MCQSelectionContent

Bases: BaseModel

Content of an MCQ selection message.

Source code in framewise_meet_client/models/messages.py
115
116
117
118
119
120
class MCQSelectionContent(BaseModel):
    """Content of an MCQ selection message."""
    selectedOption: str = Field(..., description="The selected option text")
    selectedIndex: int = Field(..., description="The selected option index (0-based)")
    question: str = Field(...,description="the question name")
    id: Optional[str] = Field(None, description="ID of the related question")

MCQSelectionMessage

Bases: BaseMessage

Message for an MCQ selection event.

Source code in framewise_meet_client/models/messages.py
123
124
125
126
127
class MCQSelectionMessage(BaseMessage):
    """Message for an MCQ selection event."""
    message_type: ClassVar[str] = "mcq_selection"
    type: Literal["mcq_selection"] = "mcq_selection"
    content: MCQSelectionContent

GeneratedTextContent

Bases: BaseModel

Content of a generated text message.

Source code in framewise_meet_client/models/messages.py
131
132
133
134
class GeneratedTextContent(BaseModel):
    """Content of a generated text message."""
    text: str = Field("", description="The generated text")
    is_generation_end: bool = Field(False, description="Whether this is the end of generation")

GeneratedTextMessage

Bases: BaseMessage

Message for sending generated text.

Source code in framewise_meet_client/models/messages.py
137
138
139
140
141
class GeneratedTextMessage(BaseMessage):
    """Message for sending generated text."""
    message_type: ClassVar[str] = "generated_text"
    type: Literal["generated_text"] = "generated_text"
    content: GeneratedTextContent

MCQQuestionSendData

Bases: BaseModel

Data for an MCQ question to be sent.

Source code in framewise_meet_client/models/messages.py
144
145
146
147
148
class MCQQuestionSendData(BaseModel):
    """Data for an MCQ question to be sent."""
    id: str = Field(..., description="Unique identifier for the question")
    question: str = Field(..., description="The question text")
    options: List[str] = Field(..., description="List of answer options")

CustomUIElementSendData

Bases: BaseModel

Data for a custom UI element to be sent.

Source code in framewise_meet_client/models/messages.py
151
152
153
154
class CustomUIElementSendData(BaseModel):
    """Data for a custom UI element to be sent."""
    type: str = Field(..., description="Type of UI element")
    data: Union[MCQQuestionSendData, Dict[str, Any]] = Field(..., description="Element-specific data")

CustomUIElementSendMessage

Bases: BaseMessage

Message for sending a custom UI element.

Source code in framewise_meet_client/models/messages.py
157
158
159
160
161
class CustomUIElementSendMessage(BaseMessage):
    """Message for sending a custom UI element."""
    message_type: ClassVar[str] = "custom_ui_element"
    type: Literal["custom_ui_element"] = "custom_ui_element"
    content: CustomUIElementSendData

ConnectionRejectedContent

Bases: BaseModel

Content of a connection rejected message.

Source code in framewise_meet_client/models/messages.py
164
165
166
167
class ConnectionRejectedContent(BaseModel):
    """Content of a connection rejected message."""
    reason: str = Field("", description="Reason for connection rejection")
    meeting_id: str = Field("", description="Meeting ID for which connection was rejected")

ConnectionRejectedMessage

Bases: BaseMessage

Message for connection rejection.

Source code in framewise_meet_client/models/messages.py
170
171
172
173
174
class ConnectionRejectedMessage(BaseMessage):
    """Message for connection rejection."""
    message_type: ClassVar[str] = "connection_rejected"
    type: Literal["connection_rejected"] = "connection_rejected"
    content: ConnectionRejectedContent