docs/how_to/pydantic_compatibility/ #27463
Replies: 3 comments 2 replies
-
Hey, my Programm isn't working anymore, after updating Langchain. I am using kor. Kor is using pydantic. How can I get help to get it running again? |
Beta Was this translation helpful? Give feedback.
-
import os if name=="main":
The above code is failling with below error: pydantic_core._pydantic_core.ValidationError: 2 validation errors for GenerateRequest |
Beta Was this translation helpful? Give feedback.
-
My env has pydantic==2.9.2 installed and I was earlier using both pydantic and pydantic.v1 models in different packages. Now after upgrading to langchain==0.3, I am seeing validation errors even in packages that don't directly interact with langchain. The testcases were failing at the collection stage itself with errors like:
If pydantic.v1 and v2 can co-exist earlier, why is the langchain upgrade breaking it? Is this expected? |
Beta Was this translation helpful? Give feedback.
-
docs/how_to/pydantic_compatibility/
As of the 0.3 release, LangChain uses Pydantic 2 internally.
https://python.langchain.com/docs/how_to/pydantic_compatibility/
Beta Was this translation helpful? Give feedback.
All reactions