This commit is contained in:
Zhang Minghan 2023-09-25 16:51:56 +08:00
parent ca2f0c347b
commit 51f025b0f4
2 changed files with 1 additions and 2 deletions

View File

@ -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)

View File

@ -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: