You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When calling CreateImageEdit method, and passing ImageEditCreateRequest object to the method, if the optional parameter "Mask" is not set, it throws an exception Value cannot be null. (Parameter 'content')|System.ArgumentNullException: Value cannot be null. (Parameter 'content') at System.Net.Http.ByteArrayContent..ctor(Byte[] content) at OpenAI.GPT3.Managers.OpenAIService.CreateImageEdit(ImageEditCreateRequest imageEditCreateRequest)
Your code piece
var imageCreateResponse = await _openAIService.Image.CreateImageEdit(new ImageEditCreateRequest()
{
Size = "512x512",
N = 1,
ImageName = "123456",
Image = fileBytes,
User = Cryptography.SHA1Hash("123456789", true),
Prompt = "Robot, AI"
});
From the SDK source code, there is no check on Mask property before adding it to the request
Describe the bug
When calling CreateImageEdit method, and passing ImageEditCreateRequest object to the method, if the optional parameter "Mask" is not set, it throws an exception
Value cannot be null. (Parameter 'content')|System.ArgumentNullException: Value cannot be null. (Parameter 'content') at System.Net.Http.ByteArrayContent..ctor(Byte[] content) at OpenAI.GPT3.Managers.OpenAIService.CreateImageEdit(ImageEditCreateRequest imageEditCreateRequest)
Your code piece
From the SDK source code, there is no check on Mask property before adding it to the request
multipartContent.Add(new ByteArrayContent(imageEditCreateRequest.Mask), "mask", imageEditCreateRequest.MaskName);
The text was updated successfully, but these errors were encountered: