forked from phoenix/litellm-mirror
(fix) HF api + streaming
This commit is contained in:
parent
a1cecbafe6
commit
da8c2f4a4a
1 changed files with 1 additions and 0 deletions
|
@ -4367,6 +4367,7 @@ class CustomStreamWrapper:
|
||||||
|
|
||||||
def handle_huggingface_chunk(self, chunk):
|
def handle_huggingface_chunk(self, chunk):
|
||||||
try:
|
try:
|
||||||
|
chunk = chunk.decode("utf-8") # DO NOT REMOVE this: This is required for HF inference API + Streaming
|
||||||
text = ""
|
text = ""
|
||||||
is_finished = False
|
is_finished = False
|
||||||
finish_reason = ""
|
finish_reason = ""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue