mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-17 12:35:07 +08:00
【代码优化】AI:完善 OpenAIChatModelTests、OpenAiImageModelTests 单测,方便大家快速体验
This commit is contained in:
@ -23,7 +23,7 @@ public interface AiModelFactory {
|
||||
* @param url API URL
|
||||
* @return ChatModel 对象
|
||||
*/
|
||||
ChatModel getOrCreateChatClient(AiPlatformEnum platform, String apiKey, String url);
|
||||
ChatModel getOrCreateChatModel(AiPlatformEnum platform, String apiKey, String url);
|
||||
|
||||
/**
|
||||
* 基于默认配置,获得 ChatModel 对象
|
||||
|
@ -50,7 +50,7 @@ import java.util.List;
|
||||
public class AiModelFactoryImpl implements AiModelFactory {
|
||||
|
||||
@Override
|
||||
public ChatModel getOrCreateChatClient(AiPlatformEnum platform, String apiKey, String url) {
|
||||
public ChatModel getOrCreateChatModel(AiPlatformEnum platform, String apiKey, String url) {
|
||||
String cacheKey = buildClientCacheKey(ChatModel.class, platform, apiKey, url);
|
||||
return Singleton.get(cacheKey, (Func0<ChatModel>) () -> {
|
||||
//noinspection EnhancedSwitchMigration
|
||||
|
Reference in New Issue
Block a user