Skip to content

Commit 04b27f4

Browse files
committed
fix: review comment
1 parent bd46a6a commit 04b27f4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sentry_sdk/integrations/openai.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,9 @@ def _convert_message_parts(messages: "List[Dict[str, Any]]") -> "List[Dict[str,
220220
"""
221221

222222
def _map_item(item: "Dict[str, Any]") -> "Dict[str, Any]":
223+
if not isinstance(item, dict):
224+
return item
225+
223226
if item.get("type") == "image_url":
224227
image_url = item.get("image_url") or {}
225228
url = image_url.get("url", "")
@@ -242,6 +245,7 @@ def _map_item(item: "Dict[str, Any]") -> "Dict[str, Any]":
242245
else:
243246
return {
244247
"type": "uri",
248+
"modality": "image",
245249
"uri": url,
246250
}
247251
return item

0 commit comments

Comments
 (0)