_make_custom_tool_output_from_message() — langchain Function Reference
Architecture documentation for the _make_custom_tool_output_from_message() function in base.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 19a91a7c_09b7_1e12_cab8_29322483cdfd["_make_custom_tool_output_from_message()"] 2b046911_ea21_8e2e_ba0d_9d03da8d7bda["base.py"] 19a91a7c_09b7_1e12_cab8_29322483cdfd -->|defined in| 2b046911_ea21_8e2e_ba0d_9d03da8d7bda b988bc7d_ceff_06f1_193c_a22abc7a149f["_construct_responses_api_input()"] b988bc7d_ceff_06f1_193c_a22abc7a149f -->|calls| 19a91a7c_09b7_1e12_cab8_29322483cdfd style 19a91a7c_09b7_1e12_cab8_29322483cdfd fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/openai/langchain_openai/chat_models/base.py lines 4070–4088
def _make_custom_tool_output_from_message(message: ToolMessage) -> dict | None:
custom_tool_output = None
for block in message.content:
if isinstance(block, dict) and block.get("type") == "custom_tool_call_output":
custom_tool_output = {
"type": "custom_tool_call_output",
"call_id": message.tool_call_id,
"output": block.get("output") or "",
}
break
if (
isinstance(block, dict)
and block.get("type") == "non_standard"
and block.get("value", {}).get("type") == "custom_tool_call_output"
):
custom_tool_output = block["value"]
break
return custom_tool_output
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does _make_custom_tool_output_from_message() do?
_make_custom_tool_output_from_message() is a function in the langchain codebase, defined in libs/partners/openai/langchain_openai/chat_models/base.py.
Where is _make_custom_tool_output_from_message() defined?
_make_custom_tool_output_from_message() is defined in libs/partners/openai/langchain_openai/chat_models/base.py at line 4070.
What calls _make_custom_tool_output_from_message()?
_make_custom_tool_output_from_message() is called by 1 function(s): _construct_responses_api_input.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free