[Bugfix] input prompt was not logged (#13936)
This commit is contained in:
@@ -454,6 +454,19 @@ class TokenizerManager(TokenizerCommunicatorMixin):
|
||||
f"Receive: obj={dataclass_to_string_truncated(obj, max_length, skip_names=skip_names)}"
|
||||
)
|
||||
|
||||
# FIXME: This is a temporary fix to get the text from the input ids.
|
||||
# We should remove this once we have a proper way.
|
||||
if (
|
||||
self.log_requests_level >= 2
|
||||
and obj.text is None
|
||||
and obj.input_ids is not None
|
||||
and self.tokenizer is not None
|
||||
):
|
||||
decoded = self.tokenizer.decode(
|
||||
obj.input_ids, skip_special_tokens=False
|
||||
)
|
||||
obj.text = decoded
|
||||
|
||||
async with self.is_pause_cond:
|
||||
await self.is_pause_cond.wait_for(lambda: not self.is_pause)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user