There is an error with the file upload, which is probably due to changes made by OpenAI in the chat completion API:
openai::upload_file(file = file, purpose = "assistants")
Error in match.arg(purpose) :
'arg' should be one of “search”, “answers”, “classifications”, “fine-tune”
openai::upload_file(file = file, purpose = "answers")
Error: OpenAI API request failed [400]:
'answers' is not one of ['fine-tune', 'assistants', 'batch', 'user_data', 'responses', 'vision'] - 'purpose'
Thanks for this useful R-package!
There is an error with the file upload, which is probably due to changes made by OpenAI in the chat completion API: