lizhimins commented on issue #4108:
URL:
https://github.com/apache/rocketmq-dashboard/issues/4108#issuecomment-5581293214
Resolved by #4109, merged into `rocketmq-studio` as 10a7b493.
The two chunk filters were the only places dropping whitespace:
`OpenAiCompatibleLlmClient.java:273` (`hasText(token)`) and
`OpenAiCompatibleLlmGateway.java:211` (`!hasText(chunk)`). Both now use
`hasLength`, so a delta whose content is only spaces, newlines or indentation
is forwarded instead of discarded.
Worth recording that the impact was slightly wider than this issue
describes: `enhanceAndEmitHttp` accumulates inside the client's consumer
(`OpenAiCompatibleLlmGateway.java:202-205`), so on trunk the whitespace was
stripped from the prompt actually sent to the model, not only from the streamed
preview.
The guard was narrowed rather than removed. `parseDelta` returns
`asText("")` and never null (`OpenAiCompatibleLlmClient.java:454`), and
`hasLength("")` is still false, so role-only, `finish_reason` and `usage`
deltas are still skipped, `[DONE]` termination is unaffected, and the
non-streaming `parseCompletion` path correctly keeps `hasText`.
Because this repository squash-merges against `rocketmq-studio` rather than
the default branch, GitHub does not auto-close issues referenced in a PR body;
closing manually.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]