langroid 0.54.0__py3-none-any.whl → 0.54.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
langroid/agent/task.py CHANGED
@@ -104,6 +104,10 @@ class TaskConfig(BaseModel):
104
104
  to use string-based signaling, and it is recommended to use the
105
105
  new Orchestration tools instead (see agent/tools/orchestration.py),
106
106
  e.g. DoneTool, SendTool, etc.
107
+ done_if_tool (bool): whether to consider the task done if the pending message
108
+ contains a Tool attempt by the LLM
109
+ (including tools not handled by the agent).
110
+ Default is False.
107
111
 
108
112
  """
109
113
 
@@ -115,6 +119,7 @@ class TaskConfig(BaseModel):
115
119
  addressing_prefix: str = ""
116
120
  allow_subtask_multi_oai_tools: bool = True
117
121
  recognize_string_signals: bool = True
122
+ done_if_tool: bool = False
118
123
 
119
124
 
120
125
  class Task:
@@ -1828,6 +1833,14 @@ class Task:
1828
1833
  if self._is_kill():
1829
1834
  return (True, StatusCode.KILL)
1830
1835
  result = result or self.pending_message
1836
+
1837
+ # Check if task should be done if message contains a tool
1838
+ if self.config.done_if_tool and result is not None:
1839
+ if isinstance(result, ChatDocument) and self.agent.try_get_tool_messages(
1840
+ result, all_tools=True
1841
+ ):
1842
+ return (True, StatusCode.DONE)
1843
+
1831
1844
  allow_done_string = self.config.recognize_string_signals
1832
1845
  # An entity decided task is done, either via DoneTool,
1833
1846
  # or by explicitly saying DONE
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: langroid
3
- Version: 0.54.0
3
+ Version: 0.54.1
4
4
  Summary: Harness LLMs with Multi-Agent Programming
5
5
  Author-email: Prasad Chalasani <pchalasani@gmail.com>
6
6
  License: MIT
@@ -344,6 +344,9 @@ teacher_task.run()
344
344
  <details>
345
345
  <summary> <b>Click to expand</b></summary>
346
346
 
347
+ - **Jun 2025:**
348
+ - [0.54.0](https://github.com/langroid/langroid/releases/tag/0.54.0) Portkey AI Gateway support - access 200+ models
349
+ across providers through unified API with caching, retries, observability.
347
350
  - **Mar-Apr 2025:**
348
351
  - [0.53.0](https://github.com/langroid/langroid/releases/tag/0.53.0) MCP Tools Support.
349
352
  - [0.52.0](https://github.com/langroid/langroid/releases/tag/0.52.0) Multimodal support, i.e. allow PDF, image
@@ -8,7 +8,7 @@ langroid/agent/batch.py,sha256=wpE9RqCNDVDhAXkCB7wEqfCIEAi6qKcrhaZ-Zr9T4C0,21375
8
8
  langroid/agent/chat_agent.py,sha256=2HIYzYxkrGkRIS97ioKfIqjaW3RbX89M39LjzBobBEY,88381
9
9
  langroid/agent/chat_document.py,sha256=6O20Fp4QrquykaF2jFtwNHkvcoDte1LLwVZNk9mVH9c,18057
10
10
  langroid/agent/openai_assistant.py,sha256=JkAcs02bIrgPNVvUWVR06VCthc5-ulla2QMBzux_q6o,34340
11
- langroid/agent/task.py,sha256=dJ2nRKc9-ulZyzNaABMKb9PKJzWRdZTonH9TPswpdbc,90801
11
+ langroid/agent/task.py,sha256=Ns9SoeMoAHDW7OEcPHJ22cgQKsHzWSt9UAWi9BFl4NM,91366
12
12
  langroid/agent/tool_message.py,sha256=BhjP-_TfQ2tgxuY4Yo_JHLOwwt0mJ4BwjPnREvEY4vk,14744
13
13
  langroid/agent/xml_tool_message.py,sha256=oeBKnJNoGaKdtz39XoWGMTNlVyXew2MWH5lgtYeh8wQ,15496
14
14
  langroid/agent/callbacks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -133,7 +133,7 @@ langroid/vector_store/pineconedb.py,sha256=otxXZNaBKb9f_H75HTaU3lMHiaR2NUp5MqwLZ
133
133
  langroid/vector_store/postgres.py,sha256=wHPtIi2qM4fhO4pMQr95pz1ZCe7dTb2hxl4VYspGZoA,16104
134
134
  langroid/vector_store/qdrantdb.py,sha256=O6dSBoDZ0jzfeVBd7LLvsXu083xs2fxXtPa9gGX3JX4,18443
135
135
  langroid/vector_store/weaviatedb.py,sha256=Yn8pg139gOy3zkaPfoTbMXEEBCiLiYa1MU5d_3UA1K4,11847
136
- langroid-0.54.0.dist-info/METADATA,sha256=QlVhCDwV-tQE6I1leUqSUmXeMjT0vozzoYn4l1GcVWs,65180
137
- langroid-0.54.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
138
- langroid-0.54.0.dist-info/licenses/LICENSE,sha256=EgVbvA6VSYgUlvC3RvPKehSg7MFaxWDsFuzLOsPPfJg,1065
139
- langroid-0.54.0.dist-info/RECORD,,
136
+ langroid-0.54.1.dist-info/METADATA,sha256=uamTXuB82_ONKDncZCXu8Lz_Xu1VpL2DT56kaaFLbDY,65395
137
+ langroid-0.54.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
138
+ langroid-0.54.1.dist-info/licenses/LICENSE,sha256=EgVbvA6VSYgUlvC3RvPKehSg7MFaxWDsFuzLOsPPfJg,1065
139
+ langroid-0.54.1.dist-info/RECORD,,