作者 李宇航

合并分支 'lyh-server' 到 'master'

gx



查看合并请求 !1705
... ... @@ -70,7 +70,7 @@ class ChatLogic extends BaseLogic
while (!$stream->eof()) {
$chunk = $stream->read(1024);
if ($chunk !== false) {
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($chunk, true) . PHP_EOL, FILE_APPEND);
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($chunk->text, true) . PHP_EOL, FILE_APPEND);
$aiResponse .= $chunk; // 累积完整的 AI 回复
// 使用 en_sse_data 格式化流数据
echo $gptService->en_sse_data(trim($chunk));
... ...