diff --git a/src/crewai/utilities/converter.py b/src/crewai/utilities/converter.py index a79a6781ff..436d68b765 100644 --- a/src/crewai/utilities/converter.py +++ b/src/crewai/utilities/converter.py @@ -32,7 +32,7 @@ def to_pydantic(self, current_attempt=1): else: return self._create_chain().invoke({}) except Exception as e: - if current_attempt < self.max_attemps: + if current_attempt < self.max_attempts: return self.to_pydantic(current_attempt + 1) return ConverterError( f"Failed to convert text into a pydantic model due to the following error: {e}" @@ -46,7 +46,7 @@ def to_json(self, current_attempt=1): else: return json.dumps(self._create_chain().invoke({}).model_dump()) except Exception: - if current_attempt < self.max_attemps: + if current_attempt < self.max_attempts: return self.to_json(current_attempt + 1) return ConverterError("Failed to convert text into JSON.") @@ -56,7 +56,7 @@ def _create_instructor(self): inst = Instructor( llm=self.llm, - max_attemps=self.max_attemps, + max_attempts=self.max_attempts, model=self.model, content=self.text, instructions=self.instructions,