mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-06-17 08:13:56 +00:00
fix(providers): allow dropping default OpenAI image params via null extraBody (#4167)
This commit is contained in:
parent
73353785a0
commit
a4cf0f9514
@ -996,6 +996,8 @@ class OpenAIImageGenerationClient(ImageGenerationProvider):
|
|||||||
body["size"] = size
|
body["size"] = size
|
||||||
|
|
||||||
body.update(self.extra_body)
|
body.update(self.extra_body)
|
||||||
|
# Drop null-valued params so extraBody can opt out of defaults like response_format.
|
||||||
|
body = {key: value for key, value in body.items() if value is not None}
|
||||||
|
|
||||||
logger.info("OpenAI Images API request: POST {}/images/generations body={}", self.api_base, body)
|
logger.info("OpenAI Images API request: POST {}/images/generations body={}", self.api_base, body)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user