Skip to content

Commit

Permalink
update gpt4 prize to 50%
Browse files Browse the repository at this point in the history
  • Loading branch information
zmh-program committed Oct 22, 2023
1 parent 9ae2d5b commit 248e204
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/tokenizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func CountInputToken(model string, v []globals.Message) float32 {
case globals.GPT3Turbo16k:
return 0
case globals.GPT4:
return float32(CountTokenPrice(v, model)) / 1000 * 2.1 * 0.8
return float32(CountTokenPrice(v, model)) / 1000 * 2.1 * 0.5
case globals.GPT432k:
return float32(CountTokenPrice(v, model)) / 1000 * 4.2
case globals.SparkDesk:
Expand All @@ -130,7 +130,7 @@ func CountOutputToken(model string, t int) float32 {
case globals.GPT3Turbo16k:
return 0
case globals.GPT4:
return float32(t*GetWeightByModel(model)) / 1000 * 4.3 * 0.8
return float32(t*GetWeightByModel(model)) / 1000 * 4.3 * 0.5
case globals.GPT432k:
return float32(t*GetWeightByModel(model)) / 1000 * 8.6
case globals.SparkDesk:
Expand Down

0 comments on commit 248e204

Please sign in to comment.