run_copy() — langchain Function Reference
Architecture documentation for the run_copy() function in _compat.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 9452f700_3426_c78b_03cf_fb013e09791c["run_copy()"] 75bf479b_1332_0b5c_5710_656c22821d19["_compat.py"] 9452f700_3426_c78b_03cf_fb013e09791c -->|defined in| 75bf479b_1332_0b5c_5710_656c22821d19 style 9452f700_3426_c78b_03cf_fb013e09791c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/langchain_core/tracers/_compat.py lines 39–51
def run_copy(run: Run, **kwargs: Any) -> Run:
"""Copy run, compatible with both Pydantic v1 and v2.
Args:
run: The run to copy.
**kwargs: Additional arguments passed to `model_copy`/`copy`.
Returns:
A copy of the run.
"""
if _RUN_IS_PYDANTIC_V2:
return run.model_copy(**kwargs)
return run.copy(**kwargs) # type: ignore[deprecated]
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does run_copy() do?
run_copy() is a function in the langchain codebase, defined in libs/core/langchain_core/tracers/_compat.py.
Where is run_copy() defined?
run_copy() is defined in libs/core/langchain_core/tracers/_compat.py at line 39.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free