mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-08 02:03:42 +08:00
feat: gpt-4-gizmo-g-* model is supported
This commit is contained in:
@@ -435,7 +435,7 @@ func (h *ChatHandler) doRequest(ctx context.Context, req types.ApiRequest, platf
|
||||
apiURL = strings.Replace(apiKey.ApiURL, "{model}", req.Model, 1)
|
||||
break
|
||||
default:
|
||||
if req.Model == "gpt-4-all" {
|
||||
if req.Model == "gpt-4-all" || strings.HasPrefix(req.Model, "gpt-4-gizmo-g-") {
|
||||
apiURL = "https://gpt.bemore.lol/v1/chat/completions"
|
||||
} else {
|
||||
apiURL = apiKey.ApiURL
|
||||
|
||||
@@ -329,7 +329,7 @@ func (h *PaymentHandler) notify(orderNo string) error {
|
||||
user.ImgCalls += remark.ImgCalls
|
||||
}
|
||||
|
||||
} else { // 非 VIP 用户
|
||||
} else { // 非 VIP 用户
|
||||
if remark.Days > 0 { // vip 套餐:days > 0, calls == 0
|
||||
user.ExpiredTime = time.Now().AddDate(0, 0, remark.Days).Unix()
|
||||
user.Calls += h.App.SysConfig.VipMonthCalls
|
||||
|
||||
@@ -21,11 +21,11 @@ func NewUploadHandler(app *core.AppServer, db *gorm.DB, manager *oss.UploaderMan
|
||||
}
|
||||
|
||||
func (h *UploadHandler) Upload(c *gin.Context) {
|
||||
fileURL, err := h.uploaderManager.GetUploadHandler().PutFile(c, "file")
|
||||
file, err := h.uploaderManager.GetUploadHandler().PutFile(c, "file")
|
||||
if err != nil {
|
||||
resp.ERROR(c, err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
resp.SUCCESS(c, fileURL)
|
||||
resp.SUCCESS(c, file)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user