mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-10 19:51:00 +00:00
(improvement)(chat) fix agentCanSupport null execption (#315)
This commit is contained in:
@@ -40,7 +40,8 @@ public class AgentCheckParser implements SemanticParser {
|
|||||||
queries.stream().map(SemanticQuery::getQueryMode).collect(Collectors.toList()));
|
queries.stream().map(SemanticQuery::getQueryMode).collect(Collectors.toList()));
|
||||||
queries.removeIf(query -> {
|
queries.removeIf(query -> {
|
||||||
for (RuleQueryTool tool : queryTools) {
|
for (RuleQueryTool tool : queryTools) {
|
||||||
if (!tool.getQueryModes().contains(query.getQueryMode())) {
|
if (CollectionUtils.isNotEmpty(tool.getQueryModes())
|
||||||
|
&& !tool.getQueryModes().contains(query.getQueryMode())) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (CollectionUtils.isEmpty(tool.getModelIds())) {
|
if (CollectionUtils.isEmpty(tool.getModelIds())) {
|
||||||
|
|||||||
Reference in New Issue
Block a user