mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-25 16:18:13 +00:00
TYPO
This commit is contained in:
@@ -32,7 +32,7 @@ class Converter(OutputConverter):
|
|||||||
else:
|
else:
|
||||||
return self._create_chain().invoke({})
|
return self._create_chain().invoke({})
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
if current_attempt < self.max_attemps:
|
if current_attempt < self.max_attempts:
|
||||||
return self.to_pydantic(current_attempt + 1)
|
return self.to_pydantic(current_attempt + 1)
|
||||||
return ConverterError(
|
return ConverterError(
|
||||||
f"Failed to convert text into a pydantic model due to the following error: {e}"
|
f"Failed to convert text into a pydantic model due to the following error: {e}"
|
||||||
@@ -46,7 +46,7 @@ class Converter(OutputConverter):
|
|||||||
else:
|
else:
|
||||||
return json.dumps(self._create_chain().invoke({}).model_dump())
|
return json.dumps(self._create_chain().invoke({}).model_dump())
|
||||||
except Exception:
|
except Exception:
|
||||||
if current_attempt < self.max_attemps:
|
if current_attempt < self.max_attempts:
|
||||||
return self.to_json(current_attempt + 1)
|
return self.to_json(current_attempt + 1)
|
||||||
return ConverterError("Failed to convert text into JSON.")
|
return ConverterError("Failed to convert text into JSON.")
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ class Converter(OutputConverter):
|
|||||||
|
|
||||||
inst = Instructor(
|
inst = Instructor(
|
||||||
llm=self.llm,
|
llm=self.llm,
|
||||||
max_attemps=self.max_attemps,
|
max_attempts=self.max_attempts,
|
||||||
model=self.model,
|
model=self.model,
|
||||||
content=self.text,
|
content=self.text,
|
||||||
instructions=self.instructions,
|
instructions=self.instructions,
|
||||||
|
|||||||
Reference in New Issue
Block a user