#Error in Nodejs TS lib

14 messages · Page 1 of 1 (latest)

static canopy
#

The type for size is incorrect.
My code:

 const response = await openai.createImageVariation({
            image: fs.createReadStream(`${config.dalle2.tempDir}/${imageName}.png`),
            n: 1,
            size: "1024x1024",
        });
static canopy
#

ok, the documentation is definetly not right.
the createImage() method takes in a CreateImageRequest object input, which, works as intended on the documentation

the methods createImageVariation() and createImageEdit() DO NOT take any sort of ImageRequest object input, which makes the documentation completely wrong for those methods

#

following the declaration stated on the api.ts file from the lib, this works:

stark magnet
#

Oh weird I thought we fixed the docs yesterday

#

Where are you seeing the example that uses image request for variation

static canopy
#

I was expecting the documentation to be correct and not the lib

#

it is correct now

#

thanks =)

stark magnet
#

I was testing this last night and found the same issue haha

#

We codegen the node module and to do multi part form data we had to do it this way, that’s why it’s diffeeent from createImage

glacial elbow
static canopy
#

actually, im going to close it

glacial elbow
#

Thank you! Just a new errors im trying to resolve 🙏🏻