Skip to content

Commit

Permalink
Preparing new version
Browse files Browse the repository at this point in the history
  • Loading branch information
joaomdmoura committed Mar 11, 2024
1 parent cb5a528 commit 35f8919
Show file tree
Hide file tree
Showing 7 changed files with 238 additions and 239 deletions.
445 changes: 223 additions & 222 deletions poetry.lock

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
[tool.poetry]
name = "crewai"
version = "0.20.0"
version = "0.22.0"
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>"]
readme = "README.md"
packages = [
{ include = "crewai", from = "src" },
]


[tool.poetry.urls]
Homepage = "https://crewai.io"
Homepage = "https://crewai.com"
Documentation = "https://github.com/joaomdmoura/CrewAI/wiki/Index"
Repository = "https://github.com/joaomdmoura/crewai"

Expand Down
5 changes: 2 additions & 3 deletions src/crewai/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
from langchain.memory import ConversationSummaryMemory
from langchain.tools.render import render_text_description
from langchain_core.agents import AgentAction
from langchain_openai import ChatOpenAI
from langchain_core.callbacks import BaseCallbackHandler

from langchain_openai import ChatOpenAI
from pydantic import (
UUID4,
BaseModel,
Expand Down Expand Up @@ -251,7 +250,7 @@ def create_agent_executor(self, tools=None) -> None:
"step_callback": self.step_callback,
"tools_handler": self.tools_handler,
"function_calling_llm": self.function_calling_llm,
"callbacks": self.callbacks
"callbacks": self.callbacks,
}

if self._rpm_controller:
Expand Down
2 changes: 1 addition & 1 deletion src/crewai/cli/templates/crew.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def research_task(self) -> Task:
)

@task
def research_task(self) -> Task:
def reporting_task(self) -> Task:
return Task(
config=self.tasks_config['reporting_task'],
agent=self.reporting_analyst(),
Expand Down
2 changes: 1 addition & 1 deletion src/crewai/cli/templates/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = ["Your Name <you@example.com>"]

[tool.poetry.dependencies]
python = ">=3.10,<=3.13"
crewai = {extras = ["tools"], version = "^0.20.0"}
crewai = {extras = ["tools"], version = "^0.22.0"}

[tool.poetry.scripts]
{{folder_name}} = "{{folder_name}}.main:run"
Expand Down
6 changes: 3 additions & 3 deletions src/crewai/crew.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,17 +232,17 @@ def _run_sequential_process(self) -> str:
task.tools += AgentTools(agents=agents_for_delegation).tools()

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_yellow")
self._logger.log(
"info", f" == Starting Task: {task.description}", color="bold_yellow"
"info", f"== Starting Task: {task.description}", color="bold_yellow"
)

output = task.execute(context=task_output)
if not task.async_execution:
task_output = output

role = task.agent.role if task.agent is not None else "None"
self._logger.log("debug", f"[{role}] Task output: {task_output}\n\n")
self._logger.log("debug", f"== [{role}] Task output: {task_output}\n\n")

self._finish_execution(task_output)
return self._format_output(task_output)
Expand Down
12 changes: 6 additions & 6 deletions tests/crew_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,12 +222,12 @@ def test_crew_verbose_output(capsys):
crew.kickoff()
captured = capsys.readouterr()
expected_strings = [
"[DEBUG]: Working Agent: Researcher",
"[INFO]: Starting Task: Research AI advancements.",
"[DEBUG]: [Researcher] Task output:",
"[DEBUG]: Working Agent: Senior Writer",
"[INFO]: Starting Task: Write about AI in healthcare.",
"[DEBUG]: [Senior Writer] Task output:",
"[DEBUG]: == Working Agent: Researcher",
"[INFO]: == Starting Task: Research AI advancements.",
"[DEBUG]: == [Researcher] Task output:",
"[DEBUG]: == Working Agent: Senior Writer",
"[INFO]: == Starting Task: Write about AI in healthcare.",
"[DEBUG]: == [Senior Writer] Task output:",
]

for expected_string in expected_strings:
Expand Down

0 comments on commit 35f8919

Please sign in to comment.