feat: support amazon bedrock anthropic (#114)

* 🚧 WIP: bedrock

*  feat: support amazon bedrock anthropic
This commit is contained in:
Buer
2024-03-18 16:00:35 +08:00
committed by GitHub
parent 6f76007292
commit b81808e839
23 changed files with 1617 additions and 29 deletions

View File

@@ -198,6 +198,7 @@ const (
ChannelTypeMoonshot = 29
ChannelTypeMistral = 30
ChannelTypeGroq = 31
ChannelTypeBedrock = 32
)
var ChannelBaseURLs = []string{
@@ -232,7 +233,8 @@ var ChannelBaseURLs = []string{
"https://api.deepseek.com", //28
"https://api.moonshot.cn", //29
"https://api.mistral.ai", //30
"https://api.groq.com/openai", //30
"https://api.groq.com/openai", //31
"", //32
}
const (

View File

@@ -89,10 +89,14 @@ func init() {
// $0.80/million tokens $2.40/million tokens
"claude-instant-1.2": {[]float64{0.4, 1.2}, ChannelTypeAnthropic},
// $8.00/million tokens $24.00/million tokens
"claude-2.0": {[]float64{4, 12}, ChannelTypeAnthropic},
"claude-2.1": {[]float64{4, 12}, ChannelTypeAnthropic},
"claude-3-opus-20240229": {[]float64{7.5, 22.5}, ChannelTypeAnthropic},
"claude-2.0": {[]float64{4, 12}, ChannelTypeAnthropic},
"claude-2.1": {[]float64{4, 12}, ChannelTypeAnthropic},
// $15 / M $75 / M
"claude-3-opus-20240229": {[]float64{7.5, 22.5}, ChannelTypeAnthropic},
// $3 / M $15 / M
"claude-3-sonnet-20240229": {[]float64{1.3, 3.9}, ChannelTypeAnthropic},
// $0.25 / M $1.25 / M 0.00025$ / 1k tokens 0.00125$ / 1k tokens
"claude-3-haiku-20240307": {[]float64{0.125, 0.625}, ChannelTypeAnthropic},
// ¥0.004 / 1k tokens ¥0.008 / 1k tokens
"ERNIE-Speed": {[]float64{0.2857, 0.5714}, ChannelTypeBaidu},