test_chat_generation_chunk() — langchain Function Reference
Architecture documentation for the test_chat_generation_chunk() function in test_outputs.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 1514b35c_4738_6501_8603_bf80a015bd80["test_chat_generation_chunk()"] 77f770f7_1ea1_6fd8_a785_97ac4572a4ff["test_outputs.py"] 1514b35c_4738_6501_8603_bf80a015bd80 -->|defined in| 77f770f7_1ea1_6fd8_a785_97ac4572a4ff style 1514b35c_4738_6501_8603_bf80a015bd80 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/test_outputs.py lines 29–62
def test_chat_generation_chunk() -> None:
assert ChatGenerationChunk(
message=HumanMessageChunk(content="Hello, ")
) + ChatGenerationChunk(
message=HumanMessageChunk(content="world!")
) == ChatGenerationChunk(message=HumanMessageChunk(content="Hello, world!")), (
"ChatGenerationChunk + ChatGenerationChunk should be a ChatGenerationChunk"
)
assert ChatGenerationChunk(
message=HumanMessageChunk(content="Hello, ")
) + ChatGenerationChunk(
message=HumanMessageChunk(content="world!"), generation_info={"foo": "bar"}
) == ChatGenerationChunk(
message=HumanMessageChunk(content="Hello, world!"),
generation_info={"foo": "bar"},
), (
"GenerationChunk + GenerationChunk should be a GenerationChunk "
"with merged generation_info"
)
assert ChatGenerationChunk(
message=HumanMessageChunk(content="Hello, ")
) + ChatGenerationChunk(
message=HumanMessageChunk(content="world!"), generation_info={"foo": "bar"}
) + ChatGenerationChunk(
message=HumanMessageChunk(content="!"), generation_info={"baz": "foo"}
) == ChatGenerationChunk(
message=HumanMessageChunk(content="Hello, world!!"),
generation_info={"foo": "bar", "baz": "foo"},
), (
"GenerationChunk + GenerationChunk should be a GenerationChunk "
"with merged generation_info"
)
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_chat_generation_chunk() do?
test_chat_generation_chunk() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/test_outputs.py.
Where is test_chat_generation_chunk() defined?
test_chat_generation_chunk() is defined in libs/core/tests/unit_tests/test_outputs.py at line 29.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free