grasp_agents 0.4.0__py3-none-any.whl → 0.4.2__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.
@@ -366,9 +366,13 @@ class LLMPolicyExecutor(AutoInstanceAttributesMixin, Generic[_FinalAnswerT, CtxT
366
366
  # If we are not in ReAct mode, we set tool_choice to "auto" to allow
367
367
  # the LLM to choose freely whether to call tools.
368
368
 
369
- tool_choice = (
370
- "none" if (self._react_mode and gen_message.tool_calls) else "required"
371
- )
369
+ if self._react_mode and gen_message.tool_calls:
370
+ tool_choice = "none"
371
+ elif gen_message.tool_calls:
372
+ tool_choice = "auto"
373
+ else:
374
+ tool_choice = "required"
375
+
372
376
  gen_message = (
373
377
  await self.generate_messages(
374
378
  memory, tool_choice=tool_choice, run_id=run_id, ctx=ctx
@@ -66,6 +66,7 @@ class Content(BaseModel):
66
66
  def from_formatted_prompt(
67
67
  cls,
68
68
  prompt_template: str,
69
+ /,
69
70
  **prompt_args: str | int | bool | ImageData | None,
70
71
  ) -> "Content":
71
72
  prompt_args = prompt_args or {}
@@ -45,9 +45,7 @@ class UserMessage(MessageBase):
45
45
  name: str | None = None,
46
46
  prompt_args: Mapping[str, str | int | bool | ImageData] | None = None,
47
47
  ) -> "UserMessage":
48
- content = Content.from_formatted_prompt(
49
- prompt_template=prompt_template, **(prompt_args or {})
50
- )
48
+ content = Content.from_formatted_prompt(prompt_template, **(prompt_args or {}))
51
49
 
52
50
  return cls(content=content, name=name)
53
51
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: grasp_agents
3
- Version: 0.4.0
3
+ Version: 0.4.2
4
4
  Summary: Grasp Agents Library
5
5
  License-File: LICENSE.md
6
6
  Requires-Python: <4,>=3.11.4
@@ -45,7 +45,7 @@ Description-Content-Type: text/markdown
45
45
  - Workflows (static communication topology), including loops
46
46
  - Agents-as-tools for task delegation
47
47
  - Freeform A2A communication via the in-process actor model
48
- - Batch processing support outside of agentic loops
48
+ - Parallel processing with flexible retries and rate limiting
49
49
  - Simple logging and usage/cost tracking
50
50
 
51
51
  ## Project Structure
@@ -9,7 +9,7 @@ grasp_agents/http_client.py,sha256=Es8NXGDkp4Nem7g24-jW0KFGA9Hp_o2Cv3cOvjup-iU,8
9
9
  grasp_agents/llm.py,sha256=S5muzwTbbT048YyASG_BrMcGYX7IGB0q3KZwL3H26wo,5193
10
10
  grasp_agents/llm_agent.py,sha256=tK6cOIPTQzH8GO_xDSLMwRiZX_YrGYNbHzZnURRs8NQ,13835
11
11
  grasp_agents/llm_agent_memory.py,sha256=KPVnwF68acVNdSObSaRcO905YYx8vLHJ-kAEfZYs0sA,1860
12
- grasp_agents/llm_policy_executor.py,sha256=Fzu5tXXbB-60vEzvlFOwC3IcEKq-2_rPh54E06neYro,17488
12
+ grasp_agents/llm_policy_executor.py,sha256=C9qzSkF371-c15-HRQDaDfUaYXKRUCYTgq31b78p2RY,17593
13
13
  grasp_agents/memory.py,sha256=QSWjpGTn_t3XFKDxycWUCNFFueQcajzduQGU1vkJFWQ,720
14
14
  grasp_agents/packet.py,sha256=PZ1EpclniAoLk7z4ieZbWzgYH3JSRgnlTe_WfbJYG_4,707
15
15
  grasp_agents/packet_pool.py,sha256=F29EWkKM-305Qqf3hK9jriYXj4vgAx9iAWTg-hfZONs,3035
@@ -34,17 +34,17 @@ grasp_agents/rate_limiting/utils.py,sha256=oEDWDNHYMUdxOOG49PlAJochkZq8nnVBCo6Jx
34
34
  grasp_agents/typing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
35
35
  grasp_agents/typing/completion.py,sha256=KrvdFZqOcw5GePdMhDoFuwCkMJ86nqRdz9mT9s2lFv4,2445
36
36
  grasp_agents/typing/completion_chunk.py,sha256=eo9h2f3BphBz-sgnCetB9o6Ol6MOl6VH89fMM-NtxtE,6050
37
- grasp_agents/typing/content.py,sha256=rP6_PnkBqDrto6kDEubzNwCvUkXosSqnxQwfw2r35yA,3648
37
+ grasp_agents/typing/content.py,sha256=XFmLpNWkGhkw5JujO6UsYwhzTHkU67PfhzaXH2waLcQ,3659
38
38
  grasp_agents/typing/converters.py,sha256=kHlocHQS8QnduZOzNPbj3aRD8JpvJd53oudYqWdOxKE,2978
39
39
  grasp_agents/typing/events.py,sha256=QbrvXnDmXFr9_cSsdqL9f35eQLOfZ2O0h3a6yCRtKwY,2625
40
40
  grasp_agents/typing/io.py,sha256=RtBnxOiEJkfCPz7bEu1T1JXU7o71MhHK3RkeedzWwX0,237
41
- grasp_agents/typing/message.py,sha256=IhWBJeXhzMEm3SNYPtcYUebFaKlTCwv-ePPtHlIAyUA,2388
41
+ grasp_agents/typing/message.py,sha256=vB94CLGfNJOZ3pTKneVP_mbZpWrhC_981K5OhHUiLW4,2350
42
42
  grasp_agents/typing/tool.py,sha256=mHodyJYbiGQAG7exyDh04n5eqpDEUnV3pFAbC23LHQM,1754
43
43
  grasp_agents/workflow/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
44
44
  grasp_agents/workflow/looped_workflow.py,sha256=eQkjCo6j3W5Xc7mw3AGmXpUhTkK2BmhrvCuht2UkZuI,4537
45
45
  grasp_agents/workflow/sequential_workflow.py,sha256=UCHZXvTy47S0UG0WwuKp2G7Az6dAcE5tIFPaOXhxcWM,2347
46
46
  grasp_agents/workflow/workflow_processor.py,sha256=lGW-Cy1QraU1AaCPVRs9-EtU5Z_3O3EAnuyIPzD6KQ8,3134
47
- grasp_agents-0.4.0.dist-info/METADATA,sha256=wXLHFglzchCwgLmvqiRKofLkydOoT65B2bP1kOR8xHE,6858
48
- grasp_agents-0.4.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
49
- grasp_agents-0.4.0.dist-info/licenses/LICENSE.md,sha256=-nNNdWqGB8gJ2O-peFQ2Irshv5tW5pHKyTcYkwvH7CE,1201
50
- grasp_agents-0.4.0.dist-info/RECORD,,
47
+ grasp_agents-0.4.2.dist-info/METADATA,sha256=RX_H6TsRQxb-V9JJxjgWu1qn63GPKfEkD2B8Y2cY-1Y,6868
48
+ grasp_agents-0.4.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
49
+ grasp_agents-0.4.2.dist-info/licenses/LICENSE.md,sha256=-nNNdWqGB8gJ2O-peFQ2Irshv5tW5pHKyTcYkwvH7CE,1201
50
+ grasp_agents-0.4.2.dist-info/RECORD,,