mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-13 18:45:06 +08:00
【新增】AI:增加 ollama 模型的接入
This commit is contained in:
@ -1,11 +1,8 @@
|
||||
package cn.iocoder.yudao.framework.ai.core.enums;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
// TODO 芋艿:这块,看看要不要调整下;
|
||||
/**
|
||||
* ai 模型平台
|
||||
@ -17,29 +14,31 @@ import java.util.List;
|
||||
@AllArgsConstructor
|
||||
public enum AiPlatformEnum {
|
||||
|
||||
OPENAI("OpenAI", "OpenAI"),
|
||||
OLLAMA("dall", "dall"),
|
||||
|
||||
YI_YAN("yiyan", "一言"),
|
||||
QIAN_WEN("qianwen", "千问"),
|
||||
XING_HUO("xinghuo", "星火"),
|
||||
OPENAI("OpenAI", "OpenAI"),
|
||||
OPEN_AI_DALL("dall", "dall"),
|
||||
MIDJOURNEY("midjourney", "midjourney"),
|
||||
MIDJOURNEY("Ollama", "Ollama"),
|
||||
|
||||
;
|
||||
|
||||
private String platform;
|
||||
private String name;
|
||||
private final String platform;
|
||||
private final String name;
|
||||
|
||||
public static List<AiPlatformEnum> CHAT_PLATFORM_LIST = Lists.newArrayList(
|
||||
AiPlatformEnum.YI_YAN,
|
||||
AiPlatformEnum.QIAN_WEN,
|
||||
AiPlatformEnum.XING_HUO,
|
||||
AiPlatformEnum.OPENAI
|
||||
);
|
||||
|
||||
public static List<AiPlatformEnum> IMAGE_PLATFORM_LIST = Lists.newArrayList(
|
||||
AiPlatformEnum.OPEN_AI_DALL,
|
||||
AiPlatformEnum.MIDJOURNEY
|
||||
);
|
||||
// public static List<AiPlatformEnum> CHAT_PLATFORM_LIST = Lists.newArrayList(
|
||||
// AiPlatformEnum.YI_YAN,
|
||||
// AiPlatformEnum.QIAN_WEN,
|
||||
// AiPlatformEnum.XING_HUO,
|
||||
// AiPlatformEnum.OPENAI
|
||||
// );
|
||||
//
|
||||
// public static List<AiPlatformEnum> IMAGE_PLATFORM_LIST = Lists.newArrayList(
|
||||
// AiPlatformEnum.OPEN_AI_DALL,
|
||||
// AiPlatformEnum.MIDJOURNEY
|
||||
// );
|
||||
|
||||
public static AiPlatformEnum validatePlatform(String platform) {
|
||||
for (AiPlatformEnum platformEnum : AiPlatformEnum.values()) {
|
||||
|
Reference in New Issue
Block a user