mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-10 00:28:31 +00:00
@@ -273,9 +273,9 @@ class Crew(BaseModel):
|
|||||||
task.tools += AgentTools(agents=agents_for_delegation).tools()
|
task.tools += AgentTools(agents=agents_for_delegation).tools()
|
||||||
|
|
||||||
role = task.agent.role if task.agent is not None else "None"
|
role = task.agent.role if task.agent is not None else "None"
|
||||||
self._logger.log("debug", f"== Working Agent: {role}", color="bold_yellow")
|
self._logger.log("debug", f"== Working Agent: {role}", color="bold_purple")
|
||||||
self._logger.log(
|
self._logger.log(
|
||||||
"info", f"== Starting Task: {task.description}", color="bold_yellow"
|
"info", f"== Starting Task: {task.description}", color="bold_purple"
|
||||||
)
|
)
|
||||||
|
|
||||||
output = task.execute(context=task_output)
|
output = task.execute(context=task_output)
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ class ToolUsage:
|
|||||||
result = self._i18n.errors("task_repeated_usage").format(
|
result = self._i18n.errors("task_repeated_usage").format(
|
||||||
tool_names=self.tools_names
|
tool_names=self.tools_names
|
||||||
)
|
)
|
||||||
self._printer.print(content=f"\n\n{result}\n", color="yellow")
|
self._printer.print(content=f"\n\n{result}\n", color="purple")
|
||||||
self._telemetry.tool_repeated_usage(
|
self._telemetry.tool_repeated_usage(
|
||||||
llm=self.function_calling_llm,
|
llm=self.function_calling_llm,
|
||||||
tool_name=tool.name,
|
tool_name=tool.name,
|
||||||
@@ -178,7 +178,7 @@ class ToolUsage:
|
|||||||
calling=calling, output=result, should_cache=should_cache
|
calling=calling, output=result, should_cache=should_cache
|
||||||
)
|
)
|
||||||
|
|
||||||
self._printer.print(content=f"\n\n{result}\n", color="yellow")
|
self._printer.print(content=f"\n\n{result}\n", color="purple")
|
||||||
self._telemetry.tool_usage(
|
self._telemetry.tool_usage(
|
||||||
llm=self.function_calling_llm,
|
llm=self.function_calling_llm,
|
||||||
tool_name=tool.name,
|
tool_name=tool.name,
|
||||||
|
|||||||
@@ -1,24 +1,24 @@
|
|||||||
class Printer:
|
class Printer:
|
||||||
def print(self, content: str, color: str):
|
def print(self, content: str, color: str):
|
||||||
if color == "yellow":
|
if color == "purple":
|
||||||
self._print_yellow(content)
|
self._print_purple(content)
|
||||||
elif color == "red":
|
elif color == "red":
|
||||||
self._print_red(content)
|
self._print_red(content)
|
||||||
elif color == "bold_green":
|
elif color == "bold_green":
|
||||||
self._print_bold_green(content)
|
self._print_bold_green(content)
|
||||||
elif color == "bold_yellow":
|
elif color == "bold_purple":
|
||||||
self._print_bold_yellow(content)
|
self._print_bold_purple(content)
|
||||||
else:
|
else:
|
||||||
print(content)
|
print(content)
|
||||||
|
|
||||||
def _print_bold_yellow(self, content):
|
def _print_bold_purple(self, content):
|
||||||
print("\033[1m\033[93m {}\033[00m".format(content))
|
print("\033[1m\033[95m {}\033[00m".format(content))
|
||||||
|
|
||||||
def _print_bold_green(self, content):
|
def _print_bold_green(self, content):
|
||||||
print("\033[1m\033[92m {}\033[00m".format(content))
|
print("\033[1m\033[92m {}\033[00m".format(content))
|
||||||
|
|
||||||
def _print_yellow(self, content):
|
def _print_purple(self, content):
|
||||||
print("\033[93m {}\033[00m".format(content))
|
print("\033[95m {}\033[00m".format(content))
|
||||||
|
|
||||||
def _print_red(self, content):
|
def _print_red(self, content):
|
||||||
print("\033[91m {}\033[00m".format(content))
|
print("\033[91m {}\033[00m".format(content))
|
||||||
|
|||||||
Reference in New Issue
Block a user