History

fix(handlers): remove handling of unsupported `n` parameter in OpenAI image handlers

Luis Pater committed 6 months agov6.9.33

Commit fd719601 parent e9351961 file · +5 −3Browse files

Unified · Split

sdk/api/handlers/openai/openai_images_handlers.go+5−3
@@ -383,9 +383,11 @@ func (h *OpenAIAPIHandler) imagesEditsFromMultipart(c *gin.Context) { · 382 unmodified lines
383383 if v := strings.TrimSpace(c.PostForm("partial_images")); v != "" {
384384 tool, _ = sjson.SetBytes(tool, "partial_images", parseIntField(v, 0))
385385 }
386− if v := strings.TrimSpace(c.PostForm("n")); v != "" {
387− tool, _ = sjson.SetBytes(tool, "n", parseIntField(v, 0))
388− }
386+
387+ // Unsupported parameter
388+ // if v := strings.TrimSpace(c.PostForm("n")); v != "" {
389+ // tool, _ = sjson.SetBytes(tool, "n", parseIntField(v, 0))
390+ // }
389391
390392 if maskDataURL != nil && strings.TrimSpace(*maskDataURL) != "" {
391393 tool, _ = sjson.SetBytes(tool, "input_image_mask.image_url", strings.TrimSpace(*maskDataURL))