Skip to content

Commit 747edc1

Browse files
authored
Merge pull request stanfordnlp#1105 from tom-doerr/patch-16
Add message for assert
2 parents 59625ab + 7d98ed2 commit 747edc1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dspy/predict/multi_chain_comparison.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def forward(self, completions, **kwargs):
4242
f"«I'm trying to {rationale} I'm not sure but my prediction is {answer}»",
4343
)
4444

45-
assert len(attempts) == self.M, len(attempts)
45+
assert len(attempts) == self.M, 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."
4646

4747
kwargs = {
4848
**{

0 commit comments

Comments
 (0)