File tree Expand file tree Collapse file tree
src/main/java/com/alibaba/dashscope/aigc/multimodalconversation Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -280,19 +280,24 @@ private void preprocessInput(MultiModalConversationParam param)
280280 /**
281281 * Modifies the parameters for internal streaming optimization. If incrementalOutput is false,
282282 * modifies the MultiModalConversationParam object to set incrementalOutput to true for internal
283- * streaming optimization.
283+ * streaming optimization. If incrementalOutput is true or null, keeps the original value to
284+ * return real incremental content.
284285 *
285286 * @param param The parameter object to modify
286- * @return true if the parameter was modified, false otherwise
287+ * @return true if the parameter was modified (needs local merge), false otherwise (real
288+ * incremental)
287289 */
288290 private boolean modifyIncrementalOutput (MultiModalConversationParam param ) {
289291 Boolean incrementalOutput = param .getIncrementalOutput ();
292+ // Only modify when user explicitly sets incrementalOutput to false
293+ // If user sets true or null, respect their choice and return real incremental content
290294 if (ParamUtils .shouldModifyIncrementalOutput (param .getModel ())
291295 && Boolean .FALSE .equals (incrementalOutput )) {
292296 // Modify the MultiModalConversationParam object to enable incremental output
293297 param .setIncrementalOutput (true );
294298 return true ;
295299 }
300+ // User wants real incremental content (incrementalOutput=true or null)
296301 return false ;
297302 }
298303
You can’t perform that action at this time.
0 commit comments