反馈模型 (Chainlit Feedbacks)
| 3 | from db.base import Base |
| 4 | |
| 5 | class FeedbackModel(Base): |
| 6 | """ |
| 7 | 反馈模型 (Chainlit Feedbacks) |
| 8 | """ |
| 9 | __tablename__ = "feedbacks" |
| 10 | |
| 11 | id = Column(UUID(as_uuid=False), primary_key=True, comment="反馈ID") |
| 12 | forId = Column(UUID(as_uuid=False), name="forId", nullable=False, comment="关联ID (Step ID)") |
| 13 | threadId = Column(UUID(as_uuid=False), ForeignKey("threads.id", ondelete="CASCADE"), name="threadId", nullable=False, comment="线程ID") |
| 14 | value = Column(Integer, nullable=False, comment="分值") |
| 15 | comment = Column(String, comment="评论") |
| 16 | |
| 17 | def __repr__(self): |
| 18 | return f"<Feedback(id='{self.id}', value='{self.value}', threadId='{self.threadId}')>" |
nothing calls this directly
no outgoing calls
no test coverage detected