From cb28aa6600f2e0c5ee7d5bccf41a079dd8727b1d Mon Sep 17 00:00:00 2001 From: chan Date: Wed, 18 Jun 2025 17:10:16 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9C=AC=E5=9C=B0mem0=E8=AE=B0?= =?UTF-8?q?=E5=BF=86=E5=8A=9F=E8=83=BD=EF=BC=8C=E6=B7=BB=E5=8A=A0=20manage?= =?UTF-8?q?r-api=20=E7=AB=AF=E7=9A=84=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/db/changelog/202506181501.sql | 12 ++++++++++++ .../resources/db/changelog/db.changelog-master.yaml | 9 ++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 main/manager-api/src/main/resources/db/changelog/202506181501.sql diff --git a/main/manager-api/src/main/resources/db/changelog/202506181501.sql b/main/manager-api/src/main/resources/db/changelog/202506181501.sql new file mode 100644 index 000000000..dd3a1e1cc --- /dev/null +++ b/main/manager-api/src/main/resources/db/changelog/202506181501.sql @@ -0,0 +1,12 @@ +INSERT INTO `ai_model_config` (`id`, `model_type`, `model_code`, `model_name`, `is_default`, + `is_enabled`, `config_json`, `doc_link`, `remark`, `sort`, `creator`, + `create_date`, `updater`, `update_date`) +VALUES ('Memory_mem0_milvus', 'memory', 'mem0_milvus', 'Mem0AI本地记忆', 0, 1, + '{\"llm\": {\"config\": {\"model\": \"qwen-plus\", \"top_p\": 1, \"api_key\": \"\", \"max_tokens\": 2000, \"temperature\": 0.2, \"openai_base_url\": \"https://dashscope.aliyuncs.com/compatible-mode/v1\"}, \"provider\": \"openai\"}, \"type\": \"mem0_milvus\", \"embedder\": {\"config\": {\"model\": \"text-embedding-v4\", \"api_key\": \"\", \"openai_base_url\": \"https://dashscope.aliyuncs.com/compatible-mode/v1/\"}, \"provider\": \"openai\"}, \"vector_store\": {\"config\": {\"url\": \"http://127.0.0.1:19530\", \"collection_name\": \"mem0_collection\", \"embedding_model_dims\": 1024}, \"provider\": \"milvus\"}}', + 'https://app.mem0.ai/dashboard/get-started', 'Mem0AI记忆配置说明:\n1. 配置llm/embedder/vector_store\n', 3, NULL, + NULL, 1, '2025-06-18 17:02:49'); +INSERT INTO `ai_model_provider` (`id`, `model_type`, `provider_code`, `name`, `fields`, `sort`, + `creator`, `create_date`, `updater`, `update_date`) +VALUES ('31a6781185be2a72865cdb6a4d8f782c', 'Memory', 'mem0_milvus', 'mem0ai本地记忆', + '[{\"key\": \"llm\", \"type\": \"dict\", \"label\": \"llm\", \"default\": \"\", \"editing\": false, \"selected\": false}, {\"key\": \"embedder\", \"type\": \"dict\", \"label\": \"embedder\", \"default\": \"\", \"editing\": false, \"selected\": false}, {\"key\": \"vector_store\", \"type\": \"dict\", \"label\": \"vector_store\", \"default\": \"\", \"editing\": false, \"selected\": false}]', + 0, 1, '2025-06-18 14:00:57', 1, '2025-06-18 14:00:57'); diff --git a/main/manager-api/src/main/resources/db/changelog/db.changelog-master.yaml b/main/manager-api/src/main/resources/db/changelog/db.changelog-master.yaml index 30447221f..dbb1db586 100755 --- a/main/manager-api/src/main/resources/db/changelog/db.changelog-master.yaml +++ b/main/manager-api/src/main/resources/db/changelog/db.changelog-master.yaml @@ -211,4 +211,11 @@ databaseChangeLog: changes: - sqlFile: encoding: utf8 - path: classpath:db/changelog/202506161101.sql \ No newline at end of file + path: classpath:db/changelog/202506161101.sql + - changeSet: + id: 202506181501 + author: chan + changes: + - sqlFile: + encoding: utf8 + path: classpath:db/changelog/202506181501.sql \ No newline at end of file