Skip to content

Commit 2c46dae

Browse files
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.
1 parent f976349 commit 2c46dae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/agents/models/chatcmpl_converter.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ def extract_all_content(
234234
type="image_url",
235235
image_url={
236236
"url": casted_image_param["image_url"],
237-
"detail": casted_image_param["detail"],
237+
"detail": casted_image_param.get("detail", "auto"),
238238
},
239239
)
240240
)

0 commit comments

Comments
 (0)