-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into enum-description-in-tools
- Loading branch information
Showing
6 changed files
with
94 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
evaluator/src/main/kotlin/com/xebia/functional/xef/evaluator/models/ModelsPricing.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package com.xebia.functional.xef.evaluator.models | ||
|
||
data class ModelsPricing( | ||
val modelName: String, | ||
val currency: String, | ||
val input: ModelsPricingItem, | ||
val output: ModelsPricingItem | ||
) { | ||
|
||
companion object { | ||
|
||
const val oneMillion = 1_000_000 | ||
val oneThousand = 1_000 | ||
|
||
// The pricing for the models was updated the May 2st, 2024 | ||
// Be sure to update the pricing for each model | ||
|
||
val gpt4Turbo = | ||
ModelsPricing( | ||
modelName = "gpt-4-turbo", | ||
currency = "USD", | ||
input = ModelsPricingItem(10.0, oneMillion), | ||
output = ModelsPricingItem(30.0, oneMillion) | ||
) | ||
|
||
val gpt4 = | ||
ModelsPricing( | ||
modelName = "gpt-4-turbo", | ||
currency = "USD", | ||
input = ModelsPricingItem(30.0, oneMillion), | ||
output = ModelsPricingItem(60.0, oneMillion) | ||
) | ||
|
||
val gpt3_5Turbo = | ||
ModelsPricing( | ||
modelName = "gpt-3.5-turbo", | ||
currency = "USD", | ||
input = ModelsPricingItem(0.5, oneMillion), | ||
output = ModelsPricingItem(1.5, oneMillion) | ||
) | ||
} | ||
} | ||
|
||
data class ModelsPricingItem(val price: Double, val perTokens: Int) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters