Skip to content

Commit 6e0738a

Browse files
authored
Merge pull request #168 from SanderMuller/patch-1
Update TranslationResponseSegment.php
2 parents 1acd793 + ee20727 commit 6e0738a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Responses/Audio/TranslationResponseSegment.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ private function __construct(
3838
/**
3939
* Acts as static factory, and returns a new Response instance.
4040
*
41-
* @param array{id: int, seek: int, start: float, end: float, text: string, tokens: array<int, int>, temperature: float, avg_logprob: float, compression_ratio: float, no_speech_prob: float, transient: bool} $attributes
41+
* @param array{id: int, seek: int, start: float, end: float, text: string, tokens: array<int, int>, temperature: float, avg_logprob: float, compression_ratio: float, no_speech_prob: float, transient?: bool} $attributes
4242
*/
4343
public static function from(array $attributes): self
4444
{
@@ -53,7 +53,7 @@ public static function from(array $attributes): self
5353
$attributes['avg_logprob'],
5454
$attributes['compression_ratio'],
5555
$attributes['no_speech_prob'],
56-
$attributes['transient'],
56+
$attributes['transient'] ?? false,
5757
);
5858
}
5959

0 commit comments

Comments
 (0)