The lawsuit is the first filed by a state over the cyberattacks, which have drawn widespread attention since the revelation in July that an autonomous agent ​powered by OpenAI’s advanced artificial intelligence models went rogue.