Skip to content

Commit 52f1ef0

Browse files
louissss61mcallzbl
authored andcommitted
fix(core): fix DashScopeChatModel 实例化时参数判空bug (alibaba#2344)
1 parent e623b53 commit 52f1ef0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

spring-ai-alibaba-core/src/main/java/com/alibaba/cloud/ai/dashscope/chat/DashScopeChatModel.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ public DashScopeChatModel(DashScopeApi dashscopeApi, DashScopeChatOptions defaul
140140
ToolCallingManager toolCallingManager, RetryTemplate retryTemplate,
141141
ObservationRegistry observationRegistry) {
142142

143-
this(dashscopeApi, defaultOptions, toolCallingManager, retryTemplate, observationRegistry, null);
143+
this(dashscopeApi, defaultOptions, toolCallingManager, retryTemplate, observationRegistry,
144+
new DefaultToolExecutionEligibilityPredicate());
144145
}
145146

146147
public DashScopeChatModel(DashScopeApi dashscopeApi, DashScopeChatOptions defaultOptions,
@@ -159,7 +160,7 @@ public DashScopeChatModel(DashScopeApi dashscopeApi, DashScopeChatOptions defaul
159160
this.toolCallingManager = toolCallingManager;
160161
this.retryTemplate = retryTemplate;
161162
this.observationRegistry = observationRegistry;
162-
this.toolExecutionEligibilityPredicate = new DefaultToolExecutionEligibilityPredicate();
163+
this.toolExecutionEligibilityPredicate = toolExecutionEligibilityPredicate;
163164
}
164165

165166
@Override

0 commit comments

Comments
 (0)