From 6743d01ed5c8bed234f42ea313fa6ee97ea8e731 Mon Sep 17 00:00:00 2001 From: Aymeric Date: Fri, 10 Jan 2025 21:45:52 +0100 Subject: [PATCH] Formatting --- src/smolagents/types.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/smolagents/types.py b/src/smolagents/types.py index f579e5a..0729b8c 100644 --- a/src/smolagents/types.py +++ b/src/smolagents/types.py @@ -277,7 +277,9 @@ def handle_agent_output_types(output, output_type=None): # If the class does not have defined output, then we map according to the type for _k, _v in INSTANCE_TYPE_MAPPING.items(): if isinstance(output, _k): - if not isinstance(output, object): # avoid converting to audio if torch is not installed + if not isinstance( + output, object + ): # avoid converting to audio if torch is not installed return _v(output) return output