fix(utils.py): fix azure streaming logic

This commit is contained in:
Krrish Dholakia 2024-04-18 07:08:36 -07:00
parent fa8a9568aa
commit b38c09c87f
2 changed files with 7 additions and 9 deletions

View file

@ -8842,11 +8842,11 @@ class CustomStreamWrapper:
Output parse <s> / </s> special tokens for sagemaker + hf streaming.
"""
hold = False
# if (
# self.custom_llm_provider != "huggingface"
# and self.custom_llm_provider != "sagemaker"
# ):
# return hold, chunk
if (
self.custom_llm_provider != "huggingface"
and self.custom_llm_provider != "sagemaker"
):
return hold, chunk
if finish_reason:
for token in self.special_tokens: