Browse Source

Merge pull request #247 from MapleEve/gpt4o

Support Gpt4o
Calcium-Ion 1 năm trước cách đây
mục cha
commit
9a9fd34cba

+ 1 - 0
common/model-ratio.go

@@ -30,6 +30,7 @@ var DefaultModelRatio = map[string]float64{
 	"gpt-4o":                    2.5,  // $0.01 / 1K tokens
 	"gpt-4o":                    2.5,  // $0.01 / 1K tokens
 	"gpt-4o-2024-05-13":         2.5,  // $0.01 / 1K tokens
 	"gpt-4o-2024-05-13":         2.5,  // $0.01 / 1K tokens
 	"gpt-4-turbo":               5,    // $0.01 / 1K tokens
 	"gpt-4-turbo":               5,    // $0.01 / 1K tokens
+	"gpt-4o":                    0.25, // $0.0015 / 1K tokens
 	"gpt-4-turbo-2024-04-09":    5,    // $0.01 / 1K tokens
 	"gpt-4-turbo-2024-04-09":    5,    // $0.01 / 1K tokens
 	"gpt-3.5-turbo":             0.25, // $0.0015 / 1K tokens
 	"gpt-3.5-turbo":             0.25, // $0.0015 / 1K tokens
 	//"gpt-3.5-turbo-0301":           0.75, //deprecated
 	//"gpt-3.5-turbo-0301":           0.75, //deprecated

+ 1 - 0
relay/channel/openai/constant.go

@@ -1,6 +1,7 @@
 package openai
 package openai
 
 
 var ModelList = []string{
 var ModelList = []string{
+	"gpt-4o",
 	"gpt-3.5-turbo", "gpt-3.5-turbo-0301", "gpt-3.5-turbo-0613", "gpt-3.5-turbo-1106", "gpt-3.5-turbo-0125",
 	"gpt-3.5-turbo", "gpt-3.5-turbo-0301", "gpt-3.5-turbo-0613", "gpt-3.5-turbo-1106", "gpt-3.5-turbo-0125",
 	"gpt-3.5-turbo-16k", "gpt-3.5-turbo-16k-0613",
 	"gpt-3.5-turbo-16k", "gpt-3.5-turbo-16k-0613",
 	"gpt-3.5-turbo-instruct",
 	"gpt-3.5-turbo-instruct",