MCPcopy Index your code
hub / github.com/dataease/SQLBot / ChatLog

Class ChatLog

backend/apps/chat/models/chat_model.py:66–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64# TODO choose table / check connection / generate description
65
66class ChatLog(SQLModel, table=True):
67 __tablename__ = "chat_log"
68 id: Optional[int] = Field(sa_column=Column(BigInteger, Identity(always=True), primary_key=True))
69 type: TypeEnum = Field(
70 sa_column=Column(SQLAlchemyEnum(TypeEnum, native_enum=False, values_callable=enum_values, length=3)))
71 operate: OperationEnum = Field(
72 sa_column=Column(SQLAlchemyEnum(OperationEnum, native_enum=False, values_callable=enum_values, length=3)))
73 pid: Optional[int] = Field(sa_column=Column(BigInteger, nullable=True))
74 ai_modal_id: Optional[int] = Field(sa_column=Column(BigInteger))
75 base_modal: Optional[str] = Field(max_length=255)
76 messages: Optional[list[dict]] = Field(sa_column=Column(JSONB))
77 reasoning_content: Optional[str | None] = Field(sa_column=Column(Text, nullable=True))
78 start_time: datetime = Field(sa_column=Column(DateTime(timezone=False), nullable=True))
79 finish_time: datetime = Field(sa_column=Column(DateTime(timezone=False), nullable=True))
80 token_usage: Optional[dict | None | int] = Field(sa_column=Column(JSONB))
81 local_operation: bool = Field(default=False)
82 error: bool = Field(default=False)
83
84
85class Chat(SQLModel, table=True):

Callers 3

list_generate_sql_logsFunction · 0.90
list_generate_chart_logsFunction · 0.90
start_logFunction · 0.90

Calls 2

ColumnClass · 0.85
IdentityFunction · 0.85

Tested by

no test coverage detected