Skip to content

models

framewise_meet_client.models

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

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

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")

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")

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

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")

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

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")

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")