Home / Function/ _is_pydantic_class() — langchain Function Reference

_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
  a721f74e_a9bc_485c_1015_24805ba9e651["_is_pydantic_class()"]
  6f997c9a_8c58_9d52_c33f_d88978f12eb4["chat_models.py"]
  a721f74e_a9bc_485c_1015_24805ba9e651 -->|defined in| 6f997c9a_8c58_9d52_c33f_d88978f12eb4
  dc1fc791_1a25_e86b_f626_e8a7105a996c["with_structured_output()"]
  dc1fc791_1a25_e86b_f626_e8a7105a996c -->|calls| a721f74e_a9bc_485c_1015_24805ba9e651
  style a721f74e_a9bc_485c_1015_24805ba9e651 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/perplexity/langchain_perplexity/chat_models.py lines 73–74

def _is_pydantic_class(obj: Any) -> bool:
    return isinstance(obj, type) and is_basemodel_subclass(obj)

Domain

Subdomains

Frequently Asked Questions

What does _is_pydantic_class() do?
_is_pydantic_class() is a function in the langchain codebase, defined in libs/partners/perplexity/langchain_perplexity/chat_models.py.
Where is _is_pydantic_class() defined?
_is_pydantic_class() is defined in libs/partners/perplexity/langchain_perplexity/chat_models.py at line 73.
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