Skip to content

Fix warning: Directly instantiating an LLMMathChain with an llm is deprecated #14

@msoedov

Description

@msoedov

It's reproducible by running pytest

======================================================== warnings summary ========================================================
../../pyenvs/langchain_api/lib/python3.9/site-packages/langchain/chains/llm_math/base.py:50
  /Users/alexander/pyenvs/langchain_api/lib/python3.9/site-packages/langchain/chains/llm_math/base.py:50: UserWarning: Directly instantiating an LLMMathChain with an llm is deprecated. Please instantiate with llm_chain argument or using the from_llm class method.
    warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions