Skip to content

Commit

Permalink
ensure compatibility with huggingface_hub==0.26.0 (#8464)
Browse files Browse the repository at this point in the history
  • Loading branch information
anakin87 authored Oct 18, 2024
1 parent 939698b commit dfd339c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
fixes:
- |
Adjusted a test on `HuggingFaceAPIGenerator` to ensure compatibility with the `huggingface_hub==0.26.0`.
4 changes: 3 additions & 1 deletion test/components/generators/test_hugging_face_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,9 @@ def mock_iter(self):
index=1,
generated_text=None,
token=TextGenerationOutputToken(id=1, text="Ok bye", logprob=0.0, special=False),
details=TextGenerationStreamOutputStreamDetails(finish_reason="length", generated_tokens=5, seed=None),
details=TextGenerationStreamOutputStreamDetails(
finish_reason="length", generated_tokens=5, seed=None, input_length=10
),
)

mock_response = Mock(**{"__iter__": mock_iter})
Expand Down

0 comments on commit dfd339c

Please sign in to comment.