Update Tool Execution Final Message and Dependencies (#175)

* Update final message when max iteration hits in durable agent

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* Update dependencies

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* Fix lint

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

* Update testenv deps to include vectorstore

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>

---------

Signed-off-by: Roberto Rodriguez <9653181+Cyb3rWard0g@users.noreply.github.com>
This commit is contained in:
Roberto Rodriguez 2025-08-11 15:15:13 -04:00 committed by GitHub
parent 249ea5ec43
commit d325cc07de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 7 additions and 10 deletions

View File

@ -209,6 +209,8 @@ class DurableAgent(AgenticWorkflow, AgentBase):
# 🔴 If this was the last turn, stop here—even though there were tool calls
if turn == self.max_iterations:
final_message = response_message
# Make sure content exists and is a string
final_message["content"] = final_message.get("content") or ""
final_message[
"content"
] += "\n\n⚠️ Stopped: reached max iterations."
@ -223,6 +225,8 @@ class DurableAgent(AgenticWorkflow, AgentBase):
# 🔴 If it happened to be the last turn, banner it
if turn == self.max_iterations:
# Again, ensure content is never None
final_message["content"] = final_message.get("content") or ""
final_message["content"] += "\n\n⚠️ Stopped: reached max iterations."
break # exit loop with final_message

View File

@ -37,9 +37,6 @@ dependencies = [
"numpy>=2.2.2,<3.0.0",
"mcp>=1.7.1,<2.0.0",
"pip-tools>=7.4.1,<8.0.0",
"sentence-transformers>=4.1.0,<5.0.0",
"chromadb>=1.0.13,<2.0.0",
"posthog<6.0.0",
]
classifiers = [
"Development Status :: 2 - Pre-Alpha",

View File

@ -10,7 +10,7 @@ envlist =
[testenv]
deps =
-e .[test]
-e .[test,vectorstore]
numpy
durabletask
cloudevents

View File

@ -664,7 +664,6 @@ source = { editable = "." }
dependencies = [
{ name = "aiohttp" },
{ name = "azure-identity" },
{ name = "chromadb" },
{ name = "cloudevents" },
{ name = "colorama" },
{ name = "dapr" },
@ -681,13 +680,11 @@ dependencies = [
{ name = "openapi-pydantic" },
{ name = "openapi-schema-pydantic" },
{ name = "pip-tools" },
{ name = "posthog" },
{ name = "pydantic" },
{ name = "pyyaml" },
{ name = "regex" },
{ name = "requests" },
{ name = "rich" },
{ name = "sentence-transformers" },
{ name = "uvicorn" },
]
@ -715,13 +712,13 @@ vectorstore = [
{ name = "chromadb" },
{ name = "posthog" },
{ name = "sentence-transformers" },
{ name = "torch" },
]
[package.metadata]
requires-dist = [
{ name = "aiohttp", specifier = ">=3.9.0,<4.0.0" },
{ name = "azure-identity", specifier = ">=1.21.0,<2.0.0" },
{ name = "chromadb", specifier = ">=1.0.13,<2.0.0" },
{ name = "chromadb", marker = "extra == 'vectorstore'", specifier = ">=0.4.22,<2.0.0" },
{ name = "cloudevents", specifier = ">=1.11.0,<2.0.0" },
{ name = "colorama", specifier = ">=0.4.6,<1.0.0" },
@ -745,7 +742,6 @@ requires-dist = [
{ name = "opentelemetry-exporter-otlp", marker = "extra == 'observability'", specifier = ">=1.32.1,<1.35.0" },
{ name = "opentelemetry-instrumentation-requests", marker = "extra == 'observability'", specifier = ">=0.53b1,<0.56b0" },
{ name = "pip-tools", specifier = ">=7.4.1,<8.0.0" },
{ name = "posthog", specifier = "<6.0.0" },
{ name = "posthog", marker = "extra == 'vectorstore'", specifier = "<6.0.0" },
{ name = "pydantic", specifier = ">=2.11.3,<3.0.0" },
{ name = "pytest", marker = "extra == 'test'", specifier = ">=7.0.0,<8.0.0" },
@ -756,8 +752,8 @@ requires-dist = [
{ name = "regex", specifier = ">=2023.0.0,<2025.0.0" },
{ name = "requests", specifier = ">=2.31.0,<3.0.0" },
{ name = "rich", specifier = ">=13.9.4,<14.0.0" },
{ name = "sentence-transformers", specifier = ">=4.1.0,<5.0.0" },
{ name = "sentence-transformers", marker = "extra == 'vectorstore'", specifier = ">=4.1.0,<5.0.0" },
{ name = "torch", marker = "extra == 'vectorstore'", specifier = ">=2.7.0" },
{ name = "tox", marker = "extra == 'dev'", specifier = ">=4.0.0,<5.0.0" },
{ name = "uvicorn", specifier = ">=0.27.0,<1.0.0" },
{ name = "wrapt", marker = "extra == 'observability'", specifier = ">=1.14.0,<2.0.0" },