Home / Function/ get_output_jsonschema() — langchain Function Reference

get_output_jsonschema() — langchain Function Reference

Architecture documentation for the get_output_jsonschema() function in base.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  37fd13d7_34ce_8eed_97e7_c56543c90e6c["get_output_jsonschema()"]
  4a62481c_02cb_a5de_1833_50669d5351a6["Runnable"]
  37fd13d7_34ce_8eed_97e7_c56543c90e6c -->|defined in| 4a62481c_02cb_a5de_1833_50669d5351a6
  310f6e6e_dbfb_7eb4_3854_6fc149d866c4["get_output_schema()"]
  37fd13d7_34ce_8eed_97e7_c56543c90e6c -->|calls| 310f6e6e_dbfb_7eb4_3854_6fc149d866c4
  style 37fd13d7_34ce_8eed_97e7_c56543c90e6c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/runnables/base.py lines 490–518

    def get_output_jsonschema(
        self, config: RunnableConfig | None = None
    ) -> dict[str, Any]:
        """Get a JSON schema that represents the output of the `Runnable`.

        Args:
            config: A config to use when generating the schema.

        Returns:
            A JSON schema that represents the output of the `Runnable`.

        Example:
            ```python
            from langchain_core.runnables import RunnableLambda


            def add_one(x: int) -> int:
                return x + 1


            runnable = RunnableLambda(add_one)

            print(runnable.get_output_jsonschema())
            ```

        !!! version-added "Added in `langchain-core` 0.3.0"

        """
        return self.get_output_schema(config).model_json_schema()

Domain

Subdomains

Frequently Asked Questions

What does get_output_jsonschema() do?
get_output_jsonschema() is a function in the langchain codebase, defined in libs/core/langchain_core/runnables/base.py.
Where is get_output_jsonschema() defined?
get_output_jsonschema() is defined in libs/core/langchain_core/runnables/base.py at line 490.
What does get_output_jsonschema() call?
get_output_jsonschema() calls 1 function(s): get_output_schema.

Analyze Your Own Codebase

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

Try Supermodel Free