translate_content() — langchain Function Reference
Architecture documentation for the translate_content() function in google_genai.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD eca8c6c8_6110_e88d_fe5f_673f61f70bb5["translate_content()"] d24bd624_4204_2ea9_e307_7937b89182bc["google_genai.py"] eca8c6c8_6110_e88d_fe5f_673f61f70bb5 -->|defined in| d24bd624_4204_2ea9_e307_7937b89182bc fd689bd2_1377_f6be_db90_7e66dcadfcce["_convert_to_v1_from_genai()"] eca8c6c8_6110_e88d_fe5f_673f61f70bb5 -->|calls| fd689bd2_1377_f6be_db90_7e66dcadfcce style eca8c6c8_6110_e88d_fe5f_673f61f70bb5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/langchain_core/messages/block_translators/google_genai.py lines 530–539
def translate_content(message: AIMessage) -> list[types.ContentBlock]:
"""Derive standard content blocks from a message with Google (GenAI) content.
Args:
message: The message to translate.
Returns:
The derived content blocks.
"""
return _convert_to_v1_from_genai(message)
Domain
Subdomains
Source
Frequently Asked Questions
What does translate_content() do?
translate_content() is a function in the langchain codebase, defined in libs/core/langchain_core/messages/block_translators/google_genai.py.
Where is translate_content() defined?
translate_content() is defined in libs/core/langchain_core/messages/block_translators/google_genai.py at line 530.
What does translate_content() call?
translate_content() calls 1 function(s): _convert_to_v1_from_genai.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free