Home / Function/ translate_content() — langchain Function Reference

translate_content() — langchain Function Reference

Architecture documentation for the translate_content() function in bedrock_converse.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  fb254d8d_a16f_a23f_aa8b_dbd5eabe3cbf["translate_content()"]
  4f830f44_a777_e9e4_dc82_3b3b61033802["bedrock_converse.py"]
  fb254d8d_a16f_a23f_aa8b_dbd5eabe3cbf -->|defined in| 4f830f44_a777_e9e4_dc82_3b3b61033802
  58049150_fae0_b4d0_089a_5bc619fc4036["_convert_to_v1_from_converse()"]
  fb254d8d_a16f_a23f_aa8b_dbd5eabe3cbf -->|calls| 58049150_fae0_b4d0_089a_5bc619fc4036
  style fb254d8d_a16f_a23f_aa8b_dbd5eabe3cbf fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/messages/block_translators/bedrock_converse.py lines 283–292

def translate_content(message: AIMessage) -> list[types.ContentBlock]:
    """Derive standard content blocks from a message with Bedrock Converse content.

    Args:
        message: The message to translate.

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

Domain

Subdomains

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/bedrock_converse.py.
Where is translate_content() defined?
translate_content() is defined in libs/core/langchain_core/messages/block_translators/bedrock_converse.py at line 283.
What does translate_content() call?
translate_content() calls 1 function(s): _convert_to_v1_from_converse.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free