diff --git a/api/stream.go b/api/stream.go index 4a17acc..bf6d205 100644 --- a/api/stream.go +++ b/api/stream.go @@ -89,7 +89,6 @@ func NativeStreamRequest(model string, endpoint string, apikeys string, messages return } defer res.Body.Close() - for { buf := make([]byte, 20480) n, err := res.Body.Read(buf) diff --git a/auth/usage.go b/auth/usage.go index 4470ae0..9b9aa9d 100644 --- a/auth/usage.go +++ b/auth/usage.go @@ -36,7 +36,7 @@ func CountInputToken(model string, v []types.ChatGPTMessage) float32 { case types.GPT4: return float32(utils.CountTokenPrice(v, model)) / 1000 * 2.1 case types.GPT432k: - return float32(utils.CountTokenPrice(v, model)) / 1000 * 2.1 * 2 + return float32(utils.CountTokenPrice(v, model)) / 1000 * 4.2 case types.Claude2, types.Claude2100k: return 0 default: