From e2c31fca5cbbb8c145b69f6b3cdaabdcf7039add Mon Sep 17 00:00:00 2001 From: Enrique Shockwave <33002121+qeternity@users.noreply.github.com> Date: Thu, 9 May 2024 08:14:01 +0100 Subject: [PATCH] Include finish reason in meta info response (#415) --- python/sglang/srt/managers/router/model_rpc.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/sglang/srt/managers/router/model_rpc.py b/python/sglang/srt/managers/router/model_rpc.py index 80c38b0df..2d30409e5 100644 --- a/python/sglang/srt/managers/router/model_rpc.py +++ b/python/sglang/srt/managers/router/model_rpc.py @@ -586,6 +586,8 @@ class ModelRpcServer: + len(req.output_ids) - req.prompt_tokens, "completion_tokens_wo_jump_forward": req.completion_tokens_wo_jump_forward, + "finish_reason": req.finish_reason, + "hit_stop_str": req.hit_stop_str, } if req.return_logprob: (