feat: add gemini new model

This commit is contained in:
Martial BE 2024-03-25 10:50:43 +08:00
parent e7fbcbffab
commit 40ef06ceda
No known key found for this signature in database
GPG Key ID: D06C32DF0EDB9084
3 changed files with 4 additions and 2 deletions

View File

@ -118,6 +118,8 @@ func init() {
"PaLM-2": {[]float64{1, 1}, ChannelTypePaLM},
"gemini-pro": {[]float64{1, 1}, ChannelTypeGemini},
"gemini-pro-vision": {[]float64{1, 1}, ChannelTypeGemini},
"gemini-1.0-pro": {[]float64{1, 1}, ChannelTypeGemini},
"gemini-1.5-pro": {[]float64{1, 1}, ChannelTypeGemini},
// ¥0.005 / 1k tokens
"glm-3-turbo": {[]float64{0.3572, 0.3572}, ChannelTypeZhipu},

View File

@ -61,7 +61,7 @@ func errorHandle(geminiError *GeminiErrorResponse) *types.OpenAIError {
func (p *GeminiProvider) GetFullRequestURL(requestURL string, modelName string) string {
baseURL := strings.TrimSuffix(p.GetBaseURL(), "/")
version := "v1"
version := "v1beta"
if p.Channel.Other != "" {
version = p.Channel.Other
}

View File

@ -142,7 +142,7 @@ const typeConfig = {
other: '版本号'
},
input: {
models: ['gemini-pro', 'gemini-pro-vision'],
models: ['gemini-pro', 'gemini-pro-vision', 'gemini-1.0-pro', 'gemini-1.5-pro'],
test_model: 'gemini-pro'
},
prompt: {