mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-09 18:23:40 +08:00
fix: get gemini adapter bug
This commit is contained in:
@@ -25,7 +25,7 @@ func (a *Adaptor) Init(meta *meta.Meta) {
|
||||
|
||||
func (a *Adaptor) GetRequestURL(meta *meta.Meta) (string, error) {
|
||||
defaultVersion := config.GeminiVersion
|
||||
if strings.Contains(meta.ActualModelName, "gemini-2.0") ||
|
||||
if strings.Contains(meta.ActualModelName, "gemini-2") ||
|
||||
strings.Contains(meta.ActualModelName, "gemini-1.5") {
|
||||
defaultVersion = "v1beta"
|
||||
}
|
||||
|
||||
@@ -23,6 +23,8 @@ func ToAPIType(channelType int) int {
|
||||
apiType = apitype.Tencent
|
||||
case Gemini:
|
||||
apiType = apitype.Gemini
|
||||
case GeminiOpenAICompatible:
|
||||
apiType = apitype.Gemini
|
||||
case Ollama:
|
||||
apiType = apitype.Ollama
|
||||
case AwsClaude:
|
||||
|
||||
Reference in New Issue
Block a user