[BugFix] Send all token include empty result to Adapter

This commit is contained in:
Jiang-Jia-Jun
2025-09-28 17:03:16 +08:00
parent c35a21a99a
commit 8614ca56ad

View File

@@ -706,11 +706,12 @@ class EngineSevice:
delta_text, token_ids = self._decode_token( delta_text, token_ids = self._decode_token(
token_ids=content.outputs.token_ids, req_id=request_id, is_end=content.finished token_ids=content.outputs.token_ids, req_id=request_id, is_end=content.finished
) )
if len(token_ids):
content.outputs.token_ids = token_ids content.outputs.token_ids = token_ids
content.outputs.text = delta_text content.outputs.text = delta_text
new_contents.append(content) new_contents.append(content)
else:
if len(token_ids) == 0:
llm_logger.warning( llm_logger.warning(
f"current tokens need to accumulate, req_id: {request_id} {content.outputs.token_ids}" f"current tokens need to accumulate, req_id: {request_id} {content.outputs.token_ids}"
) )