diff --git a/server/Module/OpenAI/Client/SwooleAI/Client.php b/server/Module/OpenAI/Client/SwooleAI/Client.php index d53da9c..6690424 100644 --- a/server/Module/OpenAI/Client/SwooleAI/Client.php +++ b/server/Module/OpenAI/Client/SwooleAI/Client.php @@ -47,7 +47,7 @@ public function chat(array $params, ?int &$inputTokens = null, ?int &$outputToke { $contents = ''; // @phpstan-ignore-next-line - $this->client->chat($params, function ($curlInfo, $data) use ($channel, $params, &$outputTokens, &$contents) { + $this->client->chat($params, function ($curlInfo, $data) use ($channel, &$outputTokens, &$contents) { // 请求结束 if ('[DONE]' === $data) { @@ -63,7 +63,7 @@ public function chat(array $params, ?int &$inputTokens = null, ?int &$outputToke { if (null !== $chunk && '' !== $chunk) { - $contents.=$chunk; + $contents .= $chunk; } $channel->push([ 'delta' => [