Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Tables = []any{ &Chats{}, &Messages{}, &SubAgents{}, &Terminals{}, &Scopes{}, &Configs{}, &Traces{}, }
Tables 所有表
Functions ¶
This section is empty.
Types ¶
type Chats ¶
type Chats struct {
ID uint32 `gorm:"primaryKey;autoIncrement"`
LastModelID uint32
NowAgent string
TraceID uint64
// === 会话过程参数 ===
DB *gorm.DB `gorm:"-" json:"-"`
CurrentAgentID string `gorm:"-" json:"-"`
CurrentAgentConfig structs.AgentConfig `gorm:"-" json:"-"`
CurrentActivatePath string `gorm:"-" json:"-"`
EnableScopes map[string]bool `gorm:"-" json:"-"`
TemporyDataOfRequest map[string]any `gorm:"-" json:"-"`
TemporyDataOfSession map[string]any `gorm:"-" json:"-"`
InTestFlag bool `gorm:"-" json:"-"`
}
Chats 对话列表
type Messages ¶
type Messages struct {
ID uint64 `gorm:"primaryKey;autoIncrement"`
ChatID uint32
AgentID *string
Delta string `gorm:"type:text"`
Summary string `gorm:"type:text"`
ThinkingDelta string `gorm:"type:text"`
Chats Chats `gorm:"foreignKey:ChatID;constraints:OnDelete:RESTRICT;OnUpdate:CASCADE"`
// SubAgents SubAgents `gorm:"foreignKey:AgentID;constraints:OnDelete:RESTRICT;OnUpdate:CASCADE"`
Refers MessagesReferList `gorm:"type:bytes;serialize:gob"`
ToolCallingJSONString string `gorm:"type:text"`
// ToolFinished bool `gorm:"default:false"`
Time uint64 `gorm:"autoCreateTime"`
ModelName string
ModelID uint32
Type MessagesRole
}
Messages 消息列表
type MessagesRefer ¶
type MessagesRefer struct {
FilePath string
FileType MessagesReferType
FileFromLine int32
FileFromCol int32
FileToLine int32
FileToCol int32
Origin []byte
}
MessagesRefer 消息引用
type MessagesReferType ¶
type MessagesReferType uint8
MessagesReferType 消息引用类型
const ( MessagesReferTypeFile MessagesReferType = iota MessagesReferTypeText MessagesReferTypeImage )
消息引用类型
type MessagesRole ¶
type MessagesRole uint8
MessagesRole 消息类型
const ( MessagesRoleUser MessagesRole = iota MessagesRoleAgent MessagesRoleTool MessagesRoleCommunicate )
消息引用类型
type Scopes ¶
type Scopes struct {
ChatID uint32 `gorm:"primaryKey;column:chat_id"`
Name string `gorm:"primaryKey;column:name"`
Enabled bool `gorm:"column:enabled"`
Chats Chats `gorm:"foreignKey:ChatID;references:ID"`
}
Scopes 存储命名空间启用状态
type SubAgents ¶
type SubAgents struct {
ID string `gorm:"primaryKey"`
// ChatID uint32
AgentID string
BindPath string
Deleted bool
LastSummary string
}
SubAgents 子 agents 列表
Click to show internal directories.
Click to hide internal directories.