The invention discloses a large-model-assisted
code review method, and relates to the technical field of
artificial intelligence application. Comprising the steps of (1) configuring a
Webhook request in a code warehouse and automatically triggering the
Webhook request when a code submission event occurs in the code warehouse, (2) obtaining code submission differences: obtaining code difference contents between the current code submission and a previous version according to the
Webhook request, and (3) carrying out code analysis on the code difference contents and then splicing the code difference contents with a preset prompt template, 4, packaging the generated prompt information according to the requirement of a
large model interface, sending the packaged prompt information to the
large model, and reviewing and analyzing codes in the prompt information through the
large model based on trained code data and
natural language processing capability, and 5, reviewing the codes in the prompt information through a code reviewing result returned by the large model. A free text review result returned by the large model is converted into a standardized
data structure, and a review report is generated; and step 6, according to the code submitter information recorded in the code warehouse, obtaining an
email address, and sending the generated review report to the code submitter in the form of an email.