Kaynağa Gözat

设置默认生图模型为gpt-image-2

lh 5 gün önce
ebeveyn
işleme
0a5efdb99c

+ 1 - 1
app/Services/AIGeneration/AIImageGenerationService.php

@@ -186,7 +186,7 @@ class AIImageGenerationService
         // $model = $params['model'] ?? self::MODEL_JIMENG_4;
 
         // 获取模型类型,默认使用即梦seedream5.0-lite
-        $model = $params['model'] ?? 'doubao-seedream-5-0-lite-260128';
+        $model = $params['model'] ?? 'gpt-image-2';
 
         // 构建计费信息并余额预检(不足直接报错)
         $chargeInfo = $this->buildImageChargeInfo($params, $model);

+ 8 - 8
app/Services/Anime/AnimeService.php

@@ -1934,12 +1934,12 @@ class AnimeService
             $model = getProp($episode, 'image_model');
             if (!$model) {
                 // episode表也没有,使用默认值
-                $model = 'doubao-seedream-5-0-lite-260128';
+                $model = 'gpt-image-2';
             }
         }
         // 验证模型是否在可用模型表中
         if (!DB::table('mp_image_models')->where('model', $model)->where('is_enabled', 1)->exists()) {
-            $model = 'doubao-seedream-5-0-lite-260128';
+            $model = 'gpt-image-2';
         }
 
         $roles = json_decode(getProp($episode, 'roles'), true);
@@ -6251,12 +6251,12 @@ class AnimeService
             }
             if (!$model) {
                 // episode表也没有,使用默认值
-                $model = 'doubao-seedream-5-0-lite-260128';
+                $model = 'gpt-image-2';
             }
         }
         // 验证模型是否在可用模型表中
         if (!DB::table('mp_image_models')->where('model', $model)->where('is_enabled', 1)->exists()) {
-            // $model = 'doubao-seedream-5-0-lite-260128';
+            // $model = 'gpt-image-2';
             Utils::throwError('20003:该模型已不可用,请更换!');
         }
         // 保存到episode表
@@ -7956,7 +7956,7 @@ class AnimeService
         $model = getProp($data, 'model');
         if (!$model) {
             // 使用默认模型
-            $model = 'doubao-seedream-5-0-lite-260128';
+            $model = 'gpt-image-2';
         }
         // 验证模型是否在可用模型表中
         if (!DB::table('mp_image_models')->where('model', $model)->where('is_enabled', 1)->exists()) {
@@ -8706,7 +8706,7 @@ class AnimeService
         // 图片生成参数(与 saveScriptProducts 保持一致的校验规则)
         $model = getProp($data, 'model');
         if (!$model) {
-            $model = 'doubao-seedream-5-0-lite-260128';
+            $model = 'gpt-image-2';
         }
         if (!DB::table('mp_image_models')->where('model', $model)->where('is_enabled', 1)->exists()) {
             Utils::throwError('20003:该模型已不可用,请更换!');
@@ -9595,7 +9595,7 @@ class AnimeService
         $model = getProp($data, 'model');
         if (!$model) {
             // 使用默认模型
-            $model = 'doubao-seedream-5-0-lite-260128';
+            $model = 'gpt-image-2';
         }
         // 验证模型是否在可用模型表中
         if (!DB::table('mp_image_models')->where('model', $model)->where('is_enabled', 1)->exists()) {
@@ -10349,7 +10349,7 @@ class AnimeService
         }
         
         // 默认参数
-        $model = 'doubao-seedream-5-0-lite-260128';
+        $model = 'gpt-image-2';
         $width = 1600;
         $height = 2848;