forked from phoenix/litellm-mirror
fix(utils.py): filter out hf eos token
Closes https://github.com/BerriAI/litellm/issues/3757
This commit is contained in:
parent
33a6647fac
commit
62e5559e0a
1 changed files with 8 additions and 1 deletions
|
@ -10080,7 +10080,14 @@ class CustomStreamWrapper:
|
||||||
self.sent_last_chunk = False
|
self.sent_last_chunk = False
|
||||||
self.system_fingerprint: Optional[str] = None
|
self.system_fingerprint: Optional[str] = None
|
||||||
self.received_finish_reason: Optional[str] = None
|
self.received_finish_reason: Optional[str] = None
|
||||||
self.special_tokens = ["<|assistant|>", "<|system|>", "<|user|>", "<s>", "</s>"]
|
self.special_tokens = [
|
||||||
|
"<|assistant|>",
|
||||||
|
"<|system|>",
|
||||||
|
"<|user|>",
|
||||||
|
"<s>",
|
||||||
|
"</s>",
|
||||||
|
"<|im_end|>",
|
||||||
|
]
|
||||||
self.holding_chunk = ""
|
self.holding_chunk = ""
|
||||||
self.complete_response = ""
|
self.complete_response = ""
|
||||||
self.response_uptil_now = ""
|
self.response_uptil_now = ""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue