def test_process_streaming_content_incremental_with_list():
    """Test processing content with list structures."""
    response = ChatResponse(
        message=ChatMessage(
            role=MessageRole.ASSISTANT,
            content='{"title": "Comedy Show", "jokes": [{"setup": "Why did the chicken cross the road?", "punchline": "To get to the other side!"}]}',
        )
    )

    result = process_streaming_content_incremental(response, Show)
    assert isinstance(result, Show)
    assert result.title == "Comedy Show"
    assert len(result.jokes) == 1
    assert result.jokes[0].setup == "Why did the chicken cross the road?"
    assert result.jokes[0].punchline == "To get to the other side!"
Test processing content with list structures.
llama-index-core/tests/program/test_streaming_utils.py