c63a5cfe-b235-4fbe-8bbb-82a9e02a482a-python 0.1.0a3__py3-none-any.whl → 0.1.0a4__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.
- {c63a5cfe_b235_4fbe_8bbb_82a9e02a482a_python-0.1.0a3.dist-info → c63a5cfe_b235_4fbe_8bbb_82a9e02a482a_python-0.1.0a4.dist-info}/METADATA +91 -59
- c63a5cfe_b235_4fbe_8bbb_82a9e02a482a_python-0.1.0a4.dist-info/RECORD +217 -0
- {c63a5cfe_b235_4fbe_8bbb_82a9e02a482a_python-0.1.0a3.dist-info → c63a5cfe_b235_4fbe_8bbb_82a9e02a482a_python-0.1.0a4.dist-info}/licenses/LICENSE +1 -1
- {digitalocean_genai_sdk → gradientai}/__init__.py +10 -9
- {digitalocean_genai_sdk → gradientai}/_base_client.py +39 -3
- {digitalocean_genai_sdk → gradientai}/_client.py +69 -148
- {digitalocean_genai_sdk → gradientai}/_exceptions.py +2 -2
- {digitalocean_genai_sdk → gradientai}/_resource.py +5 -5
- {digitalocean_genai_sdk → gradientai}/_response.py +6 -6
- {digitalocean_genai_sdk → gradientai}/_streaming.py +3 -3
- {digitalocean_genai_sdk → gradientai}/_types.py +1 -1
- {digitalocean_genai_sdk → gradientai}/_utils/_logs.py +3 -3
- gradientai/_utils/_resources_proxy.py +24 -0
- digitalocean_genai_sdk/types/providers/__init__.py → gradientai/_version.py +2 -1
- {digitalocean_genai_sdk → gradientai}/resources/__init__.py +13 -41
- {digitalocean_genai_sdk → gradientai}/resources/agents/agents.py +40 -16
- {digitalocean_genai_sdk → gradientai}/resources/agents/api_keys.py +34 -14
- {digitalocean_genai_sdk → gradientai}/resources/agents/child_agents.py +28 -12
- {digitalocean_genai_sdk → gradientai}/resources/agents/functions.py +22 -10
- {digitalocean_genai_sdk → gradientai}/resources/agents/knowledge_bases.py +22 -10
- {digitalocean_genai_sdk → gradientai}/resources/agents/versions.py +16 -8
- gradientai/resources/chat/__init__.py +33 -0
- gradientai/resources/chat/chat.py +102 -0
- digitalocean_genai_sdk/resources/chat.py → gradientai/resources/chat/completions.py +61 -57
- {digitalocean_genai_sdk → gradientai}/resources/indexing_jobs.py +34 -14
- gradientai/resources/inference/__init__.py +47 -0
- digitalocean_genai_sdk/resources/api_keys/api_keys_.py → gradientai/resources/inference/api_keys.py +40 -20
- gradientai/resources/inference/inference.py +134 -0
- {digitalocean_genai_sdk/resources → gradientai/resources/inference}/models.py +19 -15
- {digitalocean_genai_sdk → gradientai}/resources/knowledge_bases/data_sources.py +25 -12
- {digitalocean_genai_sdk → gradientai}/resources/knowledge_bases/knowledge_bases.py +34 -14
- digitalocean_genai_sdk/resources/api_keys/api_keys.py → gradientai/resources/models.py +51 -72
- {digitalocean_genai_sdk → gradientai}/resources/providers/anthropic/anthropic.py +4 -4
- {digitalocean_genai_sdk → gradientai}/resources/providers/anthropic/keys.py +40 -16
- {digitalocean_genai_sdk → gradientai}/resources/providers/openai/keys.py +40 -16
- {digitalocean_genai_sdk → gradientai}/resources/providers/openai/openai.py +4 -4
- {digitalocean_genai_sdk → gradientai}/resources/providers/providers.py +4 -4
- gradientai/resources/regions/__init__.py +61 -0
- gradientai/resources/regions/evaluation_datasets.py +292 -0
- gradientai/resources/regions/evaluation_runs/__init__.py +33 -0
- gradientai/resources/regions/evaluation_runs/evaluation_runs.py +316 -0
- gradientai/resources/regions/evaluation_runs/results.py +264 -0
- gradientai/resources/regions/evaluation_test_cases.py +618 -0
- gradientai/resources/regions/regions.py +352 -0
- {digitalocean_genai_sdk → gradientai}/types/__init__.py +7 -11
- {digitalocean_genai_sdk → gradientai}/types/agent_list_response.py +3 -3
- {digitalocean_genai_sdk → gradientai}/types/api_agent.py +8 -3
- digitalocean_genai_sdk/types/api_model.py → gradientai/types/api_agent_model.py +2 -2
- gradientai/types/api_evaluation_metric.py +24 -0
- digitalocean_genai_sdk/types/api_key_list_response.py → gradientai/types/api_model.py +3 -13
- {digitalocean_genai_sdk → gradientai}/types/api_openai_api_key_info.py +2 -2
- gradientai/types/api_workspace.py +36 -0
- gradientai/types/chat/__init__.py +7 -0
- {digitalocean_genai_sdk/types → gradientai/types/chat}/chat_completion_token_logprob.py +1 -1
- digitalocean_genai_sdk/types/chat_create_completion_params.py → gradientai/types/chat/completion_create_params.py +6 -29
- digitalocean_genai_sdk/types/chat_create_completion_response.py → gradientai/types/chat/completion_create_response.py +3 -3
- {digitalocean_genai_sdk/types/api_keys → gradientai/types/inference}/__init__.py +2 -0
- {digitalocean_genai_sdk/types → gradientai/types/inference}/model.py +1 -1
- {digitalocean_genai_sdk/types → gradientai/types/inference}/model_list_response.py +1 -1
- {digitalocean_genai_sdk → gradientai}/types/knowledge_base_create_params.py +3 -0
- {digitalocean_genai_sdk → gradientai}/types/knowledge_bases/__init__.py +1 -0
- {digitalocean_genai_sdk → gradientai}/types/knowledge_bases/api_knowledge_base_data_source.py +11 -1
- gradientai/types/knowledge_bases/aws_data_source_param.py +19 -0
- {digitalocean_genai_sdk → gradientai}/types/knowledge_bases/data_source_create_params.py +3 -14
- digitalocean_genai_sdk/types/api_key_list_params.py → gradientai/types/model_list_params.py +2 -2
- gradientai/types/model_list_response.py +18 -0
- gradientai/types/region_list_evaluation_metrics_response.py +12 -0
- gradientai/types/regions/__init__.py +32 -0
- gradientai/types/regions/api_evaluation_test_case.py +46 -0
- gradientai/types/regions/api_star_metric.py +19 -0
- gradientai/types/regions/api_star_metric_param.py +19 -0
- gradientai/types/regions/evaluation_dataset_create_file_upload_presigned_urls_params.py +20 -0
- gradientai/types/regions/evaluation_dataset_create_file_upload_presigned_urls_response.py +30 -0
- gradientai/types/regions/evaluation_dataset_create_params.py +17 -0
- gradientai/types/regions/evaluation_dataset_create_response.py +12 -0
- gradientai/types/regions/evaluation_run_create_params.py +17 -0
- gradientai/types/regions/evaluation_run_create_response.py +11 -0
- gradientai/types/regions/evaluation_run_retrieve_response.py +12 -0
- gradientai/types/regions/evaluation_runs/__init__.py +9 -0
- gradientai/types/regions/evaluation_runs/api_evaluation_metric_result.py +17 -0
- gradientai/types/regions/evaluation_runs/api_evaluation_run.py +56 -0
- gradientai/types/regions/evaluation_runs/api_prompt.py +42 -0
- gradientai/types/regions/evaluation_runs/result_retrieve_prompt_response.py +12 -0
- gradientai/types/regions/evaluation_runs/result_retrieve_response.py +16 -0
- gradientai/types/regions/evaluation_test_case_create_params.py +29 -0
- gradientai/types/regions/evaluation_test_case_create_response.py +12 -0
- gradientai/types/regions/evaluation_test_case_list_evaluation_runs_params.py +12 -0
- gradientai/types/regions/evaluation_test_case_list_evaluation_runs_response.py +13 -0
- gradientai/types/regions/evaluation_test_case_list_response.py +12 -0
- gradientai/types/regions/evaluation_test_case_retrieve_response.py +12 -0
- gradientai/types/regions/evaluation_test_case_update_params.py +32 -0
- gradientai/types/regions/evaluation_test_case_update_response.py +14 -0
- c63a5cfe_b235_4fbe_8bbb_82a9e02a482a_python-0.1.0a3.dist-info/RECORD +0 -190
- digitalocean_genai_sdk/_utils/_resources_proxy.py +0 -24
- digitalocean_genai_sdk/_version.py +0 -4
- digitalocean_genai_sdk/resources/api_keys/__init__.py +0 -19
- digitalocean_genai_sdk/resources/auth/__init__.py +0 -33
- digitalocean_genai_sdk/resources/auth/agents/__init__.py +0 -33
- digitalocean_genai_sdk/resources/auth/agents/agents.py +0 -102
- digitalocean_genai_sdk/resources/auth/agents/token.py +0 -173
- digitalocean_genai_sdk/resources/auth/auth.py +0 -102
- digitalocean_genai_sdk/resources/embeddings.py +0 -201
- digitalocean_genai_sdk/resources/regions.py +0 -191
- digitalocean_genai_sdk/types/auth/agents/__init__.py +0 -6
- digitalocean_genai_sdk/types/auth/agents/token_create_params.py +0 -13
- digitalocean_genai_sdk/types/auth/agents/token_create_response.py +0 -13
- digitalocean_genai_sdk/types/chat_completion_request_message_content_part_text_param.py +0 -15
- digitalocean_genai_sdk/types/embedding_create_params.py +0 -28
- digitalocean_genai_sdk/types/embedding_create_response.py +0 -41
- {c63a5cfe_b235_4fbe_8bbb_82a9e02a482a_python-0.1.0a3.dist-info → c63a5cfe_b235_4fbe_8bbb_82a9e02a482a_python-0.1.0a4.dist-info}/WHEEL +0 -0
- {digitalocean_genai_sdk → gradientai}/_compat.py +0 -0
- {digitalocean_genai_sdk → gradientai}/_constants.py +0 -0
- {digitalocean_genai_sdk → gradientai}/_files.py +0 -0
- {digitalocean_genai_sdk → gradientai}/_models.py +0 -0
- {digitalocean_genai_sdk → gradientai}/_qs.py +0 -0
- {digitalocean_genai_sdk → gradientai}/_utils/__init__.py +0 -0
- {digitalocean_genai_sdk → gradientai}/_utils/_proxy.py +0 -0
- {digitalocean_genai_sdk → gradientai}/_utils/_reflection.py +0 -0
- {digitalocean_genai_sdk → gradientai}/_utils/_streams.py +0 -0
- {digitalocean_genai_sdk → gradientai}/_utils/_sync.py +0 -0
- {digitalocean_genai_sdk → gradientai}/_utils/_transform.py +0 -0
- {digitalocean_genai_sdk → gradientai}/_utils/_typing.py +0 -0
- {digitalocean_genai_sdk → gradientai}/_utils/_utils.py +0 -0
- {digitalocean_genai_sdk → gradientai}/lib/.keep +0 -0
- {digitalocean_genai_sdk → gradientai}/py.typed +0 -0
- {digitalocean_genai_sdk → gradientai}/resources/agents/__init__.py +0 -0
- {digitalocean_genai_sdk → gradientai}/resources/knowledge_bases/__init__.py +0 -0
- {digitalocean_genai_sdk → gradientai}/resources/providers/__init__.py +0 -0
- {digitalocean_genai_sdk → gradientai}/resources/providers/anthropic/__init__.py +0 -0
- {digitalocean_genai_sdk → gradientai}/resources/providers/openai/__init__.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/agent_create_params.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/agent_create_response.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/agent_delete_response.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/agent_list_params.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/agent_retrieve_response.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/agent_update_params.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/agent_update_response.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/agent_update_status_params.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/agent_update_status_response.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/agents/__init__.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/agents/api_key_create_params.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/agents/api_key_create_response.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/agents/api_key_delete_response.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/agents/api_key_list_params.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/agents/api_key_list_response.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/agents/api_key_regenerate_response.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/agents/api_key_update_params.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/agents/api_key_update_response.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/agents/api_link_knowledge_base_output.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/agents/api_links.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/agents/api_meta.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/agents/child_agent_add_params.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/agents/child_agent_add_response.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/agents/child_agent_delete_response.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/agents/child_agent_update_params.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/agents/child_agent_update_response.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/agents/child_agent_view_response.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/agents/function_create_params.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/agents/function_create_response.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/agents/function_delete_response.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/agents/function_update_params.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/agents/function_update_response.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/agents/knowledge_base_detach_response.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/agents/version_list_params.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/agents/version_list_response.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/agents/version_update_params.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/agents/version_update_response.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/api_agent_api_key_info.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/api_agreement.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/api_anthropic_api_key_info.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/api_deployment_visibility.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/api_indexing_job.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/api_knowledge_base.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/api_model_version.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/api_retrieval_method.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/indexing_job_create_params.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/indexing_job_create_response.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/indexing_job_list_params.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/indexing_job_list_response.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/indexing_job_retrieve_data_sources_response.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/indexing_job_retrieve_response.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/indexing_job_update_cancel_params.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/indexing_job_update_cancel_response.py +0 -0
- {digitalocean_genai_sdk/types/api_keys → gradientai/types/inference}/api_key_create_params.py +0 -0
- {digitalocean_genai_sdk/types/api_keys → gradientai/types/inference}/api_key_create_response.py +0 -0
- {digitalocean_genai_sdk/types/api_keys → gradientai/types/inference}/api_key_delete_response.py +0 -0
- {digitalocean_genai_sdk/types/api_keys → gradientai/types/inference}/api_key_list_params.py +0 -0
- {digitalocean_genai_sdk/types/api_keys → gradientai/types/inference}/api_key_list_response.py +0 -0
- {digitalocean_genai_sdk/types/api_keys → gradientai/types/inference}/api_key_update_params.py +0 -0
- {digitalocean_genai_sdk/types/api_keys → gradientai/types/inference}/api_key_update_regenerate_response.py +0 -0
- {digitalocean_genai_sdk/types/api_keys → gradientai/types/inference}/api_key_update_response.py +0 -0
- {digitalocean_genai_sdk/types/api_keys → gradientai/types/inference}/api_model_api_key_info.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/knowledge_base_create_response.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/knowledge_base_delete_response.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/knowledge_base_list_params.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/knowledge_base_list_response.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/knowledge_base_retrieve_response.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/knowledge_base_update_params.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/knowledge_base_update_response.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/knowledge_bases/api_file_upload_data_source.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/knowledge_bases/api_file_upload_data_source_param.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/knowledge_bases/api_spaces_data_source.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/knowledge_bases/api_spaces_data_source_param.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/knowledge_bases/api_web_crawler_data_source.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/knowledge_bases/api_web_crawler_data_source_param.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/knowledge_bases/data_source_create_response.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/knowledge_bases/data_source_delete_response.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/knowledge_bases/data_source_list_params.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/knowledge_bases/data_source_list_response.py +0 -0
- {digitalocean_genai_sdk/types/auth → gradientai/types/providers}/__init__.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/providers/anthropic/__init__.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/providers/anthropic/key_create_params.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/providers/anthropic/key_create_response.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/providers/anthropic/key_delete_response.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/providers/anthropic/key_list_agents_params.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/providers/anthropic/key_list_agents_response.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/providers/anthropic/key_list_params.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/providers/anthropic/key_list_response.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/providers/anthropic/key_retrieve_response.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/providers/anthropic/key_update_params.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/providers/anthropic/key_update_response.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/providers/openai/__init__.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/providers/openai/key_create_params.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/providers/openai/key_create_response.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/providers/openai/key_delete_response.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/providers/openai/key_list_params.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/providers/openai/key_list_response.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/providers/openai/key_retrieve_agents_params.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/providers/openai/key_retrieve_agents_response.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/providers/openai/key_retrieve_response.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/providers/openai/key_update_params.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/providers/openai/key_update_response.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/region_list_params.py +0 -0
- {digitalocean_genai_sdk → gradientai}/types/region_list_response.py +0 -0
@@ -12,7 +12,7 @@ import httpx
|
|
12
12
|
from ._utils import extract_type_var_from_base
|
13
13
|
|
14
14
|
if TYPE_CHECKING:
|
15
|
-
from ._client import
|
15
|
+
from ._client import GradientAI, AsyncGradientAI
|
16
16
|
|
17
17
|
|
18
18
|
_T = TypeVar("_T")
|
@@ -30,7 +30,7 @@ class Stream(Generic[_T]):
|
|
30
30
|
*,
|
31
31
|
cast_to: type[_T],
|
32
32
|
response: httpx.Response,
|
33
|
-
client:
|
33
|
+
client: GradientAI,
|
34
34
|
) -> None:
|
35
35
|
self.response = response
|
36
36
|
self._cast_to = cast_to
|
@@ -93,7 +93,7 @@ class AsyncStream(Generic[_T]):
|
|
93
93
|
*,
|
94
94
|
cast_to: type[_T],
|
95
95
|
response: httpx.Response,
|
96
|
-
client:
|
96
|
+
client: AsyncGradientAI,
|
97
97
|
) -> None:
|
98
98
|
self.response = response
|
99
99
|
self._cast_to = cast_to
|
@@ -81,7 +81,7 @@ HttpxRequestFiles = Union[Mapping[str, HttpxFileTypes], Sequence[Tuple[str, Http
|
|
81
81
|
# This unfortunately means that you will either have
|
82
82
|
# to import this type and pass it explicitly:
|
83
83
|
#
|
84
|
-
# from
|
84
|
+
# from gradientai import NoneType
|
85
85
|
# client.get('/foo', cast_to=NoneType)
|
86
86
|
#
|
87
87
|
# or build it yourself:
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import os
|
2
2
|
import logging
|
3
3
|
|
4
|
-
logger: logging.Logger = logging.getLogger("
|
4
|
+
logger: logging.Logger = logging.getLogger("gradientai")
|
5
5
|
httpx_logger: logging.Logger = logging.getLogger("httpx")
|
6
6
|
|
7
7
|
|
8
8
|
def _basic_config() -> None:
|
9
|
-
# e.g. [2023-10-05 14:12:26 -
|
9
|
+
# e.g. [2023-10-05 14:12:26 - gradientai._base_client:818 - DEBUG] HTTP Request: POST http://127.0.0.1:4010/foo/bar "200 OK"
|
10
10
|
logging.basicConfig(
|
11
11
|
format="[%(asctime)s - %(name)s:%(lineno)d - %(levelname)s] %(message)s",
|
12
12
|
datefmt="%Y-%m-%d %H:%M:%S",
|
@@ -14,7 +14,7 @@ def _basic_config() -> None:
|
|
14
14
|
|
15
15
|
|
16
16
|
def setup_logging() -> None:
|
17
|
-
env = os.environ.get("
|
17
|
+
env = os.environ.get("GRADIENT_AI_LOG")
|
18
18
|
if env == "debug":
|
19
19
|
_basic_config()
|
20
20
|
logger.setLevel(logging.DEBUG)
|
@@ -0,0 +1,24 @@
|
|
1
|
+
from __future__ import annotations
|
2
|
+
|
3
|
+
from typing import Any
|
4
|
+
from typing_extensions import override
|
5
|
+
|
6
|
+
from ._proxy import LazyProxy
|
7
|
+
|
8
|
+
|
9
|
+
class ResourcesProxy(LazyProxy[Any]):
|
10
|
+
"""A proxy for the `gradientai.resources` module.
|
11
|
+
|
12
|
+
This is used so that we can lazily import `gradientai.resources` only when
|
13
|
+
needed *and* so that users can just import `gradientai` and reference `gradientai.resources`
|
14
|
+
"""
|
15
|
+
|
16
|
+
@override
|
17
|
+
def __load__(self) -> Any:
|
18
|
+
import importlib
|
19
|
+
|
20
|
+
mod = importlib.import_module("gradientai.resources")
|
21
|
+
return mod
|
22
|
+
|
23
|
+
|
24
|
+
resources = ResourcesProxy().__as_proxied__()
|
@@ -1,13 +1,5 @@
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
2
|
|
3
|
-
from .auth import (
|
4
|
-
AuthResource,
|
5
|
-
AsyncAuthResource,
|
6
|
-
AuthResourceWithRawResponse,
|
7
|
-
AsyncAuthResourceWithRawResponse,
|
8
|
-
AuthResourceWithStreamingResponse,
|
9
|
-
AsyncAuthResourceWithStreamingResponse,
|
10
|
-
)
|
11
3
|
from .chat import (
|
12
4
|
ChatResource,
|
13
5
|
AsyncChatResource,
|
@@ -40,13 +32,13 @@ from .regions import (
|
|
40
32
|
RegionsResourceWithStreamingResponse,
|
41
33
|
AsyncRegionsResourceWithStreamingResponse,
|
42
34
|
)
|
43
|
-
from .
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
35
|
+
from .inference import (
|
36
|
+
InferenceResource,
|
37
|
+
AsyncInferenceResource,
|
38
|
+
InferenceResourceWithRawResponse,
|
39
|
+
AsyncInferenceResourceWithRawResponse,
|
40
|
+
InferenceResourceWithStreamingResponse,
|
41
|
+
AsyncInferenceResourceWithStreamingResponse,
|
50
42
|
)
|
51
43
|
from .providers import (
|
52
44
|
ProvidersResource,
|
@@ -56,14 +48,6 @@ from .providers import (
|
|
56
48
|
ProvidersResourceWithStreamingResponse,
|
57
49
|
AsyncProvidersResourceWithStreamingResponse,
|
58
50
|
)
|
59
|
-
from .embeddings import (
|
60
|
-
EmbeddingsResource,
|
61
|
-
AsyncEmbeddingsResource,
|
62
|
-
EmbeddingsResourceWithRawResponse,
|
63
|
-
AsyncEmbeddingsResourceWithRawResponse,
|
64
|
-
EmbeddingsResourceWithStreamingResponse,
|
65
|
-
AsyncEmbeddingsResourceWithStreamingResponse,
|
66
|
-
)
|
67
51
|
from .indexing_jobs import (
|
68
52
|
IndexingJobsResource,
|
69
53
|
AsyncIndexingJobsResource,
|
@@ -94,12 +78,6 @@ __all__ = [
|
|
94
78
|
"AsyncProvidersResourceWithRawResponse",
|
95
79
|
"ProvidersResourceWithStreamingResponse",
|
96
80
|
"AsyncProvidersResourceWithStreamingResponse",
|
97
|
-
"AuthResource",
|
98
|
-
"AsyncAuthResource",
|
99
|
-
"AuthResourceWithRawResponse",
|
100
|
-
"AsyncAuthResourceWithRawResponse",
|
101
|
-
"AuthResourceWithStreamingResponse",
|
102
|
-
"AsyncAuthResourceWithStreamingResponse",
|
103
81
|
"RegionsResource",
|
104
82
|
"AsyncRegionsResource",
|
105
83
|
"RegionsResourceWithRawResponse",
|
@@ -118,24 +96,18 @@ __all__ = [
|
|
118
96
|
"AsyncKnowledgeBasesResourceWithRawResponse",
|
119
97
|
"KnowledgeBasesResourceWithStreamingResponse",
|
120
98
|
"AsyncKnowledgeBasesResourceWithStreamingResponse",
|
121
|
-
"APIKeysResource",
|
122
|
-
"AsyncAPIKeysResource",
|
123
|
-
"APIKeysResourceWithRawResponse",
|
124
|
-
"AsyncAPIKeysResourceWithRawResponse",
|
125
|
-
"APIKeysResourceWithStreamingResponse",
|
126
|
-
"AsyncAPIKeysResourceWithStreamingResponse",
|
127
99
|
"ChatResource",
|
128
100
|
"AsyncChatResource",
|
129
101
|
"ChatResourceWithRawResponse",
|
130
102
|
"AsyncChatResourceWithRawResponse",
|
131
103
|
"ChatResourceWithStreamingResponse",
|
132
104
|
"AsyncChatResourceWithStreamingResponse",
|
133
|
-
"
|
134
|
-
"
|
135
|
-
"
|
136
|
-
"
|
137
|
-
"
|
138
|
-
"
|
105
|
+
"InferenceResource",
|
106
|
+
"AsyncInferenceResource",
|
107
|
+
"InferenceResourceWithRawResponse",
|
108
|
+
"AsyncInferenceResourceWithRawResponse",
|
109
|
+
"InferenceResourceWithStreamingResponse",
|
110
|
+
"AsyncInferenceResourceWithStreamingResponse",
|
139
111
|
"ModelsResource",
|
140
112
|
"AsyncModelsResource",
|
141
113
|
"ModelsResourceWithRawResponse",
|
@@ -104,7 +104,7 @@ class AgentsResource(SyncAPIResource):
|
|
104
104
|
This property can be used as a prefix for any HTTP method call to return
|
105
105
|
the raw response object instead of the parsed content.
|
106
106
|
|
107
|
-
For more information, see https://www.github.com/digitalocean/
|
107
|
+
For more information, see https://www.github.com/digitalocean/gradientai-python#accessing-raw-response-data-eg-headers
|
108
108
|
"""
|
109
109
|
return AgentsResourceWithRawResponse(self)
|
110
110
|
|
@@ -113,7 +113,7 @@ class AgentsResource(SyncAPIResource):
|
|
113
113
|
"""
|
114
114
|
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
115
115
|
|
116
|
-
For more information, see https://www.github.com/digitalocean/
|
116
|
+
For more information, see https://www.github.com/digitalocean/gradientai-python#with_streaming_response
|
117
117
|
"""
|
118
118
|
return AgentsResourceWithStreamingResponse(self)
|
119
119
|
|
@@ -159,7 +159,9 @@ class AgentsResource(SyncAPIResource):
|
|
159
159
|
timeout: Override the client-level default timeout for this request, in seconds
|
160
160
|
"""
|
161
161
|
return self._post(
|
162
|
-
"/v2/
|
162
|
+
"/v2/gen-ai/agents"
|
163
|
+
if self._client._base_url_overridden
|
164
|
+
else "https://api.digitalocean.com/v2/gen-ai/agents",
|
163
165
|
body=maybe_transform(
|
164
166
|
{
|
165
167
|
"anthropic_key_uuid": anthropic_key_uuid,
|
@@ -209,7 +211,9 @@ class AgentsResource(SyncAPIResource):
|
|
209
211
|
if not uuid:
|
210
212
|
raise ValueError(f"Expected a non-empty value for `uuid` but received {uuid!r}")
|
211
213
|
return self._get(
|
212
|
-
f"/v2/
|
214
|
+
f"/v2/gen-ai/agents/{uuid}"
|
215
|
+
if self._client._base_url_overridden
|
216
|
+
else f"https://api.digitalocean.com/v2/gen-ai/agents/{uuid}",
|
213
217
|
options=make_request_options(
|
214
218
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
215
219
|
),
|
@@ -278,7 +282,9 @@ class AgentsResource(SyncAPIResource):
|
|
278
282
|
if not path_uuid:
|
279
283
|
raise ValueError(f"Expected a non-empty value for `path_uuid` but received {path_uuid!r}")
|
280
284
|
return self._put(
|
281
|
-
f"/v2/
|
285
|
+
f"/v2/gen-ai/agents/{path_uuid}"
|
286
|
+
if self._client._base_url_overridden
|
287
|
+
else f"https://api.digitalocean.com/v2/gen-ai/agents/{path_uuid}",
|
282
288
|
body=maybe_transform(
|
283
289
|
{
|
284
290
|
"anthropic_key_uuid": anthropic_key_uuid,
|
@@ -337,7 +343,9 @@ class AgentsResource(SyncAPIResource):
|
|
337
343
|
timeout: Override the client-level default timeout for this request, in seconds
|
338
344
|
"""
|
339
345
|
return self._get(
|
340
|
-
"/v2/
|
346
|
+
"/v2/gen-ai/agents"
|
347
|
+
if self._client._base_url_overridden
|
348
|
+
else "https://api.digitalocean.com/v2/gen-ai/agents",
|
341
349
|
options=make_request_options(
|
342
350
|
extra_headers=extra_headers,
|
343
351
|
extra_query=extra_query,
|
@@ -381,7 +389,9 @@ class AgentsResource(SyncAPIResource):
|
|
381
389
|
if not uuid:
|
382
390
|
raise ValueError(f"Expected a non-empty value for `uuid` but received {uuid!r}")
|
383
391
|
return self._delete(
|
384
|
-
f"/v2/
|
392
|
+
f"/v2/gen-ai/agents/{uuid}"
|
393
|
+
if self._client._base_url_overridden
|
394
|
+
else f"https://api.digitalocean.com/v2/gen-ai/agents/{uuid}",
|
385
395
|
options=make_request_options(
|
386
396
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
387
397
|
),
|
@@ -418,7 +428,9 @@ class AgentsResource(SyncAPIResource):
|
|
418
428
|
if not path_uuid:
|
419
429
|
raise ValueError(f"Expected a non-empty value for `path_uuid` but received {path_uuid!r}")
|
420
430
|
return self._put(
|
421
|
-
f"/v2/
|
431
|
+
f"/v2/gen-ai/agents/{path_uuid}/deployment_visibility"
|
432
|
+
if self._client._base_url_overridden
|
433
|
+
else f"https://api.digitalocean.com/v2/gen-ai/agents/{path_uuid}/deployment_visibility",
|
422
434
|
body=maybe_transform(
|
423
435
|
{
|
424
436
|
"body_uuid": body_uuid,
|
@@ -460,7 +472,7 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
460
472
|
This property can be used as a prefix for any HTTP method call to return
|
461
473
|
the raw response object instead of the parsed content.
|
462
474
|
|
463
|
-
For more information, see https://www.github.com/digitalocean/
|
475
|
+
For more information, see https://www.github.com/digitalocean/gradientai-python#accessing-raw-response-data-eg-headers
|
464
476
|
"""
|
465
477
|
return AsyncAgentsResourceWithRawResponse(self)
|
466
478
|
|
@@ -469,7 +481,7 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
469
481
|
"""
|
470
482
|
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
471
483
|
|
472
|
-
For more information, see https://www.github.com/digitalocean/
|
484
|
+
For more information, see https://www.github.com/digitalocean/gradientai-python#with_streaming_response
|
473
485
|
"""
|
474
486
|
return AsyncAgentsResourceWithStreamingResponse(self)
|
475
487
|
|
@@ -515,7 +527,9 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
515
527
|
timeout: Override the client-level default timeout for this request, in seconds
|
516
528
|
"""
|
517
529
|
return await self._post(
|
518
|
-
"/v2/
|
530
|
+
"/v2/gen-ai/agents"
|
531
|
+
if self._client._base_url_overridden
|
532
|
+
else "https://api.digitalocean.com/v2/gen-ai/agents",
|
519
533
|
body=await async_maybe_transform(
|
520
534
|
{
|
521
535
|
"anthropic_key_uuid": anthropic_key_uuid,
|
@@ -565,7 +579,9 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
565
579
|
if not uuid:
|
566
580
|
raise ValueError(f"Expected a non-empty value for `uuid` but received {uuid!r}")
|
567
581
|
return await self._get(
|
568
|
-
f"/v2/
|
582
|
+
f"/v2/gen-ai/agents/{uuid}"
|
583
|
+
if self._client._base_url_overridden
|
584
|
+
else f"https://api.digitalocean.com/v2/gen-ai/agents/{uuid}",
|
569
585
|
options=make_request_options(
|
570
586
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
571
587
|
),
|
@@ -634,7 +650,9 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
634
650
|
if not path_uuid:
|
635
651
|
raise ValueError(f"Expected a non-empty value for `path_uuid` but received {path_uuid!r}")
|
636
652
|
return await self._put(
|
637
|
-
f"/v2/
|
653
|
+
f"/v2/gen-ai/agents/{path_uuid}"
|
654
|
+
if self._client._base_url_overridden
|
655
|
+
else f"https://api.digitalocean.com/v2/gen-ai/agents/{path_uuid}",
|
638
656
|
body=await async_maybe_transform(
|
639
657
|
{
|
640
658
|
"anthropic_key_uuid": anthropic_key_uuid,
|
@@ -693,7 +711,9 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
693
711
|
timeout: Override the client-level default timeout for this request, in seconds
|
694
712
|
"""
|
695
713
|
return await self._get(
|
696
|
-
"/v2/
|
714
|
+
"/v2/gen-ai/agents"
|
715
|
+
if self._client._base_url_overridden
|
716
|
+
else "https://api.digitalocean.com/v2/gen-ai/agents",
|
697
717
|
options=make_request_options(
|
698
718
|
extra_headers=extra_headers,
|
699
719
|
extra_query=extra_query,
|
@@ -737,7 +757,9 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
737
757
|
if not uuid:
|
738
758
|
raise ValueError(f"Expected a non-empty value for `uuid` but received {uuid!r}")
|
739
759
|
return await self._delete(
|
740
|
-
f"/v2/
|
760
|
+
f"/v2/gen-ai/agents/{uuid}"
|
761
|
+
if self._client._base_url_overridden
|
762
|
+
else f"https://api.digitalocean.com/v2/gen-ai/agents/{uuid}",
|
741
763
|
options=make_request_options(
|
742
764
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
743
765
|
),
|
@@ -774,7 +796,9 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
774
796
|
if not path_uuid:
|
775
797
|
raise ValueError(f"Expected a non-empty value for `path_uuid` but received {path_uuid!r}")
|
776
798
|
return await self._put(
|
777
|
-
f"/v2/
|
799
|
+
f"/v2/gen-ai/agents/{path_uuid}/deployment_visibility"
|
800
|
+
if self._client._base_url_overridden
|
801
|
+
else f"https://api.digitalocean.com/v2/gen-ai/agents/{path_uuid}/deployment_visibility",
|
778
802
|
body=await async_maybe_transform(
|
779
803
|
{
|
780
804
|
"body_uuid": body_uuid,
|
@@ -32,7 +32,7 @@ class APIKeysResource(SyncAPIResource):
|
|
32
32
|
This property can be used as a prefix for any HTTP method call to return
|
33
33
|
the raw response object instead of the parsed content.
|
34
34
|
|
35
|
-
For more information, see https://www.github.com/digitalocean/
|
35
|
+
For more information, see https://www.github.com/digitalocean/gradientai-python#accessing-raw-response-data-eg-headers
|
36
36
|
"""
|
37
37
|
return APIKeysResourceWithRawResponse(self)
|
38
38
|
|
@@ -41,7 +41,7 @@ class APIKeysResource(SyncAPIResource):
|
|
41
41
|
"""
|
42
42
|
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
43
43
|
|
44
|
-
For more information, see https://www.github.com/digitalocean/
|
44
|
+
For more information, see https://www.github.com/digitalocean/gradientai-python#with_streaming_response
|
45
45
|
"""
|
46
46
|
return APIKeysResourceWithStreamingResponse(self)
|
47
47
|
|
@@ -74,7 +74,9 @@ class APIKeysResource(SyncAPIResource):
|
|
74
74
|
if not path_agent_uuid:
|
75
75
|
raise ValueError(f"Expected a non-empty value for `path_agent_uuid` but received {path_agent_uuid!r}")
|
76
76
|
return self._post(
|
77
|
-
f"/v2/
|
77
|
+
f"/v2/gen-ai/agents/{path_agent_uuid}/api_keys"
|
78
|
+
if self._client._base_url_overridden
|
79
|
+
else f"https://api.digitalocean.com/v2/gen-ai/agents/{path_agent_uuid}/api_keys",
|
78
80
|
body=maybe_transform(
|
79
81
|
{
|
80
82
|
"body_agent_uuid": body_agent_uuid,
|
@@ -121,7 +123,9 @@ class APIKeysResource(SyncAPIResource):
|
|
121
123
|
if not path_api_key_uuid:
|
122
124
|
raise ValueError(f"Expected a non-empty value for `path_api_key_uuid` but received {path_api_key_uuid!r}")
|
123
125
|
return self._put(
|
124
|
-
f"/v2/
|
126
|
+
f"/v2/gen-ai/agents/{path_agent_uuid}/api_keys/{path_api_key_uuid}"
|
127
|
+
if self._client._base_url_overridden
|
128
|
+
else f"https://api.digitalocean.com/v2/gen-ai/agents/{path_agent_uuid}/api_keys/{path_api_key_uuid}",
|
125
129
|
body=maybe_transform(
|
126
130
|
{
|
127
131
|
"body_agent_uuid": body_agent_uuid,
|
@@ -169,7 +173,9 @@ class APIKeysResource(SyncAPIResource):
|
|
169
173
|
if not agent_uuid:
|
170
174
|
raise ValueError(f"Expected a non-empty value for `agent_uuid` but received {agent_uuid!r}")
|
171
175
|
return self._get(
|
172
|
-
f"/v2/
|
176
|
+
f"/v2/gen-ai/agents/{agent_uuid}/api_keys"
|
177
|
+
if self._client._base_url_overridden
|
178
|
+
else f"https://api.digitalocean.com/v2/gen-ai/agents/{agent_uuid}/api_keys",
|
173
179
|
options=make_request_options(
|
174
180
|
extra_headers=extra_headers,
|
175
181
|
extra_query=extra_query,
|
@@ -216,7 +222,9 @@ class APIKeysResource(SyncAPIResource):
|
|
216
222
|
if not api_key_uuid:
|
217
223
|
raise ValueError(f"Expected a non-empty value for `api_key_uuid` but received {api_key_uuid!r}")
|
218
224
|
return self._delete(
|
219
|
-
f"/v2/
|
225
|
+
f"/v2/gen-ai/agents/{agent_uuid}/api_keys/{api_key_uuid}"
|
226
|
+
if self._client._base_url_overridden
|
227
|
+
else f"https://api.digitalocean.com/v2/gen-ai/agents/{agent_uuid}/api_keys/{api_key_uuid}",
|
220
228
|
options=make_request_options(
|
221
229
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
222
230
|
),
|
@@ -253,7 +261,9 @@ class APIKeysResource(SyncAPIResource):
|
|
253
261
|
if not api_key_uuid:
|
254
262
|
raise ValueError(f"Expected a non-empty value for `api_key_uuid` but received {api_key_uuid!r}")
|
255
263
|
return self._put(
|
256
|
-
f"/v2/
|
264
|
+
f"/v2/gen-ai/agents/{agent_uuid}/api_keys/{api_key_uuid}/regenerate"
|
265
|
+
if self._client._base_url_overridden
|
266
|
+
else f"https://api.digitalocean.com/v2/gen-ai/agents/{agent_uuid}/api_keys/{api_key_uuid}/regenerate",
|
257
267
|
options=make_request_options(
|
258
268
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
259
269
|
),
|
@@ -268,7 +278,7 @@ class AsyncAPIKeysResource(AsyncAPIResource):
|
|
268
278
|
This property can be used as a prefix for any HTTP method call to return
|
269
279
|
the raw response object instead of the parsed content.
|
270
280
|
|
271
|
-
For more information, see https://www.github.com/digitalocean/
|
281
|
+
For more information, see https://www.github.com/digitalocean/gradientai-python#accessing-raw-response-data-eg-headers
|
272
282
|
"""
|
273
283
|
return AsyncAPIKeysResourceWithRawResponse(self)
|
274
284
|
|
@@ -277,7 +287,7 @@ class AsyncAPIKeysResource(AsyncAPIResource):
|
|
277
287
|
"""
|
278
288
|
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
279
289
|
|
280
|
-
For more information, see https://www.github.com/digitalocean/
|
290
|
+
For more information, see https://www.github.com/digitalocean/gradientai-python#with_streaming_response
|
281
291
|
"""
|
282
292
|
return AsyncAPIKeysResourceWithStreamingResponse(self)
|
283
293
|
|
@@ -310,7 +320,9 @@ class AsyncAPIKeysResource(AsyncAPIResource):
|
|
310
320
|
if not path_agent_uuid:
|
311
321
|
raise ValueError(f"Expected a non-empty value for `path_agent_uuid` but received {path_agent_uuid!r}")
|
312
322
|
return await self._post(
|
313
|
-
f"/v2/
|
323
|
+
f"/v2/gen-ai/agents/{path_agent_uuid}/api_keys"
|
324
|
+
if self._client._base_url_overridden
|
325
|
+
else f"https://api.digitalocean.com/v2/gen-ai/agents/{path_agent_uuid}/api_keys",
|
314
326
|
body=await async_maybe_transform(
|
315
327
|
{
|
316
328
|
"body_agent_uuid": body_agent_uuid,
|
@@ -357,7 +369,9 @@ class AsyncAPIKeysResource(AsyncAPIResource):
|
|
357
369
|
if not path_api_key_uuid:
|
358
370
|
raise ValueError(f"Expected a non-empty value for `path_api_key_uuid` but received {path_api_key_uuid!r}")
|
359
371
|
return await self._put(
|
360
|
-
f"/v2/
|
372
|
+
f"/v2/gen-ai/agents/{path_agent_uuid}/api_keys/{path_api_key_uuid}"
|
373
|
+
if self._client._base_url_overridden
|
374
|
+
else f"https://api.digitalocean.com/v2/gen-ai/agents/{path_agent_uuid}/api_keys/{path_api_key_uuid}",
|
361
375
|
body=await async_maybe_transform(
|
362
376
|
{
|
363
377
|
"body_agent_uuid": body_agent_uuid,
|
@@ -405,7 +419,9 @@ class AsyncAPIKeysResource(AsyncAPIResource):
|
|
405
419
|
if not agent_uuid:
|
406
420
|
raise ValueError(f"Expected a non-empty value for `agent_uuid` but received {agent_uuid!r}")
|
407
421
|
return await self._get(
|
408
|
-
f"/v2/
|
422
|
+
f"/v2/gen-ai/agents/{agent_uuid}/api_keys"
|
423
|
+
if self._client._base_url_overridden
|
424
|
+
else f"https://api.digitalocean.com/v2/gen-ai/agents/{agent_uuid}/api_keys",
|
409
425
|
options=make_request_options(
|
410
426
|
extra_headers=extra_headers,
|
411
427
|
extra_query=extra_query,
|
@@ -452,7 +468,9 @@ class AsyncAPIKeysResource(AsyncAPIResource):
|
|
452
468
|
if not api_key_uuid:
|
453
469
|
raise ValueError(f"Expected a non-empty value for `api_key_uuid` but received {api_key_uuid!r}")
|
454
470
|
return await self._delete(
|
455
|
-
f"/v2/
|
471
|
+
f"/v2/gen-ai/agents/{agent_uuid}/api_keys/{api_key_uuid}"
|
472
|
+
if self._client._base_url_overridden
|
473
|
+
else f"https://api.digitalocean.com/v2/gen-ai/agents/{agent_uuid}/api_keys/{api_key_uuid}",
|
456
474
|
options=make_request_options(
|
457
475
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
458
476
|
),
|
@@ -489,7 +507,9 @@ class AsyncAPIKeysResource(AsyncAPIResource):
|
|
489
507
|
if not api_key_uuid:
|
490
508
|
raise ValueError(f"Expected a non-empty value for `api_key_uuid` but received {api_key_uuid!r}")
|
491
509
|
return await self._put(
|
492
|
-
f"/v2/
|
510
|
+
f"/v2/gen-ai/agents/{agent_uuid}/api_keys/{api_key_uuid}/regenerate"
|
511
|
+
if self._client._base_url_overridden
|
512
|
+
else f"https://api.digitalocean.com/v2/gen-ai/agents/{agent_uuid}/api_keys/{api_key_uuid}/regenerate",
|
493
513
|
options=make_request_options(
|
494
514
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
495
515
|
),
|
@@ -31,7 +31,7 @@ class ChildAgentsResource(SyncAPIResource):
|
|
31
31
|
This property can be used as a prefix for any HTTP method call to return
|
32
32
|
the raw response object instead of the parsed content.
|
33
33
|
|
34
|
-
For more information, see https://www.github.com/digitalocean/
|
34
|
+
For more information, see https://www.github.com/digitalocean/gradientai-python#accessing-raw-response-data-eg-headers
|
35
35
|
"""
|
36
36
|
return ChildAgentsResourceWithRawResponse(self)
|
37
37
|
|
@@ -40,7 +40,7 @@ class ChildAgentsResource(SyncAPIResource):
|
|
40
40
|
"""
|
41
41
|
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
42
42
|
|
43
|
-
For more information, see https://www.github.com/digitalocean/
|
43
|
+
For more information, see https://www.github.com/digitalocean/gradientai-python#with_streaming_response
|
44
44
|
"""
|
45
45
|
return ChildAgentsResourceWithStreamingResponse(self)
|
46
46
|
|
@@ -85,7 +85,9 @@ class ChildAgentsResource(SyncAPIResource):
|
|
85
85
|
f"Expected a non-empty value for `path_child_agent_uuid` but received {path_child_agent_uuid!r}"
|
86
86
|
)
|
87
87
|
return self._put(
|
88
|
-
f"/v2/
|
88
|
+
f"/v2/gen-ai/agents/{path_parent_agent_uuid}/child_agents/{path_child_agent_uuid}"
|
89
|
+
if self._client._base_url_overridden
|
90
|
+
else f"https://api.digitalocean.com/v2/gen-ai/agents/{path_parent_agent_uuid}/child_agents/{path_child_agent_uuid}",
|
89
91
|
body=maybe_transform(
|
90
92
|
{
|
91
93
|
"body_child_agent_uuid": body_child_agent_uuid,
|
@@ -132,7 +134,9 @@ class ChildAgentsResource(SyncAPIResource):
|
|
132
134
|
if not child_agent_uuid:
|
133
135
|
raise ValueError(f"Expected a non-empty value for `child_agent_uuid` but received {child_agent_uuid!r}")
|
134
136
|
return self._delete(
|
135
|
-
f"/v2/
|
137
|
+
f"/v2/gen-ai/agents/{parent_agent_uuid}/child_agents/{child_agent_uuid}"
|
138
|
+
if self._client._base_url_overridden
|
139
|
+
else f"https://api.digitalocean.com/v2/gen-ai/agents/{parent_agent_uuid}/child_agents/{child_agent_uuid}",
|
136
140
|
options=make_request_options(
|
137
141
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
138
142
|
),
|
@@ -179,7 +183,9 @@ class ChildAgentsResource(SyncAPIResource):
|
|
179
183
|
f"Expected a non-empty value for `path_child_agent_uuid` but received {path_child_agent_uuid!r}"
|
180
184
|
)
|
181
185
|
return self._post(
|
182
|
-
f"/v2/
|
186
|
+
f"/v2/gen-ai/agents/{path_parent_agent_uuid}/child_agents/{path_child_agent_uuid}"
|
187
|
+
if self._client._base_url_overridden
|
188
|
+
else f"https://api.digitalocean.com/v2/gen-ai/agents/{path_parent_agent_uuid}/child_agents/{path_child_agent_uuid}",
|
183
189
|
body=maybe_transform(
|
184
190
|
{
|
185
191
|
"body_child_agent_uuid": body_child_agent_uuid,
|
@@ -222,7 +228,9 @@ class ChildAgentsResource(SyncAPIResource):
|
|
222
228
|
if not uuid:
|
223
229
|
raise ValueError(f"Expected a non-empty value for `uuid` but received {uuid!r}")
|
224
230
|
return self._get(
|
225
|
-
f"/v2/
|
231
|
+
f"/v2/gen-ai/agents/{uuid}/child_agents"
|
232
|
+
if self._client._base_url_overridden
|
233
|
+
else f"https://api.digitalocean.com/v2/gen-ai/agents/{uuid}/child_agents",
|
226
234
|
options=make_request_options(
|
227
235
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
228
236
|
),
|
@@ -237,7 +245,7 @@ class AsyncChildAgentsResource(AsyncAPIResource):
|
|
237
245
|
This property can be used as a prefix for any HTTP method call to return
|
238
246
|
the raw response object instead of the parsed content.
|
239
247
|
|
240
|
-
For more information, see https://www.github.com/digitalocean/
|
248
|
+
For more information, see https://www.github.com/digitalocean/gradientai-python#accessing-raw-response-data-eg-headers
|
241
249
|
"""
|
242
250
|
return AsyncChildAgentsResourceWithRawResponse(self)
|
243
251
|
|
@@ -246,7 +254,7 @@ class AsyncChildAgentsResource(AsyncAPIResource):
|
|
246
254
|
"""
|
247
255
|
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
248
256
|
|
249
|
-
For more information, see https://www.github.com/digitalocean/
|
257
|
+
For more information, see https://www.github.com/digitalocean/gradientai-python#with_streaming_response
|
250
258
|
"""
|
251
259
|
return AsyncChildAgentsResourceWithStreamingResponse(self)
|
252
260
|
|
@@ -291,7 +299,9 @@ class AsyncChildAgentsResource(AsyncAPIResource):
|
|
291
299
|
f"Expected a non-empty value for `path_child_agent_uuid` but received {path_child_agent_uuid!r}"
|
292
300
|
)
|
293
301
|
return await self._put(
|
294
|
-
f"/v2/
|
302
|
+
f"/v2/gen-ai/agents/{path_parent_agent_uuid}/child_agents/{path_child_agent_uuid}"
|
303
|
+
if self._client._base_url_overridden
|
304
|
+
else f"https://api.digitalocean.com/v2/gen-ai/agents/{path_parent_agent_uuid}/child_agents/{path_child_agent_uuid}",
|
295
305
|
body=await async_maybe_transform(
|
296
306
|
{
|
297
307
|
"body_child_agent_uuid": body_child_agent_uuid,
|
@@ -338,7 +348,9 @@ class AsyncChildAgentsResource(AsyncAPIResource):
|
|
338
348
|
if not child_agent_uuid:
|
339
349
|
raise ValueError(f"Expected a non-empty value for `child_agent_uuid` but received {child_agent_uuid!r}")
|
340
350
|
return await self._delete(
|
341
|
-
f"/v2/
|
351
|
+
f"/v2/gen-ai/agents/{parent_agent_uuid}/child_agents/{child_agent_uuid}"
|
352
|
+
if self._client._base_url_overridden
|
353
|
+
else f"https://api.digitalocean.com/v2/gen-ai/agents/{parent_agent_uuid}/child_agents/{child_agent_uuid}",
|
342
354
|
options=make_request_options(
|
343
355
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
344
356
|
),
|
@@ -385,7 +397,9 @@ class AsyncChildAgentsResource(AsyncAPIResource):
|
|
385
397
|
f"Expected a non-empty value for `path_child_agent_uuid` but received {path_child_agent_uuid!r}"
|
386
398
|
)
|
387
399
|
return await self._post(
|
388
|
-
f"/v2/
|
400
|
+
f"/v2/gen-ai/agents/{path_parent_agent_uuid}/child_agents/{path_child_agent_uuid}"
|
401
|
+
if self._client._base_url_overridden
|
402
|
+
else f"https://api.digitalocean.com/v2/gen-ai/agents/{path_parent_agent_uuid}/child_agents/{path_child_agent_uuid}",
|
389
403
|
body=await async_maybe_transform(
|
390
404
|
{
|
391
405
|
"body_child_agent_uuid": body_child_agent_uuid,
|
@@ -428,7 +442,9 @@ class AsyncChildAgentsResource(AsyncAPIResource):
|
|
428
442
|
if not uuid:
|
429
443
|
raise ValueError(f"Expected a non-empty value for `uuid` but received {uuid!r}")
|
430
444
|
return await self._get(
|
431
|
-
f"/v2/
|
445
|
+
f"/v2/gen-ai/agents/{uuid}/child_agents"
|
446
|
+
if self._client._base_url_overridden
|
447
|
+
else f"https://api.digitalocean.com/v2/gen-ai/agents/{uuid}/child_agents",
|
432
448
|
options=make_request_options(
|
433
449
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
434
450
|
),
|