Home / Function/ _get_type() — langchain Function Reference

_get_type() — langchain Function Reference

Architecture documentation for the _get_type() function in experimental.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  d9058760_f9cc_3da0_3a92_1bff684072de["_get_type()"]
  ce9a5118_b2cf_f25f_fad5_ea15575e8265["experimental.py"]
  d9058760_f9cc_3da0_3a92_1bff684072de -->|defined in| ce9a5118_b2cf_f25f_fad5_ea15575e8265
  20030fef_5e64_fdb1_381b_8e6e638220f6["get_system_message()"]
  20030fef_5e64_fdb1_381b_8e6e638220f6 -->|calls| d9058760_f9cc_3da0_3a92_1bff684072de
  style d9058760_f9cc_3da0_3a92_1bff684072de fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/anthropic/langchain_anthropic/experimental.py lines 43–50

def _get_type(parameter: dict[str, Any]) -> str:
    if "type" in parameter:
        return parameter["type"]
    if "anyOf" in parameter:
        return json.dumps({"anyOf": parameter["anyOf"]})
    if "allOf" in parameter:
        return json.dumps({"allOf": parameter["allOf"]})
    return json.dumps(parameter)

Domain

Subdomains

Frequently Asked Questions

What does _get_type() do?
_get_type() is a function in the langchain codebase, defined in libs/partners/anthropic/langchain_anthropic/experimental.py.
Where is _get_type() defined?
_get_type() is defined in libs/partners/anthropic/langchain_anthropic/experimental.py at line 43.
What calls _get_type()?
_get_type() is called by 1 function(s): get_system_message.

Analyze Your Own Codebase

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

Try Supermodel Free