Legal Frameworks for the Integration of Artificial Intelligence