Skip to content
New issue

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

Fix "invalidPayload" error when request Azure dall-e-3 api without optional parameter #764

Merged
merged 3 commits into from
Dec 3, 2023

Conversation

simulacraliasing
Copy link
Contributor

Based on #754
I noticed the "omitempty" missing in optional (as official api ref said) request parameters of ImageRequest struct in relay.go.

The 'invalidPayload' error from Azure disappeared after adding 'omitempty' in the struct.

closes: #763

@songquanpeng songquanpeng merged commit 8f5b835 into songquanpeng:main Dec 3, 2023
@songquanpeng
Copy link
Owner

Thx~

dirname pushed a commit to dirname/one-api that referenced this pull request Dec 22, 2023
…ut optional parameter (songquanpeng#764)

* fix: based on songquanpeng#754 add 'omitempty' in ImageRequest to fit official api reference for relay

* Revert "fix: based on songquanpeng#754 add 'omitempty' in ImageRequest to fit official api reference for relay"

This reverts commit b526006.

* fix: add missing omitempty

---------

Co-authored-by: JustSong <songquanpeng@foxmail.com>
greeeds pushed a commit to greeeds/one-api that referenced this pull request Mar 3, 2024
…ut optional parameter (songquanpeng#764)

* fix: based on songquanpeng#754 add 'omitempty' in ImageRequest to fit official api reference for relay

* Revert "fix: based on songquanpeng#754 add 'omitempty' in ImageRequest to fit official api reference for relay"

This reverts commit b526006.

* fix: add missing omitempty

---------

Co-authored-by: JustSong <songquanpeng@foxmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"invalidPayload" error when using Azure api dall-e-3 model
2 participants