DSPy: The framework for programming—not prompting—language models
Python
Add message for assert
Tom Dörr3d4c20814f5b
diff --git a/dspy/predict/multi_chain_comparison.py b/dspy/predict/multi_chain_comparison.pyindex 37b66afad..30a5dff5a 100644--- a/dspy/predict/multi_chain_comparison.py+++ b/dspy/predict/multi_chain_comparison.py@@ -42,7 +42,7 @@ class MultiChainComparison(Module):f"«I'm trying to {rationale} I'm not sure but my prediction is {answer}»",)- assert len(attempts) == self.M, len(attempts)+ assert len(attempts) == self.M, len(attempts), f"The number of attempts ({len(attempts)}) doesn't match the expected number M ({self.M}). Please set the correct value for M when initializing MultiChainComparison."kwargs = {**{