mirror of
				https://github.com/songquanpeng/one-api.git
				synced 2025-11-04 15:53:42 +08:00 
			
		
		
		
	fix: fix "invalidPayload" error when request Azure dall-e-3 api without optional parameter (#764)
* fix: based on #754 add 'omitempty' in ImageRequest to fit official api reference for relay
* Revert "fix: based on #754 add 'omitempty' in ImageRequest to fit official api reference for relay"
This reverts commit b526006ce0.
* fix: add missing omitempty
---------
Co-authored-by: JustSong <songquanpeng@foxmail.com>
			
			
This commit is contained in:
		@@ -133,12 +133,12 @@ type TextRequest struct {
 | 
			
		||||
type ImageRequest struct {
 | 
			
		||||
	Model          string `json:"model"`
 | 
			
		||||
	Prompt         string `json:"prompt" binding:"required"`
 | 
			
		||||
	N              int    `json:"n"`
 | 
			
		||||
	Size           string `json:"size"`
 | 
			
		||||
	Quality        string `json:"quality"`
 | 
			
		||||
	ResponseFormat string `json:"response_format"`
 | 
			
		||||
	Style          string `json:"style"`
 | 
			
		||||
	User           string `json:"user"`
 | 
			
		||||
	N              int    `json:"n,omitempty"`
 | 
			
		||||
	Size           string `json:"size,omitempty"`
 | 
			
		||||
	Quality        string `json:"quality,omitempty"`
 | 
			
		||||
	ResponseFormat string `json:"response_format,omitempty"`
 | 
			
		||||
	Style          string `json:"style,omitempty"`
 | 
			
		||||
	User           string `json:"user,omitempty"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
type WhisperResponse struct {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user