DSPy: The framework for programming—not prompting—language models
Python
ruff
Omar Khattabf4190e151917
diff --git a/dspy/predict/react.py b/dspy/predict/react.pyindex 03a1b7004..e358abd46 100644--- a/dspy/predict/react.py+++ b/dspy/predict/react.py@@ -97,7 +97,7 @@ class ReAct(Module):# Handle the case where 'passages' attribute is missingoutput[f"Observation_{hop+1}"] = getattr(result, "passages", result)- except Exception as e:+ except Exception:output[f"Observation_{hop+1}"] = ("Failed to parse action. Bad formatting or incorrect action name.")