agentex-sdk 0.1.0a6__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.
- agentex/__init__.py +103 -0
- agentex/_base_client.py +1992 -0
- agentex/_client.py +506 -0
- agentex/_compat.py +219 -0
- agentex/_constants.py +14 -0
- agentex/_exceptions.py +108 -0
- agentex/_files.py +123 -0
- agentex/_models.py +829 -0
- agentex/_qs.py +150 -0
- agentex/_resource.py +43 -0
- agentex/_response.py +830 -0
- agentex/_streaming.py +333 -0
- agentex/_types.py +219 -0
- agentex/_utils/__init__.py +57 -0
- agentex/_utils/_logs.py +25 -0
- agentex/_utils/_proxy.py +65 -0
- agentex/_utils/_reflection.py +42 -0
- agentex/_utils/_resources_proxy.py +24 -0
- agentex/_utils/_streams.py +12 -0
- agentex/_utils/_sync.py +86 -0
- agentex/_utils/_transform.py +447 -0
- agentex/_utils/_typing.py +151 -0
- agentex/_utils/_utils.py +422 -0
- agentex/_version.py +4 -0
- agentex/lib/.keep +4 -0
- agentex/lib/__init__.py +0 -0
- agentex/lib/adk/__init__.py +41 -0
- agentex/lib/adk/_modules/__init__.py +0 -0
- agentex/lib/adk/_modules/acp.py +247 -0
- agentex/lib/adk/_modules/agent_task_tracker.py +176 -0
- agentex/lib/adk/_modules/agents.py +77 -0
- agentex/lib/adk/_modules/events.py +141 -0
- agentex/lib/adk/_modules/messages.py +285 -0
- agentex/lib/adk/_modules/state.py +291 -0
- agentex/lib/adk/_modules/streaming.py +75 -0
- agentex/lib/adk/_modules/tasks.py +124 -0
- agentex/lib/adk/_modules/tracing.py +194 -0
- agentex/lib/adk/providers/__init__.py +9 -0
- agentex/lib/adk/providers/_modules/__init__.py +0 -0
- agentex/lib/adk/providers/_modules/litellm.py +232 -0
- agentex/lib/adk/providers/_modules/openai.py +416 -0
- agentex/lib/adk/providers/_modules/sgp.py +85 -0
- agentex/lib/adk/utils/__init__.py +5 -0
- agentex/lib/adk/utils/_modules/__init__.py +0 -0
- agentex/lib/adk/utils/_modules/templating.py +94 -0
- agentex/lib/cli/__init__.py +0 -0
- agentex/lib/cli/commands/__init__.py +0 -0
- agentex/lib/cli/commands/agents.py +328 -0
- agentex/lib/cli/commands/init.py +227 -0
- agentex/lib/cli/commands/main.py +33 -0
- agentex/lib/cli/commands/secrets.py +169 -0
- agentex/lib/cli/commands/tasks.py +118 -0
- agentex/lib/cli/commands/uv.py +133 -0
- agentex/lib/cli/handlers/__init__.py +0 -0
- agentex/lib/cli/handlers/agent_handlers.py +160 -0
- agentex/lib/cli/handlers/cleanup_handlers.py +186 -0
- agentex/lib/cli/handlers/deploy_handlers.py +351 -0
- agentex/lib/cli/handlers/run_handlers.py +452 -0
- agentex/lib/cli/handlers/secret_handlers.py +670 -0
- agentex/lib/cli/templates/default/.dockerignore.j2 +43 -0
- agentex/lib/cli/templates/default/Dockerfile-uv.j2 +42 -0
- agentex/lib/cli/templates/default/Dockerfile.j2 +42 -0
- agentex/lib/cli/templates/default/README.md.j2 +193 -0
- agentex/lib/cli/templates/default/deploy/example.yaml.j2 +55 -0
- agentex/lib/cli/templates/default/manifest.yaml.j2 +116 -0
- agentex/lib/cli/templates/default/project/acp.py.j2 +29 -0
- agentex/lib/cli/templates/default/pyproject.toml.j2 +33 -0
- agentex/lib/cli/templates/default/requirements.txt.j2 +5 -0
- agentex/lib/cli/templates/deploy/Screenshot 2025-03-19 at 10.36.57/342/200/257AM.png +0 -0
- agentex/lib/cli/templates/deploy/example.yaml.j2 +55 -0
- agentex/lib/cli/templates/sync/.dockerignore.j2 +43 -0
- agentex/lib/cli/templates/sync/Dockerfile-uv.j2 +42 -0
- agentex/lib/cli/templates/sync/Dockerfile.j2 +42 -0
- agentex/lib/cli/templates/sync/README.md.j2 +293 -0
- agentex/lib/cli/templates/sync/deploy/example.yaml.j2 +55 -0
- agentex/lib/cli/templates/sync/manifest.yaml.j2 +116 -0
- agentex/lib/cli/templates/sync/project/acp.py.j2 +26 -0
- agentex/lib/cli/templates/sync/pyproject.toml.j2 +33 -0
- agentex/lib/cli/templates/sync/requirements.txt.j2 +5 -0
- agentex/lib/cli/templates/temporal/.dockerignore.j2 +43 -0
- agentex/lib/cli/templates/temporal/Dockerfile-uv.j2 +48 -0
- agentex/lib/cli/templates/temporal/Dockerfile.j2 +48 -0
- agentex/lib/cli/templates/temporal/README.md.j2 +316 -0
- agentex/lib/cli/templates/temporal/deploy/example.yaml.j2 +55 -0
- agentex/lib/cli/templates/temporal/manifest.yaml.j2 +137 -0
- agentex/lib/cli/templates/temporal/project/acp.py.j2 +30 -0
- agentex/lib/cli/templates/temporal/project/run_worker.py.j2 +33 -0
- agentex/lib/cli/templates/temporal/project/workflow.py.j2 +66 -0
- agentex/lib/cli/templates/temporal/pyproject.toml.j2 +34 -0
- agentex/lib/cli/templates/temporal/requirements.txt.j2 +5 -0
- agentex/lib/cli/utils/cli_utils.py +14 -0
- agentex/lib/cli/utils/credential_utils.py +103 -0
- agentex/lib/cli/utils/exceptions.py +6 -0
- agentex/lib/cli/utils/kubectl_utils.py +135 -0
- agentex/lib/cli/utils/kubernetes_secrets_utils.py +185 -0
- agentex/lib/core/__init__.py +0 -0
- agentex/lib/core/adapters/__init__.py +0 -0
- agentex/lib/core/adapters/llm/__init__.py +1 -0
- agentex/lib/core/adapters/llm/adapter_litellm.py +46 -0
- agentex/lib/core/adapters/llm/adapter_sgp.py +55 -0
- agentex/lib/core/adapters/llm/port.py +24 -0
- agentex/lib/core/adapters/streams/adapter_redis.py +128 -0
- agentex/lib/core/adapters/streams/port.py +50 -0
- agentex/lib/core/clients/__init__.py +1 -0
- agentex/lib/core/clients/temporal/__init__.py +0 -0
- agentex/lib/core/clients/temporal/temporal_client.py +181 -0
- agentex/lib/core/clients/temporal/types.py +47 -0
- agentex/lib/core/clients/temporal/utils.py +56 -0
- agentex/lib/core/services/__init__.py +0 -0
- agentex/lib/core/services/adk/__init__.py +0 -0
- agentex/lib/core/services/adk/acp/__init__.py +0 -0
- agentex/lib/core/services/adk/acp/acp.py +210 -0
- agentex/lib/core/services/adk/agent_task_tracker.py +85 -0
- agentex/lib/core/services/adk/agents.py +43 -0
- agentex/lib/core/services/adk/events.py +61 -0
- agentex/lib/core/services/adk/messages.py +164 -0
- agentex/lib/core/services/adk/providers/__init__.py +0 -0
- agentex/lib/core/services/adk/providers/litellm.py +256 -0
- agentex/lib/core/services/adk/providers/openai.py +723 -0
- agentex/lib/core/services/adk/providers/sgp.py +99 -0
- agentex/lib/core/services/adk/state.py +120 -0
- agentex/lib/core/services/adk/streaming.py +262 -0
- agentex/lib/core/services/adk/tasks.py +69 -0
- agentex/lib/core/services/adk/tracing.py +36 -0
- agentex/lib/core/services/adk/utils/__init__.py +0 -0
- agentex/lib/core/services/adk/utils/templating.py +58 -0
- agentex/lib/core/temporal/__init__.py +0 -0
- agentex/lib/core/temporal/activities/__init__.py +207 -0
- agentex/lib/core/temporal/activities/activity_helpers.py +37 -0
- agentex/lib/core/temporal/activities/adk/__init__.py +0 -0
- agentex/lib/core/temporal/activities/adk/acp/__init__.py +0 -0
- agentex/lib/core/temporal/activities/adk/acp/acp_activities.py +86 -0
- agentex/lib/core/temporal/activities/adk/agent_task_tracker_activities.py +76 -0
- agentex/lib/core/temporal/activities/adk/agents_activities.py +35 -0
- agentex/lib/core/temporal/activities/adk/events_activities.py +50 -0
- agentex/lib/core/temporal/activities/adk/messages_activities.py +94 -0
- agentex/lib/core/temporal/activities/adk/providers/__init__.py +0 -0
- agentex/lib/core/temporal/activities/adk/providers/litellm_activities.py +71 -0
- agentex/lib/core/temporal/activities/adk/providers/openai_activities.py +210 -0
- agentex/lib/core/temporal/activities/adk/providers/sgp_activities.py +42 -0
- agentex/lib/core/temporal/activities/adk/state_activities.py +85 -0
- agentex/lib/core/temporal/activities/adk/streaming_activities.py +33 -0
- agentex/lib/core/temporal/activities/adk/tasks_activities.py +48 -0
- agentex/lib/core/temporal/activities/adk/tracing_activities.py +55 -0
- agentex/lib/core/temporal/activities/adk/utils/__init__.py +0 -0
- agentex/lib/core/temporal/activities/adk/utils/templating_activities.py +41 -0
- agentex/lib/core/temporal/services/__init__.py +0 -0
- agentex/lib/core/temporal/services/temporal_task_service.py +69 -0
- agentex/lib/core/temporal/types/__init__.py +0 -0
- agentex/lib/core/temporal/types/workflow.py +5 -0
- agentex/lib/core/temporal/workers/__init__.py +0 -0
- agentex/lib/core/temporal/workers/worker.py +162 -0
- agentex/lib/core/temporal/workflows/workflow.py +26 -0
- agentex/lib/core/tracing/__init__.py +5 -0
- agentex/lib/core/tracing/processors/agentex_tracing_processor.py +117 -0
- agentex/lib/core/tracing/processors/sgp_tracing_processor.py +119 -0
- agentex/lib/core/tracing/processors/tracing_processor_interface.py +40 -0
- agentex/lib/core/tracing/trace.py +311 -0
- agentex/lib/core/tracing/tracer.py +70 -0
- agentex/lib/core/tracing/tracing_processor_manager.py +62 -0
- agentex/lib/environment_variables.py +87 -0
- agentex/lib/py.typed +0 -0
- agentex/lib/sdk/__init__.py +0 -0
- agentex/lib/sdk/config/__init__.py +0 -0
- agentex/lib/sdk/config/agent_config.py +61 -0
- agentex/lib/sdk/config/agent_manifest.py +219 -0
- agentex/lib/sdk/config/build_config.py +35 -0
- agentex/lib/sdk/config/deployment_config.py +117 -0
- agentex/lib/sdk/config/local_development_config.py +56 -0
- agentex/lib/sdk/config/project_config.py +103 -0
- agentex/lib/sdk/fastacp/__init__.py +3 -0
- agentex/lib/sdk/fastacp/base/base_acp_server.py +406 -0
- agentex/lib/sdk/fastacp/fastacp.py +74 -0
- agentex/lib/sdk/fastacp/impl/agentic_base_acp.py +72 -0
- agentex/lib/sdk/fastacp/impl/sync_acp.py +109 -0
- agentex/lib/sdk/fastacp/impl/temporal_acp.py +97 -0
- agentex/lib/sdk/fastacp/tests/README.md +297 -0
- agentex/lib/sdk/fastacp/tests/conftest.py +307 -0
- agentex/lib/sdk/fastacp/tests/pytest.ini +10 -0
- agentex/lib/sdk/fastacp/tests/run_tests.py +227 -0
- agentex/lib/sdk/fastacp/tests/test_base_acp_server.py +450 -0
- agentex/lib/sdk/fastacp/tests/test_fastacp_factory.py +344 -0
- agentex/lib/sdk/fastacp/tests/test_integration.py +477 -0
- agentex/lib/sdk/state_machine/__init__.py +6 -0
- agentex/lib/sdk/state_machine/noop_workflow.py +21 -0
- agentex/lib/sdk/state_machine/state.py +10 -0
- agentex/lib/sdk/state_machine/state_machine.py +189 -0
- agentex/lib/sdk/state_machine/state_workflow.py +16 -0
- agentex/lib/sdk/utils/__init__.py +0 -0
- agentex/lib/sdk/utils/messages.py +223 -0
- agentex/lib/types/__init__.py +0 -0
- agentex/lib/types/acp.py +94 -0
- agentex/lib/types/agent_configs.py +79 -0
- agentex/lib/types/agent_results.py +29 -0
- agentex/lib/types/credentials.py +34 -0
- agentex/lib/types/fastacp.py +61 -0
- agentex/lib/types/files.py +13 -0
- agentex/lib/types/json_rpc.py +49 -0
- agentex/lib/types/llm_messages.py +354 -0
- agentex/lib/types/task_message_updates.py +171 -0
- agentex/lib/types/tracing.py +34 -0
- agentex/lib/utils/__init__.py +0 -0
- agentex/lib/utils/completions.py +131 -0
- agentex/lib/utils/console.py +14 -0
- agentex/lib/utils/io.py +29 -0
- agentex/lib/utils/iterables.py +14 -0
- agentex/lib/utils/json_schema.py +23 -0
- agentex/lib/utils/logging.py +31 -0
- agentex/lib/utils/mcp.py +17 -0
- agentex/lib/utils/model_utils.py +46 -0
- agentex/lib/utils/parsing.py +15 -0
- agentex/lib/utils/regex.py +6 -0
- agentex/lib/utils/temporal.py +13 -0
- agentex/py.typed +0 -0
- agentex/resources/__init__.py +103 -0
- agentex/resources/agents.py +707 -0
- agentex/resources/events.py +294 -0
- agentex/resources/messages/__init__.py +33 -0
- agentex/resources/messages/batch.py +271 -0
- agentex/resources/messages/messages.py +492 -0
- agentex/resources/spans.py +557 -0
- agentex/resources/states.py +544 -0
- agentex/resources/tasks.py +615 -0
- agentex/resources/tracker.py +384 -0
- agentex/types/__init__.py +56 -0
- agentex/types/acp_type.py +7 -0
- agentex/types/agent.py +29 -0
- agentex/types/agent_list_params.py +13 -0
- agentex/types/agent_list_response.py +10 -0
- agentex/types/agent_rpc_by_name_params.py +21 -0
- agentex/types/agent_rpc_params.py +51 -0
- agentex/types/agent_rpc_params1.py +21 -0
- agentex/types/agent_rpc_response.py +20 -0
- agentex/types/agent_rpc_result.py +90 -0
- agentex/types/agent_task_tracker.py +34 -0
- agentex/types/data_content.py +30 -0
- agentex/types/data_content_param.py +31 -0
- agentex/types/data_delta.py +14 -0
- agentex/types/event.py +29 -0
- agentex/types/event_list_params.py +22 -0
- agentex/types/event_list_response.py +10 -0
- agentex/types/message_author.py +7 -0
- agentex/types/message_create_params.py +18 -0
- agentex/types/message_list_params.py +14 -0
- agentex/types/message_list_response.py +10 -0
- agentex/types/message_style.py +7 -0
- agentex/types/message_update_params.py +18 -0
- agentex/types/messages/__init__.py +8 -0
- agentex/types/messages/batch_create_params.py +16 -0
- agentex/types/messages/batch_create_response.py +10 -0
- agentex/types/messages/batch_update_params.py +16 -0
- agentex/types/messages/batch_update_response.py +10 -0
- agentex/types/shared/__init__.py +3 -0
- agentex/types/shared/task_message_update.py +83 -0
- agentex/types/span.py +36 -0
- agentex/types/span_create_params.py +40 -0
- agentex/types/span_list_params.py +12 -0
- agentex/types/span_list_response.py +10 -0
- agentex/types/span_update_params.py +37 -0
- agentex/types/state.py +25 -0
- agentex/types/state_create_params.py +16 -0
- agentex/types/state_list_params.py +16 -0
- agentex/types/state_list_response.py +10 -0
- agentex/types/state_update_params.py +16 -0
- agentex/types/task.py +23 -0
- agentex/types/task_delete_by_name_response.py +8 -0
- agentex/types/task_delete_response.py +8 -0
- agentex/types/task_list_response.py +10 -0
- agentex/types/task_message.py +33 -0
- agentex/types/task_message_content.py +16 -0
- agentex/types/task_message_content_param.py +17 -0
- agentex/types/task_message_delta.py +16 -0
- agentex/types/text_content.py +53 -0
- agentex/types/text_content_param.py +54 -0
- agentex/types/text_delta.py +14 -0
- agentex/types/tool_request_content.py +36 -0
- agentex/types/tool_request_content_param.py +37 -0
- agentex/types/tool_request_delta.py +18 -0
- agentex/types/tool_response_content.py +36 -0
- agentex/types/tool_response_content_param.py +36 -0
- agentex/types/tool_response_delta.py +18 -0
- agentex/types/tracker_list_params.py +16 -0
- agentex/types/tracker_list_response.py +10 -0
- agentex/types/tracker_update_params.py +19 -0
- agentex_sdk-0.1.0a6.dist-info/METADATA +426 -0
- agentex_sdk-0.1.0a6.dist-info/RECORD +289 -0
- agentex_sdk-0.1.0a6.dist-info/WHEEL +4 -0
- agentex_sdk-0.1.0a6.dist-info/entry_points.txt +2 -0
- agentex_sdk-0.1.0a6.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,707 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
from typing import Union, Optional
|
6
|
+
from typing_extensions import Literal
|
7
|
+
|
8
|
+
import httpx
|
9
|
+
|
10
|
+
from ..types import AgentRpcParams, agent_rpc_params, agent_list_params, agent_rpc_by_name_params
|
11
|
+
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
12
|
+
from .._utils import maybe_transform, async_maybe_transform
|
13
|
+
from .._compat import cached_property
|
14
|
+
from .._resource import SyncAPIResource, AsyncAPIResource
|
15
|
+
from .._response import (
|
16
|
+
to_raw_response_wrapper,
|
17
|
+
to_streamed_response_wrapper,
|
18
|
+
async_to_raw_response_wrapper,
|
19
|
+
async_to_streamed_response_wrapper,
|
20
|
+
)
|
21
|
+
from ..types.agent import Agent
|
22
|
+
from .._base_client import make_request_options
|
23
|
+
from ..types.agent_rpc_params import AgentRpcParams
|
24
|
+
from ..types.agent_rpc_response import AgentRpcResponse
|
25
|
+
from ..types.agent_list_response import AgentListResponse
|
26
|
+
|
27
|
+
__all__ = ["AgentsResource", "AsyncAgentsResource"]
|
28
|
+
|
29
|
+
|
30
|
+
class AgentsResource(SyncAPIResource):
|
31
|
+
@cached_property
|
32
|
+
def with_raw_response(self) -> AgentsResourceWithRawResponse:
|
33
|
+
"""
|
34
|
+
This property can be used as a prefix for any HTTP method call to return
|
35
|
+
the raw response object instead of the parsed content.
|
36
|
+
|
37
|
+
For more information, see https://www.github.com/scaleapi/agentex-python#accessing-raw-response-data-eg-headers
|
38
|
+
"""
|
39
|
+
return AgentsResourceWithRawResponse(self)
|
40
|
+
|
41
|
+
@cached_property
|
42
|
+
def with_streaming_response(self) -> AgentsResourceWithStreamingResponse:
|
43
|
+
"""
|
44
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
45
|
+
|
46
|
+
For more information, see https://www.github.com/scaleapi/agentex-python#with_streaming_response
|
47
|
+
"""
|
48
|
+
return AgentsResourceWithStreamingResponse(self)
|
49
|
+
|
50
|
+
def retrieve(
|
51
|
+
self,
|
52
|
+
agent_id: str,
|
53
|
+
*,
|
54
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
55
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
56
|
+
extra_headers: Headers | None = None,
|
57
|
+
extra_query: Query | None = None,
|
58
|
+
extra_body: Body | None = None,
|
59
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
60
|
+
) -> Agent:
|
61
|
+
"""
|
62
|
+
Get an agent by its unique ID.
|
63
|
+
|
64
|
+
Args:
|
65
|
+
extra_headers: Send extra headers
|
66
|
+
|
67
|
+
extra_query: Add additional query parameters to the request
|
68
|
+
|
69
|
+
extra_body: Add additional JSON properties to the request
|
70
|
+
|
71
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
72
|
+
"""
|
73
|
+
if not agent_id:
|
74
|
+
raise ValueError(f"Expected a non-empty value for `agent_id` but received {agent_id!r}")
|
75
|
+
return self._get(
|
76
|
+
f"/agents/{agent_id}",
|
77
|
+
options=make_request_options(
|
78
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
79
|
+
),
|
80
|
+
cast_to=Agent,
|
81
|
+
)
|
82
|
+
|
83
|
+
def list(
|
84
|
+
self,
|
85
|
+
*,
|
86
|
+
task_id: Optional[str] | NotGiven = NOT_GIVEN,
|
87
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
88
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
89
|
+
extra_headers: Headers | None = None,
|
90
|
+
extra_query: Query | None = None,
|
91
|
+
extra_body: Body | None = None,
|
92
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
93
|
+
) -> AgentListResponse:
|
94
|
+
"""
|
95
|
+
List all registered agents, optionally filtered by query parameters.
|
96
|
+
|
97
|
+
Args:
|
98
|
+
task_id: Task ID
|
99
|
+
|
100
|
+
extra_headers: Send extra headers
|
101
|
+
|
102
|
+
extra_query: Add additional query parameters to the request
|
103
|
+
|
104
|
+
extra_body: Add additional JSON properties to the request
|
105
|
+
|
106
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
107
|
+
"""
|
108
|
+
return self._get(
|
109
|
+
"/agents",
|
110
|
+
options=make_request_options(
|
111
|
+
extra_headers=extra_headers,
|
112
|
+
extra_query=extra_query,
|
113
|
+
extra_body=extra_body,
|
114
|
+
timeout=timeout,
|
115
|
+
query=maybe_transform({"task_id": task_id}, agent_list_params.AgentListParams),
|
116
|
+
),
|
117
|
+
cast_to=AgentListResponse,
|
118
|
+
)
|
119
|
+
|
120
|
+
def delete(
|
121
|
+
self,
|
122
|
+
agent_id: str,
|
123
|
+
*,
|
124
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
125
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
126
|
+
extra_headers: Headers | None = None,
|
127
|
+
extra_query: Query | None = None,
|
128
|
+
extra_body: Body | None = None,
|
129
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
130
|
+
) -> Agent:
|
131
|
+
"""
|
132
|
+
Delete an agent by its unique ID.
|
133
|
+
|
134
|
+
Args:
|
135
|
+
extra_headers: Send extra headers
|
136
|
+
|
137
|
+
extra_query: Add additional query parameters to the request
|
138
|
+
|
139
|
+
extra_body: Add additional JSON properties to the request
|
140
|
+
|
141
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
142
|
+
"""
|
143
|
+
if not agent_id:
|
144
|
+
raise ValueError(f"Expected a non-empty value for `agent_id` but received {agent_id!r}")
|
145
|
+
return self._delete(
|
146
|
+
f"/agents/{agent_id}",
|
147
|
+
options=make_request_options(
|
148
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
149
|
+
),
|
150
|
+
cast_to=Agent,
|
151
|
+
)
|
152
|
+
|
153
|
+
def delete_by_name(
|
154
|
+
self,
|
155
|
+
agent_name: str,
|
156
|
+
*,
|
157
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
158
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
159
|
+
extra_headers: Headers | None = None,
|
160
|
+
extra_query: Query | None = None,
|
161
|
+
extra_body: Body | None = None,
|
162
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
163
|
+
) -> Agent:
|
164
|
+
"""
|
165
|
+
Delete an agent by its unique name.
|
166
|
+
|
167
|
+
Args:
|
168
|
+
extra_headers: Send extra headers
|
169
|
+
|
170
|
+
extra_query: Add additional query parameters to the request
|
171
|
+
|
172
|
+
extra_body: Add additional JSON properties to the request
|
173
|
+
|
174
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
175
|
+
"""
|
176
|
+
if not agent_name:
|
177
|
+
raise ValueError(f"Expected a non-empty value for `agent_name` but received {agent_name!r}")
|
178
|
+
return self._delete(
|
179
|
+
f"/agents/name/{agent_name}",
|
180
|
+
options=make_request_options(
|
181
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
182
|
+
),
|
183
|
+
cast_to=Agent,
|
184
|
+
)
|
185
|
+
|
186
|
+
def retrieve_by_name(
|
187
|
+
self,
|
188
|
+
agent_name: str,
|
189
|
+
*,
|
190
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
191
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
192
|
+
extra_headers: Headers | None = None,
|
193
|
+
extra_query: Query | None = None,
|
194
|
+
extra_body: Body | None = None,
|
195
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
196
|
+
) -> Agent:
|
197
|
+
"""
|
198
|
+
Get an agent by its unique name.
|
199
|
+
|
200
|
+
Args:
|
201
|
+
extra_headers: Send extra headers
|
202
|
+
|
203
|
+
extra_query: Add additional query parameters to the request
|
204
|
+
|
205
|
+
extra_body: Add additional JSON properties to the request
|
206
|
+
|
207
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
208
|
+
"""
|
209
|
+
if not agent_name:
|
210
|
+
raise ValueError(f"Expected a non-empty value for `agent_name` but received {agent_name!r}")
|
211
|
+
return self._get(
|
212
|
+
f"/agents/name/{agent_name}",
|
213
|
+
options=make_request_options(
|
214
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
215
|
+
),
|
216
|
+
cast_to=Agent,
|
217
|
+
)
|
218
|
+
|
219
|
+
def rpc(
|
220
|
+
self,
|
221
|
+
agent_id: str,
|
222
|
+
*,
|
223
|
+
method: Literal["event/send", "task/create", "message/send", "task/cancel"],
|
224
|
+
params: AgentRpcParams,
|
225
|
+
id: Union[int, str, None] | NotGiven = NOT_GIVEN,
|
226
|
+
jsonrpc: Literal["2.0"] | NotGiven = NOT_GIVEN,
|
227
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
228
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
229
|
+
extra_headers: Headers | None = None,
|
230
|
+
extra_query: Query | None = None,
|
231
|
+
extra_body: Body | None = None,
|
232
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
233
|
+
) -> AgentRpcResponse:
|
234
|
+
"""
|
235
|
+
Handle JSON-RPC requests for an agent by its unique ID.
|
236
|
+
|
237
|
+
Args:
|
238
|
+
params: The parameters for the agent RPC request
|
239
|
+
|
240
|
+
extra_headers: Send extra headers
|
241
|
+
|
242
|
+
extra_query: Add additional query parameters to the request
|
243
|
+
|
244
|
+
extra_body: Add additional JSON properties to the request
|
245
|
+
|
246
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
247
|
+
"""
|
248
|
+
if not agent_id:
|
249
|
+
raise ValueError(f"Expected a non-empty value for `agent_id` but received {agent_id!r}")
|
250
|
+
return self._post(
|
251
|
+
f"/agents/{agent_id}/rpc",
|
252
|
+
body=maybe_transform(
|
253
|
+
{
|
254
|
+
"method": method,
|
255
|
+
"params": params,
|
256
|
+
"id": id,
|
257
|
+
"jsonrpc": jsonrpc,
|
258
|
+
},
|
259
|
+
agent_rpc_params.AgentRpcParams,
|
260
|
+
),
|
261
|
+
options=make_request_options(
|
262
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
263
|
+
),
|
264
|
+
cast_to=AgentRpcResponse,
|
265
|
+
)
|
266
|
+
|
267
|
+
def rpc_by_name(
|
268
|
+
self,
|
269
|
+
agent_name: str,
|
270
|
+
*,
|
271
|
+
method: Literal["event/send", "task/create", "message/send", "task/cancel"],
|
272
|
+
params: AgentRpcParams,
|
273
|
+
id: Union[int, str, None] | NotGiven = NOT_GIVEN,
|
274
|
+
jsonrpc: Literal["2.0"] | NotGiven = NOT_GIVEN,
|
275
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
276
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
277
|
+
extra_headers: Headers | None = None,
|
278
|
+
extra_query: Query | None = None,
|
279
|
+
extra_body: Body | None = None,
|
280
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
281
|
+
) -> AgentRpcResponse:
|
282
|
+
"""
|
283
|
+
Handle JSON-RPC requests for an agent by its unique name.
|
284
|
+
|
285
|
+
Args:
|
286
|
+
params: The parameters for the agent RPC request
|
287
|
+
|
288
|
+
extra_headers: Send extra headers
|
289
|
+
|
290
|
+
extra_query: Add additional query parameters to the request
|
291
|
+
|
292
|
+
extra_body: Add additional JSON properties to the request
|
293
|
+
|
294
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
295
|
+
"""
|
296
|
+
if not agent_name:
|
297
|
+
raise ValueError(f"Expected a non-empty value for `agent_name` but received {agent_name!r}")
|
298
|
+
return self._post(
|
299
|
+
f"/agents/name/{agent_name}/rpc",
|
300
|
+
body=maybe_transform(
|
301
|
+
{
|
302
|
+
"method": method,
|
303
|
+
"params": params,
|
304
|
+
"id": id,
|
305
|
+
"jsonrpc": jsonrpc,
|
306
|
+
},
|
307
|
+
agent_rpc_by_name_params.AgentRpcByNameParams,
|
308
|
+
),
|
309
|
+
options=make_request_options(
|
310
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
311
|
+
),
|
312
|
+
cast_to=AgentRpcResponse,
|
313
|
+
)
|
314
|
+
|
315
|
+
|
316
|
+
class AsyncAgentsResource(AsyncAPIResource):
|
317
|
+
@cached_property
|
318
|
+
def with_raw_response(self) -> AsyncAgentsResourceWithRawResponse:
|
319
|
+
"""
|
320
|
+
This property can be used as a prefix for any HTTP method call to return
|
321
|
+
the raw response object instead of the parsed content.
|
322
|
+
|
323
|
+
For more information, see https://www.github.com/scaleapi/agentex-python#accessing-raw-response-data-eg-headers
|
324
|
+
"""
|
325
|
+
return AsyncAgentsResourceWithRawResponse(self)
|
326
|
+
|
327
|
+
@cached_property
|
328
|
+
def with_streaming_response(self) -> AsyncAgentsResourceWithStreamingResponse:
|
329
|
+
"""
|
330
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
331
|
+
|
332
|
+
For more information, see https://www.github.com/scaleapi/agentex-python#with_streaming_response
|
333
|
+
"""
|
334
|
+
return AsyncAgentsResourceWithStreamingResponse(self)
|
335
|
+
|
336
|
+
async def retrieve(
|
337
|
+
self,
|
338
|
+
agent_id: str,
|
339
|
+
*,
|
340
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
341
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
342
|
+
extra_headers: Headers | None = None,
|
343
|
+
extra_query: Query | None = None,
|
344
|
+
extra_body: Body | None = None,
|
345
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
346
|
+
) -> Agent:
|
347
|
+
"""
|
348
|
+
Get an agent by its unique ID.
|
349
|
+
|
350
|
+
Args:
|
351
|
+
extra_headers: Send extra headers
|
352
|
+
|
353
|
+
extra_query: Add additional query parameters to the request
|
354
|
+
|
355
|
+
extra_body: Add additional JSON properties to the request
|
356
|
+
|
357
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
358
|
+
"""
|
359
|
+
if not agent_id:
|
360
|
+
raise ValueError(f"Expected a non-empty value for `agent_id` but received {agent_id!r}")
|
361
|
+
return await self._get(
|
362
|
+
f"/agents/{agent_id}",
|
363
|
+
options=make_request_options(
|
364
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
365
|
+
),
|
366
|
+
cast_to=Agent,
|
367
|
+
)
|
368
|
+
|
369
|
+
async def list(
|
370
|
+
self,
|
371
|
+
*,
|
372
|
+
task_id: Optional[str] | NotGiven = NOT_GIVEN,
|
373
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
374
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
375
|
+
extra_headers: Headers | None = None,
|
376
|
+
extra_query: Query | None = None,
|
377
|
+
extra_body: Body | None = None,
|
378
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
379
|
+
) -> AgentListResponse:
|
380
|
+
"""
|
381
|
+
List all registered agents, optionally filtered by query parameters.
|
382
|
+
|
383
|
+
Args:
|
384
|
+
task_id: Task ID
|
385
|
+
|
386
|
+
extra_headers: Send extra headers
|
387
|
+
|
388
|
+
extra_query: Add additional query parameters to the request
|
389
|
+
|
390
|
+
extra_body: Add additional JSON properties to the request
|
391
|
+
|
392
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
393
|
+
"""
|
394
|
+
return await self._get(
|
395
|
+
"/agents",
|
396
|
+
options=make_request_options(
|
397
|
+
extra_headers=extra_headers,
|
398
|
+
extra_query=extra_query,
|
399
|
+
extra_body=extra_body,
|
400
|
+
timeout=timeout,
|
401
|
+
query=await async_maybe_transform({"task_id": task_id}, agent_list_params.AgentListParams),
|
402
|
+
),
|
403
|
+
cast_to=AgentListResponse,
|
404
|
+
)
|
405
|
+
|
406
|
+
async def delete(
|
407
|
+
self,
|
408
|
+
agent_id: str,
|
409
|
+
*,
|
410
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
411
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
412
|
+
extra_headers: Headers | None = None,
|
413
|
+
extra_query: Query | None = None,
|
414
|
+
extra_body: Body | None = None,
|
415
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
416
|
+
) -> Agent:
|
417
|
+
"""
|
418
|
+
Delete an agent by its unique ID.
|
419
|
+
|
420
|
+
Args:
|
421
|
+
extra_headers: Send extra headers
|
422
|
+
|
423
|
+
extra_query: Add additional query parameters to the request
|
424
|
+
|
425
|
+
extra_body: Add additional JSON properties to the request
|
426
|
+
|
427
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
428
|
+
"""
|
429
|
+
if not agent_id:
|
430
|
+
raise ValueError(f"Expected a non-empty value for `agent_id` but received {agent_id!r}")
|
431
|
+
return await self._delete(
|
432
|
+
f"/agents/{agent_id}",
|
433
|
+
options=make_request_options(
|
434
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
435
|
+
),
|
436
|
+
cast_to=Agent,
|
437
|
+
)
|
438
|
+
|
439
|
+
async def delete_by_name(
|
440
|
+
self,
|
441
|
+
agent_name: str,
|
442
|
+
*,
|
443
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
444
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
445
|
+
extra_headers: Headers | None = None,
|
446
|
+
extra_query: Query | None = None,
|
447
|
+
extra_body: Body | None = None,
|
448
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
449
|
+
) -> Agent:
|
450
|
+
"""
|
451
|
+
Delete an agent by its unique name.
|
452
|
+
|
453
|
+
Args:
|
454
|
+
extra_headers: Send extra headers
|
455
|
+
|
456
|
+
extra_query: Add additional query parameters to the request
|
457
|
+
|
458
|
+
extra_body: Add additional JSON properties to the request
|
459
|
+
|
460
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
461
|
+
"""
|
462
|
+
if not agent_name:
|
463
|
+
raise ValueError(f"Expected a non-empty value for `agent_name` but received {agent_name!r}")
|
464
|
+
return await self._delete(
|
465
|
+
f"/agents/name/{agent_name}",
|
466
|
+
options=make_request_options(
|
467
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
468
|
+
),
|
469
|
+
cast_to=Agent,
|
470
|
+
)
|
471
|
+
|
472
|
+
async def retrieve_by_name(
|
473
|
+
self,
|
474
|
+
agent_name: str,
|
475
|
+
*,
|
476
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
477
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
478
|
+
extra_headers: Headers | None = None,
|
479
|
+
extra_query: Query | None = None,
|
480
|
+
extra_body: Body | None = None,
|
481
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
482
|
+
) -> Agent:
|
483
|
+
"""
|
484
|
+
Get an agent by its unique name.
|
485
|
+
|
486
|
+
Args:
|
487
|
+
extra_headers: Send extra headers
|
488
|
+
|
489
|
+
extra_query: Add additional query parameters to the request
|
490
|
+
|
491
|
+
extra_body: Add additional JSON properties to the request
|
492
|
+
|
493
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
494
|
+
"""
|
495
|
+
if not agent_name:
|
496
|
+
raise ValueError(f"Expected a non-empty value for `agent_name` but received {agent_name!r}")
|
497
|
+
return await self._get(
|
498
|
+
f"/agents/name/{agent_name}",
|
499
|
+
options=make_request_options(
|
500
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
501
|
+
),
|
502
|
+
cast_to=Agent,
|
503
|
+
)
|
504
|
+
|
505
|
+
async def rpc(
|
506
|
+
self,
|
507
|
+
agent_id: str,
|
508
|
+
*,
|
509
|
+
method: Literal["event/send", "task/create", "message/send", "task/cancel"],
|
510
|
+
params: AgentRpcParams,
|
511
|
+
id: Union[int, str, None] | NotGiven = NOT_GIVEN,
|
512
|
+
jsonrpc: Literal["2.0"] | NotGiven = NOT_GIVEN,
|
513
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
514
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
515
|
+
extra_headers: Headers | None = None,
|
516
|
+
extra_query: Query | None = None,
|
517
|
+
extra_body: Body | None = None,
|
518
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
519
|
+
) -> AgentRpcResponse:
|
520
|
+
"""
|
521
|
+
Handle JSON-RPC requests for an agent by its unique ID.
|
522
|
+
|
523
|
+
Args:
|
524
|
+
params: The parameters for the agent RPC request
|
525
|
+
|
526
|
+
extra_headers: Send extra headers
|
527
|
+
|
528
|
+
extra_query: Add additional query parameters to the request
|
529
|
+
|
530
|
+
extra_body: Add additional JSON properties to the request
|
531
|
+
|
532
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
533
|
+
"""
|
534
|
+
if not agent_id:
|
535
|
+
raise ValueError(f"Expected a non-empty value for `agent_id` but received {agent_id!r}")
|
536
|
+
return await self._post(
|
537
|
+
f"/agents/{agent_id}/rpc",
|
538
|
+
body=await async_maybe_transform(
|
539
|
+
{
|
540
|
+
"method": method,
|
541
|
+
"params": params,
|
542
|
+
"id": id,
|
543
|
+
"jsonrpc": jsonrpc,
|
544
|
+
},
|
545
|
+
agent_rpc_params.AgentRpcParams,
|
546
|
+
),
|
547
|
+
options=make_request_options(
|
548
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
549
|
+
),
|
550
|
+
cast_to=AgentRpcResponse,
|
551
|
+
)
|
552
|
+
|
553
|
+
async def rpc_by_name(
|
554
|
+
self,
|
555
|
+
agent_name: str,
|
556
|
+
*,
|
557
|
+
method: Literal["event/send", "task/create", "message/send", "task/cancel"],
|
558
|
+
params: AgentRpcParams,
|
559
|
+
id: Union[int, str, None] | NotGiven = NOT_GIVEN,
|
560
|
+
jsonrpc: Literal["2.0"] | NotGiven = NOT_GIVEN,
|
561
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
562
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
563
|
+
extra_headers: Headers | None = None,
|
564
|
+
extra_query: Query | None = None,
|
565
|
+
extra_body: Body | None = None,
|
566
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
567
|
+
) -> AgentRpcResponse:
|
568
|
+
"""
|
569
|
+
Handle JSON-RPC requests for an agent by its unique name.
|
570
|
+
|
571
|
+
Args:
|
572
|
+
params: The parameters for the agent RPC request
|
573
|
+
|
574
|
+
extra_headers: Send extra headers
|
575
|
+
|
576
|
+
extra_query: Add additional query parameters to the request
|
577
|
+
|
578
|
+
extra_body: Add additional JSON properties to the request
|
579
|
+
|
580
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
581
|
+
"""
|
582
|
+
if not agent_name:
|
583
|
+
raise ValueError(f"Expected a non-empty value for `agent_name` but received {agent_name!r}")
|
584
|
+
return await self._post(
|
585
|
+
f"/agents/name/{agent_name}/rpc",
|
586
|
+
body=await async_maybe_transform(
|
587
|
+
{
|
588
|
+
"method": method,
|
589
|
+
"params": params,
|
590
|
+
"id": id,
|
591
|
+
"jsonrpc": jsonrpc,
|
592
|
+
},
|
593
|
+
agent_rpc_by_name_params.AgentRpcByNameParams,
|
594
|
+
),
|
595
|
+
options=make_request_options(
|
596
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
597
|
+
),
|
598
|
+
cast_to=AgentRpcResponse,
|
599
|
+
)
|
600
|
+
|
601
|
+
|
602
|
+
class AgentsResourceWithRawResponse:
|
603
|
+
def __init__(self, agents: AgentsResource) -> None:
|
604
|
+
self._agents = agents
|
605
|
+
|
606
|
+
self.retrieve = to_raw_response_wrapper(
|
607
|
+
agents.retrieve,
|
608
|
+
)
|
609
|
+
self.list = to_raw_response_wrapper(
|
610
|
+
agents.list,
|
611
|
+
)
|
612
|
+
self.delete = to_raw_response_wrapper(
|
613
|
+
agents.delete,
|
614
|
+
)
|
615
|
+
self.delete_by_name = to_raw_response_wrapper(
|
616
|
+
agents.delete_by_name,
|
617
|
+
)
|
618
|
+
self.retrieve_by_name = to_raw_response_wrapper(
|
619
|
+
agents.retrieve_by_name,
|
620
|
+
)
|
621
|
+
self.rpc = to_raw_response_wrapper(
|
622
|
+
agents.rpc,
|
623
|
+
)
|
624
|
+
self.rpc_by_name = to_raw_response_wrapper(
|
625
|
+
agents.rpc_by_name,
|
626
|
+
)
|
627
|
+
|
628
|
+
|
629
|
+
class AsyncAgentsResourceWithRawResponse:
|
630
|
+
def __init__(self, agents: AsyncAgentsResource) -> None:
|
631
|
+
self._agents = agents
|
632
|
+
|
633
|
+
self.retrieve = async_to_raw_response_wrapper(
|
634
|
+
agents.retrieve,
|
635
|
+
)
|
636
|
+
self.list = async_to_raw_response_wrapper(
|
637
|
+
agents.list,
|
638
|
+
)
|
639
|
+
self.delete = async_to_raw_response_wrapper(
|
640
|
+
agents.delete,
|
641
|
+
)
|
642
|
+
self.delete_by_name = async_to_raw_response_wrapper(
|
643
|
+
agents.delete_by_name,
|
644
|
+
)
|
645
|
+
self.retrieve_by_name = async_to_raw_response_wrapper(
|
646
|
+
agents.retrieve_by_name,
|
647
|
+
)
|
648
|
+
self.rpc = async_to_raw_response_wrapper(
|
649
|
+
agents.rpc,
|
650
|
+
)
|
651
|
+
self.rpc_by_name = async_to_raw_response_wrapper(
|
652
|
+
agents.rpc_by_name,
|
653
|
+
)
|
654
|
+
|
655
|
+
|
656
|
+
class AgentsResourceWithStreamingResponse:
|
657
|
+
def __init__(self, agents: AgentsResource) -> None:
|
658
|
+
self._agents = agents
|
659
|
+
|
660
|
+
self.retrieve = to_streamed_response_wrapper(
|
661
|
+
agents.retrieve,
|
662
|
+
)
|
663
|
+
self.list = to_streamed_response_wrapper(
|
664
|
+
agents.list,
|
665
|
+
)
|
666
|
+
self.delete = to_streamed_response_wrapper(
|
667
|
+
agents.delete,
|
668
|
+
)
|
669
|
+
self.delete_by_name = to_streamed_response_wrapper(
|
670
|
+
agents.delete_by_name,
|
671
|
+
)
|
672
|
+
self.retrieve_by_name = to_streamed_response_wrapper(
|
673
|
+
agents.retrieve_by_name,
|
674
|
+
)
|
675
|
+
self.rpc = to_streamed_response_wrapper(
|
676
|
+
agents.rpc,
|
677
|
+
)
|
678
|
+
self.rpc_by_name = to_streamed_response_wrapper(
|
679
|
+
agents.rpc_by_name,
|
680
|
+
)
|
681
|
+
|
682
|
+
|
683
|
+
class AsyncAgentsResourceWithStreamingResponse:
|
684
|
+
def __init__(self, agents: AsyncAgentsResource) -> None:
|
685
|
+
self._agents = agents
|
686
|
+
|
687
|
+
self.retrieve = async_to_streamed_response_wrapper(
|
688
|
+
agents.retrieve,
|
689
|
+
)
|
690
|
+
self.list = async_to_streamed_response_wrapper(
|
691
|
+
agents.list,
|
692
|
+
)
|
693
|
+
self.delete = async_to_streamed_response_wrapper(
|
694
|
+
agents.delete,
|
695
|
+
)
|
696
|
+
self.delete_by_name = async_to_streamed_response_wrapper(
|
697
|
+
agents.delete_by_name,
|
698
|
+
)
|
699
|
+
self.retrieve_by_name = async_to_streamed_response_wrapper(
|
700
|
+
agents.retrieve_by_name,
|
701
|
+
)
|
702
|
+
self.rpc = async_to_streamed_response_wrapper(
|
703
|
+
agents.rpc,
|
704
|
+
)
|
705
|
+
self.rpc_by_name = async_to_streamed_response_wrapper(
|
706
|
+
agents.rpc_by_name,
|
707
|
+
)
|