File tree Expand file tree Collapse file tree 4 files changed +79
-8
lines changed Expand file tree Collapse file tree 4 files changed +79
-8
lines changed Original file line number Diff line number Diff line change 1
- # Backwards compatibility.
1
+ """
2
+ This module provides backward-compatible exports of core language model classes.
3
+
4
+ These classes are re-exported for compatibility with older versions of LangChain
5
+ and allow users to import language model interfaces from a stable path.
6
+
7
+ Exports:
8
+ - LLM: Abstract base class for all LLMs
9
+ - BaseLLM: Deprecated or foundational class for legacy LLMs
10
+ - BaseLanguageModel: Base class for core language model implementations
11
+ """
12
+
2
13
from langchain_core .language_models import BaseLanguageModel
3
- from langchain_core .language_models .llms import (
4
- LLM ,
5
- BaseLLM ,
6
- )
14
+ from langchain_core .language_models .llms import LLM , BaseLLM
7
15
8
16
__all__ = [
9
17
"LLM" ,
Original file line number Diff line number Diff line change
1
+ """
2
+ This module provides dynamic access to deprecated Jira tools.
3
+
4
+ When attributes like `JiraAction` are accessed, they are redirected to their new
5
+ locations in `langchain_community.tools`. This ensures backward compatibility
6
+ while warning developers about deprecation.
7
+
8
+ Attributes:
9
+ JiraAction (deprecated): Dynamically loaded from langchain_community.tools.
10
+ """
11
+
1
12
from typing import TYPE_CHECKING , Any
2
13
3
14
from langchain ._api import create_importer
14
25
15
26
16
27
def __getattr__ (name : str ) -> Any :
17
- """Look up attributes dynamically."""
28
+ """
29
+ Dynamically retrieve attributes from the updated module path.
30
+
31
+ Args:
32
+ name (str): The name of the attribute to import.
33
+
34
+ Returns:
35
+ Any: The resolved attribute from the updated path.
36
+ """
18
37
return _import_attribute (name )
19
38
20
39
Original file line number Diff line number Diff line change
1
+ """
2
+ This module provides dynamic access to deprecated JSON tools in LangChain.
3
+
4
+ It ensures backward compatibility by forwarding references such as
5
+ `JsonGetValueTool`, `JsonListKeysTool`, and `JsonSpec` to their updated
6
+ locations within the `langchain_community.tools` namespace.
7
+
8
+ This setup allows legacy code to continue working while guiding developers
9
+ toward using the updated module paths.
10
+ """
11
+
1
12
from typing import TYPE_CHECKING , Any
2
13
3
14
from langchain ._api import create_importer
19
30
20
31
21
32
def __getattr__ (name : str ) -> Any :
22
- """Look up attributes dynamically."""
33
+ """
34
+ Dynamically retrieve attributes from the updated module path.
35
+
36
+ This method is used to resolve deprecated attribute imports
37
+ at runtime and forward them to their new locations.
38
+
39
+ Args:
40
+ name (str): The name of the attribute to import.
41
+
42
+ Returns:
43
+ Any: The resolved attribute from the appropriate updated module.
44
+ """
23
45
return _import_attribute (name )
24
46
25
47
Original file line number Diff line number Diff line change
1
+ """
2
+ This module provides dynamic access to deprecated Zapier tools in LangChain.
3
+
4
+ It supports backward compatibility by forwarding references such as
5
+ `ZapierNLAListActions` and `ZapierNLARunAction` to their updated locations
6
+ in the `langchain_community.tools` package.
7
+
8
+ Developers using older import paths will continue to function, while LangChain
9
+ internally redirects access to the newer, supported module structure.
10
+ """
11
+
1
12
from typing import TYPE_CHECKING , Any
2
13
3
14
from langchain ._api import create_importer
17
28
18
29
19
30
def __getattr__ (name : str ) -> Any :
20
- """Look up attributes dynamically."""
31
+ """
32
+ Dynamically retrieve attributes from the updated module path.
33
+
34
+ This method is used to resolve deprecated attribute imports
35
+ at runtime and forward them to their new locations.
36
+
37
+ Args:
38
+ name (str): The name of the attribute to import.
39
+
40
+ Returns:
41
+ Any: The resolved attribute from the appropriate updated module.
42
+ """
21
43
return _import_attribute (name )
22
44
23
45
You can’t perform that action at this time.
0 commit comments