Spaces:
Sleeping
Sleeping
Update helper.py
Browse files
helper.py
CHANGED
@@ -39,7 +39,7 @@ def get_fn(model_name: str, **model_kwargs) -> Callable:
|
|
39 |
response_text = ""
|
40 |
# Iterate over the streaming response
|
41 |
for chunk in response:
|
42 |
-
if len(chunk.choices[0]) > 0:
|
43 |
content = chunk.choices[0].delta.content
|
44 |
if content:
|
45 |
response_text += content
|
|
|
39 |
response_text = ""
|
40 |
# Iterate over the streaming response
|
41 |
for chunk in response:
|
42 |
+
if len(chunk.choices[0].delta.content) > 0:
|
43 |
content = chunk.choices[0].delta.content
|
44 |
if content:
|
45 |
response_text += content
|