From cb904fbdb2bf2222f6a918f6a45a1146402919ce Mon Sep 17 00:00:00 2001 From: Zhang Minghan Date: Sat, 21 Oct 2023 23:13:27 +0800 Subject: [PATCH] update model authentication struct --- auth/payment.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/auth/payment.go b/auth/payment.go index 4a95d0f7..9a65ff19 100644 --- a/auth/payment.go +++ b/auth/payment.go @@ -74,6 +74,9 @@ func ReduceDalle(db *sql.DB, user *User) bool { func CanEnableModel(db *sql.DB, user *User, model string) bool { switch model { + case globals.GPT3Turbo, globals.GPT3Turbo0301, globals.GPT3Turbo0613, + globals.Claude2: + return true case globals.GPT4, globals.GPT40613, globals.GPT40314: return user != nil && user.GetQuota(db) >= 5 case globals.GPT432k, globals.GPT432k0613, globals.GPT432k0314: @@ -85,7 +88,7 @@ func CanEnableModel(db *sql.DB, user *User, model string) bool { case globals.ZhiPuChatGLMPro, globals.ZhiPuChatGLMStd: return user != nil && user.GetQuota(db) >= 1 default: - return true + return user != nil } }