Skip to content

Commit

Permalink
fix: expect delta to not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
beliven-daniele-sarnari authored May 26, 2024
1 parent 7ec1207 commit 2f3aa15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Responses/Chat/CreateStreamedResponseChoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static function from(array $attributes): self
{
return new self(
$attributes['index'],
CreateStreamedResponseDelta::from($attributes['delta']),
CreateStreamedResponseDelta::from($attributes['delta'] ?? []),
$attributes['finish_reason'] ?? null,
);
}
Expand Down

0 comments on commit 2f3aa15

Please sign in to comment.