Skip to content

Commit

Permalink
TYPO
Browse files Browse the repository at this point in the history
  • Loading branch information
joaomdmoura committed Jul 3, 2024
1 parent 6fae56d commit 4bcd1df
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/crewai/utilities/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand All @@ -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.")

Expand All @@ -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,
Expand Down

0 comments on commit 4bcd1df

Please sign in to comment.