We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Your issue may already be reported! Please search on the issue tracker before creating one.
Describe the bug CreateEditImage method upload file report Supported file formats are 'image/png'
To Reproduce
config := openai.DefaultConfig("token") config.HTTPClient = &http.Client{} c := openai.NewClientWithConfig(config) f4, _ := os.Open("./4.png") defer f4.Close() ctx := context.Background() reqUrl := openai.ImageEditRequest{ Image: f4, Prompt: "添加一只红色的鸭子", Model: openai.CreateImageModelDallE2, Size: openai.CreateImageSize512x512, ResponseFormat: openai.CreateImageResponseFormatURL, N: 1, } respUrl, err := c.CreateEditImage(ctx, reqUrl) if err != nil { fmt.Printf("Image creation error: %v\n", err) return } fmt.Println(respUrl.Data[0].URL)
Expected behavior Print out the URL address
Screenshots/Logs Invalid file 'image': unsupported mimetype ('application/octet-stream'). Supported file formats are 'image/png'.
Environment (please complete the following information):
Additional context Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Your issue may already be reported!
Please search on the issue tracker before creating one.
Describe the bug
CreateEditImage method upload file report Supported file formats are 'image/png'
To Reproduce
Expected behavior
Print out the URL address
Screenshots/Logs
Invalid file 'image': unsupported mimetype ('application/octet-stream'). Supported file formats are 'image/png'.
Environment (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: