You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi I am trying to send files for finetuning from my api service (not command line)
I tried: return json.loads(requests.post( 'https://api.openai.com/v1/files', headers={'Authorization': 'Bearer '+ os.getenv("OPENAI_API_KEY")}, json={"purpose":"fine-tune"}, files={'file': "\n".join(data)} ).text)
and return json.loads(requests.post( 'https://api.openai.com/v1/files', headers={'Authorization': 'Bearer '+ os.getenv("OPENAI_API_KEY")}, params={"purpose":"fine-tune"}, files={'file': "\n".join(data)} ).text)
but I got "'purpose' is a required property" error
and when I try: return json.loads(requests.post( 'https://api.openai.com/v1/files', headers={'Authorization': 'Bearer '+ os.getenv("OPENAI_API_KEY")}, files={"purpose":"fine-tune", 'file': "\n".join(data)} ).text)
I got "'' is not one of ['fine-tune', 'answers', 'search', 'classifications'] - 'purpose'" error
What am I missing?
The text was updated successfully, but these errors were encountered:
* Add support for search_indices (openai#64)
* Add support for search_indices
* Updated with Schnurr's comments
* Add version to search (openai#65)
* Make search query required (openai#67)
Hi I am trying to send files for finetuning from my api service (not command line)
I tried:
return json.loads(requests.post( 'https://api.openai.com/v1/files', headers={'Authorization': 'Bearer '+ os.getenv("OPENAI_API_KEY")}, json={"purpose":"fine-tune"}, files={'file': "\n".join(data)} ).text)
and
return json.loads(requests.post( 'https://api.openai.com/v1/files', headers={'Authorization': 'Bearer '+ os.getenv("OPENAI_API_KEY")}, params={"purpose":"fine-tune"}, files={'file': "\n".join(data)} ).text)
but I got
"'purpose' is a required property"
errorand when I try:
return json.loads(requests.post( 'https://api.openai.com/v1/files', headers={'Authorization': 'Bearer '+ os.getenv("OPENAI_API_KEY")}, files={"purpose":"fine-tune", 'file': "\n".join(data)} ).text)
I got
"'' is not one of ['fine-tune', 'answers', 'search', 'classifications'] - 'purpose'"
errorWhat am I missing?
The text was updated successfully, but these errors were encountered: