cockpit/agent 两个模型下拉 dspy 都读 capabilities 列但表里没有,报 Unknown column。 models/llm.json 加 capabilities(str len20 default text), mysql_v2.ddl.sql 加 ALTER 固化(ADD COLUMN IF NOT EXISTS,MariaDB 语法)。 取值: text=纯文本 / vision=图像理解 / multimodal=多模态。
26 lines
1.5 KiB
SQL
26 lines
1.5 KiB
SQL
-- pipeline_user_memory: 跨会话记忆表(v2 新增)
|
||
-- 对照 Hermes Agent 的 memory 系统
|
||
|
||
CREATE TABLE IF NOT EXISTS `pipeline_user_memory` (
|
||
`id` varchar(32) NOT NULL COMMENT '主键',
|
||
`memory_key` varchar(64) NOT NULL COMMENT '记忆唯一标识(内容MD5)',
|
||
`content` text NOT NULL COMMENT '记忆内容',
|
||
`category` varchar(32) NOT NULL DEFAULT 'memory' COMMENT '分类: user/memory',
|
||
`priority` int NOT NULL DEFAULT 0 COMMENT '优先级(越高越重要)',
|
||
`access_count` int NOT NULL DEFAULT 0 COMMENT '被引用次数',
|
||
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||
`updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||
PRIMARY KEY (`id`),
|
||
UNIQUE KEY `uk_memory` (`memory_key`, `category`),
|
||
KEY `idx_category_priority` (`category`, `priority` DESC)
|
||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Agent 跨会话记忆';
|
||
|
||
-- pipeline_agent_config: 产线级 Agent 配置(可选,JSON 字段)
|
||
ALTER TABLE `pipelines` ADD COLUMN IF NOT EXISTS `agent_config` text COMMENT 'Agent配置JSON';
|
||
|
||
-- sd_org_settings 增加 agent_config 字段
|
||
ALTER TABLE `sd_org_settings` ADD COLUMN IF NOT EXISTS `agent_config` text COMMENT '项目级Agent配置JSON';
|
||
|
||
-- llm 表增加 capabilities 能力分类字段(text=纯文本 / vision=图像理解 / multimodal=多模态)
|
||
ALTER TABLE `llm` ADD COLUMN IF NOT EXISTS `capabilities` varchar(20) DEFAULT 'text' COMMENT '能力分类: text/vision/multimodal';
|