Description
Can't upload a file using
$api->files()->upload([
'purpose' => 'user_data',
'file' => $temp_file,
'expires_after' => [
'anchor' => 'created_at',
'seconds' => (string) now()->addDays(7)->diffInSeconds(),
],
]);
Because of
Steps To Reproduce
Can't upload a file using
$api->files()->upload([
'purpose' => 'user_data',
'file' => $temp_file,
'expires_after' => [
'anchor' => 'created_at',
'seconds' => (string) now()->addDays(7)->diffInSeconds(),
],
]);
Because of ValueObjects\Transporter\Payload.php:176-177 which should be
foreach ($value as $k => $nestedValue) {
$streamBuilder->addResource($key . '[' . $k . ']', $nestedValue);
}
A temporary workaround may be:
$api->files()->upload([
'purpose' => 'user_data',
'file' => $temp_file,
'expires_after[anchor]' => 'created_at',
'expires_after[seconds]' => (string)123
]);
OpenAI PHP Client Version
v0.19
PHP Version
8.2
Notes
No response
Description
Can't upload a file using
Because of
Steps To Reproduce
Can't upload a file using
Because of
ValueObjects\Transporter\Payload.php:176-177which should beA temporary workaround may be:
OpenAI PHP Client Version
v0.19
PHP Version
8.2
Notes
No response