feat: 更新 Server 后端服务
- 更新 agent handler 和 service 层 - 新增 chat_group handler 和 service - 删除废弃的 chat_handler - 更新 tool 相关处理 - 更新 API 文档和依赖 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -63,12 +63,30 @@ type AgentMemory struct {
|
||||
AgentID string `json:"agent_id" gorm:"size:191;index"`
|
||||
UserID string `json:"user_id" gorm:"size:191;index"`
|
||||
Content string `json:"content" gorm:"type:text"`
|
||||
MemoryType string `json:"memory_type" gorm:"size:20"` // experience/preference/conversation
|
||||
Importance int `json:"importance" gorm:"default:5"`
|
||||
MemoryType string `json:"memory_type" gorm:"size:20"` // experience/preference/conversation/fact
|
||||
Category string `json:"category" gorm:"size:50;index"` // 记忆分类
|
||||
Tags string `json:"tags" gorm:"size:500"` // 标签,JSON数组格式
|
||||
Keywords string `json:"keywords" gorm:"size:500"` // 关键词,用于搜索
|
||||
Importance int `json:"importance" gorm:"default:5;index"` // 重要性等级 1-10
|
||||
IsPinned bool `json:"is_pinned" gorm:"default:false"` // 是否置顶
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
|
||||
func (AgentMemory) TableName() string {
|
||||
return "agent_memories"
|
||||
}
|
||||
|
||||
// ImportItem 导入记忆项
|
||||
type ImportItem struct {
|
||||
Content string `json:"content"`
|
||||
MemoryType string `json:"memory_type"`
|
||||
Category string `json:"category"`
|
||||
Tags string `json:"tags"`
|
||||
Keywords string `json:"keywords"`
|
||||
Importance int `json:"importance"`
|
||||
}
|
||||
|
||||
// AgentTeam 多智能体协作配置
|
||||
type AgentTeam struct {
|
||||
ID string `json:"id" gorm:"primaryKey"`
|
||||
|
||||
Reference in New Issue
Block a user