mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-10 11:07:06 +00:00
[feature][chat]Add switch to allow human involvement.#1729
This commit is contained in:
@@ -3,6 +3,7 @@ package com.tencent.supersonic.chat.server.agent;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Sets;
|
||||
import com.tencent.supersonic.chat.server.memory.MemoryReviewTask;
|
||||
import com.tencent.supersonic.common.pojo.ChatApp;
|
||||
import com.tencent.supersonic.common.pojo.RecordInfo;
|
||||
import lombok.Data;
|
||||
@@ -21,6 +22,7 @@ public class Agent extends RecordInfo {
|
||||
private Integer status;
|
||||
private List<String> examples;
|
||||
private Integer enableSearch;
|
||||
private Integer enableFeedback;
|
||||
private String toolConfig;
|
||||
private Map<String, ChatApp> chatAppConfig = Collections.EMPTY_MAP;
|
||||
private VisualConfig visualConfig;
|
||||
@@ -44,7 +46,7 @@ public class Agent extends RecordInfo {
|
||||
}
|
||||
|
||||
public boolean enableMemoryReview() {
|
||||
return false;
|
||||
return chatAppConfig.get(MemoryReviewTask.APP_KEY).isEnable();
|
||||
}
|
||||
|
||||
public static boolean containsAllModel(Set<Long> detectViewIds) {
|
||||
|
||||
@@ -33,6 +33,8 @@ public class AgentDO {
|
||||
|
||||
private Integer enableSearch;
|
||||
|
||||
private Integer enableFeedback;
|
||||
|
||||
private String toolConfig;
|
||||
|
||||
private String chatModelConfig;
|
||||
|
||||
@@ -392,3 +392,6 @@ ALTER TABLE s2_agent RENAME COLUMN model_config TO chat_model_config;
|
||||
ALTER TABLE s2_agent DROP COLUMN prompt_config;
|
||||
ALTER TABLE s2_agent DROP COLUMN multi_turn_config;
|
||||
ALTER TABLE s2_agent DROP COLUMN enable_memory_review;
|
||||
|
||||
--20241012
|
||||
alter table s2_agent add column `enable_feedback` tinyint DEFAULT 1;
|
||||
@@ -397,6 +397,7 @@ CREATE TABLE IF NOT EXISTS s2_agent
|
||||
updated_by varchar(100) null,
|
||||
updated_at TIMESTAMP null,
|
||||
enable_search int null,
|
||||
enable_feedback int null,
|
||||
PRIMARY KEY (`id`)
|
||||
); COMMENT ON TABLE s2_agent IS 'agent information table';
|
||||
|
||||
|
||||
@@ -75,6 +75,7 @@ CREATE TABLE IF NOT EXISTS `s2_agent` (
|
||||
`chat_model_config` text COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||
`visual_config` varchar(2000) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||
`enable_search` tinyint DEFAULT 1,
|
||||
`enable_feedback` tinyint DEFAULT 1,
|
||||
`created_by` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||
`created_at` datetime DEFAULT NULL,
|
||||
`updated_by` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||
|
||||
@@ -397,6 +397,7 @@ CREATE TABLE IF NOT EXISTS s2_agent
|
||||
updated_by varchar(100) null,
|
||||
updated_at TIMESTAMP null,
|
||||
enable_search int null,
|
||||
enable_feedback int null,
|
||||
PRIMARY KEY (`id`)
|
||||
); COMMENT ON TABLE s2_agent IS 'agent information table';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user