_use_responses_api() — langchain Function Reference
Architecture documentation for the _use_responses_api() function in base.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD b361240a_f3ce_9c3b_a1c7_b266eab54259["_use_responses_api()"] 2b046911_ea21_8e2e_ba0d_9d03da8d7bda["base.py"] b361240a_f3ce_9c3b_a1c7_b266eab54259 -->|defined in| 2b046911_ea21_8e2e_ba0d_9d03da8d7bda e9866be0_b078_31ff_4159_1d040978b7e3["_use_responses_api()"] e9866be0_b078_31ff_4159_1d040978b7e3 -->|calls| b361240a_f3ce_9c3b_a1c7_b266eab54259 e9866be0_b078_31ff_4159_1d040978b7e3["_use_responses_api()"] b361240a_f3ce_9c3b_a1c7_b266eab54259 -->|calls| e9866be0_b078_31ff_4159_1d040978b7e3 ef893b92_c10c_5b65_ccbd_7ffc6ceb39c2["_is_builtin_tool()"] b361240a_f3ce_9c3b_a1c7_b266eab54259 -->|calls| ef893b92_c10c_5b65_ccbd_7ffc6ceb39c2 style b361240a_f3ce_9c3b_a1c7_b266eab54259 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/openai/langchain_openai/chat_models/base.py lines 3815–3826
def _use_responses_api(payload: dict) -> bool:
uses_builtin_tools = "tools" in payload and any(
_is_builtin_tool(tool) for tool in payload["tools"]
)
responses_only_args = {
"include",
"previous_response_id",
"reasoning",
"text",
"truncation",
}
return bool(uses_builtin_tools or responses_only_args.intersection(payload))
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does _use_responses_api() do?
_use_responses_api() is a function in the langchain codebase, defined in libs/partners/openai/langchain_openai/chat_models/base.py.
Where is _use_responses_api() defined?
_use_responses_api() is defined in libs/partners/openai/langchain_openai/chat_models/base.py at line 3815.
What does _use_responses_api() call?
_use_responses_api() calls 2 function(s): _is_builtin_tool, _use_responses_api.
What calls _use_responses_api()?
_use_responses_api() is called by 1 function(s): _use_responses_api.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free