Home / Function/ json_schema() — langchain Function Reference

json_schema() — langchain Function Reference

Architecture documentation for the json_schema() function in test_chat_models.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  7a697c07_5e49_51ea_f723_01fc98ad19f7["json_schema()"]
  18428dc5_a41b_90c6_88ad_615296ee3311["test_chat_models.py"]
  7a697c07_5e49_51ea_f723_01fc98ad19f7 -->|defined in| 18428dc5_a41b_90c6_88ad_615296ee3311
  style 7a697c07_5e49_51ea_f723_01fc98ad19f7 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/anthropic/tests/unit_tests/test_chat_models.py lines 464–478

def json_schema() -> dict:
    return {
        "title": "dummy_function",
        "description": "Dummy function.",
        "type": "object",
        "properties": {
            "arg1": {"description": "foo", "type": "integer"},
            "arg2": {
                "description": "one of 'bar', 'baz'",
                "enum": ["bar", "baz"],
                "type": "string",
            },
        },
        "required": ["arg1", "arg2"],
    }

Domain

Subdomains

Frequently Asked Questions

What does json_schema() do?
json_schema() is a function in the langchain codebase, defined in libs/partners/anthropic/tests/unit_tests/test_chat_models.py.
Where is json_schema() defined?
json_schema() is defined in libs/partners/anthropic/tests/unit_tests/test_chat_models.py at line 464.

Analyze Your Own Codebase

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

Try Supermodel Free