-
Notifications
You must be signed in to change notification settings - Fork 15.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TransformChain wrong function types, enforced since 0.0.267 #9440
Comments
@mpartel do you know what version of pydantic this was happening with? |
2.2.1 Just tested with a fresh project:
|
for debugging purposes, could you try installing pydantic v1 (e.g. |
Pydantic < 2 had no effect:
Both errors stayed the same. (Sanity-checked: even with Pydantic 1, |
Hi, @mpartel! I'm Dosu, and I'm helping the LangChain team manage their backlog. I wanted to let you know that we are marking this issue as stale. From what I understand, the issue you reported is about two type checking problems in the TransformChain library. The Before we close this issue, we wanted to check with you if it is still relevant to the latest version of the LangChain repository. If it is, please let us know by commenting on the issue. Otherwise, feel free to close the issue yourself, or it will be automatically closed in 7 days. Thank you for your contribution to the LangChain repository! |
System Info
LangChain 0.0.267, Python 3.10, Poetry virtualenv, Pop_OS 22.04
Who can help?
@agola11
Information
Related Components
Reproduction
Expected behavior
Two type checking issues since 0.0.267:
transform
should probably take/returndict[str, Any]
instead ofdict[str, str]
(likeatransform
does)atransfrom
should probably not be mandatoryMost other code seems to use
Dict[str, Any]
, and non-string values seem to work just fine.Prior to
0.0.267
the type system didn't enforce the type oftransform
when constructingTransformChain
. It also started requiring anatransform
parameter even though it seems to be intended to be optional.The text was updated successfully, but these errors were encountered: