正在显示
1 个修改的文件
包含
1 行增加
和
5 行删除
| @@ -59,10 +59,6 @@ class GptService | @@ -59,10 +59,6 @@ class GptService | ||
| 59 | * @time :2025/4/2 16:56 | 59 | * @time :2025/4/2 16:56 |
| 60 | */ | 60 | */ |
| 61 | public function en_sse_data($body, string $type='text'){ | 61 | public function en_sse_data($body, string $type='text'){ |
| 62 | - return 'data:'.json_encode([ | ||
| 63 | - 'id' => md5(is_array($body) ? json_encode($body) : $body), | ||
| 64 | - 'data' => $body, | ||
| 65 | - 'type' => $type | ||
| 66 | - ],JSON_UNESCAPED_UNICODE)."\n\n"; | 62 | + return 'data:'.json_encode(['id' => md5(is_array($body) ? json_encode($body) : $body), 'data' => $body, 'type' => $type],JSON_UNESCAPED_UNICODE)."\n\n"; |
| 67 | } | 63 | } |
| 68 | } | 64 | } |
-
请 注册 或 登录 后发表评论