Open
Description
If you configure the LM (dspy.settings.configure(lm=lm)
) before initializing your modules you get a different prompt to if you configure your LM after initializing your modules.
dspy.settings.configure(lm=lm)
pot = ChainOfThought(BasicQA)
Adds "reasoning" to the output signature.
pot = ChainOfThought(BasicQA)
dspy.settings.configure(lm=lm)
Adds "rationale" to the output signature.
Think its because the dspy.settings.lm
is referenced in ChainOfThought.__init__
:
# Add "rationale" field to the output signature.
if isinstance(dspy.settings.lm, dspy.LM):
extended_signature = signature.prepend("reasoning", rationale_type, type_=str)
else:
extended_signature = signature.prepend("rationale", rationale_type, type_=str)
Maybe something to flag in migration docs or just to be aware of before this logic is removed when dsp.LM
is removed.
Metadata
Metadata
Assignees
Labels
No labels