|
@@ -59,10 +59,11 @@ public class LlmClientService {
|
|
|
String className = ChatApiClient.class.getName().replace("ChatApiClient", supplier.getChatClientClass());
|
|
|
ChatApiConfig config = new ChatApiConfig(supplier, model);
|
|
|
Class<?> clientClass = Class.forName(className);
|
|
|
- chatApiClientMap.put(model.getId(),
|
|
|
- (ChatApiClient) clientClass.getConstructor(ChatApiConfig.class).newInstance(config));
|
|
|
+
|
|
|
+ Object clientInstance = clientClass.getConstructor(ChatApiConfig.class).newInstance(config);
|
|
|
+ chatApiClientMap.put(model.getId(), (ChatApiClient) clientInstance);
|
|
|
} catch (Exception e) {
|
|
|
- log.error("Chat api client init error, supplier={}, class={}, model={}", supplier.getName(),
|
|
|
+ log.warn("ChatApiClient init error, supplier:{} class:{} model:{}", supplier.getName(),
|
|
|
supplier.getChatClientClass(), model.getName());
|
|
|
}
|
|
|
}
|