The invention discloses a method for
stream output of a semi-structured response by an
intelligent agent. The method comprises the following operation steps: step 1, pre-defining a
stream response body; step 2, dynamically self-adapting to the segment of
large model streaming output, dynamically analyzing correct content by an
intelligent agent through self-adapting to an incomplete
json structure response body output in the process of
large model streaming output, and backfilling the correct content to a predefined
json response body to realize streaming output semi-structured response; and step 3, performing dynamic streaming output of the semi-structured response by the
intelligent agent, and performing streaming output by the intelligent agent. According to the method, the universal
Json format is adopted as the structural definition of the semi-structured response of the agent streaming output, programmed
processing is more convenient, compared with conventional streaming output, the richness of output information can be remarkably increased, better personalized experience can be supported and provided, and the method is more universal and can be widely applied.