get_pydantic_major_version() — langchain Function Reference
Architecture documentation for the get_pydantic_major_version() function in pydantic.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD f2a34cfe_7743_8f8a_7dc5_3cfc6ac41479["get_pydantic_major_version()"] 1a3a8457_aa49_1ce8_ded1_18ccc8906161["pydantic.py"] f2a34cfe_7743_8f8a_7dc5_3cfc6ac41479 -->|defined in| 1a3a8457_aa49_1ce8_ded1_18ccc8906161 f2a34cfe_7743_8f8a_7dc5_3cfc6ac41479["get_pydantic_major_version()"] f2a34cfe_7743_8f8a_7dc5_3cfc6ac41479 -->|calls| f2a34cfe_7743_8f8a_7dc5_3cfc6ac41479 f2a34cfe_7743_8f8a_7dc5_3cfc6ac41479["get_pydantic_major_version()"] f2a34cfe_7743_8f8a_7dc5_3cfc6ac41479 -->|calls| f2a34cfe_7743_8f8a_7dc5_3cfc6ac41479 style f2a34cfe_7743_8f8a_7dc5_3cfc6ac41479 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/standard-tests/langchain_tests/utils/pydantic.py lines 4–11
def get_pydantic_major_version() -> int:
"""Get the major version of Pydantic."""
try:
import pydantic # noqa: PLC0415
return int(pydantic.__version__.split(".")[0])
except ImportError:
return 0
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does get_pydantic_major_version() do?
get_pydantic_major_version() is a function in the langchain codebase, defined in libs/standard-tests/langchain_tests/utils/pydantic.py.
Where is get_pydantic_major_version() defined?
get_pydantic_major_version() is defined in libs/standard-tests/langchain_tests/utils/pydantic.py at line 4.
What does get_pydantic_major_version() call?
get_pydantic_major_version() calls 1 function(s): get_pydantic_major_version.
What calls get_pydantic_major_version()?
get_pydantic_major_version() is called by 1 function(s): get_pydantic_major_version.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free