From 199e4e74e31ad4b43acbe96b4954014c8d72cea4 Mon Sep 17 00:00:00 2001 From: Bjorn Valk Date: Fri, 26 Jul 2024 14:01:51 +0200 Subject: [PATCH] Fixed the instance of Models RetrieveResponse not containing 'created' attribute when using Azure OpenAI --- src/Responses/Models/RetrieveResponse.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Responses/Models/RetrieveResponse.php b/src/Responses/Models/RetrieveResponse.php index 979c6dc9..2f6c2bea 100644 --- a/src/Responses/Models/RetrieveResponse.php +++ b/src/Responses/Models/RetrieveResponse.php @@ -43,8 +43,8 @@ public static function from(array $attributes, MetaInformation $meta): self return new self( $attributes['id'], $attributes['object'], - $attributes['created'], - $attributes['owned_by'], + $attributes['created'] ?? $attributes['created_at'] ?? 0, + $attributes['owned_by'] ?? '', $meta, ); }