正在显示
1 个修改的文件
包含
3 行增加
和
2 行删除
| @@ -8,6 +8,7 @@ use App\Helper\Translate; | @@ -8,6 +8,7 @@ use App\Helper\Translate; | ||
| 8 | use App\Http\Logic\Bside\BaseLogic; | 8 | use App\Http\Logic\Bside\BaseLogic; |
| 9 | use App\Models\Ai\AiCommand; | 9 | use App\Models\Ai\AiCommand; |
| 10 | use App\Models\Project\DeployOptimize; | 10 | use App\Models\Project\DeployOptimize; |
| 11 | +use App\Models\WebSetting\WebLanguage; | ||
| 11 | use Illuminate\Support\Facades\Cache; | 12 | use Illuminate\Support\Facades\Cache; |
| 12 | 13 | ||
| 13 | class AiCommandLogic extends BaseLogic | 14 | class AiCommandLogic extends BaseLogic |
| @@ -58,8 +59,8 @@ class AiCommandLogic extends BaseLogic | @@ -58,8 +59,8 @@ class AiCommandLogic extends BaseLogic | ||
| 58 | if(trim($ai_command->ai) == '{core keywords 8}'){ | 59 | if(trim($ai_command->ai) == '{core keywords 8}'){ |
| 59 | $ai_send = false; | 60 | $ai_send = false; |
| 60 | }else{ | 61 | }else{ |
| 61 | - $lang = $this->getLang($this->param['keywords']); | ||
| 62 | - $prompt .= '.Please answer in ' . ($lang ?: 'English'); | 62 | + $lang = WebLanguage::getLangById($this->project['main_lang_id']??1)['english'] ?? 'English'; |
| 63 | + $prompt .= '.Please answer in ' . $lang; | ||
| 63 | $ai_send = true; | 64 | $ai_send = true; |
| 64 | } | 65 | } |
| 65 | 66 |
-
请 注册 或 登录 后发表评论