Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork667
Added filename support for the file payload#416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
gehrisandro commentedJun 6, 2024
I am not able to reproduce the issue. When I upload a file, the filename is set properly. Could you please provided a full example or a demo repository which reproduces the issue? |
apc-harold commentedJun 7, 2024
Hi@gehrisandro, Thanks for checking it out! I'm quite busy at the moment so won't be able to provide an example, but:
I'll maybe have some time on w/s 17th, so will make a reminder to come back and make an example if it's still here. |
DennisBirkholz commentedJun 27, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I stumbled on the same problem: This may also be remedied by adding the following code to the file upload example: $jsonlData ="{...}\n{...}";$response =$client->files()->upload(['purpose' =>'fine-tune','file' => \GuzzleHttp\Psr7\Utils::streamFor($jsonlData, ["metadata" => ["uri" =>"upload.jsonl"]]), ]); |
olimarferraz commentedNov 8, 2024
@DennisBirkholz thanks! Works for me. I'm using the Laravel driver and was stuck in how properly handle this uploads. |
What:
Description:
When uploading a file using:
The uploaded file is automatically named
Nyholm-Psr7-Zval:, which causes issues because it doesn't have a file extension. This prevents the file from being attached to an assistant.The proposed changes allow for a file name to be provided by instead passing an array value for the file key: