Generative AI is constantly developing with its unique competitiveness, and its content influence is gradually penetrating into people's daily life, but at the same time, it has also caused a series of discussions on the regulation of artificial intelligence legal risks. This paper analyzes and researches ChatGPT and finds many existing problems, such as data risk, algorithm model training risk, and content generation risk. In order to better deal with the risks of generative AI, it is necessary to find a healthy path conducive to the development of generative AI from the perspectives of database establishment, computing legal system, data compliance construction, scientific and technological ethics governance, and improvement of laws and regulations.