__getattr__() — langchain Function Reference
Architecture documentation for the __getattr__() function in __init__.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 8a138d08_c84b_8b70_bb5f_c18ba13e342f["__getattr__()"] 134b09a6_9f28_b79b_4cd8_58fd34194d2f["__init__.py"] 8a138d08_c84b_8b70_bb5f_c18ba13e342f -->|defined in| 134b09a6_9f28_b79b_4cd8_58fd34194d2f style 8a138d08_c84b_8b70_bb5f_c18ba13e342f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/langchain_classic/agents/agent_toolkits/__init__.py lines 118–131
def __getattr__(name: str) -> Any:
"""Get attr name."""
if name in DEPRECATED_AGENTS:
relative_path = as_import_path(Path(__file__).parent, suffix=name)
old_path = "langchain_classic." + relative_path
new_path = "langchain_experimental." + relative_path
msg = (
f"{name} has been moved to langchain_experimental. "
"See https://github.com/langchain-ai/langchain/discussions/11680"
"for more information.\n"
f"Please update your import statement from: `{old_path}` to `{new_path}`."
)
raise ImportError(msg)
return _import_attribute(name)
Domain
Subdomains
Source
Frequently Asked Questions
What does __getattr__() do?
__getattr__() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/agents/agent_toolkits/__init__.py.
Where is __getattr__() defined?
__getattr__() is defined in libs/langchain/langchain_classic/agents/agent_toolkits/__init__.py at line 118.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free