Merge pull request #76 from songquanpeng/main

Fork Sync: Update from parent repository
This commit is contained in:
quzard 2023-06-24 14:23:37 +08:00 committed by GitHub
commit 576e7f5ff6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -124,7 +124,7 @@ func relayTextHelper(c *gin.Context, relayMode int) *OpenAIErrorWithStatusCode {
defer func() {
if consumeQuota {
quota := 0
completionRatio := 1.34 // default for gpt-3
completionRatio := 1.333333 // default for gpt-3
if strings.HasPrefix(textRequest.Model, "gpt-4") {
completionRatio = 2
}