Adding support to force a tool return to be the final answer. (#867)

* Adding support to force a tool return to be the final answer.
This will at the end of the execution return the tool output.
It will return the output of the latest tool with the flag

* Update src/crewai/agent.py

Co-authored-by: Gui Vieira <guilherme_vieira@me.com>

* Update tests/agent_test.py

Co-authored-by: Gui Vieira <guilherme_vieira@me.com>

---------

Co-authored-by: Gui Vieira <guilherme_vieira@me.com>
This commit is contained in:
João Moura
2024-07-04 12:36:00 -07:00
committed by GitHub
parent 35676fe2f5
commit 2fb56f1f9f
16 changed files with 207777 additions and 6651 deletions

View File

@@ -14,20 +14,20 @@ Repository = "https://github.com/joaomdmoura/crewai"
[tool.poetry.dependencies]
python = ">=3.10,<=3.13"
pydantic = "^2.4.2"
langchain = ">=0.1.4,<0.2.0"
langchain = ">0.2,<=0.3"
openai = "^1.13.3"
opentelemetry-api = "^1.22.0"
opentelemetry-sdk = "^1.22.0"
opentelemetry-exporter-otlp-proto-http = "^1.22.0"
instructor = "1.3.3"
regex = "^2023.12.25"
crewai-tools = { version = "^0.4.6", optional = true }
crewai-tools = { version = "^0.4.7", optional = true }
click = "^8.1.7"
python-dotenv = "^1.0.0"
appdirs = "^1.4.4"
jsonref = "^1.1.0"
agentops = { version = "^0.1.9", optional = true }
embedchain = "^0.1.113"
embedchain = "^0.1.114"
[tool.poetry.extras]
tools = ["crewai-tools"]
@@ -45,7 +45,7 @@ mkdocs-material = { extras = ["imaging"], version = "^9.5.7" }
mkdocs-material-extensions = "^1.3.1"
pillow = "^10.2.0"
cairosvg = "^2.7.1"
crewai-tools = "^0.4.6"
crewai-tools = "^0.4.7"
[tool.poetry.group.test.dependencies]
pytest = "^8.0.0"