copy() — langchain Function Reference
Architecture documentation for the copy() function in graph.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD f87c1ed6_b569_98a8_6084_9f7857a4fa39["copy()"] 2beebca5_04a9_fb02_6662_6a2b98ab5e76["Edge"] f87c1ed6_b569_98a8_6084_9f7857a4fa39 -->|defined in| 2beebca5_04a9_fb02_6662_6a2b98ab5e76 3db09069_0f77_1402_7f96_14d549abbd03["copy()"] 3db09069_0f77_1402_7f96_14d549abbd03 -->|calls| f87c1ed6_b569_98a8_6084_9f7857a4fa39 3db09069_0f77_1402_7f96_14d549abbd03["copy()"] f87c1ed6_b569_98a8_6084_9f7857a4fa39 -->|calls| 3db09069_0f77_1402_7f96_14d549abbd03 style f87c1ed6_b569_98a8_6084_9f7857a4fa39 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/langchain_core/runnables/graph.py lines 75–90
def copy(self, *, source: str | None = None, target: str | None = None) -> Edge:
"""Return a copy of the edge with optional new source and target nodes.
Args:
source: The new source node id.
target: The new target node id.
Returns:
A copy of the edge with the new source and target nodes.
"""
return Edge(
source=source or self.source,
target=target or self.target,
data=self.data,
conditional=self.conditional,
)
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does copy() do?
copy() is a function in the langchain codebase, defined in libs/core/langchain_core/runnables/graph.py.
Where is copy() defined?
copy() is defined in libs/core/langchain_core/runnables/graph.py at line 75.
What does copy() call?
copy() calls 1 function(s): copy.
What calls copy()?
copy() is called by 1 function(s): copy.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free