We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9629c4 commit 0f8f66dCopy full SHA for 0f8f66d
src/Results/DTO/Candidate.php
@@ -18,7 +18,7 @@
18
*
19
* @phpstan-import-type MessageArrayShape from Message
20
21
- * @phpstan-type CandidateArrayShape array{message: MessageArrayShape, finishReason: string, tokenCount: int|string}
+ * @phpstan-type CandidateArrayShape array{message: MessageArrayShape, finishReason: string, tokenCount: int}
22
23
* @extends AbstractDataValueObject<CandidateArrayShape>
24
*/
@@ -150,7 +150,7 @@ public static function fromArray(array $array): Candidate
150
return new self(
151
Message::fromArray($messageData),
152
FinishReasonEnum::from($array['finishReason']),
153
- (int) $array['tokenCount']
+ $array['tokenCount']
154
);
155
}
156
0 commit comments