Skip to content

Commit 89b21c9

Browse files
committed
Fix linter issues, remove temporary logging
1 parent e7540ba commit 89b21c9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

azure/durable_functions/openai_agents/model_invocation_activity.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,14 +165,14 @@ def to_json(self) -> str:
165165
"""Convert the ActivityModelInput to a JSON string."""
166166
try:
167167
return self.model_dump_json(warnings=False)
168-
except Exception as e:
169-
# logger.warning(f"Failed to serialize ActivityModelInput with warnings='none': {e}")
168+
except Exception:
170169
# Fallback to basic JSON serialization
171170
try:
172171
return json.dumps(self.model_dump(warnings=False), default=str)
173172
except Exception as fallback_error:
174-
logger.error(f"Failed to serialize ActivityModelInput with fallback method: {fallback_error}")
175-
raise ValueError(f"Unable to serialize ActivityModelInput: {fallback_error}") from fallback_error
173+
raise ValueError(
174+
f"Unable to serialize ActivityModelInput: {fallback_error}"
175+
) from fallback_error
176176

177177
@classmethod
178178
def from_json(cls, json_str: str) -> 'ActivityModelInput':

0 commit comments

Comments
 (0)