Skip to content

armgit / dspy

Public Imported from GitHub
0

DSPy: The framework for programming—not prompting—language models

Python

ruff

Omar Khattabf4190e151917
diff --git a/dspy/predict/react.py b/dspy/predict/react.py
index 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 missing
output[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."
)