_is_pydantic_class() — langchain Function Reference
Architecture documentation for the _is_pydantic_class() function in chat_models.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 833edee0_b6a7_157f_ee72_19c9e88c7dfc["_is_pydantic_class()"] 5b41b5a0_b415_2ecd_9522_191ca69202ca["chat_models.py"] 833edee0_b6a7_157f_ee72_19c9e88c7dfc -->|defined in| 5b41b5a0_b415_2ecd_9522_191ca69202ca e8d6a68e_9c70_dc39_2fed_312e948801f8["with_structured_output()"] e8d6a68e_9c70_dc39_2fed_312e948801f8 -->|calls| 833edee0_b6a7_157f_ee72_19c9e88c7dfc style 833edee0_b6a7_157f_ee72_19c9e88c7dfc fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/ollama/langchain_ollama/chat_models.py lines 256–257
def _is_pydantic_class(obj: Any) -> bool:
return isinstance(obj, type) and is_basemodel_subclass(obj)
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does _is_pydantic_class() do?
_is_pydantic_class() is a function in the langchain codebase, defined in libs/partners/ollama/langchain_ollama/chat_models.py.
Where is _is_pydantic_class() defined?
_is_pydantic_class() is defined in libs/partners/ollama/langchain_ollama/chat_models.py at line 256.
What calls _is_pydantic_class()?
_is_pydantic_class() is called by 1 function(s): with_structured_output.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free