Fixed a bug for "detail" attribute in input image (#685)
When an input image is given as input, the code tries to access the 'detail' key, that may not be present as noted in #159. With this pull request, now it tries to access the key, otherwise set the value to `None`. @pakrym-oai or @rm-openai let me know if you want any changes.
This commit is contained in:
parent
f9763495b8
commit
2c46dae377
1 changed files with 1 additions and 1 deletions
|
|
@ -234,7 +234,7 @@ class Converter:
|
||||||
type="image_url",
|
type="image_url",
|
||||||
image_url={
|
image_url={
|
||||||
"url": casted_image_param["image_url"],
|
"url": casted_image_param["image_url"],
|
||||||
"detail": casted_image_param["detail"],
|
"detail": casted_image_param.get("detail", "auto"),
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue