Merge branch 'refs/heads/main' into perf-tool-call-optimization
@@ -99,6 +99,7 @@ public class ConfigServiceImpl implements ConfigService {
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
result,
|
||||
isCache);
|
||||
|
||||
@@ -113,7 +114,7 @@ public class ConfigServiceImpl implements ConfigService {
|
||||
// 检查是否为管理控制台请求
|
||||
String redisKey = RedisKeys.getTmpRegisterMacKey(macAddress);
|
||||
Object isAdminRequest = redisUtils.get(redisKey);
|
||||
|
||||
|
||||
if (isAdminRequest != null && "true".equals(isAdminRequest)) {
|
||||
// 管理控制台请求,返回getConfig的结果
|
||||
redisUtils.delete(redisKey); // 使用后清理
|
||||
@@ -203,10 +204,11 @@ public class ConfigServiceImpl implements ConfigService {
|
||||
mcpEndpoint = mcpEndpoint.replace("/mcp/", "/call/");
|
||||
result.put("mcp_endpoint", mcpEndpoint);
|
||||
}
|
||||
|
||||
|
||||
// 获取上下文源配置
|
||||
AgentContextProviderEntity contextProviderEntity = agentContextProviderService.getByAgentId(agent.getId());
|
||||
if (contextProviderEntity != null && contextProviderEntity.getContextProviders() != null && !contextProviderEntity.getContextProviders().isEmpty()) {
|
||||
if (contextProviderEntity != null && contextProviderEntity.getContextProviders() != null
|
||||
&& !contextProviderEntity.getContextProviders().isEmpty()) {
|
||||
result.put("context_providers", contextProviderEntity.getContextProviders());
|
||||
}
|
||||
|
||||
@@ -229,6 +231,7 @@ public class ConfigServiceImpl implements ConfigService {
|
||||
agent.getAsrModelId(),
|
||||
agent.getLlmModelId(),
|
||||
agent.getVllmModelId(),
|
||||
agent.getSlmModelId(),
|
||||
agent.getTtsModelId(),
|
||||
agent.getMemModelId(),
|
||||
agent.getIntentModelId(),
|
||||
@@ -410,6 +413,7 @@ public class ConfigServiceImpl implements ConfigService {
|
||||
String asrModelId,
|
||||
String llmModelId,
|
||||
String vllmModelId,
|
||||
String slmModelId,
|
||||
String ttsModelId,
|
||||
String memModelId,
|
||||
String intentModelId,
|
||||
@@ -418,9 +422,9 @@ public class ConfigServiceImpl implements ConfigService {
|
||||
boolean isCache) {
|
||||
Map<String, String> selectedModule = new HashMap<>();
|
||||
|
||||
String[] modelTypes = { "VAD", "ASR", "TTS", "Memory", "Intent", "LLM", "VLLM", "RAG" };
|
||||
String[] modelTypes = { "VAD", "ASR", "TTS", "Memory", "Intent", "LLM", "VLLM", "SLM", "RAG" };
|
||||
String[] modelIds = { vadModelId, asrModelId, ttsModelId, memModelId, intentModelId, llmModelId, vllmModelId,
|
||||
ragModelId };
|
||||
slmModelId, ragModelId };
|
||||
String intentLLMModelId = null;
|
||||
String memLocalShortLLMModelId = null;
|
||||
|
||||
@@ -456,7 +460,7 @@ public class ConfigServiceImpl implements ConfigService {
|
||||
// 火山引擎声音克隆需要替换resource_id
|
||||
Map<String, Object> map = (Map<String, Object>) model.getConfigJson();
|
||||
if (Constant.VOICE_CLONE_HUOSHAN_DOUBLE_STREAM.equals(map.get("type"))) {
|
||||
// 如果voice是”S_“开头的,使用seed-icl-1.0
|
||||
// 如果voice是”S_”开头的,使用seed-icl-1.0
|
||||
if (voice != null && voice.startsWith("S_")) {
|
||||
map.put("resource_id", "seed-icl-1.0");
|
||||
}
|
||||
@@ -474,7 +478,7 @@ public class ConfigServiceImpl implements ConfigService {
|
||||
if (map.get("functions") != null) {
|
||||
String functionStr = (String) map.get("functions");
|
||||
if (StringUtils.isNotBlank(functionStr)) {
|
||||
String[] functions = functionStr.split("\\;");
|
||||
String[] functions = functionStr.split(";");
|
||||
map.put("functions", functions);
|
||||
}
|
||||
}
|
||||
@@ -507,6 +511,15 @@ public class ConfigServiceImpl implements ConfigService {
|
||||
typeConfig.put(memLocalShortLLM.getId(), memLocalShortLLM.getConfigJson());
|
||||
}
|
||||
}
|
||||
// LLM也返回所选的SLM,如果同名id则不重复显示
|
||||
if (StringUtils.isNotBlank(slmModelId) && !slmModelId.equals(llmModelId)) {
|
||||
if (!typeConfig.containsKey(slmModelId)) {
|
||||
ModelConfigEntity slmModel = modelConfigService.getModelByIdFromCache(slmModelId);
|
||||
if (slmModel != null && slmModel.getConfigJson() != null) {
|
||||
typeConfig.put(slmModel.getId(), slmModel.getConfigJson());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
result.put(modelTypes[i], typeConfig);
|
||||
|
||||
@@ -2,12 +2,11 @@
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="icon" href="./favicon.ico">
|
||||
<title>Xiaozhi AI Customization</title>
|
||||
<script type="module" crossorigin src="./assets/index-B8r0c7xg.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="./assets/index-CrIJdTCK.css">
|
||||
<script type="module" crossorigin src="./assets/index-Guo1hQ-y.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="./assets/index-B3ns2K1c.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
|
After Width: | Height: | Size: 154 KiB |
|
After Width: | Height: | Size: 173 KiB |
|
After Width: | Height: | Size: 326 KiB |
|
After Width: | Height: | Size: 207 KiB |
|
After Width: | Height: | Size: 233 KiB |
|
After Width: | Height: | Size: 258 KiB |
|
After Width: | Height: | Size: 239 KiB |
|
After Width: | Height: | Size: 242 KiB |
|
After Width: | Height: | Size: 184 KiB |
|
After Width: | Height: | Size: 215 KiB |
|
After Width: | Height: | Size: 388 KiB |
|
After Width: | Height: | Size: 198 KiB |
|
After Width: | Height: | Size: 55 KiB |
|
After Width: | Height: | Size: 284 KiB |
|
After Width: | Height: | Size: 214 KiB |
|
After Width: | Height: | Size: 246 KiB |
|
After Width: | Height: | Size: 162 KiB |
|
After Width: | Height: | Size: 245 KiB |
|
After Width: | Height: | Size: 97 KiB |
|
After Width: | Height: | Size: 268 KiB |
|
After Width: | Height: | Size: 204 KiB |
|
After Width: | Height: | Size: 52 KiB |
|
After Width: | Height: | Size: 53 KiB |
|
After Width: | Height: | Size: 87 KiB |
|
After Width: | Height: | Size: 74 KiB |
|
After Width: | Height: | Size: 85 KiB |
|
After Width: | Height: | Size: 77 KiB |
|
After Width: | Height: | Size: 73 KiB |
|
After Width: | Height: | Size: 90 KiB |
|
After Width: | Height: | Size: 64 KiB |
|
After Width: | Height: | Size: 77 KiB |
|
After Width: | Height: | Size: 145 KiB |
|
After Width: | Height: | Size: 72 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 95 KiB |
|
After Width: | Height: | Size: 72 KiB |
|
After Width: | Height: | Size: 80 KiB |
|
After Width: | Height: | Size: 56 KiB |
|
After Width: | Height: | Size: 89 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 92 KiB |
|
After Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 891 B After Width: | Height: | Size: 891 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
@@ -0,0 +1 @@
|
||||
wakenet9_tts3h12_Hi,Stack Chan_3_0.585_0.590
|
||||
@@ -0,0 +1 @@
|
||||
wakenet9_tts3h12_小峰小峰_3_0.614_0.621
|
||||
@@ -0,0 +1 @@
|
||||
wakenet9_tts3h12_小珈小珈_3_0.598_0.607
|
||||
@@ -23,7 +23,7 @@ You are a playful, expressive, empathetic, and highly emotionally intelligent co
|
||||
你的输出会被合成器(TTS)转为声音朗读,用户输入格式为 JSON,但你的常规回复必须严格遵循纯文本规范:
|
||||
1. 【单一表情前置】只允许在每段常规回复的**最开头**插入 1 个且仅 1 个 Emoji 表情(调用工具时不插入表情)。
|
||||
2. 【表情白名单】绝对只能使用以下列表中的 Emoji:{{emojiList}}。禁止使用列表外的符号及任何颜文字。
|
||||
3. 【排版绝对禁区】除非输出标准化 JSON 进行工具调用,常规文本绝对禁止输出 Markdown 排版(如加粗、列表、代码块等),严禁使用括号等形式输出心理活动和动作描写(如“[无奈地叹气]”、“(笑着说)”)。
|
||||
3. 【排版绝对禁区】除非输出标准化 JSON 进行工具调用,常规文本绝对禁止输出 Markdown 排版。绝对不要使用 “**” 或 “__” 加粗(如”**重点**”),不要在行首使用 “-”、”•” 等列表标记,不要用 “```” 代码块。严禁使用括号输出心理活动和动作描写(如”[无奈地叹气]”、”(笑着说)”)。多项内容请用中文分号”;”或逗号”,”串联成自然口语段落。
|
||||
</tts_format_constraints>
|
||||
|
||||
<tool_and_knowledge>
|
||||
|
||||