Skip to content

Commit 0bb9526

Browse files
Merge pull request #1630 from stanfordnlp/multi_chain_patch
add support for reasoning/rationale
2 parents 6c6db52 + fb907fc commit 0bb9526

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
@@ -36,7 +36,7 @@ def forward(self, completions, **kwargs):
3636
attempts = []
3737

3838
for c in completions:
39-
rationale = c.rationale.strip().split("\n")[0].strip()
39+
rationale = c.get('rationale', c.get('reasoning')).strip().split("\n")[0].strip()
4040
answer = c[self.last_key].strip().split("\n")[0].strip()
4141
attempts.append(
4242
f"«I'm trying to {rationale} I'm not sure but my prediction is {answer}»",

0 commit comments

Comments
 (0)