dspy/deprecated-two-step-adapter
| Pack | Severity | Fix | Versions |
|---|---|---|---|
| DSPy | warning | none, edit by hand | All versions |
dspy.TwoStepAdapter is deprecated in DSPy 3.5 and will be removed in DSPy 3.6.
adapter = dspy.TwoStepAdapter(extraction_lm)adapter = dspy.JSONAdapter()What the rule reports
Section titled “What the rule reports”Calls to TwoStepAdapter(...) through a module attribute or direct import in files that import dspy.
How to fix it
Section titled “How to fix it”Use dspy.JSONAdapter() for models that support structured outputs, or dspy.XMLAdapter() for models that do not.
Diagnostic message
Section titled “Diagnostic message”dspy.TwoStepAdapter is deprecated in DSPy 3.5 and will be removed in 3.6. Use dspy.JSONAdapter() for structured outputs or dspy.XMLAdapter() otherwise.See all rules in the DSPy pack.