A side thread created from a selected WebChat assistant response.
| 248 | |
| 249 | |
| 250 | class WebChatThread(TimestampMixin, SQLModel, table=True): |
| 251 | """A side thread created from a selected WebChat assistant response.""" |
| 252 | |
| 253 | __tablename__: str = "webchat_threads" |
| 254 | |
| 255 | id: int | None = Field( |
| 256 | primary_key=True, |
| 257 | sa_column_kwargs={"autoincrement": True}, |
| 258 | default=None, |
| 259 | ) |
| 260 | thread_id: str = Field( |
| 261 | max_length=36, |
| 262 | nullable=False, |
| 263 | unique=True, |
| 264 | default_factory=lambda: str(uuid.uuid4()), |
| 265 | ) |
| 266 | creator: str = Field(nullable=False, index=True) |
| 267 | parent_session_id: str = Field(nullable=False, index=True) |
| 268 | parent_message_id: int = Field(nullable=False, index=True) |
| 269 | base_checkpoint_id: str = Field(nullable=False, index=True) |
| 270 | selected_text: str = Field(sa_type=Text, nullable=False) |
| 271 | |
| 272 | __table_args__ = ( |
| 273 | UniqueConstraint( |
| 274 | "thread_id", |
| 275 | name="uix_webchat_thread_id", |
| 276 | ), |
| 277 | ) |
| 278 | |
| 279 | |
| 280 | class PlatformSession(TimestampMixin, SQLModel, table=True): |
no outgoing calls
no test coverage detected