diff --git a/haystack/components/generators/chat/hugging_face_local.py b/haystack/components/generators/chat/hugging_face_local.py index 7f5cfefbc..afb9d2d80 100644 --- a/haystack/components/generators/chat/hugging_face_local.py +++ b/haystack/components/generators/chat/hugging_face_local.py @@ -272,7 +272,7 @@ class HuggingFaceLocalChatGenerator: self, text: str, index: int, - tokenizer: Union[PreTrainedTokenizer, PreTrainedTokenizerFast], + tokenizer: Union["PreTrainedTokenizer", "PreTrainedTokenizerFast"], prompt: str, generation_kwargs: Dict[str, Any], ) -> ChatMessage: