Skip to content

Commit d1ea884

Browse files
feat(api): update via SDK Studio
1 parent b2ccc4a commit d1ea884

21 files changed

+153
-152
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 70
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/digitalocean%2Fgradientai-e40feaac59c85aace6aa42d2749b20e0955dbbae58b06c3a650bc03adafcd7b5.yml
33
openapi_spec_hash: 825c1a4816938e9f594b7a8c06692667
4-
config_hash: c53f9cc8c1576a747f2e766faafbbc06
4+
config_hash: 211ece2994c6ac52f84f78ee56c1097a

api.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,29 @@ Methods:
260260
- <code title="post /v2/gen-ai/evaluation_datasets">client.regions.evaluation_datasets.<a href="./src/gradientai/resources/regions/evaluation_datasets.py">create</a>(\*\*<a href="src/gradientai/types/regions/evaluation_dataset_create_params.py">params</a>) -> <a href="./src/gradientai/types/regions/evaluation_dataset_create_response.py">EvaluationDatasetCreateResponse</a></code>
261261
- <code title="post /v2/gen-ai/evaluation_datasets/file_upload_presigned_urls">client.regions.evaluation_datasets.<a href="./src/gradientai/resources/regions/evaluation_datasets.py">create_file_upload_presigned_urls</a>(\*\*<a href="src/gradientai/types/regions/evaluation_dataset_create_file_upload_presigned_urls_params.py">params</a>) -> <a href="./src/gradientai/types/regions/evaluation_dataset_create_file_upload_presigned_urls_response.py">EvaluationDatasetCreateFileUploadPresignedURLsResponse</a></code>
262262

263+
# IndexingJobs
264+
265+
Types:
266+
267+
```python
268+
from gradientai.types import (
269+
APIIndexingJob,
270+
IndexingJobCreateResponse,
271+
IndexingJobRetrieveResponse,
272+
IndexingJobListResponse,
273+
IndexingJobRetrieveDataSourcesResponse,
274+
IndexingJobUpdateCancelResponse,
275+
)
276+
```
277+
278+
Methods:
279+
280+
- <code title="post /v2/gen-ai/indexing_jobs">client.indexing_jobs.<a href="./src/gradientai/resources/indexing_jobs.py">create</a>(\*\*<a href="src/gradientai/types/indexing_job_create_params.py">params</a>) -> <a href="./src/gradientai/types/indexing_job_create_response.py">IndexingJobCreateResponse</a></code>
281+
- <code title="get /v2/gen-ai/indexing_jobs/{uuid}">client.indexing_jobs.<a href="./src/gradientai/resources/indexing_jobs.py">retrieve</a>(uuid) -> <a href="./src/gradientai/types/indexing_job_retrieve_response.py">IndexingJobRetrieveResponse</a></code>
282+
- <code title="get /v2/gen-ai/indexing_jobs">client.indexing_jobs.<a href="./src/gradientai/resources/indexing_jobs.py">list</a>(\*\*<a href="src/gradientai/types/indexing_job_list_params.py">params</a>) -> <a href="./src/gradientai/types/indexing_job_list_response.py">IndexingJobListResponse</a></code>
283+
- <code title="get /v2/gen-ai/indexing_jobs/{indexing_job_uuid}/data_sources">client.indexing_jobs.<a href="./src/gradientai/resources/indexing_jobs.py">retrieve_data_sources</a>(indexing_job_uuid) -> <a href="./src/gradientai/types/indexing_job_retrieve_data_sources_response.py">IndexingJobRetrieveDataSourcesResponse</a></code>
284+
- <code title="put /v2/gen-ai/indexing_jobs/{uuid}/cancel">client.indexing_jobs.<a href="./src/gradientai/resources/indexing_jobs.py">update_cancel</a>(path_uuid, \*\*<a href="src/gradientai/types/indexing_job_update_cancel_params.py">params</a>) -> <a href="./src/gradientai/types/indexing_job_update_cancel_response.py">IndexingJobUpdateCancelResponse</a></code>
285+
263286
# KnowledgeBases
264287

265288
Types:
@@ -306,29 +329,6 @@ Methods:
306329
- <code title="get /v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources">client.knowledge_bases.data_sources.<a href="./src/gradientai/resources/knowledge_bases/data_sources.py">list</a>(knowledge_base_uuid, \*\*<a href="src/gradientai/types/knowledge_bases/data_source_list_params.py">params</a>) -> <a href="./src/gradientai/types/knowledge_bases/data_source_list_response.py">DataSourceListResponse</a></code>
307330
- <code title="delete /v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources/{data_source_uuid}">client.knowledge_bases.data_sources.<a href="./src/gradientai/resources/knowledge_bases/data_sources.py">delete</a>(data_source_uuid, \*, knowledge_base_uuid) -> <a href="./src/gradientai/types/knowledge_bases/data_source_delete_response.py">DataSourceDeleteResponse</a></code>
308331

309-
## IndexingJobs
310-
311-
Types:
312-
313-
```python
314-
from gradientai.types.knowledge_bases import (
315-
APIIndexingJob,
316-
IndexingJobCreateResponse,
317-
IndexingJobRetrieveResponse,
318-
IndexingJobListResponse,
319-
IndexingJobRetrieveDataSourcesResponse,
320-
IndexingJobUpdateCancelResponse,
321-
)
322-
```
323-
324-
Methods:
325-
326-
- <code title="post /v2/gen-ai/indexing_jobs">client.knowledge_bases.indexing_jobs.<a href="./src/gradientai/resources/knowledge_bases/indexing_jobs.py">create</a>(\*\*<a href="src/gradientai/types/knowledge_bases/indexing_job_create_params.py">params</a>) -> <a href="./src/gradientai/types/knowledge_bases/indexing_job_create_response.py">IndexingJobCreateResponse</a></code>
327-
- <code title="get /v2/gen-ai/indexing_jobs/{uuid}">client.knowledge_bases.indexing_jobs.<a href="./src/gradientai/resources/knowledge_bases/indexing_jobs.py">retrieve</a>(uuid) -> <a href="./src/gradientai/types/knowledge_bases/indexing_job_retrieve_response.py">IndexingJobRetrieveResponse</a></code>
328-
- <code title="get /v2/gen-ai/indexing_jobs">client.knowledge_bases.indexing_jobs.<a href="./src/gradientai/resources/knowledge_bases/indexing_jobs.py">list</a>(\*\*<a href="src/gradientai/types/knowledge_bases/indexing_job_list_params.py">params</a>) -> <a href="./src/gradientai/types/knowledge_bases/indexing_job_list_response.py">IndexingJobListResponse</a></code>
329-
- <code title="get /v2/gen-ai/indexing_jobs/{indexing_job_uuid}/data_sources">client.knowledge_bases.indexing_jobs.<a href="./src/gradientai/resources/knowledge_bases/indexing_jobs.py">retrieve_data_sources</a>(indexing_job_uuid) -> <a href="./src/gradientai/types/knowledge_bases/indexing_job_retrieve_data_sources_response.py">IndexingJobRetrieveDataSourcesResponse</a></code>
330-
- <code title="put /v2/gen-ai/indexing_jobs/{uuid}/cancel">client.knowledge_bases.indexing_jobs.<a href="./src/gradientai/resources/knowledge_bases/indexing_jobs.py">update_cancel</a>(path_uuid, \*\*<a href="src/gradientai/types/knowledge_bases/indexing_job_update_cancel_params.py">params</a>) -> <a href="./src/gradientai/types/knowledge_bases/indexing_job_update_cancel_response.py">IndexingJobUpdateCancelResponse</a></code>
331-
332332
# Chat
333333

334334
## Completions

src/gradientai/_client.py

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,11 @@
3131
)
3232

3333
if TYPE_CHECKING:
34-
from .resources import chat, agents, models, regions, inference, providers, knowledge_bases
34+
from .resources import chat, agents, models, regions, inference, providers, indexing_jobs, knowledge_bases
3535
from .resources.models import ModelsResource, AsyncModelsResource
3636
from .resources.chat.chat import ChatResource, AsyncChatResource
3737
from .resources.agents.agents import AgentsResource, AsyncAgentsResource
38+
from .resources.indexing_jobs import IndexingJobsResource, AsyncIndexingJobsResource
3839
from .resources.regions.regions import RegionsResource, AsyncRegionsResource
3940
from .resources.inference.inference import InferenceResource, AsyncInferenceResource
4041
from .resources.providers.providers import ProvidersResource, AsyncProvidersResource
@@ -126,6 +127,12 @@ def regions(self) -> RegionsResource:
126127

127128
return RegionsResource(self)
128129

130+
@cached_property
131+
def indexing_jobs(self) -> IndexingJobsResource:
132+
from .resources.indexing_jobs import IndexingJobsResource
133+
134+
return IndexingJobsResource(self)
135+
129136
@cached_property
130137
def knowledge_bases(self) -> KnowledgeBasesResource:
131138
from .resources.knowledge_bases import KnowledgeBasesResource
@@ -339,6 +346,12 @@ def regions(self) -> AsyncRegionsResource:
339346

340347
return AsyncRegionsResource(self)
341348

349+
@cached_property
350+
def indexing_jobs(self) -> AsyncIndexingJobsResource:
351+
from .resources.indexing_jobs import AsyncIndexingJobsResource
352+
353+
return AsyncIndexingJobsResource(self)
354+
342355
@cached_property
343356
def knowledge_bases(self) -> AsyncKnowledgeBasesResource:
344357
from .resources.knowledge_bases import AsyncKnowledgeBasesResource
@@ -502,6 +515,12 @@ def regions(self) -> regions.RegionsResourceWithRawResponse:
502515

503516
return RegionsResourceWithRawResponse(self._client.regions)
504517

518+
@cached_property
519+
def indexing_jobs(self) -> indexing_jobs.IndexingJobsResourceWithRawResponse:
520+
from .resources.indexing_jobs import IndexingJobsResourceWithRawResponse
521+
522+
return IndexingJobsResourceWithRawResponse(self._client.indexing_jobs)
523+
505524
@cached_property
506525
def knowledge_bases(self) -> knowledge_bases.KnowledgeBasesResourceWithRawResponse:
507526
from .resources.knowledge_bases import KnowledgeBasesResourceWithRawResponse
@@ -551,6 +570,12 @@ def regions(self) -> regions.AsyncRegionsResourceWithRawResponse:
551570

552571
return AsyncRegionsResourceWithRawResponse(self._client.regions)
553572

573+
@cached_property
574+
def indexing_jobs(self) -> indexing_jobs.AsyncIndexingJobsResourceWithRawResponse:
575+
from .resources.indexing_jobs import AsyncIndexingJobsResourceWithRawResponse
576+
577+
return AsyncIndexingJobsResourceWithRawResponse(self._client.indexing_jobs)
578+
554579
@cached_property
555580
def knowledge_bases(self) -> knowledge_bases.AsyncKnowledgeBasesResourceWithRawResponse:
556581
from .resources.knowledge_bases import AsyncKnowledgeBasesResourceWithRawResponse
@@ -600,6 +625,12 @@ def regions(self) -> regions.RegionsResourceWithStreamingResponse:
600625

601626
return RegionsResourceWithStreamingResponse(self._client.regions)
602627

628+
@cached_property
629+
def indexing_jobs(self) -> indexing_jobs.IndexingJobsResourceWithStreamingResponse:
630+
from .resources.indexing_jobs import IndexingJobsResourceWithStreamingResponse
631+
632+
return IndexingJobsResourceWithStreamingResponse(self._client.indexing_jobs)
633+
603634
@cached_property
604635
def knowledge_bases(self) -> knowledge_bases.KnowledgeBasesResourceWithStreamingResponse:
605636
from .resources.knowledge_bases import KnowledgeBasesResourceWithStreamingResponse
@@ -649,6 +680,12 @@ def regions(self) -> regions.AsyncRegionsResourceWithStreamingResponse:
649680

650681
return AsyncRegionsResourceWithStreamingResponse(self._client.regions)
651682

683+
@cached_property
684+
def indexing_jobs(self) -> indexing_jobs.AsyncIndexingJobsResourceWithStreamingResponse:
685+
from .resources.indexing_jobs import AsyncIndexingJobsResourceWithStreamingResponse
686+
687+
return AsyncIndexingJobsResourceWithStreamingResponse(self._client.indexing_jobs)
688+
652689
@cached_property
653690
def knowledge_bases(self) -> knowledge_bases.AsyncKnowledgeBasesResourceWithStreamingResponse:
654691
from .resources.knowledge_bases import AsyncKnowledgeBasesResourceWithStreamingResponse

src/gradientai/resources/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@
4848
ProvidersResourceWithStreamingResponse,
4949
AsyncProvidersResourceWithStreamingResponse,
5050
)
51+
from .indexing_jobs import (
52+
IndexingJobsResource,
53+
AsyncIndexingJobsResource,
54+
IndexingJobsResourceWithRawResponse,
55+
AsyncIndexingJobsResourceWithRawResponse,
56+
IndexingJobsResourceWithStreamingResponse,
57+
AsyncIndexingJobsResourceWithStreamingResponse,
58+
)
5159
from .knowledge_bases import (
5260
KnowledgeBasesResource,
5361
AsyncKnowledgeBasesResource,
@@ -76,6 +84,12 @@
7684
"AsyncRegionsResourceWithRawResponse",
7785
"RegionsResourceWithStreamingResponse",
7886
"AsyncRegionsResourceWithStreamingResponse",
87+
"IndexingJobsResource",
88+
"AsyncIndexingJobsResource",
89+
"IndexingJobsResourceWithRawResponse",
90+
"AsyncIndexingJobsResourceWithRawResponse",
91+
"IndexingJobsResourceWithStreamingResponse",
92+
"AsyncIndexingJobsResourceWithStreamingResponse",
7993
"KnowledgeBasesResource",
8094
"AsyncKnowledgeBasesResource",
8195
"KnowledgeBasesResourceWithRawResponse",

src/gradientai/resources/knowledge_bases/indexing_jobs.py renamed to src/gradientai/resources/indexing_jobs.py

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,23 @@
66

77
import httpx
88

9-
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
10-
from ..._utils import maybe_transform, async_maybe_transform
11-
from ..._compat import cached_property
12-
from ..._resource import SyncAPIResource, AsyncAPIResource
13-
from ..._response import (
9+
from ..types import indexing_job_list_params, indexing_job_create_params, indexing_job_update_cancel_params
10+
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
11+
from .._utils import maybe_transform, async_maybe_transform
12+
from .._compat import cached_property
13+
from .._resource import SyncAPIResource, AsyncAPIResource
14+
from .._response import (
1415
to_raw_response_wrapper,
1516
to_streamed_response_wrapper,
1617
async_to_raw_response_wrapper,
1718
async_to_streamed_response_wrapper,
1819
)
19-
from ..._base_client import make_request_options
20-
from ...types.knowledge_bases import (
21-
indexing_job_list_params,
22-
indexing_job_create_params,
23-
indexing_job_update_cancel_params,
24-
)
25-
from ...types.knowledge_bases.indexing_job_list_response import IndexingJobListResponse
26-
from ...types.knowledge_bases.indexing_job_create_response import IndexingJobCreateResponse
27-
from ...types.knowledge_bases.indexing_job_retrieve_response import IndexingJobRetrieveResponse
28-
from ...types.knowledge_bases.indexing_job_update_cancel_response import IndexingJobUpdateCancelResponse
29-
from ...types.knowledge_bases.indexing_job_retrieve_data_sources_response import IndexingJobRetrieveDataSourcesResponse
20+
from .._base_client import make_request_options
21+
from ..types.indexing_job_list_response import IndexingJobListResponse
22+
from ..types.indexing_job_create_response import IndexingJobCreateResponse
23+
from ..types.indexing_job_retrieve_response import IndexingJobRetrieveResponse
24+
from ..types.indexing_job_update_cancel_response import IndexingJobUpdateCancelResponse
25+
from ..types.indexing_job_retrieve_data_sources_response import IndexingJobRetrieveDataSourcesResponse
3026

3127
__all__ = ["IndexingJobsResource", "AsyncIndexingJobsResource"]
3228

src/gradientai/resources/knowledge_bases/__init__.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,6 @@
88
DataSourcesResourceWithStreamingResponse,
99
AsyncDataSourcesResourceWithStreamingResponse,
1010
)
11-
from .indexing_jobs import (
12-
IndexingJobsResource,
13-
AsyncIndexingJobsResource,
14-
IndexingJobsResourceWithRawResponse,
15-
AsyncIndexingJobsResourceWithRawResponse,
16-
IndexingJobsResourceWithStreamingResponse,
17-
AsyncIndexingJobsResourceWithStreamingResponse,
18-
)
1911
from .knowledge_bases import (
2012
KnowledgeBasesResource,
2113
AsyncKnowledgeBasesResource,
@@ -32,12 +24,6 @@
3224
"AsyncDataSourcesResourceWithRawResponse",
3325
"DataSourcesResourceWithStreamingResponse",
3426
"AsyncDataSourcesResourceWithStreamingResponse",
35-
"IndexingJobsResource",
36-
"AsyncIndexingJobsResource",
37-
"IndexingJobsResourceWithRawResponse",
38-
"AsyncIndexingJobsResourceWithRawResponse",
39-
"IndexingJobsResourceWithStreamingResponse",
40-
"AsyncIndexingJobsResourceWithStreamingResponse",
4127
"KnowledgeBasesResource",
4228
"AsyncKnowledgeBasesResource",
4329
"KnowledgeBasesResourceWithRawResponse",

src/gradientai/resources/knowledge_bases/knowledge_bases.py

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,6 @@
2525
DataSourcesResourceWithStreamingResponse,
2626
AsyncDataSourcesResourceWithStreamingResponse,
2727
)
28-
from .indexing_jobs import (
29-
IndexingJobsResource,
30-
AsyncIndexingJobsResource,
31-
IndexingJobsResourceWithRawResponse,
32-
AsyncIndexingJobsResourceWithRawResponse,
33-
IndexingJobsResourceWithStreamingResponse,
34-
AsyncIndexingJobsResourceWithStreamingResponse,
35-
)
3628
from ..._base_client import make_request_options
3729
from ...types.knowledge_base_list_response import KnowledgeBaseListResponse
3830
from ...types.knowledge_base_create_response import KnowledgeBaseCreateResponse
@@ -48,10 +40,6 @@ class KnowledgeBasesResource(SyncAPIResource):
4840
def data_sources(self) -> DataSourcesResource:
4941
return DataSourcesResource(self._client)
5042

51-
@cached_property
52-
def indexing_jobs(self) -> IndexingJobsResource:
53-
return IndexingJobsResource(self._client)
54-
5543
@cached_property
5644
def with_raw_response(self) -> KnowledgeBasesResourceWithRawResponse:
5745
"""
@@ -328,10 +316,6 @@ class AsyncKnowledgeBasesResource(AsyncAPIResource):
328316
def data_sources(self) -> AsyncDataSourcesResource:
329317
return AsyncDataSourcesResource(self._client)
330318

331-
@cached_property
332-
def indexing_jobs(self) -> AsyncIndexingJobsResource:
333-
return AsyncIndexingJobsResource(self._client)
334-
335319
@cached_property
336320
def with_raw_response(self) -> AsyncKnowledgeBasesResourceWithRawResponse:
337321
"""
@@ -627,10 +611,6 @@ def __init__(self, knowledge_bases: KnowledgeBasesResource) -> None:
627611
def data_sources(self) -> DataSourcesResourceWithRawResponse:
628612
return DataSourcesResourceWithRawResponse(self._knowledge_bases.data_sources)
629613

630-
@cached_property
631-
def indexing_jobs(self) -> IndexingJobsResourceWithRawResponse:
632-
return IndexingJobsResourceWithRawResponse(self._knowledge_bases.indexing_jobs)
633-
634614

635615
class AsyncKnowledgeBasesResourceWithRawResponse:
636616
def __init__(self, knowledge_bases: AsyncKnowledgeBasesResource) -> None:
@@ -656,10 +636,6 @@ def __init__(self, knowledge_bases: AsyncKnowledgeBasesResource) -> None:
656636
def data_sources(self) -> AsyncDataSourcesResourceWithRawResponse:
657637
return AsyncDataSourcesResourceWithRawResponse(self._knowledge_bases.data_sources)
658638

659-
@cached_property
660-
def indexing_jobs(self) -> AsyncIndexingJobsResourceWithRawResponse:
661-
return AsyncIndexingJobsResourceWithRawResponse(self._knowledge_bases.indexing_jobs)
662-
663639

664640
class KnowledgeBasesResourceWithStreamingResponse:
665641
def __init__(self, knowledge_bases: KnowledgeBasesResource) -> None:
@@ -685,10 +661,6 @@ def __init__(self, knowledge_bases: KnowledgeBasesResource) -> None:
685661
def data_sources(self) -> DataSourcesResourceWithStreamingResponse:
686662
return DataSourcesResourceWithStreamingResponse(self._knowledge_bases.data_sources)
687663

688-
@cached_property
689-
def indexing_jobs(self) -> IndexingJobsResourceWithStreamingResponse:
690-
return IndexingJobsResourceWithStreamingResponse(self._knowledge_bases.indexing_jobs)
691-
692664

693665
class AsyncKnowledgeBasesResourceWithStreamingResponse:
694666
def __init__(self, knowledge_bases: AsyncKnowledgeBasesResource) -> None:
@@ -713,7 +685,3 @@ def __init__(self, knowledge_bases: AsyncKnowledgeBasesResource) -> None:
713685
@cached_property
714686
def data_sources(self) -> AsyncDataSourcesResourceWithStreamingResponse:
715687
return AsyncDataSourcesResourceWithStreamingResponse(self._knowledge_bases.data_sources)
716-
717-
@cached_property
718-
def indexing_jobs(self) -> AsyncIndexingJobsResourceWithStreamingResponse:
719-
return AsyncIndexingJobsResourceWithStreamingResponse(self._knowledge_bases.indexing_jobs)

0 commit comments

Comments
 (0)