diff --git a/haystack_experimental/components/extractors/llm_metadata_extractor.py b/haystack_experimental/components/extractors/llm_metadata_extractor.py index 1bc4ad7e..2ddd5d34 100644 --- a/haystack_experimental/components/extractors/llm_metadata_extractor.py +++ b/haystack_experimental/components/extractors/llm_metadata_extractor.py @@ -140,10 +140,9 @@ def __init__( # pylint: disable=R0917 self.builder = PromptBuilder(prompt, required_variables=[input_text]) self.raise_on_failure = raise_on_failure self.expected_keys = expected_keys - self.generator_api = generator_api if isinstance(generator_api, LLMProvider) \ - else LLMProvider.from_str(generator_api) + self.generator_api = generator_api if isinstance(generator_api, LLMProvider) else LLMProvider.from_str(generator_api) self.generator_api_params = generator_api_params or {} - self.llm_provider = self._init_generator(generator_api, self.generator_api_params) + self.llm_provider = self._init_generator(self.generator_api, self.generator_api_params) if self.input_text not in self.prompt: raise ValueError(f"Input text '{self.input_text}' must be in the prompt.")