Skip to content

Commit 6254ccf

Browse files
feat(api): update via SDK Studio
1 parent 8f5761b commit 6254ccf

File tree

11 files changed

+654
-3
lines changed

11 files changed

+654
-3
lines changed

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 8
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/digitalocean%2Fdigitalocean-genai-sdk-2b5d132a76e51849a4fdbb2da2818132d1f8208f137acb86ee71e4a5c130154e.yml
3-
openapi_spec_hash: 6c13968b99ef16b717854a096b6ca506
1+
configured_endpoints: 10
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/digitalocean%2Fdigitalocean-genai-sdk-dfc4c90814a9503f4796d2b0ac258becf67a135292bd57d55545430bbc125770.yml
3+
openapi_spec_hash: 55413c66920b0f073f598043822addb5
44
config_hash: 69dc66269416b2e01e8852b5a6788b97

api.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,19 @@ Methods:
2121
- <code title="post /v2/gen-ai/agents">client.agents.<a href="./src/gradientai/resources/agents/agents.py">create</a>(\*\*<a href="src/gradientai/types/agent_create_params.py">params</a>) -> <a href="./src/gradientai/types/agent_create_response.py">AgentCreateResponse</a></code>
2222
- <code title="get /v2/gen-ai/agents">client.agents.<a href="./src/gradientai/resources/agents/agents.py">list</a>(\*\*<a href="src/gradientai/types/agent_list_params.py">params</a>) -> <a href="./src/gradientai/types/agent_list_response.py">AgentListResponse</a></code>
2323

24+
## APIKeys
25+
26+
Types:
27+
28+
```python
29+
from gradientai.types.agents import APIKeyCreateResponse, APIKeyListResponse
30+
```
31+
32+
Methods:
33+
34+
- <code title="post /v2/gen-ai/agents/{agent_uuid}/api_keys">client.agents.api_keys.<a href="./src/gradientai/resources/agents/api_keys.py">create</a>(path_agent_uuid, \*\*<a href="src/gradientai/types/agents/api_key_create_params.py">params</a>) -> <a href="./src/gradientai/types/agents/api_key_create_response.py">APIKeyCreateResponse</a></code>
35+
- <code title="get /v2/gen-ai/agents/{agent_uuid}/api_keys">client.agents.api_keys.<a href="./src/gradientai/resources/agents/api_keys.py">list</a>(agent_uuid, \*\*<a href="src/gradientai/types/agents/api_key_list_params.py">params</a>) -> <a href="./src/gradientai/types/agents/api_key_list_response.py">APIKeyListResponse</a></code>
36+
2437
## Versions
2538

2639
Types:

src/gradientai/resources/agents/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@
88
AgentsResourceWithStreamingResponse,
99
AsyncAgentsResourceWithStreamingResponse,
1010
)
11+
from .api_keys import (
12+
APIKeysResource,
13+
AsyncAPIKeysResource,
14+
APIKeysResourceWithRawResponse,
15+
AsyncAPIKeysResourceWithRawResponse,
16+
APIKeysResourceWithStreamingResponse,
17+
AsyncAPIKeysResourceWithStreamingResponse,
18+
)
1119
from .versions import (
1220
VersionsResource,
1321
AsyncVersionsResource,
@@ -18,6 +26,12 @@
1826
)
1927

2028
__all__ = [
29+
"APIKeysResource",
30+
"AsyncAPIKeysResource",
31+
"APIKeysResourceWithRawResponse",
32+
"AsyncAPIKeysResourceWithRawResponse",
33+
"APIKeysResourceWithStreamingResponse",
34+
"AsyncAPIKeysResourceWithStreamingResponse",
2135
"VersionsResource",
2236
"AsyncVersionsResource",
2337
"VersionsResourceWithRawResponse",

src/gradientai/resources/agents/agents.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@
99
from ...types import agent_list_params, agent_create_params
1010
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
1111
from ..._utils import maybe_transform, async_maybe_transform
12+
from .api_keys import (
13+
APIKeysResource,
14+
AsyncAPIKeysResource,
15+
APIKeysResourceWithRawResponse,
16+
AsyncAPIKeysResourceWithRawResponse,
17+
APIKeysResourceWithStreamingResponse,
18+
AsyncAPIKeysResourceWithStreamingResponse,
19+
)
1220
from .versions import (
1321
VersionsResource,
1422
AsyncVersionsResource,
@@ -33,6 +41,10 @@
3341

3442

3543
class AgentsResource(SyncAPIResource):
44+
@cached_property
45+
def api_keys(self) -> APIKeysResource:
46+
return APIKeysResource(self._client)
47+
3648
@cached_property
3749
def versions(self) -> VersionsResource:
3850
return VersionsResource(self._client)
@@ -172,6 +184,10 @@ def list(
172184

173185

174186
class AsyncAgentsResource(AsyncAPIResource):
187+
@cached_property
188+
def api_keys(self) -> AsyncAPIKeysResource:
189+
return AsyncAPIKeysResource(self._client)
190+
175191
@cached_property
176192
def versions(self) -> AsyncVersionsResource:
177193
return AsyncVersionsResource(self._client)
@@ -321,6 +337,10 @@ def __init__(self, agents: AgentsResource) -> None:
321337
agents.list,
322338
)
323339

340+
@cached_property
341+
def api_keys(self) -> APIKeysResourceWithRawResponse:
342+
return APIKeysResourceWithRawResponse(self._agents.api_keys)
343+
324344
@cached_property
325345
def versions(self) -> VersionsResourceWithRawResponse:
326346
return VersionsResourceWithRawResponse(self._agents.versions)
@@ -337,6 +357,10 @@ def __init__(self, agents: AsyncAgentsResource) -> None:
337357
agents.list,
338358
)
339359

360+
@cached_property
361+
def api_keys(self) -> AsyncAPIKeysResourceWithRawResponse:
362+
return AsyncAPIKeysResourceWithRawResponse(self._agents.api_keys)
363+
340364
@cached_property
341365
def versions(self) -> AsyncVersionsResourceWithRawResponse:
342366
return AsyncVersionsResourceWithRawResponse(self._agents.versions)
@@ -353,6 +377,10 @@ def __init__(self, agents: AgentsResource) -> None:
353377
agents.list,
354378
)
355379

380+
@cached_property
381+
def api_keys(self) -> APIKeysResourceWithStreamingResponse:
382+
return APIKeysResourceWithStreamingResponse(self._agents.api_keys)
383+
356384
@cached_property
357385
def versions(self) -> VersionsResourceWithStreamingResponse:
358386
return VersionsResourceWithStreamingResponse(self._agents.versions)
@@ -369,6 +397,10 @@ def __init__(self, agents: AsyncAgentsResource) -> None:
369397
agents.list,
370398
)
371399

400+
@cached_property
401+
def api_keys(self) -> AsyncAPIKeysResourceWithStreamingResponse:
402+
return AsyncAPIKeysResourceWithStreamingResponse(self._agents.api_keys)
403+
372404
@cached_property
373405
def versions(self) -> AsyncVersionsResourceWithStreamingResponse:
374406
return AsyncVersionsResourceWithStreamingResponse(self._agents.versions)

0 commit comments

Comments
 (0)