Closed wxinix-2022 closed 1 year ago
Yes, it looks like it. Didn't look that there is no standard constructor for TMultipartFormData
Fixed
OpenAI.Images, TImageCreateParams, TImageVariationParams appear to have the same issue - missing constructors.
TImageCreateParams - the constructor of the parent is sufficient.
TImageVariationParams - has a constructor
right. I meant TImageEditParams (not TImageCreateParams). I see they are already fixed.
https://github.com/HemulGM/DelphiOpenAI/blob/main/OpenAI.Files.pas
Line 18,
TFileCreateParams inherits from TMultipartFormData. However, TFileCreateParams didn't implement its own constructor. Therefore, TFileCreateParams.Create will call TObject.Create, skipping all the initialization code inside TMultipartFormData.Create(...).
This later will result invalid access to Stream object inside TMultipartFormData.