Assistant API refuses to accept certain .txt files. In particular, if the file’s content starts with “Article Title” the upload will fail. Changing it to anything else (i.e. adding “W” to become “WArticle Title”) works and file is uploaded successfully.
Steps to reproduce:
Create any.txt file and write “Article Title” inside.
Upload to Assistant API via POST https://api.openai.com/v1/files
It fails consistently, probably 100+ times at this point. The file name seems to be irrelevant: it fails no matter what the file is called.
I’ve been testing different content of the .txt file and it fails every time when the content start with Article. Lowercase article works fine. Feel free to see for yourself in the assistant playground
The uploader has for a long time not trusted your file extension, instead using some parser to determine file type – and do stupid inspection, like one time failing JSON if NOT containing invalid trailing commas.
You can be tricky and try to fool the typing, (like you’ve already done)
{“initial_document_chunk”: “This is the start of a text file that discusses the birds and the bees”, “plain_text”: "
(your actual document)