Skip to content

armgit / dspy

Public Imported from GitHub
0

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

Python

switch shortcircuit

Herumb Shandilya138f0410af76
diff --git a/dspy/functional/functional.py b/dspy/functional/functional.py
index cf2fe6977..c7c4239d9 100644
--- a/dspy/functional/functional.py
+++ b/dspy/functional/functional.py
@@ -62,7 +62,7 @@ def TypedChainOfThought(signature, instructions=None, rationale_type=None, *, ma
prefix="Rationale: Let's think step by step in order to",
desc="${produce the " + output_keys + "}. We ...",
)
- rationale_type = rationale_type or DEFAULT_RATIONALE
+ rationale_type = DEFAULT_RATIONALE or rationale_type
return TypedPredictor(
signature.prepend(