Skip to content

Commit

Permalink
fix bug of HFTransformer.generate (#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
liujiangning30 committed Jan 30, 2024
1 parent 94ba3a1 commit c9973b9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lagent/llms/huggingface.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ def generate(
Returns:
(a list of/batched) text/chat completion
"""
for chunk in self.stream_generate(inputs, do_sample, **kwargs):
for status, chunk, _ in self.stream_generate(inputs, do_sample,
**kwargs):
response = chunk
return response

Expand Down

0 comments on commit c9973b9

Please sign in to comment.