From 4bcd1df6bb60b71dbbd16200b7a171e3600ca086 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Moura?= Date: Wed, 3 Jul 2024 18:41:09 -0400 Subject: [PATCH] TYPO --- src/crewai/utilities/converter.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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,