-
-
Notifications
You must be signed in to change notification settings - Fork 634
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Description
Enabling Asynchronous Filter will cause a Undefined array key "delta"
error
ErrorException
Undefined array key "delta"
at vendor/openai-php/client/src/Responses/Chat/CreateStreamedResponseChoice.php:23
19▕ public static function from(array $attributes): self
20▕ {
21▕ return new self(
22▕ $attributes['index'],
➜ 23▕ CreateStreamedResponseDelta::from($attributes['delta']),
24▕ $attributes['finish_reason'] ?? null,
25▕ );
26▕ }
27▕
+2 vendor frames
3 [internal]:0
OpenAI\Responses\Chat\CreateStreamedResponse::OpenAI\Responses\Chat\{closure}()
+2 vendor frames
Steps To Reproduce
$this->clientGPT4 = OpenAI::factory()
->withBaseUri("{$endpoint}/openai/deployments/{$deploymentIdGPT4}")
->withHttpHeader('api-key', $apiKey)
->withQueryParam('api-version', $apiVersion)
->make();
- Use the chat()->createStreamed() function
return $this->clientGPT4->chat()->createStreamed([
'messages' => $messages,
]);
OpenAI PHP Client Version
v0.9.1
PHP Version
8.3.6
Notes
No response
berott
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request