def test_patch_from_dict(editor: ArtifactEditorToolSpec):
    """Test applying patch from dictionary format."""
    editor.create_artifact(name="John", age=30)

    patch_dict = {"operations": [{"op": "replace", "path": "/name", "value": "Jane"}]}

    result = editor.apply_patch(patch_dict)
    assert result["name"] == "Jane"
Test applying patch from dictionary format.
llama-index-integrations/tools/llama-index-tools-artifact-editor/tests/test_artifact_editor.py