diff --git a/src/agentscope/studio/tools/condition_operator.py b/src/agentscope/studio/tools/condition_operator.py index 193be9b25..8e27e2f93 100644 --- a/src/agentscope/studio/tools/condition_operator.py +++ b/src/agentscope/studio/tools/condition_operator.py @@ -10,7 +10,8 @@ def eval_condition_operator( ) -> bool: """Eval condition operator only for Msg content or string""" if isinstance(actual_value, Msg): - actual_value = actual_value.get("content", "") + if hasattr(actual_value, "content"): + actual_value = actual_value.content operator_funcs = { "contains": lambda: target_value in actual_value,