mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-09 08:08:32 +00:00
adding more error logging and preparing new version
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "crewai"
|
name = "crewai"
|
||||||
version = "0.11.1"
|
version = "0.11.2"
|
||||||
description = "Cutting-edge framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks."
|
description = "Cutting-edge framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks."
|
||||||
authors = ["Joao Moura <joao@crewai.com>"]
|
authors = ["Joao Moura <joao@crewai.com>"]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|||||||
@@ -228,11 +228,15 @@ class ToolUsage:
|
|||||||
chain = prompt | llm | parser
|
chain = prompt | llm | parser
|
||||||
calling = chain.invoke({"tool_string": tool_string})
|
calling = chain.invoke({"tool_string": tool_string})
|
||||||
|
|
||||||
except Exception:
|
except Exception as e:
|
||||||
self._run_attempts += 1
|
self._run_attempts += 1
|
||||||
if self._run_attempts > self._max_parsing_attempts:
|
if self._run_attempts > self._max_parsing_attempts:
|
||||||
self._telemetry.tool_usage_error(llm=llm)
|
self._telemetry.tool_usage_error(llm=llm)
|
||||||
return ToolUsageErrorException(self._i18n.errors("tool_usage_error"))
|
error = ToolUsageErrorException(
|
||||||
|
self._i18n.errors("tool_usage_exception").format(error=e)
|
||||||
|
).message
|
||||||
|
self._printer.print(content=f"\n\n{error}\n", color="red")
|
||||||
|
return error
|
||||||
return self._tool_calling(tool_string)
|
return self._tool_calling(tool_string)
|
||||||
|
|
||||||
return calling
|
return calling
|
||||||
|
|||||||
Reference in New Issue
Block a user