dspy
dspy copied to clipboard
Langchain Integration Broken on Change in dspy.signatures.field
OutputField no longer has .finalize() method.
hack.... in dspy/predict/langchain.py
Replace: from dspy.signatures.field import InputField, OutputField
With: from dspy.signatures.field import OldInputField as InputField, OldOutputField as OutputField
Im sure this probably breaks something else....
Hi @mkotlarz , thanks for raising this. InputField
and OutputField
were migrated to using Pydantic types, no longer using finalize
to set the prefix. . It seems like we need to make this change to langchain.py as well. Does removing those lines and keeping the original field imports resolve the issue for you? If so, feel free to push a PR so we can merge this correction!