Skip to content

Commit 90ff9f2

Browse files
feat(api): collected updates 8/4
1 parent d01b51d commit 90ff9f2

File tree

16 files changed

+157
-102
lines changed

16 files changed

+157
-102
lines changed

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 170
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/digitalocean%2Fgradient-015417b36365dfcb32166e67379c38de8bf5127c33dff646097a819a7b4dc588.yml
3-
openapi_spec_hash: d7d811c13cc79f15d82fe680cf425859
4-
config_hash: 77ddef130940a6ad8ea6c6f66aee8757
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/digitalocean%2Fgradient-9aca3802735e1375125412aa28ac36bf2175144b8218610a73d2e7f775694dff.yml
3+
openapi_spec_hash: e29d14e3e4679fcf22b3e760e49931b1
4+
config_hash: de89a9c8fde0120577d2aca8be4ae027

src/gradient/_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def __init__(
118118
base_url = os.environ.get("GRADIENT_BASE_URL")
119119
self._base_url_overridden = base_url is not None
120120
if base_url is None:
121-
base_url = f"https://api.digitalocean.com/"
121+
base_url = f"https://api.digitalocean.com"
122122

123123
super().__init__(
124124
version=__version__,
@@ -386,7 +386,7 @@ def __init__(
386386
base_url = os.environ.get("GRADIENT_BASE_URL")
387387
self._base_url_overridden = base_url is not None
388388
if base_url is None:
389-
base_url = f"https://api.digitalocean.com/"
389+
base_url = f"https://api.digitalocean.com"
390390

391391
super().__init__(
392392
version=__version__,

src/gradient/resources/agents/agents.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ def update(
300300
self,
301301
path_uuid: str,
302302
*,
303+
agent_log_insights_enabled: bool | NotGiven = NOT_GIVEN,
303304
anthropic_key_uuid: str | NotGiven = NOT_GIVEN,
304305
conversation_logs_enabled: bool | NotGiven = NOT_GIVEN,
305306
description: str | NotGiven = NOT_GIVEN,
@@ -388,6 +389,7 @@ def update(
388389
else f"https://api.digitalocean.com/v2/gen-ai/agents/{path_uuid}",
389390
body=maybe_transform(
390391
{
392+
"agent_log_insights_enabled": agent_log_insights_enabled,
391393
"anthropic_key_uuid": anthropic_key_uuid,
392394
"conversation_logs_enabled": conversation_logs_enabled,
393395
"description": description,
@@ -741,6 +743,7 @@ async def update(
741743
self,
742744
path_uuid: str,
743745
*,
746+
agent_log_insights_enabled: bool | NotGiven = NOT_GIVEN,
744747
anthropic_key_uuid: str | NotGiven = NOT_GIVEN,
745748
conversation_logs_enabled: bool | NotGiven = NOT_GIVEN,
746749
description: str | NotGiven = NOT_GIVEN,
@@ -829,6 +832,7 @@ async def update(
829832
else f"https://api.digitalocean.com/v2/gen-ai/agents/{path_uuid}",
830833
body=await async_maybe_transform(
831834
{
835+
"agent_log_insights_enabled": agent_log_insights_enabled,
832836
"anthropic_key_uuid": anthropic_key_uuid,
833837
"conversation_logs_enabled": conversation_logs_enabled,
834838
"description": description,

src/gradient/types/agent_update_params.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313

1414
class AgentUpdateParams(TypedDict, total=False):
15+
agent_log_insights_enabled: bool
16+
1517
anthropic_key_uuid: str
1618
"""Optional anthropic key uuid for use with anthropic models"""
1719

src/gradient/types/api_agent.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,12 @@ class LoggingConfig(BaseModel):
173173
galileo_project_name: Optional[str] = None
174174
"""Name of the Galileo project"""
175175

176+
insights_enabled: Optional[bool] = None
177+
"""Whether insights are enabled"""
178+
179+
insights_enabled_at: Optional[datetime] = None
180+
"""Timestamp when insights were enabled"""
181+
176182
log_stream_id: Optional[str] = None
177183
"""Identifier for the log stream"""
178184

src/gradient/types/api_model.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111

1212

1313
class APIModel(BaseModel):
14+
id: Optional[str] = None
15+
"""Human-readable model identifier"""
16+
1417
agreement: Optional[APIAgreement] = None
1518
"""Agreement Description"""
1619

@@ -21,7 +24,7 @@ class APIModel(BaseModel):
2124
"""True if it is a foundational model provided by do"""
2225

2326
name: Optional[str] = None
24-
"""Name of the model"""
27+
"""Display name of the model"""
2528

2629
parent_uuid: Optional[str] = None
2730
"""Unique id of the model, this model is based on"""

src/gradient/types/knowledge_base_create_params.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from .knowledge_bases.api_file_upload_data_source_param import APIFileUploadDataSourceParam
1111
from .knowledge_bases.api_web_crawler_data_source_param import APIWebCrawlerDataSourceParam
1212

13-
__all__ = ["KnowledgeBaseCreateParams", "Datasource"]
13+
__all__ = ["KnowledgeBaseCreateParams", "Datasource", "DatasourceDropboxDataSource"]
1414

1515

1616
class KnowledgeBaseCreateParams(TypedDict, total=False):
@@ -51,6 +51,17 @@ class KnowledgeBaseCreateParams(TypedDict, total=False):
5151
"""The VPC to deploy the knowledge base database in"""
5252

5353

54+
class DatasourceDropboxDataSource(TypedDict, total=False):
55+
folder: str
56+
57+
refresh_token: str
58+
"""Refresh token.
59+
60+
you can obrain a refresh token by following the oauth2 flow. see
61+
/v2/gen-ai/oauth2/dropbox/tokens for reference.
62+
"""
63+
64+
5465
class Datasource(TypedDict, total=False):
5566
aws_data_source: AwsDataSourceParam
5667
"""AWS S3 Data Source"""
@@ -61,6 +72,9 @@ class Datasource(TypedDict, total=False):
6172
bucket_region: str
6273
"""Deprecated, moved to data_source_details"""
6374

75+
dropbox_data_source: DatasourceDropboxDataSource
76+
"""Dropbox Data Source"""
77+
6478
file_upload_data_source: APIFileUploadDataSourceParam
6579
"""File to upload as data source for knowledge base."""
6680

src/gradient/types/knowledge_bases/api_indexing_job.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,15 @@ class APIIndexingJob(BaseModel):
5555
total_datasources: Optional[int] = None
5656
"""Number of datasources being indexed"""
5757

58+
total_items_failed: Optional[str] = None
59+
"""Total Items Failed"""
60+
61+
total_items_indexed: Optional[str] = None
62+
"""Total Items Indexed"""
63+
64+
total_items_skipped: Optional[str] = None
65+
"""Total Items Skipped"""
66+
5867
updated_at: Optional[datetime] = None
5968
"""Last modified"""
6069

src/gradient/types/knowledge_bases/api_knowledge_base_data_source.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from .api_file_upload_data_source import APIFileUploadDataSource
1111
from .api_web_crawler_data_source import APIWebCrawlerDataSource
1212

13-
__all__ = ["APIKnowledgeBaseDataSource", "AwsDataSource"]
13+
__all__ = ["APIKnowledgeBaseDataSource", "AwsDataSource", "DropboxDataSource"]
1414

1515

1616
class AwsDataSource(BaseModel):
@@ -23,6 +23,10 @@ class AwsDataSource(BaseModel):
2323
"""Region of bucket"""
2424

2525

26+
class DropboxDataSource(BaseModel):
27+
folder: Optional[str] = None
28+
29+
2630
class APIKnowledgeBaseDataSource(BaseModel):
2731
aws_data_source: Optional[AwsDataSource] = None
2832
"""AWS S3 Data Source for Display"""
@@ -33,6 +37,9 @@ class APIKnowledgeBaseDataSource(BaseModel):
3337
created_at: Optional[datetime] = None
3438
"""Creation date / time"""
3539

40+
dropbox_data_source: Optional[DropboxDataSource] = None
41+
"""Dropbox Data Source for Display"""
42+
3643
file_upload_data_source: Optional[APIFileUploadDataSource] = None
3744
"""File to upload as data source for knowledge base."""
3845

tests/api_resources/agents/evaluation_metrics/test_workspaces.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ def test_method_create(self, client: Gradient) -> None:
3535
def test_method_create_with_all_params(self, client: Gradient) -> None:
3636
workspace = client.agents.evaluation_metrics.workspaces.create(
3737
agent_uuids=["example string"],
38-
description='"example string"',
39-
name='"example name"',
38+
description="example string",
39+
name="example name",
4040
)
4141
assert_matches_type(WorkspaceCreateResponse, workspace, path=["response"])
4242

@@ -117,9 +117,9 @@ def test_method_update(self, client: Gradient) -> None:
117117
def test_method_update_with_all_params(self, client: Gradient) -> None:
118118
workspace = client.agents.evaluation_metrics.workspaces.update(
119119
path_workspace_uuid='"123e4567-e89b-12d3-a456-426614174000"',
120-
description='"example string"',
121-
name='"example name"',
122-
body_workspace_uuid='"123e4567-e89b-12d3-a456-426614174000"',
120+
description="example string",
121+
name="example name",
122+
body_workspace_uuid="123e4567-e89b-12d3-a456-426614174000",
123123
)
124124
assert_matches_type(WorkspaceUpdateResponse, workspace, path=["response"])
125125

@@ -286,8 +286,8 @@ async def test_method_create(self, async_client: AsyncGradient) -> None:
286286
async def test_method_create_with_all_params(self, async_client: AsyncGradient) -> None:
287287
workspace = await async_client.agents.evaluation_metrics.workspaces.create(
288288
agent_uuids=["example string"],
289-
description='"example string"',
290-
name='"example name"',
289+
description="example string",
290+
name="example name",
291291
)
292292
assert_matches_type(WorkspaceCreateResponse, workspace, path=["response"])
293293

@@ -368,9 +368,9 @@ async def test_method_update(self, async_client: AsyncGradient) -> None:
368368
async def test_method_update_with_all_params(self, async_client: AsyncGradient) -> None:
369369
workspace = await async_client.agents.evaluation_metrics.workspaces.update(
370370
path_workspace_uuid='"123e4567-e89b-12d3-a456-426614174000"',
371-
description='"example string"',
372-
name='"example name"',
373-
body_workspace_uuid='"123e4567-e89b-12d3-a456-426614174000"',
371+
description="example string",
372+
name="example name",
373+
body_workspace_uuid="123e4567-e89b-12d3-a456-426614174000",
374374
)
375375
assert_matches_type(WorkspaceUpdateResponse, workspace, path=["response"])
376376

0 commit comments

Comments
 (0)