OpenAI CEO Sam Altman asked senators during a hearing to regulate artificial intelligence and put safeguards in place.