grasp_agents 0.5.12__tar.gz → 0.5.14__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.5.12 → grasp_agents-0.5.14}/PKG-INFO +1 -1
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/pyproject.toml +1 -1
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/litellm/lite_llm.py +14 -15
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/processors/base_processor.py +3 -2
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/.gitignore +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/LICENSE.md +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/README.md +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/__init__.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/cloud_llm.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/costs_dict.yaml +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/errors.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/generics_utils.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/grasp_logging.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/http_client.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/litellm/__init__.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/litellm/completion_chunk_converters.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/litellm/completion_converters.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/litellm/converters.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/litellm/message_converters.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/llm.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/llm_agent.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/llm_agent_memory.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/llm_policy_executor.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/memory.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/openai/__init__.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/openai/completion_chunk_converters.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/openai/completion_converters.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/openai/content_converters.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/openai/converters.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/openai/message_converters.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/openai/openai_llm.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/openai/tool_converters.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/packet.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/packet_pool.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/printer.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/processors/parallel_processor.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/processors/processor.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/prompt_builder.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/rate_limiting/__init__.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/rate_limiting/rate_limiter_chunked.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/rate_limiting/types.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/rate_limiting/utils.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/run_context.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/runner.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/typing/__init__.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/typing/completion.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/typing/completion_chunk.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/typing/content.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/typing/converters.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/typing/events.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/typing/io.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/typing/message.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/typing/tool.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/usage_tracker.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/utils.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/workflow/__init__.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/workflow/looped_workflow.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/workflow/sequential_workflow.py +0 -0
- {grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/workflow/workflow_processor.py +0 -0
@@ -74,23 +74,22 @@ class LiteLLM(CloudLLM[LiteLLMSettings, LiteLLMConverters]):
|
|
74
74
|
)
|
75
75
|
|
76
76
|
_api_provider = self.api_provider
|
77
|
-
|
78
|
-
if self.model_name in litellm.get_valid_models(): # type: ignore[no-untyped-call]
|
77
|
+
try:
|
79
78
|
_, provider_name, _, _ = litellm.get_llm_provider(self.model_name) # type: ignore[no-untyped-call]
|
80
79
|
_api_provider = APIProvider(name=provider_name)
|
81
|
-
|
82
|
-
self.
|
83
|
-
"api_key"
|
84
|
-
|
85
|
-
|
86
|
-
"api_base"
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
80
|
+
except Exception as exc:
|
81
|
+
if self.api_provider is not None:
|
82
|
+
self._lite_llm_completion_params["api_key"] = self.api_provider.get(
|
83
|
+
"api_key"
|
84
|
+
)
|
85
|
+
self._lite_llm_completion_params["api_base"] = self.api_provider.get(
|
86
|
+
"api_base"
|
87
|
+
)
|
88
|
+
else:
|
89
|
+
raise ValueError(
|
90
|
+
f"Failed to retrieve a LiteLLM supported API provider for model "
|
91
|
+
f"'{self.model_name}' and no custom API provider was specified."
|
92
|
+
) from exc
|
94
93
|
|
95
94
|
if self.llm_settings is not None:
|
96
95
|
stream_options = self.llm_settings.get("stream_options") or {}
|
@@ -47,6 +47,7 @@ def with_retry(func: F) -> F:
|
|
47
47
|
async def wrapper(
|
48
48
|
self: "BaseProcessor[Any, Any, Any, Any]", *args: Any, **kwargs: Any
|
49
49
|
) -> Packet[Any]:
|
50
|
+
none_packet = Packet(payloads=[None], sender=self.name)
|
50
51
|
call_id = kwargs.get("call_id", "unknown")
|
51
52
|
for n_attempt in range(self.max_retries + 1):
|
52
53
|
try:
|
@@ -61,12 +62,12 @@ def with_retry(func: F) -> F:
|
|
61
62
|
else:
|
62
63
|
logger.warning(f"{err_message} after retrying:\n{err}")
|
63
64
|
# raise ProcRunError(proc_name=self.name, call_id=call_id) from err
|
64
|
-
return
|
65
|
+
return none_packet
|
65
66
|
|
66
67
|
logger.warning(f"{err_message} (retry attempt {n_attempt + 1}):\n{err}")
|
67
68
|
# This part should not be reachable due to the raise in the loop
|
68
69
|
# raise ProcRunError(proc_name=self.name, call_id=call_id)
|
69
|
-
return
|
70
|
+
return none_packet
|
70
71
|
|
71
72
|
return cast("F", wrapper)
|
72
73
|
|
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.5.12 → grasp_agents-0.5.14}/src/grasp_agents/litellm/completion_chunk_converters.py
RENAMED
File without changes
|
{grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/litellm/completion_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
|
{grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/openai/completion_chunk_converters.py
RENAMED
File without changes
|
{grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/openai/completion_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
|
{grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/processors/parallel_processor.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{grasp_agents-0.5.12 → grasp_agents-0.5.14}/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
|
File without changes
|
{grasp_agents-0.5.12 → grasp_agents-0.5.14}/src/grasp_agents/workflow/sequential_workflow.py
RENAMED
File without changes
|
File without changes
|