Home / Function/ translate_content_chunk() — langchain Function Reference

translate_content_chunk() — langchain Function Reference

Architecture documentation for the translate_content_chunk() function in google_genai.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  f4f1d3a2_f4db_b446_8619_acdeb99b255f["translate_content_chunk()"]
  d24bd624_4204_2ea9_e307_7937b89182bc["google_genai.py"]
  f4f1d3a2_f4db_b446_8619_acdeb99b255f -->|defined in| d24bd624_4204_2ea9_e307_7937b89182bc
  fd689bd2_1377_f6be_db90_7e66dcadfcce["_convert_to_v1_from_genai()"]
  f4f1d3a2_f4db_b446_8619_acdeb99b255f -->|calls| fd689bd2_1377_f6be_db90_7e66dcadfcce
  style f4f1d3a2_f4db_b446_8619_acdeb99b255f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/messages/block_translators/google_genai.py lines 542–551

def translate_content_chunk(message: AIMessageChunk) -> list[types.ContentBlock]:
    """Derive standard content blocks from a chunk with Google (GenAI) content.

    Args:
        message: The message chunk to translate.

    Returns:
        The derived content blocks.
    """
    return _convert_to_v1_from_genai(message)

Domain

Subdomains

Frequently Asked Questions

What does translate_content_chunk() do?
translate_content_chunk() is a function in the langchain codebase, defined in libs/core/langchain_core/messages/block_translators/google_genai.py.
Where is translate_content_chunk() defined?
translate_content_chunk() is defined in libs/core/langchain_core/messages/block_translators/google_genai.py at line 542.
What does translate_content_chunk() call?
translate_content_chunk() 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