feat: support claude and gemini in vertex ai (#1621)

* feat: support claude and gemini in vertex ai

* fix: do not show api key field in channel page when the type is VertexAI

* fix: update getToken function to include channelId in cache key
This commit is contained in:
LiuVaayne
2024-07-13 14:59:28 +08:00
committed by GitHub
parent 65acb94f45
commit cf9b5f0b92
19 changed files with 590 additions and 24 deletions

View File

@@ -43,5 +43,6 @@ const (
TogetherAI
Doubao
Novita
VertextAI
Dummy
)

View File

@@ -35,6 +35,8 @@ func ToAPIType(channelType int) int {
apiType = apitype.Cloudflare
case DeepL:
apiType = apitype.DeepL
case VertextAI:
apiType = apitype.VertexAI
}
return apiType

View File

@@ -43,6 +43,7 @@ var ChannelBaseURLs = []string{
"https://api.together.xyz", // 39
"https://ark.cn-beijing.volces.com", // 40
"https://api.novita.ai/v3/openai", // 41
"", // 42
}
func init() {