Home / Function/ _update_message_content_to_blocks() — langchain Function Reference

_update_message_content_to_blocks() — langchain Function Reference

Architecture documentation for the _update_message_content_to_blocks() function in _utils.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  b07e6bc7_6e4c_08a0_9277_9e59e987a8d9["_update_message_content_to_blocks()"]
  52504dd3_f4d4_21a4_b28c_0c152227d20d["_utils.py"]
  b07e6bc7_6e4c_08a0_9277_9e59e987a8d9 -->|defined in| 52504dd3_f4d4_21a4_b28c_0c152227d20d
  style b07e6bc7_6e4c_08a0_9277_9e59e987a8d9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/language_models/_utils.py lines 318–327

def _update_message_content_to_blocks(message: T, output_version: str) -> T:
    return message.model_copy(
        update={
            "content": message.content_blocks,
            "response_metadata": {
                **message.response_metadata,
                "output_version": output_version,
            },
        }
    )

Subdomains

Frequently Asked Questions

What does _update_message_content_to_blocks() do?
_update_message_content_to_blocks() is a function in the langchain codebase, defined in libs/core/langchain_core/language_models/_utils.py.
Where is _update_message_content_to_blocks() defined?
_update_message_content_to_blocks() is defined in libs/core/langchain_core/language_models/_utils.py at line 318.

Analyze Your Own Codebase

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

Try Supermodel Free