refactor: add GetRatio to Adaptor

This commit is contained in:
WqyJh
2025-01-14 14:38:26 +08:00
parent 3915ce9814
commit 0ad609ade6
70 changed files with 1038 additions and 467 deletions

View File

@@ -1,10 +1,12 @@
package togetherai
// https://docs.together.ai/docs/inference-models
import "github.com/songquanpeng/one-api/relay/billing/ratio"
var ModelList = []string{
"meta-llama/Llama-3-70b-chat-hf",
"deepseek-ai/deepseek-coder-33b-instruct",
"mistralai/Mixtral-8x22B-Instruct-v0.1",
"Qwen/Qwen1.5-72B-Chat",
// https://www.together.ai/pricing
// https://docs.together.ai/docs/inference-models
var RatioMap = map[string]ratio.Ratio{
"meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo": {Input: 0.88 * ratio.MILLI_USD, Output: 0.88 * ratio.MILLI_USD},
"deepseek-ai/deepseek-coder-33b-instruct": {Input: 1.25 * ratio.MILLI_USD, Output: 1.25 * ratio.MILLI_USD},
"mistralai/Mixtral-8x22B-Instruct-v0.1": {Input: 1.20 * ratio.MILLI_USD, Output: 1.20 * ratio.MILLI_USD},
"Qwen/Qwen2-72B-Instruct": {Input: 0.90 * ratio.MILLI_USD, Output: 0.90 * ratio.MILLI_USD},
}