Home / Class/ HumanMessageChunk Class — langchain Architecture

HumanMessageChunk Class — langchain Architecture

Architecture documentation for the HumanMessageChunk class in human.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  03a21b7a_8e15_6228_713f_7b9c21581ff8["HumanMessageChunk"]
  e0e879bf_e732_8d0f_6ce2_3d40e66f4eb3["HumanMessage"]
  03a21b7a_8e15_6228_713f_7b9c21581ff8 -->|extends| e0e879bf_e732_8d0f_6ce2_3d40e66f4eb3
  6a1cf81e_444c_4b27_c510_8e86e205cabb["BaseMessageChunk"]
  03a21b7a_8e15_6228_713f_7b9c21581ff8 -->|extends| 6a1cf81e_444c_4b27_c510_8e86e205cabb
  b7e16685_5fd7_85d7_611e_d902da4eab66["human.py"]
  03a21b7a_8e15_6228_713f_7b9c21581ff8 -->|defined in| b7e16685_5fd7_85d7_611e_d902da4eab66

Relationship Graph

Source Code

libs/core/langchain_core/messages/human.py lines 63–70

class HumanMessageChunk(HumanMessage, BaseMessageChunk):
    """Human Message chunk."""

    # Ignoring mypy re-assignment here since we're overriding the value
    # to make sure that the chunk variant can be discriminated from the
    # non-chunk variant.
    type: Literal["HumanMessageChunk"] = "HumanMessageChunk"  # type: ignore[assignment]
    """The type of the message (used for serialization)."""

Frequently Asked Questions

What is the HumanMessageChunk class?
HumanMessageChunk is a class in the langchain codebase, defined in libs/core/langchain_core/messages/human.py.
Where is HumanMessageChunk defined?
HumanMessageChunk is defined in libs/core/langchain_core/messages/human.py at line 63.
What does HumanMessageChunk extend?
HumanMessageChunk extends HumanMessage, BaseMessageChunk.

Analyze Your Own Codebase

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

Try Supermodel Free