Home / Function/ pydantic() — langchain Function Reference

pydantic() — langchain Function Reference

Architecture documentation for the pydantic() function in test_function_calling.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  ec38ad00_a696_77d3_c91e_4bee84885836["pydantic()"]
  6f1e8e6f_d3f9_e590_b17e_1dc8afafdbe0["test_function_calling.py"]
  ec38ad00_a696_77d3_c91e_4bee84885836 -->|defined in| 6f1e8e6f_d3f9_e590_b17e_1dc8afafdbe0
  a4ca20e5_25b3_5f62_a528_dd4d93e14cff["dummy_function()"]
  ec38ad00_a696_77d3_c91e_4bee84885836 -->|calls| a4ca20e5_25b3_5f62_a528_dd4d93e14cff
  style ec38ad00_a696_77d3_c91e_4bee84885836 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/utils/test_function_calling.py lines 39–46

def pydantic() -> type[BaseModel]:
    class dummy_function(BaseModel):  # noqa: N801
        """Dummy function."""

        arg1: int = Field(..., description="foo")
        arg2: Literal["bar", "baz"] = Field(..., description="one of 'bar', 'baz'")

    return dummy_function

Domain

Subdomains

Frequently Asked Questions

What does pydantic() do?
pydantic() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/utils/test_function_calling.py.
Where is pydantic() defined?
pydantic() is defined in libs/core/tests/unit_tests/utils/test_function_calling.py at line 39.
What does pydantic() call?
pydantic() calls 1 function(s): dummy_function.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free