From 545e0aba106fb0c60a86c2918f5209940b6dd26f Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Tue, 28 Feb 2023 19:00:21 +0530 Subject: [PATCH] fix: types --- src/Responses/Completions/CreateResponse.php | 4 ++-- src/Responses/Completions/CreateResponseChoice.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Responses/Completions/CreateResponse.php b/src/Responses/Completions/CreateResponse.php index 882c6677..234b3fdd 100644 --- a/src/Responses/Completions/CreateResponse.php +++ b/src/Responses/Completions/CreateResponse.php @@ -8,12 +8,12 @@ use OpenAI\Responses\Concerns\ArrayAccessible; /** - * @implements Response, token_logprobs: array, top_logprobs: array|null, text_offset: array}|null, finish_reason: string}>, usage: array{prompt_tokens: int, completion_tokens: int|null, total_tokens: int}}> + * @implements Response, token_logprobs: array, top_logprobs: array|null, text_offset: array}|null, finish_reason: string|null}>, usage: array{prompt_tokens: int, completion_tokens: int|null, total_tokens: int}}> */ final class CreateResponse implements Response { /** - * @use ArrayAccessible, token_logprobs: array, top_logprobs: array|null, text_offset: array}|null, finish_reason: string}>, usage: array{prompt_tokens: int, completion_tokens: int|null, total_tokens: int}}> + * @use ArrayAccessible, token_logprobs: array, top_logprobs: array|null, text_offset: array}|null, finish_reason: string|null}>, usage: array{prompt_tokens: int, completion_tokens: int|null, total_tokens: int}}> */ use ArrayAccessible; diff --git a/src/Responses/Completions/CreateResponseChoice.php b/src/Responses/Completions/CreateResponseChoice.php index f7a84ab2..1c6f93dd 100644 --- a/src/Responses/Completions/CreateResponseChoice.php +++ b/src/Responses/Completions/CreateResponseChoice.php @@ -15,7 +15,7 @@ private function __construct( } /** - * @param array{text: string, index: int, logprobs: array{tokens: array, token_logprobs: array, top_logprobs: array|null, text_offset: array}|null, finish_reason: string} $attributes + * @param array{text: string, index: int, logprobs: array{tokens: array, token_logprobs: array, top_logprobs: array|null, text_offset: array}|null, finish_reason: string|null} $attributes */ public static function from(array $attributes): self { @@ -28,7 +28,7 @@ public static function from(array $attributes): self } /** - * @return array{text: string, index: int, logprobs: array{tokens: array, token_logprobs: array, top_logprobs: array|null, text_offset: array}|null, finish_reason: string} + * @return array{text: string, index: int, logprobs: array{tokens: array, token_logprobs: array, top_logprobs: array|null, text_offset: array}|null, finish_reason: string|null} */ public function toArray(): array {