feat: gpt-4-all model is ready

This commit is contained in:
RockYang
2024-01-15 14:07:24 +08:00
parent a140671aad
commit 59fa21779b
5 changed files with 57 additions and 40 deletions

View File

@@ -435,7 +435,11 @@ func (h *ChatHandler) doRequest(ctx context.Context, req types.ApiRequest, platf
apiURL = strings.Replace(apiKey.ApiURL, "{model}", req.Model, 1)
break
default:
apiURL = apiKey.ApiURL
if req.Model == "gpt-4-all" {
apiURL = "https://gpt.bemore.lol/v1/chat/completions"
} else {
apiURL = apiKey.ApiURL
}
}
// 更新 API KEY 的最后使用时间
h.db.Model(apiKey).UpdateColumn("last_used_at", time.Now().Unix())