mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-10 02:23:43 +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) {
|
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:
|
||||||
|
|||||||
Reference in New Issue
Block a user