Skip to content

Commit

Permalink
Deprecate LLMSymbolicMath from langchain core (#11615)
Browse files Browse the repository at this point in the history
Deprecate LLMSymbolicMath from langchain core package.
  • Loading branch information
eyurtsev authored Oct 10, 2023
1 parent 59adead commit b56ca0c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 301 deletions.
22 changes: 10 additions & 12 deletions libs/langchain/langchain/chains/llm_symbolic_math/__init__.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
"""Chain that interprets a prompt and executes python code to do math.
def raise_on_import() -> None:
"""Raise an error on import since is deprecated."""
raise ImportError(
"This module has been moved to langchain-experimental. "
"For more details: https://github.com/langchain-ai/langchain/discussions/11352."
"To access this code, install it with `pip install langchain-experimental`."
"`from langchain_experimental.llm_symbolic_math.base "
"import LLMSymbolicMathChain`"
)

Heavily borrowed from llm_math, wrapper for SymPy
"""
from langchain._api import warn_deprecated

warn_deprecated(
since="0.0.304",
message=(
"On 2023-10-06 this module will be moved to langchain-experimental as "
"it relies on sympy https://github.com/sympy/sympy/issues/10805"
),
pending=True,
)
raise_on_import()
156 changes: 0 additions & 156 deletions libs/langchain/langchain/chains/llm_symbolic_math/base.py

This file was deleted.

51 changes: 0 additions & 51 deletions libs/langchain/langchain/chains/llm_symbolic_math/prompt.py

This file was deleted.

82 changes: 0 additions & 82 deletions libs/langchain/tests/unit_tests/chains/test_llm_symbolic_math.py

This file was deleted.

0 comments on commit b56ca0c

Please sign in to comment.