feat: support claude now (close #150)

This commit is contained in:
JustSong
2023-07-22 16:18:03 +08:00
parent 4139a7036f
commit 2ff15baf66
8 changed files with 400 additions and 129 deletions

View File

@@ -151,6 +151,7 @@ const (
ChannelTypePaLM = 11
ChannelTypeAPI2GPT = 12
ChannelTypeAIGC2D = 13
ChannelTypeAnthropic = 14
)
var ChannelBaseURLs = []string{
@@ -168,4 +169,5 @@ var ChannelBaseURLs = []string{
"", // 11
"https://api.api2gpt.com", // 12
"https://api.aigc2d.com", // 13
"https://api.anthropic.com", // 14
}

View File

@@ -36,6 +36,8 @@ var ModelRatio = map[string]float64{
"text-moderation-stable": 0.1,
"text-moderation-latest": 0.1,
"dall-e": 8,
"claude-instant-1": 0.75,
"claude-2": 30,
}
func ModelRatio2JSONString() string {