From 4a565d145e0fb3ea1baba8fffe39d86c56b6dc2c Mon Sep 17 00:00:00 2001 From: Sandro Gehri Date: Tue, 12 Nov 2024 21:51:16 +0100 Subject: [PATCH] update annotations after merging change on ThreadMessageResponse --- src/Resources/ThreadsMessages.php | 8 ++++---- .../Threads/Messages/ThreadMessageListResponse.php | 2 +- src/Responses/Threads/Messages/ThreadMessageResponse.php | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Resources/ThreadsMessages.php b/src/Resources/ThreadsMessages.php index 44142433..ed120f86 100644 --- a/src/Resources/ThreadsMessages.php +++ b/src/Resources/ThreadsMessages.php @@ -26,7 +26,7 @@ public function create(string $threadId, array $parameters): ThreadMessageRespon { $payload = Payload::create("threads/$threadId/messages", $parameters); - /** @var Response}}>, assistant_id: ?string, run_id: ?string, attachments: array}>, metadata: array}> $response */ + /** @var Response}}>, assistant_id: ?string, run_id: ?string, attachments?: array}>, metadata: array}> $response */ $response = $this->transporter->requestObject($payload); return ThreadMessageResponse::from($response->data(), $response->meta()); @@ -41,7 +41,7 @@ public function retrieve(string $threadId, string $messageId): ThreadMessageResp { $payload = Payload::retrieve("threads/$threadId/messages", $messageId); - /** @var Response}}>, assistant_id: ?string, run_id: ?string, attachments: array}>, metadata: array}> $response */ + /** @var Response}}>, assistant_id: ?string, run_id: ?string, attachments?: array}>, metadata: array}> $response */ $response = $this->transporter->requestObject($payload); return ThreadMessageResponse::from($response->data(), $response->meta()); @@ -58,7 +58,7 @@ public function modify(string $threadId, string $messageId, array $parameters): { $payload = Payload::modify("threads/$threadId/messages", $messageId, $parameters); - /** @var Response}}>, assistant_id: ?string, run_id: ?string, attachments: array}>, metadata: array}> $response */ + /** @var Response}}>, assistant_id: ?string, run_id: ?string, attachments?: array}>, metadata: array}> $response */ $response = $this->transporter->requestObject($payload); return ThreadMessageResponse::from($response->data(), $response->meta()); @@ -90,7 +90,7 @@ public function list(string $threadId, array $parameters = []): ThreadMessageLis { $payload = Payload::list("threads/$threadId/messages", $parameters); - /** @var Response}}>, assistant_id: ?string, run_id: ?string, attachments: array}>, metadata: array}>, first_id: ?string, last_id: ?string, has_more: bool}> $response */ + /** @var Response}}>, assistant_id: ?string, run_id: ?string, attachments?: array}>, metadata: array}>, first_id: ?string, last_id: ?string, has_more: bool}> $response */ $response = $this->transporter->requestObject($payload); return ThreadMessageListResponse::from($response->data(), $response->meta()); diff --git a/src/Responses/Threads/Messages/ThreadMessageListResponse.php b/src/Responses/Threads/Messages/ThreadMessageListResponse.php index cf60d085..8454befd 100644 --- a/src/Responses/Threads/Messages/ThreadMessageListResponse.php +++ b/src/Responses/Threads/Messages/ThreadMessageListResponse.php @@ -39,7 +39,7 @@ private function __construct( /** * Acts as static factory, and returns a new Response instance. * - * @param array{object: string, data: array}}>, assistant_id: ?string, run_id: ?string, attachments: array}>, metadata: array}>, first_id: ?string, last_id: ?string, has_more: bool} $attributes + * @param array{object: string, data: array}}>, assistant_id: ?string, run_id: ?string, attachments?: array}>, metadata: array}>, first_id: ?string, last_id: ?string, has_more: bool} $attributes */ public static function from(array $attributes, MetaInformation $meta): self { diff --git a/src/Responses/Threads/Messages/ThreadMessageResponse.php b/src/Responses/Threads/Messages/ThreadMessageResponse.php index 9dc6c4d9..1bfecb89 100644 --- a/src/Responses/Threads/Messages/ThreadMessageResponse.php +++ b/src/Responses/Threads/Messages/ThreadMessageResponse.php @@ -46,7 +46,7 @@ private function __construct( /** * Acts as static factory, and returns a new Response instance. * - * @param array{id: string, object: string, created_at: int, thread_id: string, role: string, content: array}}>, assistant_id: ?string, run_id: ?string, attachments: array}>, metadata: array} $attributes + * @param array{id: string, object: string, created_at: int, thread_id: string, role: string, content: array}}>, assistant_id: ?string, run_id: ?string, attachments?: array}>, metadata: array} $attributes */ public static function from(array $attributes, MetaInformation $meta): self {