mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-13 10:35:07 +08:00
【增加】增加 google gemini
This commit is contained in:
@ -21,6 +21,7 @@ public enum AiPlatformEnum {
|
||||
|
||||
OPEN_AI_DALL("dall", "dall"),
|
||||
MIDJOURNEY("midjourney", "midjourney"),
|
||||
GEMIR ("gemir ", "gemir "), // google gemir
|
||||
|
||||
;
|
||||
|
||||
|
@ -169,4 +169,15 @@ public class AiClientFactoryImpl implements AiClientFactory {
|
||||
return new QianWenChatClient(qianWenApi);
|
||||
}
|
||||
|
||||
|
||||
private static VertexAiGeminiChatClient buildGoogleGemir(String key) {
|
||||
List<String> keys = StrUtil.split(key, '|');
|
||||
Assert.equals(keys.size(), 2, "VertexAiGeminiChatClient 的密钥需要 (projectId|location) 格式");
|
||||
VertexAI vertexApi = new VertexAI(keys.get(0), keys.get(1));
|
||||
return new VertexAiGeminiChatClient(vertexApi,
|
||||
VertexAiGeminiChatOptions.builder()
|
||||
.withTemperature(0.4F)
|
||||
.build());
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user