rodrigomasini commited on
Commit
40abfbf
·
verified ·
1 Parent(s): 5747d32

Update helper.py

Browse files
Files changed (1) hide show
  1. helper.py +1 -1
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