正在显示
1 个修改的文件
包含
2 行增加
和
2 行删除
| @@ -55,10 +55,10 @@ class InitKeywordCommon extends Command | @@ -55,10 +55,10 @@ class InitKeywordCommon extends Command | ||
| 55 | $text = Gpt::instance()->openai_chat_qqs($info['ai']); | 55 | $text = Gpt::instance()->openai_chat_qqs($info['ai']); |
| 56 | $text = Common::deal_keywords($text); | 56 | $text = Common::deal_keywords($text); |
| 57 | $text = Common::deal_str($text); | 57 | $text = Common::deal_str($text); |
| 58 | - $text = preg_match_all('/\{[^{}]*\}/', $text, $matches); | 58 | + preg_match_all('/\{[^{}]*\}/', $text, $matches); |
| 59 | if(!empty($text)){ | 59 | if(!empty($text)){ |
| 60 | $data = []; | 60 | $data = []; |
| 61 | - foreach ($text as $item){ | 61 | + foreach ($matches[0] as $item){ |
| 62 | $data[] = [ | 62 | $data[] = [ |
| 63 | 'nickname'=>$item['name'], | 63 | 'nickname'=>$item['name'], |
| 64 | 'text'=>$item['comment'], | 64 | 'text'=>$item['comment'], |
-
请 注册 或 登录 后发表评论