MCPcopy Index your code
hub / github.com/AstrBotDevs/AstrBot / WebChatThread

Class WebChatThread

astrbot/core/db/po.py:250–277  ·  view source on GitHub ↗

A side thread created from a selected WebChat assistant response.

Source from the content-addressed store, hash-verified

248
249
250class 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
280class PlatformSession(TimestampMixin, SQLModel, table=True):

Callers 1

create_webchat_threadMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected