grasp_agents 0.4.0__tar.gz → 0.4.3__tar.gz
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.
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/PKG-INFO +2 -2
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/README.md +1 -1
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/pyproject.toml +1 -1
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/llm.py +3 -1
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/llm_agent.py +1 -1
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/llm_policy_executor.py +13 -6
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/typing/content.py +1 -0
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/typing/message.py +1 -3
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/.gitignore +0 -0
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/LICENSE.md +0 -0
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/__init__.py +0 -0
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/cloud_llm.py +0 -0
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/comm_processor.py +0 -0
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/costs_dict.yaml +0 -0
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/errors.py +0 -0
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/generics_utils.py +0 -0
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/grasp_logging.py +0 -0
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/http_client.py +0 -0
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/llm_agent_memory.py +0 -0
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/memory.py +0 -0
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/openai/__init__.py +0 -0
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/openai/completion_chunk_converters.py +0 -0
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/openai/completion_converters.py +0 -0
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/openai/content_converters.py +0 -0
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/openai/converters.py +0 -0
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/openai/message_converters.py +0 -0
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/openai/openai_llm.py +0 -0
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/openai/tool_converters.py +0 -0
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/packet.py +0 -0
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/packet_pool.py +0 -0
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/printer.py +0 -0
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/processor.py +0 -0
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/prompt_builder.py +0 -0
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/rate_limiting/__init__.py +0 -0
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/rate_limiting/rate_limiter_chunked.py +0 -0
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/rate_limiting/types.py +0 -0
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/rate_limiting/utils.py +0 -0
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/run_context.py +0 -0
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/typing/__init__.py +0 -0
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/typing/completion.py +0 -0
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/typing/completion_chunk.py +0 -0
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/typing/converters.py +0 -0
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/typing/events.py +0 -0
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/typing/io.py +0 -0
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/typing/tool.py +0 -0
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/usage_tracker.py +0 -0
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/utils.py +0 -0
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/workflow/__init__.py +0 -0
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/workflow/looped_workflow.py +0 -0
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/workflow/sequential_workflow.py +0 -0
- {grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/workflow/workflow_processor.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: grasp_agents
|
3
|
-
Version: 0.4.
|
3
|
+
Version: 0.4.3
|
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
|
-
-
|
48
|
+
- Parallel processing with flexible retries and rate limiting
|
49
49
|
- Simple logging and usage/cost tracking
|
50
50
|
|
51
51
|
## Project Structure
|
@@ -29,7 +29,7 @@
|
|
29
29
|
- Workflows (static communication topology), including loops
|
30
30
|
- Agents-as-tools for task delegation
|
31
31
|
- Freeform A2A communication via the in-process actor model
|
32
|
-
-
|
32
|
+
- Parallel processing with flexible retries and rate limiting
|
33
33
|
- Simple logging and usage/cost tracking
|
34
34
|
|
35
35
|
## Project Structure
|
@@ -106,7 +106,9 @@ class LLM(ABC, Generic[SettingsT_co, ConvertT_co]):
|
|
106
106
|
for message in completion.messages:
|
107
107
|
if not message.tool_calls:
|
108
108
|
validate_obj_from_json_or_py_string(
|
109
|
-
message.content or "",
|
109
|
+
message.content or "",
|
110
|
+
adapter=self._response_format_adapter,
|
111
|
+
from_substring=True,
|
110
112
|
)
|
111
113
|
|
112
114
|
def _validate_tool_calls(self, completion: Completion) -> None:
|
@@ -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
|
-
|
370
|
-
|
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
|
@@ -430,9 +434,12 @@ class LLMPolicyExecutor(AutoInstanceAttributesMixin, Generic[_FinalAnswerT, CtxT
|
|
430
434
|
|
431
435
|
self._manage_memory(memory, ctx=ctx, num_turns=turns)
|
432
436
|
|
433
|
-
|
434
|
-
|
435
|
-
|
437
|
+
if self._react_mode and gen_message.tool_calls:
|
438
|
+
tool_choice = "none"
|
439
|
+
elif gen_message.tool_calls:
|
440
|
+
tool_choice = "auto"
|
441
|
+
else:
|
442
|
+
tool_choice = "required"
|
436
443
|
async for event in self.generate_messages_stream(
|
437
444
|
memory, tool_choice=tool_choice, run_id=run_id, ctx=ctx
|
438
445
|
):
|
@@ -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
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/openai/completion_chunk_converters.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{grasp_agents-0.4.0 → grasp_agents-0.4.3}/src/grasp_agents/rate_limiting/rate_limiter_chunked.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|