private JsonNode mergeObjects(ObjectNode target, ObjectNode source, Stack<String> path) {
        for (Map.Entry<String, JsonNode> entry : source.properties()) {
            String name = entry.getKey();
            path.push(name);
            target.set(name, merge(target.get(name), entry.getValue(), path));
            path.pop();
        }
        return target;
    }
The utility merges chunks received from a streaming response. The original reference implementation is provided
<a href="https://github.com/epam/ai-dial-sdk/blob/0.10.1/aidial_sdk/utils/merge_chunks.py">here</a>.
server/src/main/java/com/epam/aidial/core/server/util/MergeChunks.java