From 8b9cd2f6d6ccca35ed9b6291ab667c5c90bb779a Mon Sep 17 00:00:00 2001 From: qbc Date: Mon, 11 Nov 2024 20:12:36 +0800 Subject: [PATCH] hitfix --- src/agentscope/studio/tools/condition_operator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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,