feat(app):
1. Add new functional features to the agent; 2. Enhance the voice output; 3. Modify the end_user binding; 4. Delete and modify the tools.
This commit is contained in:
@@ -31,6 +31,7 @@ class AgentConfig(Base):
|
||||
variables = Column(JSON, default=list, nullable=True, comment="变量配置")
|
||||
tools = Column(JSON, default=list, nullable=True, comment="工具配置")
|
||||
skills = Column(JSON, default=dict, nullable=True, comment="技能配置")
|
||||
features = Column(JSON, default=dict, nullable=True, comment="功能特性配置")
|
||||
|
||||
# 多 Agent 相关字段
|
||||
agent_role = Column(String(20), comment="Agent 角色: master|sub|standalone")
|
||||
|
||||
@@ -12,7 +12,8 @@ class EndUser(Base):
|
||||
__tablename__ = "end_users"
|
||||
|
||||
id = Column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4, nullable=False, index=True)
|
||||
app_id = Column(UUID(as_uuid=True), ForeignKey("apps.id"), nullable=False)
|
||||
app_id = Column(UUID(as_uuid=True), ForeignKey("apps.id"), nullable=True)
|
||||
workspace_id = Column(UUID(as_uuid=True), ForeignKey("workspaces.id"), nullable=False)
|
||||
# end_user_id = Column(String, nullable=False, index=True)
|
||||
other_id = Column(String, nullable=True) # Store original user_id
|
||||
other_name = Column(String, default="", nullable=False)
|
||||
@@ -61,4 +62,7 @@ class EndUser(Base):
|
||||
app = relationship(
|
||||
"App",
|
||||
back_populates="end_users"
|
||||
)
|
||||
)
|
||||
|
||||
# 与 WorkSpace 的反向关系
|
||||
workspace = relationship("Workspace", back_populates="end_users")
|
||||
@@ -110,7 +110,10 @@ class ToolConfig(Base):
|
||||
# 元数据
|
||||
version = Column(String(50), default="1.0.0")
|
||||
tags = Column(JSON, default=list) # 标签列表
|
||||
|
||||
|
||||
# 逻辑删除标志
|
||||
is_active = Column(Boolean, default=True, server_default='true', nullable=False, index=True, comment="是否可用,False表示已删除")
|
||||
|
||||
# 时间戳
|
||||
created_at = Column(DateTime, default=datetime.now, nullable=False)
|
||||
updated_at = Column(DateTime, default=datetime.now, onupdate=datetime.now, nullable=False)
|
||||
|
||||
@@ -38,6 +38,7 @@ class Workspace(Base):
|
||||
members = relationship("WorkspaceMember", back_populates="workspace") # users collaborate through membership
|
||||
api_keys = relationship("ApiKey", back_populates="workspace", cascade="all, delete-orphan") # API Keys
|
||||
memory_increments = relationship("MemoryIncrement", back_populates="workspace")
|
||||
end_users = relationship("EndUser", back_populates="workspace", cascade="all, delete-orphan")
|
||||
|
||||
class WorkspaceMember(Base):
|
||||
__tablename__ = "workspace_members"
|
||||
|
||||
Reference in New Issue
Block a user