fix:【AI 大模型】toolContext 为空,会导致报错问题
This commit is contained in:
parent
73e4f831f2
commit
951663b6b7
|
@ -38,6 +38,7 @@ public class AiUtils {
|
|||
public static ChatOptions buildChatOptions(AiPlatformEnum platform, String model, Double temperature, Integer maxTokens,
|
||||
Set<String> toolNames, Map<String, Object> toolContext) {
|
||||
toolNames = ObjUtil.defaultIfNull(toolNames, Collections.emptySet());
|
||||
toolContext = ObjUtil.defaultIfNull(toolContext, Collections.emptyMap());
|
||||
// noinspection EnhancedSwitchMigration
|
||||
switch (platform) {
|
||||
case TONG_YI:
|
||||
|
|
Loading…
Reference in New Issue