I am attempting to upload this javascript file for use by an Assistant.
This is an es6 javascript file which includes multiple exports and some typedefs. It uploads without issue in the GPT builder, but gives the Invalid file format
error when attempting to upload it in the Create an Assistant
UI.
I’ve narrowed it down to having something to do with importing functions and exporting specific content from a function - but can’t quite see what the pattern is. Below are examples of the actual content of a file I’ve tested this with
this uploads:
import { someExport } from './some-file.js';
function testFunc(content = {}) {
return '<a href="${content.url}"></a>';
}
export default testFunc;
this fails:
import { someExport } from './some-file.js';
function testFunc(content = {}) {
return 'thing';
}
export default testFunc;
but this uploads without error (no import):
function testFunc(content = {}) {
return 'thing';
}
export default testFunc;
thank you