3

In order to make a fine-tuned ChatGPT model, we need to upload a JSON file of training data. The OpenAI doc for file upload is here:

https://platform.openai.com/docs/api-reference/files/upload

But... I don't see how to append the actual file information. The file parameter is the file name, not the file. There must be something obvious that I am missing!

Brian Risk
  • 1,244
  • 13
  • 23
  • 1
    The files api in only useful for fine-tuning only. I assume you are talking about uploading files to a specific plugin or for multimodal support. I can only assume that this will become available when plugin's and/or multimodal api changes become available to the public. Someone with plugin developer access may be to comment better on this. – Shane Powell May 18 '23 at 21:37
  • I have the same question. I though I could just base64 encode the PNG data stream, but the API keeps complaining. I've even asked ChatGPT for an answer. – VTPete Aug 17 '23 at 21:05

1 Answers1

0

curl:

  • You can use the -F command followed by the filename/path. The file will be sent with your request.

References: https://reqbin.com/req/c-dot4w5a2/curl-post-file https://platform.openai.com/docs/api-reference/files/upload

Postman:

There is basically two ways to attach a file to a POST request

  • In the request body, click "form-data", hover over the "key" input field, and find the hidden dropdown that says "Text". Click "Text", and then change it to say "File". In the "Value" field, click "Select File" and select the file to send via the POST request body.

  • Click "binary" and then click "Select File" to attach your file.

Reference: https://www.postman.com/postman/workspace/postman-answers/documentation/13455110-00378d5c-5b08-4813-98da-bc47a2e6021d

nabil.douss
  • 634
  • 4
  • 10