In an encyclical, Pope Leo says AI poses a threat to human dignity.