Skip to content

Commit b9e317b

Browse files
stainless-app[bot]meorphis
authored andcommitted
feat(api): add gpu droplets
1 parent c4b2e95 commit b9e317b

File tree

420 files changed

+39504
-1005
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

420 files changed

+39504
-1005
lines changed

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 77
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/digitalocean%2Fgradientai-391afaae764eb758523b67805cb47ae3bc319dc119d83414afdd66f123ceaf5c.yml
3-
openapi_spec_hash: c773d792724f5647ae25a5ae4ccec208
4-
config_hash: 0bd094d86a010f7cbd5eb22ef548a29f
1+
configured_endpoints: 168
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/digitalocean%2Fgradientai-f8e8c290636c1e218efcf7bfe92ba7570c11690754d21287d838919fbc943a80.yml
3+
openapi_spec_hash: 1eddf488ecbe415efb45445697716f5d
4+
config_hash: 683ea6ba4d63037c1c72484e5936e73c

api.md

Lines changed: 447 additions & 7 deletions
Large diffs are not rendered by default.

src/gradientai/resources/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@
4040
InferenceResourceWithStreamingResponse,
4141
AsyncInferenceResourceWithStreamingResponse,
4242
)
43+
from .gpu_droplets import (
44+
GPUDropletsResource,
45+
AsyncGPUDropletsResource,
46+
GPUDropletsResourceWithRawResponse,
47+
AsyncGPUDropletsResourceWithRawResponse,
48+
GPUDropletsResourceWithStreamingResponse,
49+
AsyncGPUDropletsResourceWithStreamingResponse,
50+
)
4351
from .knowledge_bases import (
4452
KnowledgeBasesResource,
4553
AsyncKnowledgeBasesResource,
@@ -86,4 +94,10 @@
8694
"AsyncModelsResourceWithRawResponse",
8795
"ModelsResourceWithStreamingResponse",
8896
"AsyncModelsResourceWithStreamingResponse",
97+
"GPUDropletsResource",
98+
"AsyncGPUDropletsResource",
99+
"GPUDropletsResourceWithRawResponse",
100+
"AsyncGPUDropletsResourceWithRawResponse",
101+
"GPUDropletsResourceWithStreamingResponse",
102+
"AsyncGPUDropletsResourceWithStreamingResponse",
89103
]

src/gradientai/resources/agents/agents.py

Lines changed: 112 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -203,13 +203,29 @@ def create(
203203
body contains a JSON object with the newly created agent object.
204204
205205
Args:
206+
anthropic_key_uuid: Optional Anthropic API key ID to use with Anthropic models
207+
208+
description: A text description of the agent, not used in inference
209+
206210
instruction: Agent instruction. Instructions help your agent to perform its job effectively.
207211
See
208212
[Write Effective Agent Instructions](https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/#agent-instructions)
209213
for best practices.
210214
215+
knowledge_base_uuid: Ids of the knowledge base(s) to attach to the agent
216+
211217
model_uuid: Identifier for the foundation model.
212218
219+
name: Agent name
220+
221+
openai_key_uuid: Optional OpenAI API key ID to use with OpenAI models
222+
223+
project_id: The id of the DigitalOcean project this agent will belong to
224+
225+
region: The DigitalOcean region to deploy your agent in
226+
227+
tags: Agent tag to organize related resources
228+
213229
extra_headers: Send extra headers
214230
215231
extra_query: Add additional query parameters to the request
@@ -285,6 +301,7 @@ def update(
285301
path_uuid: str,
286302
*,
287303
anthropic_key_uuid: str | NotGiven = NOT_GIVEN,
304+
conversation_logs_enabled: bool | NotGiven = NOT_GIVEN,
288305
description: str | NotGiven = NOT_GIVEN,
289306
instruction: str | NotGiven = NOT_GIVEN,
290307
k: int | NotGiven = NOT_GIVEN,
@@ -312,17 +329,39 @@ def update(
312329
response body is a JSON object containing the agent.
313330
314331
Args:
332+
anthropic_key_uuid: Optional anthropic key uuid for use with anthropic models
333+
334+
conversation_logs_enabled: Optional update of conversation logs enabled
335+
336+
description: Agent description
337+
315338
instruction: Agent instruction. Instructions help your agent to perform its job effectively.
316339
See
317340
[Write Effective Agent Instructions](https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/#agent-instructions)
318341
for best practices.
319342
343+
k: How many results should be considered from an attached knowledge base
344+
320345
max_tokens: Specifies the maximum number of tokens the model can process in a single input
321346
or output, set as a number between 1 and 512. This determines the length of each
322347
response.
323348
324349
model_uuid: Identifier for the foundation model.
325350
351+
name: Agent name
352+
353+
openai_key_uuid: Optional OpenAI key uuid for use with OpenAI models
354+
355+
project_id: The id of the DigitalOcean project this agent will belong to
356+
357+
retrieval_method: - RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown
358+
- RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite
359+
- RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back
360+
- RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries
361+
- RETRIEVAL_METHOD_NONE: The retrieval method is none
362+
363+
tags: A set of abitrary tags to organize your agent
364+
326365
temperature: Controls the model’s creativity, specified as a number between 0 and 1. Lower
327366
values produce more predictable and conservative responses, while higher values
328367
encourage creativity and variation.
@@ -331,6 +370,8 @@ def update(
331370
number between 0 and 1. Higher values allow for more diverse outputs, while
332371
lower values ensure focused and coherent responses.
333372
373+
body_uuid: Unique agent id
374+
334375
extra_headers: Send extra headers
335376
336377
extra_query: Add additional query parameters to the request
@@ -348,6 +389,7 @@ def update(
348389
body=maybe_transform(
349390
{
350391
"anthropic_key_uuid": anthropic_key_uuid,
392+
"conversation_logs_enabled": conversation_logs_enabled,
351393
"description": description,
352394
"instruction": instruction,
353395
"k": k,
@@ -388,11 +430,11 @@ def list(
388430
To list all agents, send a GET request to `/v2/gen-ai/agents`.
389431
390432
Args:
391-
only_deployed: only list agents that are deployed.
433+
only_deployed: Only list agents that are deployed.
392434
393-
page: page number.
435+
page: Page number.
394436
395-
per_page: items per page.
437+
per_page: Items per page.
396438
397439
extra_headers: Send extra headers
398440
@@ -477,6 +519,17 @@ def update_status(
477519
PUT request to `/v2/gen-ai/agents/{uuid}/deployment_visibility`.
478520
479521
Args:
522+
body_uuid: Unique id
523+
524+
visibility: - VISIBILITY_UNKNOWN: The status of the deployment is unknown
525+
- VISIBILITY_DISABLED: The deployment is disabled and will no longer service
526+
requests
527+
- VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state
528+
- VISIBILITY_PUBLIC: The deployment is public and will service requests from the
529+
public internet
530+
- VISIBILITY_PRIVATE: The deployment is private and will only service requests
531+
from other agents, or through API keys
532+
480533
extra_headers: Send extra headers
481534
482535
extra_query: Add additional query parameters to the request
@@ -591,13 +644,29 @@ async def create(
591644
body contains a JSON object with the newly created agent object.
592645
593646
Args:
647+
anthropic_key_uuid: Optional Anthropic API key ID to use with Anthropic models
648+
649+
description: A text description of the agent, not used in inference
650+
594651
instruction: Agent instruction. Instructions help your agent to perform its job effectively.
595652
See
596653
[Write Effective Agent Instructions](https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/#agent-instructions)
597654
for best practices.
598655
656+
knowledge_base_uuid: Ids of the knowledge base(s) to attach to the agent
657+
599658
model_uuid: Identifier for the foundation model.
600659
660+
name: Agent name
661+
662+
openai_key_uuid: Optional OpenAI API key ID to use with OpenAI models
663+
664+
project_id: The id of the DigitalOcean project this agent will belong to
665+
666+
region: The DigitalOcean region to deploy your agent in
667+
668+
tags: Agent tag to organize related resources
669+
601670
extra_headers: Send extra headers
602671
603672
extra_query: Add additional query parameters to the request
@@ -673,6 +742,7 @@ async def update(
673742
path_uuid: str,
674743
*,
675744
anthropic_key_uuid: str | NotGiven = NOT_GIVEN,
745+
conversation_logs_enabled: bool | NotGiven = NOT_GIVEN,
676746
description: str | NotGiven = NOT_GIVEN,
677747
instruction: str | NotGiven = NOT_GIVEN,
678748
k: int | NotGiven = NOT_GIVEN,
@@ -700,17 +770,39 @@ async def update(
700770
response body is a JSON object containing the agent.
701771
702772
Args:
773+
anthropic_key_uuid: Optional anthropic key uuid for use with anthropic models
774+
775+
conversation_logs_enabled: Optional update of conversation logs enabled
776+
777+
description: Agent description
778+
703779
instruction: Agent instruction. Instructions help your agent to perform its job effectively.
704780
See
705781
[Write Effective Agent Instructions](https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/#agent-instructions)
706782
for best practices.
707783
784+
k: How many results should be considered from an attached knowledge base
785+
708786
max_tokens: Specifies the maximum number of tokens the model can process in a single input
709787
or output, set as a number between 1 and 512. This determines the length of each
710788
response.
711789
712790
model_uuid: Identifier for the foundation model.
713791
792+
name: Agent name
793+
794+
openai_key_uuid: Optional OpenAI key uuid for use with OpenAI models
795+
796+
project_id: The id of the DigitalOcean project this agent will belong to
797+
798+
retrieval_method: - RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown
799+
- RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite
800+
- RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back
801+
- RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries
802+
- RETRIEVAL_METHOD_NONE: The retrieval method is none
803+
804+
tags: A set of abitrary tags to organize your agent
805+
714806
temperature: Controls the model’s creativity, specified as a number between 0 and 1. Lower
715807
values produce more predictable and conservative responses, while higher values
716808
encourage creativity and variation.
@@ -719,6 +811,8 @@ async def update(
719811
number between 0 and 1. Higher values allow for more diverse outputs, while
720812
lower values ensure focused and coherent responses.
721813
814+
body_uuid: Unique agent id
815+
722816
extra_headers: Send extra headers
723817
724818
extra_query: Add additional query parameters to the request
@@ -736,6 +830,7 @@ async def update(
736830
body=await async_maybe_transform(
737831
{
738832
"anthropic_key_uuid": anthropic_key_uuid,
833+
"conversation_logs_enabled": conversation_logs_enabled,
739834
"description": description,
740835
"instruction": instruction,
741836
"k": k,
@@ -776,11 +871,11 @@ async def list(
776871
To list all agents, send a GET request to `/v2/gen-ai/agents`.
777872
778873
Args:
779-
only_deployed: only list agents that are deployed.
874+
only_deployed: Only list agents that are deployed.
780875
781-
page: page number.
876+
page: Page number.
782877
783-
per_page: items per page.
878+
per_page: Items per page.
784879
785880
extra_headers: Send extra headers
786881
@@ -865,6 +960,17 @@ async def update_status(
865960
PUT request to `/v2/gen-ai/agents/{uuid}/deployment_visibility`.
866961
867962
Args:
963+
body_uuid: Unique id
964+
965+
visibility: - VISIBILITY_UNKNOWN: The status of the deployment is unknown
966+
- VISIBILITY_DISABLED: The deployment is disabled and will no longer service
967+
requests
968+
- VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state
969+
- VISIBILITY_PUBLIC: The deployment is public and will service requests from the
970+
public internet
971+
- VISIBILITY_PRIVATE: The deployment is private and will only service requests
972+
from other agents, or through API keys
973+
868974
extra_headers: Send extra headers
869975
870976
extra_query: Add additional query parameters to the request

src/gradientai/resources/agents/api_keys.py

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ def create(
6363
`/v2/gen-ai/agents/{agent_uuid}/api_keys`.
6464
6565
Args:
66+
body_agent_uuid: Agent id
67+
68+
name: A human friendly name to identify the key
69+
6670
extra_headers: Send extra headers
6771
6872
extra_query: Add additional query parameters to the request
@@ -110,6 +114,12 @@ def update(
110114
`/v2/gen-ai/agents/{agent_uuid}/api_keys/{api_key_uuid}`.
111115
112116
Args:
117+
body_agent_uuid: Agent id
118+
119+
body_api_key_uuid: API key ID
120+
121+
name: Name
122+
113123
extra_headers: Send extra headers
114124
115125
extra_query: Add additional query parameters to the request
@@ -158,9 +168,9 @@ def list(
158168
`/v2/gen-ai/agents/{agent_uuid}/api_keys`.
159169
160170
Args:
161-
page: page number.
171+
page: Page number.
162172
163-
per_page: items per page.
173+
per_page: Items per page.
164174
165175
extra_headers: Send extra headers
166176
@@ -309,6 +319,10 @@ async def create(
309319
`/v2/gen-ai/agents/{agent_uuid}/api_keys`.
310320
311321
Args:
322+
body_agent_uuid: Agent id
323+
324+
name: A human friendly name to identify the key
325+
312326
extra_headers: Send extra headers
313327
314328
extra_query: Add additional query parameters to the request
@@ -356,6 +370,12 @@ async def update(
356370
`/v2/gen-ai/agents/{agent_uuid}/api_keys/{api_key_uuid}`.
357371
358372
Args:
373+
body_agent_uuid: Agent id
374+
375+
body_api_key_uuid: API key ID
376+
377+
name: Name
378+
359379
extra_headers: Send extra headers
360380
361381
extra_query: Add additional query parameters to the request
@@ -404,9 +424,9 @@ async def list(
404424
`/v2/gen-ai/agents/{agent_uuid}/api_keys`.
405425
406426
Args:
407-
page: page number.
427+
page: Page number.
408428
409-
per_page: items per page.
429+
per_page: Items per page.
410430
411431
extra_headers: Send extra headers
412432

0 commit comments

Comments
 (0)