[generation] fix type hint (#35725)

fix type hint
This commit is contained in:
Joao Gante
2025-01-16 15:09:59 +00:00
committed by GitHub
parent 8b78d9d6e7
commit 3292e96a4f

View File

@@ -284,7 +284,7 @@ class AsyncTextIteratorStreamer(TextStreamer):
"""
def __init__(
self, tokenizer: "AutoTokenizer", skip_prompt: bool = False, timeout: float | None = None, **decode_kwargs
self, tokenizer: "AutoTokenizer", skip_prompt: bool = False, timeout: Optional[float] = None, **decode_kwargs
):
super().__init__(tokenizer, skip_prompt, **decode_kwargs)
self.text_queue = asyncio.Queue()