正在显示
1 个修改的文件
包含
5 行增加
和
1 行删除
| @@ -29,13 +29,17 @@ class AiCommandController extends BaseController | @@ -29,13 +29,17 @@ class AiCommandController extends BaseController | ||
| 29 | ]); | 29 | ]); |
| 30 | 30 | ||
| 31 | $text = AiCommandLogic::instance()->ai_send(); | 31 | $text = AiCommandLogic::instance()->ai_send(); |
| 32 | + $data = [ | ||
| 33 | + 'code' => $text ? 200 : 500, | ||
| 34 | + 'text' => $text | ||
| 35 | + ]; | ||
| 32 | $param = [ | 36 | $param = [ |
| 33 | 'key' => $this->param['key'], | 37 | 'key' => $this->param['key'], |
| 34 | 'keywords' => $this->param['keywords'], | 38 | 'keywords' => $this->param['keywords'], |
| 35 | 'remark' => $text | 39 | 'remark' => $text |
| 36 | ]; | 40 | ]; |
| 37 | $this->set_ai_log($param); | 41 | $this->set_ai_log($param); |
| 38 | - $this->response('success', Code::SUCCESS, ['text' => $text]); | 42 | + $this->response('success', Code::SUCCESS, $data); |
| 39 | } | 43 | } |
| 40 | 44 | ||
| 41 | /** | 45 | /** |
-
请 注册 或 登录 后发表评论