I am using AgentKit to migrate an agent I have in code but when I try to upload a file through the file browser of the preview I get the following error
Error:
Workflow failed: Invalid file data: 'input_data.input[0].content[0].file_data'. Expected a base64-encoded data URL with a valid file MIME type (e.g. 'data:text/plain;base64,SGVsbG8sIFdvcmxkIQ=='), but got unsupported MIME type 'text/csv'. Please see https://platform.openai.com/docs/assistants/tools/file-search#supported-files for supported file types..
When using this workflow in my Chatbot, it doesn’t allow file uploads but when testing with the builder preview tool, it allows file uploads and reads them as expected?
Can’t find anything official about this being supported/unsupported though.
@JDobbsy1987 I was having the same issue. The ChatKit session needs to be initialized server side with chatkit_configuration.file_upload.enabled set to true.
Hi everyone,
For me, I’m now able to upload images and PDFs without any issue, but .xlsx and .csv files are still being rejected even after enabling file upload via the chatkit sessions.
I get the following backend error:
{
"error": {
"message": "Uploaded file type is not allowed for this session.",
"type": "invalid_request_error",
"param": null,
"code": "chatkit.file_upload_type_rejected"
}
}
Code Interpreter is enabled in my agent workflow, and file uploads are enabled in the ChatKit session (file_upload: { enabled: true }).
It looks like the session or ChatKit backend is still enforcing a more restrictive MIME type policy for data files, even though the agent should be able to handle .csv and .xlsx via Code Interpreter.