|
...
|
...
|
@@ -70,7 +70,6 @@ class ChatLogic extends BaseLogic |
|
|
|
while (!$stream->eof()) {
|
|
|
|
$chunk = $stream->read(1024);
|
|
|
|
if ($chunk !== false) {
|
|
|
|
$chunk = json_decode($chunk,JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
|
|
|
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($chunk, true) . PHP_EOL, FILE_APPEND);
|
|
|
|
$aiResponse .= $chunk; // 累积完整的 AI 回复
|
|
|
|
// 使用 en_sse_data 格式化流数据
|
...
|
...
|
|