-
Notifications
You must be signed in to change notification settings - Fork 6
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
Support LangChain 0.3.0 #14
Conversation
Signed-off-by: B-Step62 <[email protected]>
Signed-off-by: B-Step62 <[email protected]>
@efriis Let me tag you for double-checking if there is anything missing for supporting LangChain |
@@ -225,13 +222,16 @@ class GetPopulation(BaseModel): | |||
"""List of strings to stop generation at.""" | |||
max_tokens: Optional[int] = None | |||
"""The maximum number of tokens to generate.""" | |||
extra_params: dict = Field(default_factory=dict) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: After updating to pydantic v2 import, this field starts to return FieldInfo
object as default value instead of factory. Might be pydantic issue, but I couldn't figure it out the root cause so just using None
as a workaround.
python = ">=3.8.1,<3.12" | ||
langchain-core = "^0.2.35" | ||
mlflow = ">=2.9" | ||
python = ">=3.9,<4.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: The langchain-core
bumps minimum Python version. We need to follow it otherwise poetry
complains.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Update pydantic related logic to be compatible with LangChain 0.3.0.
Testing
Validated on notebook with different env settings: