diff --git a/src/dfcx_scrapi/core/scrapi_base.py b/src/dfcx_scrapi/core/scrapi_base.py index b8b826f1..343b36cb 100644 --- a/src/dfcx_scrapi/core/scrapi_base.py +++ b/src/dfcx_scrapi/core/scrapi_base.py @@ -232,7 +232,7 @@ def dict_to_struct(some_dict: Dict[str, Any]): def str_to_dict(some_str: str) -> Dict[str, Any]: """Safe convert str to Dict or fail.""" try: - return json.loads(some_str) + return json.loads(some_str) except json.JSONDecodeError as err: raise ValueError(f"Invalid JSON string: `{some_str}`") from err diff --git a/src/dfcx_scrapi/tools/evaluations.py b/src/dfcx_scrapi/tools/evaluations.py index 0f415dae..173bdd08 100644 --- a/src/dfcx_scrapi/tools/evaluations.py +++ b/src/dfcx_scrapi/tools/evaluations.py @@ -392,7 +392,7 @@ def run_detect_intent_queries(self, df: pd.DataFrame) -> pd.DataFrame: if row["action_type"] != "User Utterance": continue - session_parameters = None + session_parameters = None if "session_parameters" in row: session_parameters = self.str_to_dict(row["session_parameters"])