c63a5cfe-b235-4fbe-8bbb-82a9e02a482a-python 0.1.0a4__py3-none-any.whl → 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.
- {c63a5cfe_b235_4fbe_8bbb_82a9e02a482a_python-0.1.0a4.dist-info → c63a5cfe_b235_4fbe_8bbb_82a9e02a482a_python-0.1.0a6.dist-info}/METADATA +41 -16
- c63a5cfe_b235_4fbe_8bbb_82a9e02a482a_python-0.1.0a6.dist-info/RECORD +230 -0
- gradientai/_client.py +73 -71
- gradientai/_version.py +1 -1
- gradientai/resources/__init__.py +14 -28
- gradientai/resources/agents/__init__.py +69 -13
- gradientai/resources/agents/agents.py +148 -20
- gradientai/resources/{regions → agents}/evaluation_datasets.py +3 -3
- gradientai/resources/agents/evaluation_metrics/__init__.py +33 -0
- gradientai/resources/agents/evaluation_metrics/evaluation_metrics.py +177 -0
- gradientai/resources/agents/evaluation_metrics/workspaces/__init__.py +33 -0
- gradientai/resources/agents/evaluation_metrics/workspaces/agents.py +324 -0
- gradientai/resources/agents/evaluation_metrics/workspaces/workspaces.py +654 -0
- gradientai/resources/{regions/evaluation_runs → agents}/evaluation_runs.py +197 -47
- gradientai/resources/{regions → agents}/evaluation_test_cases.py +30 -9
- gradientai/resources/agents/{child_agents.py → routes.py} +64 -64
- gradientai/resources/chat/completions.py +20 -2
- gradientai/resources/inference/__init__.py +0 -14
- gradientai/resources/inference/inference.py +0 -32
- gradientai/resources/knowledge_bases/__init__.py +14 -0
- gradientai/resources/{indexing_jobs.py → knowledge_bases/indexing_jobs.py} +16 -12
- gradientai/resources/knowledge_bases/knowledge_bases.py +32 -0
- gradientai/resources/{providers → model_providers}/__init__.py +13 -13
- gradientai/resources/{providers → model_providers}/anthropic/keys.py +12 -7
- gradientai/resources/{providers/providers.py → model_providers/model_providers.py} +31 -31
- gradientai/resources/{providers → model_providers}/openai/keys.py +12 -7
- gradientai/resources/models.py +77 -105
- gradientai/resources/regions.py +195 -0
- gradientai/types/__init__.py +2 -17
- gradientai/types/agent_list_response.py +2 -2
- gradientai/types/agents/__init__.py +44 -8
- gradientai/types/{api_evaluation_metric.py → agents/api_evaluation_metric.py} +1 -1
- gradientai/types/{regions/evaluation_runs → agents}/api_evaluation_metric_result.py +1 -1
- gradientai/types/{regions/evaluation_runs/api_prompt.py → agents/api_evaluation_prompt.py} +3 -3
- gradientai/types/{regions/evaluation_runs → agents}/api_evaluation_run.py +13 -1
- gradientai/types/{regions → agents}/api_evaluation_test_case.py +1 -1
- gradientai/types/agents/api_key_list_response.py +2 -2
- gradientai/types/{region_list_evaluation_metrics_response.py → agents/evaluation_metric_list_response.py} +3 -3
- gradientai/types/agents/evaluation_metrics/__init__.py +14 -0
- gradientai/types/agents/evaluation_metrics/workspace_create_params.py +16 -0
- gradientai/types/agents/evaluation_metrics/workspace_create_response.py +16 -0
- gradientai/types/agents/evaluation_metrics/workspace_delete_response.py +11 -0
- gradientai/types/agents/evaluation_metrics/workspace_list_evaluation_test_cases_response.py +12 -0
- gradientai/types/agents/evaluation_metrics/workspace_list_response.py +16 -0
- gradientai/types/agents/evaluation_metrics/workspace_retrieve_response.py +16 -0
- gradientai/types/agents/evaluation_metrics/workspace_update_params.py +18 -0
- gradientai/types/agents/evaluation_metrics/workspace_update_response.py +16 -0
- gradientai/types/agents/evaluation_metrics/workspaces/__init__.py +8 -0
- gradientai/types/agents/evaluation_metrics/workspaces/agent_list_params.py +26 -0
- gradientai/types/agents/evaluation_metrics/workspaces/agent_list_response.py +22 -0
- gradientai/types/agents/evaluation_metrics/workspaces/agent_move_params.py +16 -0
- gradientai/types/agents/evaluation_metrics/workspaces/agent_move_response.py +16 -0
- gradientai/types/{regions → agents}/evaluation_run_create_params.py +3 -2
- gradientai/types/{regions → agents}/evaluation_run_create_response.py +2 -2
- gradientai/types/{regions/evaluation_runs/result_retrieve_response.py → agents/evaluation_run_list_results_response.py} +5 -5
- gradientai/types/{regions → agents}/evaluation_run_retrieve_response.py +1 -1
- gradientai/types/agents/evaluation_run_retrieve_results_response.py +12 -0
- gradientai/types/{regions → agents}/evaluation_test_case_list_evaluation_runs_response.py +1 -1
- gradientai/types/agents/evaluation_test_case_retrieve_params.py +12 -0
- gradientai/types/agents/{child_agent_add_params.py → route_add_params.py} +2 -2
- gradientai/types/agents/{child_agent_add_response.py → route_add_response.py} +2 -2
- gradientai/types/agents/{child_agent_delete_response.py → route_delete_response.py} +2 -2
- gradientai/types/agents/{child_agent_update_params.py → route_update_params.py} +2 -2
- gradientai/types/agents/{child_agent_update_response.py → route_update_response.py} +2 -2
- gradientai/types/agents/{child_agent_view_response.py → route_view_response.py} +2 -2
- gradientai/types/agents/version_list_response.py +2 -2
- gradientai/types/api_knowledge_base.py +1 -1
- gradientai/types/api_workspace.py +1 -1
- gradientai/types/inference/__init__.py +0 -2
- gradientai/types/inference/api_key_list_response.py +2 -2
- gradientai/types/knowledge_base_list_response.py +2 -2
- gradientai/types/knowledge_bases/__init__.py +12 -0
- gradientai/types/{indexing_job_retrieve_data_sources_response.py → knowledge_bases/api_indexed_data_source.py} +4 -8
- gradientai/types/{api_indexing_job.py → knowledge_bases/api_indexing_job.py} +13 -1
- gradientai/types/knowledge_bases/api_knowledge_base_data_source.py +4 -1
- gradientai/types/knowledge_bases/data_source_list_response.py +2 -2
- gradientai/types/{indexing_job_create_response.py → knowledge_bases/indexing_job_create_response.py} +1 -1
- gradientai/types/{indexing_job_list_response.py → knowledge_bases/indexing_job_list_response.py} +3 -3
- gradientai/types/knowledge_bases/indexing_job_retrieve_data_sources_response.py +12 -0
- gradientai/types/{indexing_job_retrieve_response.py → knowledge_bases/indexing_job_retrieve_response.py} +1 -1
- gradientai/types/{indexing_job_update_cancel_params.py → knowledge_bases/indexing_job_update_cancel_params.py} +1 -1
- gradientai/types/{indexing_job_update_cancel_response.py → knowledge_bases/indexing_job_update_cancel_response.py} +1 -1
- gradientai/types/{inference/model.py → model.py} +1 -1
- gradientai/types/model_list_response.py +5 -8
- gradientai/types/{providers → model_providers}/anthropic/key_list_agents_response.py +2 -2
- gradientai/types/{providers → model_providers}/anthropic/key_list_response.py +2 -2
- gradientai/types/{providers → model_providers}/openai/key_list_response.py +2 -2
- gradientai/types/{providers → model_providers}/openai/key_retrieve_agents_response.py +2 -2
- gradientai/types/shared/__init__.py +4 -0
- c63a5cfe_b235_4fbe_8bbb_82a9e02a482a_python-0.1.0a4.dist-info/RECORD +0 -217
- gradientai/resources/inference/models.py +0 -226
- gradientai/resources/regions/__init__.py +0 -61
- gradientai/resources/regions/evaluation_runs/__init__.py +0 -33
- gradientai/resources/regions/evaluation_runs/results.py +0 -264
- gradientai/resources/regions/regions.py +0 -352
- gradientai/types/api_model.py +0 -32
- gradientai/types/inference/model_list_response.py +0 -15
- gradientai/types/model_list_params.py +0 -42
- gradientai/types/regions/__init__.py +0 -32
- gradientai/types/regions/evaluation_runs/__init__.py +0 -9
- gradientai/types/regions/evaluation_runs/result_retrieve_prompt_response.py +0 -12
- {c63a5cfe_b235_4fbe_8bbb_82a9e02a482a_python-0.1.0a4.dist-info → c63a5cfe_b235_4fbe_8bbb_82a9e02a482a_python-0.1.0a6.dist-info}/WHEEL +0 -0
- {c63a5cfe_b235_4fbe_8bbb_82a9e02a482a_python-0.1.0a4.dist-info → c63a5cfe_b235_4fbe_8bbb_82a9e02a482a_python-0.1.0a6.dist-info}/licenses/LICENSE +0 -0
- /gradientai/resources/{providers → model_providers}/anthropic/__init__.py +0 -0
- /gradientai/resources/{providers → model_providers}/anthropic/anthropic.py +0 -0
- /gradientai/resources/{providers → model_providers}/openai/__init__.py +0 -0
- /gradientai/resources/{providers → model_providers}/openai/openai.py +0 -0
- /gradientai/types/{regions → agents}/api_star_metric.py +0 -0
- /gradientai/types/{regions → agents}/api_star_metric_param.py +0 -0
- /gradientai/types/{regions → agents}/evaluation_dataset_create_file_upload_presigned_urls_params.py +0 -0
- /gradientai/types/{regions → agents}/evaluation_dataset_create_file_upload_presigned_urls_response.py +0 -0
- /gradientai/types/{regions → agents}/evaluation_dataset_create_params.py +0 -0
- /gradientai/types/{regions → agents}/evaluation_dataset_create_response.py +0 -0
- /gradientai/types/{regions → agents}/evaluation_test_case_create_params.py +0 -0
- /gradientai/types/{regions → agents}/evaluation_test_case_create_response.py +0 -0
- /gradientai/types/{regions → agents}/evaluation_test_case_list_evaluation_runs_params.py +0 -0
- /gradientai/types/{regions → agents}/evaluation_test_case_list_response.py +0 -0
- /gradientai/types/{regions → agents}/evaluation_test_case_retrieve_response.py +0 -0
- /gradientai/types/{regions → agents}/evaluation_test_case_update_params.py +0 -0
- /gradientai/types/{regions → agents}/evaluation_test_case_update_response.py +0 -0
- /gradientai/types/{indexing_job_create_params.py → knowledge_bases/indexing_job_create_params.py} +0 -0
- /gradientai/types/{indexing_job_list_params.py → knowledge_bases/indexing_job_list_params.py} +0 -0
- /gradientai/types/{providers → model_providers}/__init__.py +0 -0
- /gradientai/types/{providers → model_providers}/anthropic/__init__.py +0 -0
- /gradientai/types/{providers → model_providers}/anthropic/key_create_params.py +0 -0
- /gradientai/types/{providers → model_providers}/anthropic/key_create_response.py +0 -0
- /gradientai/types/{providers → model_providers}/anthropic/key_delete_response.py +0 -0
- /gradientai/types/{providers → model_providers}/anthropic/key_list_agents_params.py +0 -0
- /gradientai/types/{providers → model_providers}/anthropic/key_list_params.py +0 -0
- /gradientai/types/{providers → model_providers}/anthropic/key_retrieve_response.py +0 -0
- /gradientai/types/{providers → model_providers}/anthropic/key_update_params.py +0 -0
- /gradientai/types/{providers → model_providers}/anthropic/key_update_response.py +0 -0
- /gradientai/types/{providers → model_providers}/openai/__init__.py +0 -0
- /gradientai/types/{providers → model_providers}/openai/key_create_params.py +0 -0
- /gradientai/types/{providers → model_providers}/openai/key_create_response.py +0 -0
- /gradientai/types/{providers → model_providers}/openai/key_delete_response.py +0 -0
- /gradientai/types/{providers → model_providers}/openai/key_list_params.py +0 -0
- /gradientai/types/{providers → model_providers}/openai/key_retrieve_agents_params.py +0 -0
- /gradientai/types/{providers → model_providers}/openai/key_retrieve_response.py +0 -0
- /gradientai/types/{providers → model_providers}/openai/key_update_params.py +0 -0
- /gradientai/types/{providers → model_providers}/openai/key_update_response.py +0 -0
- /gradientai/types/{agents → shared}/api_links.py +0 -0
- /gradientai/types/{agents → shared}/api_meta.py +0 -0
@@ -1,352 +0,0 @@
|
|
1
|
-
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
-
|
3
|
-
from __future__ import annotations
|
4
|
-
|
5
|
-
import httpx
|
6
|
-
|
7
|
-
from ...types import region_list_params
|
8
|
-
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
9
|
-
from ..._utils import maybe_transform, async_maybe_transform
|
10
|
-
from ..._compat import cached_property
|
11
|
-
from ..._resource import SyncAPIResource, AsyncAPIResource
|
12
|
-
from ..._response import (
|
13
|
-
to_raw_response_wrapper,
|
14
|
-
to_streamed_response_wrapper,
|
15
|
-
async_to_raw_response_wrapper,
|
16
|
-
async_to_streamed_response_wrapper,
|
17
|
-
)
|
18
|
-
from ..._base_client import make_request_options
|
19
|
-
from .evaluation_datasets import (
|
20
|
-
EvaluationDatasetsResource,
|
21
|
-
AsyncEvaluationDatasetsResource,
|
22
|
-
EvaluationDatasetsResourceWithRawResponse,
|
23
|
-
AsyncEvaluationDatasetsResourceWithRawResponse,
|
24
|
-
EvaluationDatasetsResourceWithStreamingResponse,
|
25
|
-
AsyncEvaluationDatasetsResourceWithStreamingResponse,
|
26
|
-
)
|
27
|
-
from .evaluation_test_cases import (
|
28
|
-
EvaluationTestCasesResource,
|
29
|
-
AsyncEvaluationTestCasesResource,
|
30
|
-
EvaluationTestCasesResourceWithRawResponse,
|
31
|
-
AsyncEvaluationTestCasesResourceWithRawResponse,
|
32
|
-
EvaluationTestCasesResourceWithStreamingResponse,
|
33
|
-
AsyncEvaluationTestCasesResourceWithStreamingResponse,
|
34
|
-
)
|
35
|
-
from ...types.region_list_response import RegionListResponse
|
36
|
-
from .evaluation_runs.evaluation_runs import (
|
37
|
-
EvaluationRunsResource,
|
38
|
-
AsyncEvaluationRunsResource,
|
39
|
-
EvaluationRunsResourceWithRawResponse,
|
40
|
-
AsyncEvaluationRunsResourceWithRawResponse,
|
41
|
-
EvaluationRunsResourceWithStreamingResponse,
|
42
|
-
AsyncEvaluationRunsResourceWithStreamingResponse,
|
43
|
-
)
|
44
|
-
from ...types.region_list_evaluation_metrics_response import RegionListEvaluationMetricsResponse
|
45
|
-
|
46
|
-
__all__ = ["RegionsResource", "AsyncRegionsResource"]
|
47
|
-
|
48
|
-
|
49
|
-
class RegionsResource(SyncAPIResource):
|
50
|
-
@cached_property
|
51
|
-
def evaluation_runs(self) -> EvaluationRunsResource:
|
52
|
-
return EvaluationRunsResource(self._client)
|
53
|
-
|
54
|
-
@cached_property
|
55
|
-
def evaluation_test_cases(self) -> EvaluationTestCasesResource:
|
56
|
-
return EvaluationTestCasesResource(self._client)
|
57
|
-
|
58
|
-
@cached_property
|
59
|
-
def evaluation_datasets(self) -> EvaluationDatasetsResource:
|
60
|
-
return EvaluationDatasetsResource(self._client)
|
61
|
-
|
62
|
-
@cached_property
|
63
|
-
def with_raw_response(self) -> RegionsResourceWithRawResponse:
|
64
|
-
"""
|
65
|
-
This property can be used as a prefix for any HTTP method call to return
|
66
|
-
the raw response object instead of the parsed content.
|
67
|
-
|
68
|
-
For more information, see https://www.github.com/digitalocean/gradientai-python#accessing-raw-response-data-eg-headers
|
69
|
-
"""
|
70
|
-
return RegionsResourceWithRawResponse(self)
|
71
|
-
|
72
|
-
@cached_property
|
73
|
-
def with_streaming_response(self) -> RegionsResourceWithStreamingResponse:
|
74
|
-
"""
|
75
|
-
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
76
|
-
|
77
|
-
For more information, see https://www.github.com/digitalocean/gradientai-python#with_streaming_response
|
78
|
-
"""
|
79
|
-
return RegionsResourceWithStreamingResponse(self)
|
80
|
-
|
81
|
-
def list(
|
82
|
-
self,
|
83
|
-
*,
|
84
|
-
serves_batch: bool | NotGiven = NOT_GIVEN,
|
85
|
-
serves_inference: bool | NotGiven = NOT_GIVEN,
|
86
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
87
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
88
|
-
extra_headers: Headers | None = None,
|
89
|
-
extra_query: Query | None = None,
|
90
|
-
extra_body: Body | None = None,
|
91
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
92
|
-
) -> RegionListResponse:
|
93
|
-
"""
|
94
|
-
To list all datacenter regions, send a GET request to `/v2/gen-ai/regions`.
|
95
|
-
|
96
|
-
Args:
|
97
|
-
serves_batch: include datacenters that are capable of running batch jobs.
|
98
|
-
|
99
|
-
serves_inference: include datacenters that serve inference.
|
100
|
-
|
101
|
-
extra_headers: Send extra headers
|
102
|
-
|
103
|
-
extra_query: Add additional query parameters to the request
|
104
|
-
|
105
|
-
extra_body: Add additional JSON properties to the request
|
106
|
-
|
107
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
108
|
-
"""
|
109
|
-
return self._get(
|
110
|
-
"/v2/gen-ai/regions"
|
111
|
-
if self._client._base_url_overridden
|
112
|
-
else "https://api.digitalocean.com/v2/gen-ai/regions",
|
113
|
-
options=make_request_options(
|
114
|
-
extra_headers=extra_headers,
|
115
|
-
extra_query=extra_query,
|
116
|
-
extra_body=extra_body,
|
117
|
-
timeout=timeout,
|
118
|
-
query=maybe_transform(
|
119
|
-
{
|
120
|
-
"serves_batch": serves_batch,
|
121
|
-
"serves_inference": serves_inference,
|
122
|
-
},
|
123
|
-
region_list_params.RegionListParams,
|
124
|
-
),
|
125
|
-
),
|
126
|
-
cast_to=RegionListResponse,
|
127
|
-
)
|
128
|
-
|
129
|
-
def list_evaluation_metrics(
|
130
|
-
self,
|
131
|
-
*,
|
132
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
133
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
134
|
-
extra_headers: Headers | None = None,
|
135
|
-
extra_query: Query | None = None,
|
136
|
-
extra_body: Body | None = None,
|
137
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
138
|
-
) -> RegionListEvaluationMetricsResponse:
|
139
|
-
"""
|
140
|
-
To list all evaluation metrics, send a GET request to
|
141
|
-
`/v2/gen-ai/evaluation_metrics`.
|
142
|
-
"""
|
143
|
-
return self._get(
|
144
|
-
"/v2/gen-ai/evaluation_metrics"
|
145
|
-
if self._client._base_url_overridden
|
146
|
-
else "https://api.digitalocean.com/v2/gen-ai/evaluation_metrics",
|
147
|
-
options=make_request_options(
|
148
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
149
|
-
),
|
150
|
-
cast_to=RegionListEvaluationMetricsResponse,
|
151
|
-
)
|
152
|
-
|
153
|
-
|
154
|
-
class AsyncRegionsResource(AsyncAPIResource):
|
155
|
-
@cached_property
|
156
|
-
def evaluation_runs(self) -> AsyncEvaluationRunsResource:
|
157
|
-
return AsyncEvaluationRunsResource(self._client)
|
158
|
-
|
159
|
-
@cached_property
|
160
|
-
def evaluation_test_cases(self) -> AsyncEvaluationTestCasesResource:
|
161
|
-
return AsyncEvaluationTestCasesResource(self._client)
|
162
|
-
|
163
|
-
@cached_property
|
164
|
-
def evaluation_datasets(self) -> AsyncEvaluationDatasetsResource:
|
165
|
-
return AsyncEvaluationDatasetsResource(self._client)
|
166
|
-
|
167
|
-
@cached_property
|
168
|
-
def with_raw_response(self) -> AsyncRegionsResourceWithRawResponse:
|
169
|
-
"""
|
170
|
-
This property can be used as a prefix for any HTTP method call to return
|
171
|
-
the raw response object instead of the parsed content.
|
172
|
-
|
173
|
-
For more information, see https://www.github.com/digitalocean/gradientai-python#accessing-raw-response-data-eg-headers
|
174
|
-
"""
|
175
|
-
return AsyncRegionsResourceWithRawResponse(self)
|
176
|
-
|
177
|
-
@cached_property
|
178
|
-
def with_streaming_response(self) -> AsyncRegionsResourceWithStreamingResponse:
|
179
|
-
"""
|
180
|
-
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
181
|
-
|
182
|
-
For more information, see https://www.github.com/digitalocean/gradientai-python#with_streaming_response
|
183
|
-
"""
|
184
|
-
return AsyncRegionsResourceWithStreamingResponse(self)
|
185
|
-
|
186
|
-
async def list(
|
187
|
-
self,
|
188
|
-
*,
|
189
|
-
serves_batch: bool | NotGiven = NOT_GIVEN,
|
190
|
-
serves_inference: bool | NotGiven = NOT_GIVEN,
|
191
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
192
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
193
|
-
extra_headers: Headers | None = None,
|
194
|
-
extra_query: Query | None = None,
|
195
|
-
extra_body: Body | None = None,
|
196
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
197
|
-
) -> RegionListResponse:
|
198
|
-
"""
|
199
|
-
To list all datacenter regions, send a GET request to `/v2/gen-ai/regions`.
|
200
|
-
|
201
|
-
Args:
|
202
|
-
serves_batch: include datacenters that are capable of running batch jobs.
|
203
|
-
|
204
|
-
serves_inference: include datacenters that serve inference.
|
205
|
-
|
206
|
-
extra_headers: Send extra headers
|
207
|
-
|
208
|
-
extra_query: Add additional query parameters to the request
|
209
|
-
|
210
|
-
extra_body: Add additional JSON properties to the request
|
211
|
-
|
212
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
213
|
-
"""
|
214
|
-
return await self._get(
|
215
|
-
"/v2/gen-ai/regions"
|
216
|
-
if self._client._base_url_overridden
|
217
|
-
else "https://api.digitalocean.com/v2/gen-ai/regions",
|
218
|
-
options=make_request_options(
|
219
|
-
extra_headers=extra_headers,
|
220
|
-
extra_query=extra_query,
|
221
|
-
extra_body=extra_body,
|
222
|
-
timeout=timeout,
|
223
|
-
query=await async_maybe_transform(
|
224
|
-
{
|
225
|
-
"serves_batch": serves_batch,
|
226
|
-
"serves_inference": serves_inference,
|
227
|
-
},
|
228
|
-
region_list_params.RegionListParams,
|
229
|
-
),
|
230
|
-
),
|
231
|
-
cast_to=RegionListResponse,
|
232
|
-
)
|
233
|
-
|
234
|
-
async def list_evaluation_metrics(
|
235
|
-
self,
|
236
|
-
*,
|
237
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
238
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
239
|
-
extra_headers: Headers | None = None,
|
240
|
-
extra_query: Query | None = None,
|
241
|
-
extra_body: Body | None = None,
|
242
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
243
|
-
) -> RegionListEvaluationMetricsResponse:
|
244
|
-
"""
|
245
|
-
To list all evaluation metrics, send a GET request to
|
246
|
-
`/v2/gen-ai/evaluation_metrics`.
|
247
|
-
"""
|
248
|
-
return await self._get(
|
249
|
-
"/v2/gen-ai/evaluation_metrics"
|
250
|
-
if self._client._base_url_overridden
|
251
|
-
else "https://api.digitalocean.com/v2/gen-ai/evaluation_metrics",
|
252
|
-
options=make_request_options(
|
253
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
254
|
-
),
|
255
|
-
cast_to=RegionListEvaluationMetricsResponse,
|
256
|
-
)
|
257
|
-
|
258
|
-
|
259
|
-
class RegionsResourceWithRawResponse:
|
260
|
-
def __init__(self, regions: RegionsResource) -> None:
|
261
|
-
self._regions = regions
|
262
|
-
|
263
|
-
self.list = to_raw_response_wrapper(
|
264
|
-
regions.list,
|
265
|
-
)
|
266
|
-
self.list_evaluation_metrics = to_raw_response_wrapper(
|
267
|
-
regions.list_evaluation_metrics,
|
268
|
-
)
|
269
|
-
|
270
|
-
@cached_property
|
271
|
-
def evaluation_runs(self) -> EvaluationRunsResourceWithRawResponse:
|
272
|
-
return EvaluationRunsResourceWithRawResponse(self._regions.evaluation_runs)
|
273
|
-
|
274
|
-
@cached_property
|
275
|
-
def evaluation_test_cases(self) -> EvaluationTestCasesResourceWithRawResponse:
|
276
|
-
return EvaluationTestCasesResourceWithRawResponse(self._regions.evaluation_test_cases)
|
277
|
-
|
278
|
-
@cached_property
|
279
|
-
def evaluation_datasets(self) -> EvaluationDatasetsResourceWithRawResponse:
|
280
|
-
return EvaluationDatasetsResourceWithRawResponse(self._regions.evaluation_datasets)
|
281
|
-
|
282
|
-
|
283
|
-
class AsyncRegionsResourceWithRawResponse:
|
284
|
-
def __init__(self, regions: AsyncRegionsResource) -> None:
|
285
|
-
self._regions = regions
|
286
|
-
|
287
|
-
self.list = async_to_raw_response_wrapper(
|
288
|
-
regions.list,
|
289
|
-
)
|
290
|
-
self.list_evaluation_metrics = async_to_raw_response_wrapper(
|
291
|
-
regions.list_evaluation_metrics,
|
292
|
-
)
|
293
|
-
|
294
|
-
@cached_property
|
295
|
-
def evaluation_runs(self) -> AsyncEvaluationRunsResourceWithRawResponse:
|
296
|
-
return AsyncEvaluationRunsResourceWithRawResponse(self._regions.evaluation_runs)
|
297
|
-
|
298
|
-
@cached_property
|
299
|
-
def evaluation_test_cases(self) -> AsyncEvaluationTestCasesResourceWithRawResponse:
|
300
|
-
return AsyncEvaluationTestCasesResourceWithRawResponse(self._regions.evaluation_test_cases)
|
301
|
-
|
302
|
-
@cached_property
|
303
|
-
def evaluation_datasets(self) -> AsyncEvaluationDatasetsResourceWithRawResponse:
|
304
|
-
return AsyncEvaluationDatasetsResourceWithRawResponse(self._regions.evaluation_datasets)
|
305
|
-
|
306
|
-
|
307
|
-
class RegionsResourceWithStreamingResponse:
|
308
|
-
def __init__(self, regions: RegionsResource) -> None:
|
309
|
-
self._regions = regions
|
310
|
-
|
311
|
-
self.list = to_streamed_response_wrapper(
|
312
|
-
regions.list,
|
313
|
-
)
|
314
|
-
self.list_evaluation_metrics = to_streamed_response_wrapper(
|
315
|
-
regions.list_evaluation_metrics,
|
316
|
-
)
|
317
|
-
|
318
|
-
@cached_property
|
319
|
-
def evaluation_runs(self) -> EvaluationRunsResourceWithStreamingResponse:
|
320
|
-
return EvaluationRunsResourceWithStreamingResponse(self._regions.evaluation_runs)
|
321
|
-
|
322
|
-
@cached_property
|
323
|
-
def evaluation_test_cases(self) -> EvaluationTestCasesResourceWithStreamingResponse:
|
324
|
-
return EvaluationTestCasesResourceWithStreamingResponse(self._regions.evaluation_test_cases)
|
325
|
-
|
326
|
-
@cached_property
|
327
|
-
def evaluation_datasets(self) -> EvaluationDatasetsResourceWithStreamingResponse:
|
328
|
-
return EvaluationDatasetsResourceWithStreamingResponse(self._regions.evaluation_datasets)
|
329
|
-
|
330
|
-
|
331
|
-
class AsyncRegionsResourceWithStreamingResponse:
|
332
|
-
def __init__(self, regions: AsyncRegionsResource) -> None:
|
333
|
-
self._regions = regions
|
334
|
-
|
335
|
-
self.list = async_to_streamed_response_wrapper(
|
336
|
-
regions.list,
|
337
|
-
)
|
338
|
-
self.list_evaluation_metrics = async_to_streamed_response_wrapper(
|
339
|
-
regions.list_evaluation_metrics,
|
340
|
-
)
|
341
|
-
|
342
|
-
@cached_property
|
343
|
-
def evaluation_runs(self) -> AsyncEvaluationRunsResourceWithStreamingResponse:
|
344
|
-
return AsyncEvaluationRunsResourceWithStreamingResponse(self._regions.evaluation_runs)
|
345
|
-
|
346
|
-
@cached_property
|
347
|
-
def evaluation_test_cases(self) -> AsyncEvaluationTestCasesResourceWithStreamingResponse:
|
348
|
-
return AsyncEvaluationTestCasesResourceWithStreamingResponse(self._regions.evaluation_test_cases)
|
349
|
-
|
350
|
-
@cached_property
|
351
|
-
def evaluation_datasets(self) -> AsyncEvaluationDatasetsResourceWithStreamingResponse:
|
352
|
-
return AsyncEvaluationDatasetsResourceWithStreamingResponse(self._regions.evaluation_datasets)
|
gradientai/types/api_model.py
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
-
|
3
|
-
from typing import Optional
|
4
|
-
from datetime import datetime
|
5
|
-
|
6
|
-
from .._models import BaseModel
|
7
|
-
from .api_agreement import APIAgreement
|
8
|
-
from .api_model_version import APIModelVersion
|
9
|
-
|
10
|
-
__all__ = ["APIModel"]
|
11
|
-
|
12
|
-
|
13
|
-
class APIModel(BaseModel):
|
14
|
-
agreement: Optional[APIAgreement] = None
|
15
|
-
|
16
|
-
created_at: Optional[datetime] = None
|
17
|
-
|
18
|
-
is_foundational: Optional[bool] = None
|
19
|
-
|
20
|
-
name: Optional[str] = None
|
21
|
-
|
22
|
-
parent_uuid: Optional[str] = None
|
23
|
-
|
24
|
-
updated_at: Optional[datetime] = None
|
25
|
-
|
26
|
-
upload_complete: Optional[bool] = None
|
27
|
-
|
28
|
-
url: Optional[str] = None
|
29
|
-
|
30
|
-
uuid: Optional[str] = None
|
31
|
-
|
32
|
-
version: Optional[APIModelVersion] = None
|
@@ -1,15 +0,0 @@
|
|
1
|
-
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
-
|
3
|
-
from typing import List
|
4
|
-
from typing_extensions import Literal
|
5
|
-
|
6
|
-
from .model import Model
|
7
|
-
from ..._models import BaseModel
|
8
|
-
|
9
|
-
__all__ = ["ModelListResponse"]
|
10
|
-
|
11
|
-
|
12
|
-
class ModelListResponse(BaseModel):
|
13
|
-
data: List[Model]
|
14
|
-
|
15
|
-
object: Literal["list"]
|
@@ -1,42 +0,0 @@
|
|
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 List
|
6
|
-
from typing_extensions import Literal, TypedDict
|
7
|
-
|
8
|
-
__all__ = ["ModelListParams"]
|
9
|
-
|
10
|
-
|
11
|
-
class ModelListParams(TypedDict, total=False):
|
12
|
-
page: int
|
13
|
-
"""page number."""
|
14
|
-
|
15
|
-
per_page: int
|
16
|
-
"""items per page."""
|
17
|
-
|
18
|
-
public_only: bool
|
19
|
-
"""only include models that are publicly available."""
|
20
|
-
|
21
|
-
usecases: List[
|
22
|
-
Literal[
|
23
|
-
"MODEL_USECASE_UNKNOWN",
|
24
|
-
"MODEL_USECASE_AGENT",
|
25
|
-
"MODEL_USECASE_FINETUNED",
|
26
|
-
"MODEL_USECASE_KNOWLEDGEBASE",
|
27
|
-
"MODEL_USECASE_GUARDRAIL",
|
28
|
-
"MODEL_USECASE_REASONING",
|
29
|
-
"MODEL_USECASE_SERVERLESS",
|
30
|
-
]
|
31
|
-
]
|
32
|
-
"""include only models defined for the listed usecases.
|
33
|
-
|
34
|
-
- MODEL_USECASE_UNKNOWN: The use case of the model is unknown
|
35
|
-
- MODEL_USECASE_AGENT: The model maybe used in an agent
|
36
|
-
- MODEL_USECASE_FINETUNED: The model maybe used for fine tuning
|
37
|
-
- MODEL_USECASE_KNOWLEDGEBASE: The model maybe used for knowledge bases
|
38
|
-
(embedding models)
|
39
|
-
- MODEL_USECASE_GUARDRAIL: The model maybe used for guardrails
|
40
|
-
- MODEL_USECASE_REASONING: The model usecase for reasoning
|
41
|
-
- MODEL_USECASE_SERVERLESS: The model usecase for serverless inference
|
42
|
-
"""
|
@@ -1,32 +0,0 @@
|
|
1
|
-
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
-
|
3
|
-
from __future__ import annotations
|
4
|
-
|
5
|
-
from .api_star_metric import APIStarMetric as APIStarMetric
|
6
|
-
from .api_star_metric_param import APIStarMetricParam as APIStarMetricParam
|
7
|
-
from .api_evaluation_test_case import APIEvaluationTestCase as APIEvaluationTestCase
|
8
|
-
from .evaluation_run_create_params import EvaluationRunCreateParams as EvaluationRunCreateParams
|
9
|
-
from .evaluation_run_create_response import EvaluationRunCreateResponse as EvaluationRunCreateResponse
|
10
|
-
from .evaluation_dataset_create_params import EvaluationDatasetCreateParams as EvaluationDatasetCreateParams
|
11
|
-
from .evaluation_run_retrieve_response import EvaluationRunRetrieveResponse as EvaluationRunRetrieveResponse
|
12
|
-
from .evaluation_dataset_create_response import EvaluationDatasetCreateResponse as EvaluationDatasetCreateResponse
|
13
|
-
from .evaluation_test_case_create_params import EvaluationTestCaseCreateParams as EvaluationTestCaseCreateParams
|
14
|
-
from .evaluation_test_case_list_response import EvaluationTestCaseListResponse as EvaluationTestCaseListResponse
|
15
|
-
from .evaluation_test_case_update_params import EvaluationTestCaseUpdateParams as EvaluationTestCaseUpdateParams
|
16
|
-
from .evaluation_test_case_create_response import EvaluationTestCaseCreateResponse as EvaluationTestCaseCreateResponse
|
17
|
-
from .evaluation_test_case_update_response import EvaluationTestCaseUpdateResponse as EvaluationTestCaseUpdateResponse
|
18
|
-
from .evaluation_test_case_retrieve_response import (
|
19
|
-
EvaluationTestCaseRetrieveResponse as EvaluationTestCaseRetrieveResponse,
|
20
|
-
)
|
21
|
-
from .evaluation_test_case_list_evaluation_runs_params import (
|
22
|
-
EvaluationTestCaseListEvaluationRunsParams as EvaluationTestCaseListEvaluationRunsParams,
|
23
|
-
)
|
24
|
-
from .evaluation_test_case_list_evaluation_runs_response import (
|
25
|
-
EvaluationTestCaseListEvaluationRunsResponse as EvaluationTestCaseListEvaluationRunsResponse,
|
26
|
-
)
|
27
|
-
from .evaluation_dataset_create_file_upload_presigned_urls_params import (
|
28
|
-
EvaluationDatasetCreateFileUploadPresignedURLsParams as EvaluationDatasetCreateFileUploadPresignedURLsParams,
|
29
|
-
)
|
30
|
-
from .evaluation_dataset_create_file_upload_presigned_urls_response import (
|
31
|
-
EvaluationDatasetCreateFileUploadPresignedURLsResponse as EvaluationDatasetCreateFileUploadPresignedURLsResponse,
|
32
|
-
)
|
@@ -1,9 +0,0 @@
|
|
1
|
-
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
-
|
3
|
-
from __future__ import annotations
|
4
|
-
|
5
|
-
from .api_prompt import APIPrompt as APIPrompt
|
6
|
-
from .api_evaluation_run import APIEvaluationRun as APIEvaluationRun
|
7
|
-
from .result_retrieve_response import ResultRetrieveResponse as ResultRetrieveResponse
|
8
|
-
from .api_evaluation_metric_result import APIEvaluationMetricResult as APIEvaluationMetricResult
|
9
|
-
from .result_retrieve_prompt_response import ResultRetrievePromptResponse as ResultRetrievePromptResponse
|
@@ -1,12 +0,0 @@
|
|
1
|
-
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
-
|
3
|
-
from typing import Optional
|
4
|
-
|
5
|
-
from ...._models import BaseModel
|
6
|
-
from .api_prompt import APIPrompt
|
7
|
-
|
8
|
-
__all__ = ["ResultRetrievePromptResponse"]
|
9
|
-
|
10
|
-
|
11
|
-
class ResultRetrievePromptResponse(BaseModel):
|
12
|
-
prompt: Optional[APIPrompt] = None
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
/gradientai/types/{regions → agents}/evaluation_dataset_create_file_upload_presigned_urls_params.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
|
/gradientai/types/{indexing_job_create_params.py → knowledge_bases/indexing_job_create_params.py}
RENAMED
File without changes
|
/gradientai/types/{indexing_job_list_params.py → knowledge_bases/indexing_job_list_params.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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|