Browse Source

更新模型倍率

CaIon 2 years ago
parent
commit
5b2d898b36
2 changed files with 51 additions and 5 deletions
  1. 2 1
      common/model-ratio.go
  2. 49 4
      controller/model.go

+ 2 - 1
common/model-ratio.go

@@ -45,7 +45,8 @@ var ModelRatio = map[string]float64{
 	"text-search-ada-doc-001":   10,
 	"text-moderation-stable":    0.1,
 	"text-moderation-latest":    0.1,
-	"dall-e":                    8,
+	"dall-e-2":                  8,
+	"dall-e-3":                  16,
 	"claude-instant-1":          0.815,  // $1.63 / 1M tokens
 	"claude-2":                  5.51,   // $11.02 / 1M tokens
 	"ERNIE-Bot":                 0.8572, // ¥0.012 / 1k tokens

+ 49 - 4
controller/model.go

@@ -55,12 +55,21 @@ func init() {
 	// https://platform.openai.com/docs/models/model-endpoint-compatibility
 	openAIModels = []OpenAIModels{
 		{
-			Id:         "dall-e",
+			Id:         "dall-e-2",
 			Object:     "model",
 			Created:    1677649963,
 			OwnedBy:    "openai",
 			Permission: permission,
-			Root:       "dall-e",
+			Root:       "dall-e-2",
+			Parent:     nil,
+		},
+		{
+			Id:         "dall-e-3",
+			Object:     "model",
+			Created:    1677649963,
+			OwnedBy:    "openai",
+			Permission: permission,
+			Root:       "dall-e-3",
 			Parent:     nil,
 		},
 		{
@@ -117,6 +126,15 @@ func init() {
 			Root:       "gpt-3.5-turbo-16k-0613",
 			Parent:     nil,
 		},
+		{
+			Id:         "gpt-3.5-turbo-1106",
+			Object:     "model",
+			Created:    1699593571,
+			OwnedBy:    "openai",
+			Permission: permission,
+			Root:       "gpt-3.5-turbo-1106",
+			Parent:     nil,
+		},
 		{
 			Id:         "gpt-3.5-turbo-instruct",
 			Object:     "model",
@@ -180,6 +198,24 @@ func init() {
 			Root:       "gpt-4-32k-0613",
 			Parent:     nil,
 		},
+		{
+			Id:         "gpt-4-1106-preview",
+			Object:     "model",
+			Created:    1699593571,
+			OwnedBy:    "openai",
+			Permission: permission,
+			Root:       "gpt-4-1106-preview",
+			Parent:     nil,
+		},
+		{
+			Id:         "gpt-4-vision-preview",
+			Object:     "model",
+			Created:    1699593571,
+			OwnedBy:    "openai",
+			Permission: permission,
+			Root:       "gpt-4-vision-preview",
+			Parent:     nil,
+		},
 		{
 			Id:         "text-embedding-ada-002",
 			Object:     "model",
@@ -274,7 +310,7 @@ func init() {
 			Id:         "claude-instant-1",
 			Object:     "model",
 			Created:    1677649963,
-			OwnedBy:    "anturopic",
+			OwnedBy:    "anthropic",
 			Permission: permission,
 			Root:       "claude-instant-1",
 			Parent:     nil,
@@ -283,7 +319,7 @@ func init() {
 			Id:         "claude-2",
 			Object:     "model",
 			Created:    1677649963,
-			OwnedBy:    "anturopic",
+			OwnedBy:    "anthropic",
 			Permission: permission,
 			Root:       "claude-2",
 			Parent:     nil,
@@ -333,6 +369,15 @@ func init() {
 			Root:       "PaLM-2",
 			Parent:     nil,
 		},
+		{
+			Id:         "chatglm_turbo",
+			Object:     "model",
+			Created:    1677649963,
+			OwnedBy:    "zhipu",
+			Permission: permission,
+			Root:       "chatglm_turbo",
+			Parent:     nil,
+		},
 		{
 			Id:         "chatglm_pro",
 			Object:     "model",