fix:修复意图识别插件名称格式bug (#885)

* fix:修复使用本地配置时忘记附带提示词

* fix:修复意图识别插件名称格式bug
This commit is contained in:
hrz
2025-04-18 16:39:18 +08:00
committed by GitHub
parent 1f836c3235
commit c74dbf03cd
3 changed files with 15 additions and 0 deletions
@@ -267,6 +267,12 @@ public class ConfigServiceImpl implements ConfigService {
if (intentLLMModelId != null && intentLLMModelId.equals(llmModelId)) {
intentLLMModelId = null;
}
} else if ("function_call".equals(map.get("type"))) {
String functionStr = (String) map.get("functions");
if (StringUtils.isNotBlank(functionStr)) {
String[] functions = functionStr.split("\\;");
map.put("functions", functions);
}
}
}
// 如果是LLM类型,且intentLLMModelId不为空,则添加附加模型
@@ -0,0 +1,2 @@
delete from `ai_model_config` where id = 'Intent_function_call';
INSERT INTO `ai_model_config` VALUES ('Intent_function_call', 'Intent', 'function_call', '函数调用意图识别', 0, 1, '{\"type\": \"function_call\", \"functions\": \"change_role;get_weather;get_news;play_music\"}', NULL, NULL, 3, NULL, NULL, NULL, NULL);
@@ -58,3 +58,10 @@ databaseChangeLog:
- sqlFile:
encoding: utf8
path: classpath:db/changelog/202504151206.sql
- changeSet:
id: 202504181534
author: John
changes:
- sqlFile:
encoding: utf8
path: classpath:db/changelog/202504181534.sql