mirror of
https://github.com/coaidev/coai.git
synced 2025-05-22 14:30:14 +09:00
init v3
This commit is contained in:
parent
ca2f0c347b
commit
51f025b0f4
@ -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)
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user