mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-09-17 01:06:37 +08:00
fix: get gemini adapter bug
This commit is contained in:
parent
93d54a7ef5
commit
1e19c333c9
@ -25,7 +25,7 @@ func (a *Adaptor) Init(meta *meta.Meta) {
|
|||||||
|
|
||||||
func (a *Adaptor) GetRequestURL(meta *meta.Meta) (string, error) {
|
func (a *Adaptor) GetRequestURL(meta *meta.Meta) (string, error) {
|
||||||
defaultVersion := config.GeminiVersion
|
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") {
|
strings.Contains(meta.ActualModelName, "gemini-1.5") {
|
||||||
defaultVersion = "v1beta"
|
defaultVersion = "v1beta"
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,8 @@ func ToAPIType(channelType int) int {
|
|||||||
apiType = apitype.Tencent
|
apiType = apitype.Tencent
|
||||||
case Gemini:
|
case Gemini:
|
||||||
apiType = apitype.Gemini
|
apiType = apitype.Gemini
|
||||||
|
case GeminiOpenAICompatible:
|
||||||
|
apiType = apitype.Gemini
|
||||||
case Ollama:
|
case Ollama:
|
||||||
apiType = apitype.Ollama
|
apiType = apitype.Ollama
|
||||||
case AwsClaude:
|
case AwsClaude:
|
||||||
|
Loading…
Reference in New Issue
Block a user