Upload of typescript contents fails

Hello there,
I struggle with the upload of some Angular content.

We concatenated some Angular component files (all in typescript) to one big ts file.
Then we use the python openAi SDK to upload the file to use it with an assistant.

The upload always fails with the following error

openai.BadRequestError: Error code: 400 - {'error': {'message': "Invalid file format. Supported formats: ['c', 'cpp', 'csv', 'docx', 'html', 'java', 'json', 'md', 'pdf', 'php', 'pptx', 'py', 'rb', 'tex', 'txt', 'css', 'jpeg', 'jpg', 'js', 'gif', 'png', 'tar', 'ts', 'xlsx', 'xml', 'zip']", 'type': 'invalid_request_error', 'param': None, 'code': None}}

I’ve tried to rename the file extension *.txt , make the file smaller (so that it only contains the code of one simple angular component) etc.
I’ve tried it with other simple txt or html files, which seems to work.
Is there some type of content check on upload? I would expect that at least a *.txt file should be possible to upload, independent of it’s content.

Nothing did help, I’m not able to upload this file. Even if I remove the “import” statements no chance. Files are encoded in UTF-8

In playground it is not possible to upload any files as well - as there is always stated, that for fine-tuning only jsonl files are allowed, but there is no possibility to change the purpose of the upload at all.
So at the end it is completely broken and it is not possible to upload Angular content, even if it is wrapped as text file.

Any ideas what to do?

2 Likes

Just worked again one day later…think this was a beta issue

3 Likes

Hi and thanks for the update!

Is it ok if we close this topic?

2 Likes

NO !!

I also have problems…

when I did:

$ echo test>test.ts
$ file --mime-type test.ts 
test.ts: text/plain

Or this one:

$: file --mime-type assistantSetup_corrected.ts
assistantSetup_corrected.ts: application/javascript

And then that:

$ touch assistantSetup_2-test.ts 
$ file --mime-type assistantSetup_2-test.ts 
assistantSetup_2-test.ts: inode/x-empty

capture_240829_16h22_04
Link: supported-files

Same issue here
ts file showing not supported in that file upload popup

1 Like