Skip to content

Commit a5f6aa6

Browse files
feat(api): update via SDK Studio
1 parent b900d76 commit a5f6aa6

18 files changed

+931
-13
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: 173
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/digitalocean%2Fgradient-621c3ebf5011c5ca508f78fccbea17de4ca6b35bfe99578c1ae2265021578d6f.yml
3-
openapi_spec_hash: e29d14e3e4679fcf22b3e760e49931b1
1+
configured_endpoints: 174
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/digitalocean%2Fgradient-3364ccdab713948eb06e9f77fb3b2046d0627ac2c18d389ef60d91bdfbeb2dd7.yml
3+
openapi_spec_hash: 83a3d092965fde776b29b61f785459f9
44
config_hash: a8e1b6dcbc8b1126938d320837c5926d

api.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,20 @@ Methods:
383383

384384
- <code title="post /chat/completions">client.chat.completions.<a href="./src/gradient/resources/chat/completions.py">create</a>(\*\*<a href="src/gradient/types/chat/completion_create_params.py">params</a>) -> <a href="./src/gradient/types/chat/completion_create_response.py">CompletionCreateResponse</a></code>
385385

386+
# Images
387+
388+
## Generations
389+
390+
Types:
391+
392+
```python
393+
from gradient.types.images import GenerationCreateResponse
394+
```
395+
396+
Methods:
397+
398+
- <code title="post /images/generations">client.images.generations.<a href="./src/gradient/resources/images/generations.py">create</a>(\*\*<a href="src/gradient/types/images/generation_create_params.py">params</a>) -> <a href="./src/gradient/types/images/generation_create_response.py">GenerationCreateResponse</a></code>
399+
386400
# GPUDroplets
387401

388402
Types:

src/gradient/_client.py

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
if TYPE_CHECKING:
3535
from .resources import (
3636
chat,
37-
agents,
37+
agents, images,
3838
models,
3939
regions,
4040
databases,
@@ -49,6 +49,7 @@
4949
AsyncGPUDropletsResource,
5050
)
5151
from .resources.agents.agents import AgentsResource, AsyncAgentsResource
52+
from .resources.images.images import ImagesResource, AsyncImagesResource
5253
from .resources.models.models import ModelsResource, AsyncModelsResource
5354
from .resources.databases.databases import DatabasesResource, AsyncDatabasesResource
5455
from .resources.inference.inference import InferenceResource, AsyncInferenceResource
@@ -182,6 +183,12 @@ def chat(self) -> ChatResource:
182183

183184
return ChatResource(self)
184185

186+
@cached_property
187+
def images(self) -> ImagesResource:
188+
from .resources.images import ImagesResource
189+
190+
return ImagesResource(self)
191+
185192
@cached_property
186193
def gpu_droplets(self) -> GPUDropletsResource:
187194
from .resources.gpu_droplets import GPUDropletsResource
@@ -471,6 +478,12 @@ def chat(self) -> AsyncChatResource:
471478

472479
return AsyncChatResource(self)
473480

481+
@cached_property
482+
def images(self) -> AsyncImagesResource:
483+
from .resources.images import AsyncImagesResource
484+
485+
return AsyncImagesResource(self)
486+
474487
@cached_property
475488
def gpu_droplets(self) -> AsyncGPUDropletsResource:
476489
from .resources.gpu_droplets import AsyncGPUDropletsResource
@@ -665,6 +678,12 @@ def chat(self) -> chat.ChatResourceWithRawResponse:
665678

666679
return ChatResourceWithRawResponse(self._client.chat)
667680

681+
@cached_property
682+
def images(self) -> images.ImagesResourceWithRawResponse:
683+
from .resources.images import ImagesResourceWithRawResponse
684+
685+
return ImagesResourceWithRawResponse(self._client.images)
686+
668687
@cached_property
669688
def gpu_droplets(self) -> gpu_droplets.GPUDropletsResourceWithRawResponse:
670689
from .resources.gpu_droplets import GPUDropletsResourceWithRawResponse
@@ -720,6 +739,12 @@ def chat(self) -> chat.AsyncChatResourceWithRawResponse:
720739

721740
return AsyncChatResourceWithRawResponse(self._client.chat)
722741

742+
@cached_property
743+
def images(self) -> images.AsyncImagesResourceWithRawResponse:
744+
from .resources.images import AsyncImagesResourceWithRawResponse
745+
746+
return AsyncImagesResourceWithRawResponse(self._client.images)
747+
723748
@cached_property
724749
def gpu_droplets(self) -> gpu_droplets.AsyncGPUDropletsResourceWithRawResponse:
725750
from .resources.gpu_droplets import AsyncGPUDropletsResourceWithRawResponse
@@ -779,6 +804,12 @@ def chat(self) -> chat.ChatResourceWithStreamingResponse:
779804

780805
return ChatResourceWithStreamingResponse(self._client.chat)
781806

807+
@cached_property
808+
def images(self) -> images.ImagesResourceWithStreamingResponse:
809+
from .resources.images import ImagesResourceWithStreamingResponse
810+
811+
return ImagesResourceWithStreamingResponse(self._client.images)
812+
782813
@cached_property
783814
def gpu_droplets(self) -> gpu_droplets.GPUDropletsResourceWithStreamingResponse:
784815
from .resources.gpu_droplets import GPUDropletsResourceWithStreamingResponse
@@ -838,6 +869,12 @@ def chat(self) -> chat.AsyncChatResourceWithStreamingResponse:
838869

839870
return AsyncChatResourceWithStreamingResponse(self._client.chat)
840871

872+
@cached_property
873+
def images(self) -> images.AsyncImagesResourceWithStreamingResponse:
874+
from .resources.images import AsyncImagesResourceWithStreamingResponse
875+
876+
return AsyncImagesResourceWithStreamingResponse(self._client.images)
877+
841878
@cached_property
842879
def gpu_droplets(
843880
self,

src/gradient/resources/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@
1616
AgentsResourceWithStreamingResponse,
1717
AsyncAgentsResourceWithStreamingResponse,
1818
)
19+
from .images import (
20+
ImagesResource,
21+
AsyncImagesResource,
22+
ImagesResourceWithRawResponse,
23+
AsyncImagesResourceWithRawResponse,
24+
ImagesResourceWithStreamingResponse,
25+
AsyncImagesResourceWithStreamingResponse,
26+
)
1927
from .models import (
2028
ModelsResource,
2129
AsyncModelsResource,
@@ -78,6 +86,12 @@
7886
"AsyncChatResourceWithRawResponse",
7987
"ChatResourceWithStreamingResponse",
8088
"AsyncChatResourceWithStreamingResponse",
89+
"ImagesResource",
90+
"AsyncImagesResource",
91+
"ImagesResourceWithRawResponse",
92+
"AsyncImagesResourceWithRawResponse",
93+
"ImagesResourceWithStreamingResponse",
94+
"AsyncImagesResourceWithStreamingResponse",
8195
"GPUDropletsResource",
8296
"AsyncGPUDropletsResource",
8397
"GPUDropletsResourceWithRawResponse",
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from .images import (
4+
ImagesResource,
5+
AsyncImagesResource,
6+
ImagesResourceWithRawResponse,
7+
AsyncImagesResourceWithRawResponse,
8+
ImagesResourceWithStreamingResponse,
9+
AsyncImagesResourceWithStreamingResponse,
10+
)
11+
from .generations import (
12+
GenerationsResource,
13+
AsyncGenerationsResource,
14+
GenerationsResourceWithRawResponse,
15+
AsyncGenerationsResourceWithRawResponse,
16+
GenerationsResourceWithStreamingResponse,
17+
AsyncGenerationsResourceWithStreamingResponse,
18+
)
19+
20+
__all__ = [
21+
"GenerationsResource",
22+
"AsyncGenerationsResource",
23+
"GenerationsResourceWithRawResponse",
24+
"AsyncGenerationsResourceWithRawResponse",
25+
"GenerationsResourceWithStreamingResponse",
26+
"AsyncGenerationsResourceWithStreamingResponse",
27+
"ImagesResource",
28+
"AsyncImagesResource",
29+
"ImagesResourceWithRawResponse",
30+
"AsyncImagesResourceWithRawResponse",
31+
"ImagesResourceWithStreamingResponse",
32+
"AsyncImagesResourceWithStreamingResponse",
33+
]

0 commit comments

Comments
 (0)