Skip to content

Commit b9f02a6

Browse files
fix(Azure): guard missing description for VectorStores (#765)
Azure OpenAI's vector-store endpoint does not yet return the `description` field that was added in v0.19.1, causing "Undefined array key description" errors. Default to null when the key is absent, consistent with how other optional fields are handled across the codebase. Co-authored-by: jesse-bos <jesse.bos@dij.digital>
1 parent 3e6c593 commit b9f02a6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Responses/VectorStores/VectorStoreResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public static function from(array $attributes, MetaInformation $meta): self
5555
$attributes['object'],
5656
$attributes['created_at'],
5757
$attributes['name'],
58-
$attributes['description'],
58+
$attributes['description'] ?? null,
5959
$attributes['usage_bytes'],
6060
VectorStoreResponseFileCounts::from($attributes['file_counts']),
6161
$attributes['status'],

0 commit comments

Comments
 (0)