Skip to content

Commit 56f33cc

Browse files
check type
1 parent 11fb6e1 commit 56f33cc

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎sentry_sdk/integrations/mistral.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,9 @@ def _transform_input_messages(
128128
continue
129129

130130
text_parts = [
131-
part for part in content if isinstance(part, dict) and "text" in part
131+
part
132+
for part in content
133+
if isinstance(part, dict) and part.get("type") == "text" and "text" in part
132134
]
133135
input_messages.append(
134136
{

0 commit comments

Comments
 (0)