[全量] 初始化项目代码、配置、文档及Agent协同harness
This commit is contained in:
17
langchain-chat/server/db/models/conversation_model.py
Normal file
17
langchain-chat/server/db/models/conversation_model.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from sqlalchemy import Column, Integer, String, DateTime, JSON, func
|
||||
from server.db.base import Base
|
||||
|
||||
|
||||
class ConversationModel(Base):
|
||||
"""
|
||||
聊天记录模型
|
||||
"""
|
||||
__tablename__ = 'conversation'
|
||||
id = Column(String(32), primary_key=True, comment='对话框ID')
|
||||
name = Column(String(50), comment='对话框名称')
|
||||
# chat/agent_chat等
|
||||
chat_type = Column(String(50), comment='聊天类型')
|
||||
create_time = Column(DateTime, default=func.now(), comment='创建时间')
|
||||
|
||||
def __repr__(self):
|
||||
return f"<Conversation(id='{self.id}', name='{self.name}', chat_type='{self.chat_type}', create_time='{self.create_time}')>"
|
||||
Reference in New Issue
Block a user