_lc_tool_call_to_openai_tool_call() — langchain Function Reference
Architecture documentation for the _lc_tool_call_to_openai_tool_call() function in base.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 61a7b00c_e050_782c_9b96_1375acca1541["_lc_tool_call_to_openai_tool_call()"] 2b046911_ea21_8e2e_ba0d_9d03da8d7bda["base.py"] 61a7b00c_e050_782c_9b96_1375acca1541 -->|defined in| 2b046911_ea21_8e2e_ba0d_9d03da8d7bda fd643003_13df_3a67_6bdc_07576981e414["_convert_message_to_dict()"] fd643003_13df_3a67_6bdc_07576981e414 -->|calls| 61a7b00c_e050_782c_9b96_1375acca1541 style 61a7b00c_e050_782c_9b96_1375acca1541 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/openai/langchain_openai/chat_models/base.py lines 3494–3502
def _lc_tool_call_to_openai_tool_call(tool_call: ToolCall) -> dict:
return {
"type": "function",
"id": tool_call["id"],
"function": {
"name": tool_call["name"],
"arguments": json.dumps(tool_call["args"], ensure_ascii=False),
},
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does _lc_tool_call_to_openai_tool_call() do?
_lc_tool_call_to_openai_tool_call() is a function in the langchain codebase, defined in libs/partners/openai/langchain_openai/chat_models/base.py.
Where is _lc_tool_call_to_openai_tool_call() defined?
_lc_tool_call_to_openai_tool_call() is defined in libs/partners/openai/langchain_openai/chat_models/base.py at line 3494.
What calls _lc_tool_call_to_openai_tool_call()?
_lc_tool_call_to_openai_tool_call() is called by 1 function(s): _convert_message_to_dict.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free