Skip to content

release: 3.0.0-beta.2 #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "3.0.0-beta.1"
".": "3.0.0-beta.2"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 170
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/digitalocean%2Fgradient-015417b36365dfcb32166e67379c38de8bf5127c33dff646097a819a7b4dc588.yml
openapi_spec_hash: d7d811c13cc79f15d82fe680cf425859
config_hash: 77ddef130940a6ad8ea6c6f66aee8757
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/digitalocean%2Fgradient-9aca3802735e1375125412aa28ac36bf2175144b8218610a73d2e7f775694dff.yml
openapi_spec_hash: e29d14e3e4679fcf22b3e760e49931b1
config_hash: de89a9c8fde0120577d2aca8be4ae027
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 3.0.0-beta.2 (2025-08-04)

Full Changelog: [v3.0.0-beta.1...v3.0.0-beta.2](https://github.com/digitalocean/gradient-python/compare/v3.0.0-beta.1...v3.0.0-beta.2)

### Features

* **api:** collected updates 8/4 ([90ff9f2](https://github.com/digitalocean/gradient-python/commit/90ff9f227aa00805deb270e8e1de0ea9b56e3b4e))

## 3.0.0-beta.1 (2025-07-31)

Full Changelog: [v0.1.0-beta.4...v3.0.0-beta.1](https://github.com/digitalocean/gradient-python/compare/v0.1.0-beta.4...v3.0.0-beta.1)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "gradient"
version = "3.0.0-beta.1"
version = "3.0.0-beta.2"
description = "The official Python library for the Gradient API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
4 changes: 2 additions & 2 deletions src/gradient/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def __init__(
base_url = os.environ.get("GRADIENT_BASE_URL")
self._base_url_overridden = base_url is not None
if base_url is None:
base_url = f"https://api.digitalocean.com/"
base_url = f"https://api.digitalocean.com"

super().__init__(
version=__version__,
Expand Down Expand Up @@ -386,7 +386,7 @@ def __init__(
base_url = os.environ.get("GRADIENT_BASE_URL")
self._base_url_overridden = base_url is not None
if base_url is None:
base_url = f"https://api.digitalocean.com/"
base_url = f"https://api.digitalocean.com"

super().__init__(
version=__version__,
Expand Down
2 changes: 1 addition & 1 deletion src/gradient/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "gradient"
__version__ = "3.0.0-beta.1" # x-release-please-version
__version__ = "3.0.0-beta.2" # x-release-please-version
4 changes: 4 additions & 0 deletions src/gradient/resources/agents/agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ def update(
self,
path_uuid: str,
*,
agent_log_insights_enabled: bool | NotGiven = NOT_GIVEN,
anthropic_key_uuid: str | NotGiven = NOT_GIVEN,
conversation_logs_enabled: bool | NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -388,6 +389,7 @@ def update(
else f"https://api.digitalocean.com/v2/gen-ai/agents/{path_uuid}",
body=maybe_transform(
{
"agent_log_insights_enabled": agent_log_insights_enabled,
"anthropic_key_uuid": anthropic_key_uuid,
"conversation_logs_enabled": conversation_logs_enabled,
"description": description,
Expand Down Expand Up @@ -741,6 +743,7 @@ async def update(
self,
path_uuid: str,
*,
agent_log_insights_enabled: bool | NotGiven = NOT_GIVEN,
anthropic_key_uuid: str | NotGiven = NOT_GIVEN,
conversation_logs_enabled: bool | NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -829,6 +832,7 @@ async def update(
else f"https://api.digitalocean.com/v2/gen-ai/agents/{path_uuid}",
body=await async_maybe_transform(
{
"agent_log_insights_enabled": agent_log_insights_enabled,
"anthropic_key_uuid": anthropic_key_uuid,
"conversation_logs_enabled": conversation_logs_enabled,
"description": description,
Expand Down
2 changes: 2 additions & 0 deletions src/gradient/types/agent_update_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@


class AgentUpdateParams(TypedDict, total=False):
agent_log_insights_enabled: bool

anthropic_key_uuid: str
"""Optional anthropic key uuid for use with anthropic models"""

Expand Down
6 changes: 6 additions & 0 deletions src/gradient/types/api_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,12 @@ class LoggingConfig(BaseModel):
galileo_project_name: Optional[str] = None
"""Name of the Galileo project"""

insights_enabled: Optional[bool] = None
"""Whether insights are enabled"""

insights_enabled_at: Optional[datetime] = None
"""Timestamp when insights were enabled"""

log_stream_id: Optional[str] = None
"""Identifier for the log stream"""

Expand Down
5 changes: 4 additions & 1 deletion src/gradient/types/api_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@


class APIModel(BaseModel):
id: Optional[str] = None
"""Human-readable model identifier"""

agreement: Optional[APIAgreement] = None
"""Agreement Description"""

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

name: Optional[str] = None
"""Name of the model"""
"""Display name of the model"""

parent_uuid: Optional[str] = None
"""Unique id of the model, this model is based on"""
Expand Down
16 changes: 15 additions & 1 deletion src/gradient/types/knowledge_base_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from .knowledge_bases.api_file_upload_data_source_param import APIFileUploadDataSourceParam
from .knowledge_bases.api_web_crawler_data_source_param import APIWebCrawlerDataSourceParam

__all__ = ["KnowledgeBaseCreateParams", "Datasource"]
__all__ = ["KnowledgeBaseCreateParams", "Datasource", "DatasourceDropboxDataSource"]


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


class DatasourceDropboxDataSource(TypedDict, total=False):
folder: str

refresh_token: str
"""Refresh token.

you can obrain a refresh token by following the oauth2 flow. see
/v2/gen-ai/oauth2/dropbox/tokens for reference.
"""


class Datasource(TypedDict, total=False):
aws_data_source: AwsDataSourceParam
"""AWS S3 Data Source"""
Expand All @@ -61,6 +72,9 @@ class Datasource(TypedDict, total=False):
bucket_region: str
"""Deprecated, moved to data_source_details"""

dropbox_data_source: DatasourceDropboxDataSource
"""Dropbox Data Source"""

file_upload_data_source: APIFileUploadDataSourceParam
"""File to upload as data source for knowledge base."""

Expand Down
9 changes: 9 additions & 0 deletions src/gradient/types/knowledge_bases/api_indexing_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@ class APIIndexingJob(BaseModel):
total_datasources: Optional[int] = None
"""Number of datasources being indexed"""

total_items_failed: Optional[str] = None
"""Total Items Failed"""

total_items_indexed: Optional[str] = None
"""Total Items Indexed"""

total_items_skipped: Optional[str] = None
"""Total Items Skipped"""

updated_at: Optional[datetime] = None
"""Last modified"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from .api_file_upload_data_source import APIFileUploadDataSource
from .api_web_crawler_data_source import APIWebCrawlerDataSource

__all__ = ["APIKnowledgeBaseDataSource", "AwsDataSource"]
__all__ = ["APIKnowledgeBaseDataSource", "AwsDataSource", "DropboxDataSource"]


class AwsDataSource(BaseModel):
Expand All @@ -23,6 +23,10 @@ class AwsDataSource(BaseModel):
"""Region of bucket"""


class DropboxDataSource(BaseModel):
folder: Optional[str] = None


class APIKnowledgeBaseDataSource(BaseModel):
aws_data_source: Optional[AwsDataSource] = None
"""AWS S3 Data Source for Display"""
Expand All @@ -33,6 +37,9 @@ class APIKnowledgeBaseDataSource(BaseModel):
created_at: Optional[datetime] = None
"""Creation date / time"""

dropbox_data_source: Optional[DropboxDataSource] = None
"""Dropbox Data Source for Display"""

file_upload_data_source: Optional[APIFileUploadDataSource] = None
"""File to upload as data source for knowledge base."""

Expand Down
20 changes: 10 additions & 10 deletions tests/api_resources/agents/evaluation_metrics/test_workspaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ def test_method_create(self, client: Gradient) -> None:
def test_method_create_with_all_params(self, client: Gradient) -> None:
workspace = client.agents.evaluation_metrics.workspaces.create(
agent_uuids=["example string"],
description='"example string"',
name='"example name"',
description="example string",
name="example name",
)
assert_matches_type(WorkspaceCreateResponse, workspace, path=["response"])

Expand Down Expand Up @@ -117,9 +117,9 @@ def test_method_update(self, client: Gradient) -> None:
def test_method_update_with_all_params(self, client: Gradient) -> None:
workspace = client.agents.evaluation_metrics.workspaces.update(
path_workspace_uuid='"123e4567-e89b-12d3-a456-426614174000"',
description='"example string"',
name='"example name"',
body_workspace_uuid='"123e4567-e89b-12d3-a456-426614174000"',
description="example string",
name="example name",
body_workspace_uuid="123e4567-e89b-12d3-a456-426614174000",
)
assert_matches_type(WorkspaceUpdateResponse, workspace, path=["response"])

Expand Down Expand Up @@ -286,8 +286,8 @@ async def test_method_create(self, async_client: AsyncGradient) -> None:
async def test_method_create_with_all_params(self, async_client: AsyncGradient) -> None:
workspace = await async_client.agents.evaluation_metrics.workspaces.create(
agent_uuids=["example string"],
description='"example string"',
name='"example name"',
description="example string",
name="example name",
)
assert_matches_type(WorkspaceCreateResponse, workspace, path=["response"])

Expand Down Expand Up @@ -368,9 +368,9 @@ async def test_method_update(self, async_client: AsyncGradient) -> None:
async def test_method_update_with_all_params(self, async_client: AsyncGradient) -> None:
workspace = await async_client.agents.evaluation_metrics.workspaces.update(
path_workspace_uuid='"123e4567-e89b-12d3-a456-426614174000"',
description='"example string"',
name='"example name"',
body_workspace_uuid='"123e4567-e89b-12d3-a456-426614174000"',
description="example string",
name="example name",
body_workspace_uuid="123e4567-e89b-12d3-a456-426614174000",
)
assert_matches_type(WorkspaceUpdateResponse, workspace, path=["response"])

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def test_method_move_with_all_params(self, client: Gradient) -> None:
agent = client.agents.evaluation_metrics.workspaces.agents.move(
path_workspace_uuid='"123e4567-e89b-12d3-a456-426614174000"',
agent_uuids=["example string"],
body_workspace_uuid='"123e4567-e89b-12d3-a456-426614174000"',
body_workspace_uuid="123e4567-e89b-12d3-a456-426614174000",
)
assert_matches_type(AgentMoveResponse, agent, path=["response"])

Expand Down Expand Up @@ -198,7 +198,7 @@ async def test_method_move_with_all_params(self, async_client: AsyncGradient) ->
agent = await async_client.agents.evaluation_metrics.workspaces.agents.move(
path_workspace_uuid='"123e4567-e89b-12d3-a456-426614174000"',
agent_uuids=["example string"],
body_workspace_uuid='"123e4567-e89b-12d3-a456-426614174000"',
body_workspace_uuid="123e4567-e89b-12d3-a456-426614174000",
)
assert_matches_type(AgentMoveResponse, agent, path=["response"])

Expand Down
20 changes: 10 additions & 10 deletions tests/api_resources/agents/test_evaluation_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ def test_method_create(self, client: Gradient) -> None:
def test_method_create_with_all_params(self, client: Gradient) -> None:
evaluation_dataset = client.agents.evaluation_datasets.create(
file_upload_dataset={
"original_file_name": '"example name"',
"size_in_bytes": '"12345"',
"stored_object_key": '"example string"',
"original_file_name": "example name",
"size_in_bytes": "12345",
"stored_object_key": "example string",
},
name='"example name"',
name="example name",
)
assert_matches_type(EvaluationDatasetCreateResponse, evaluation_dataset, path=["response"])

Expand Down Expand Up @@ -75,7 +75,7 @@ def test_method_create_file_upload_presigned_urls_with_all_params(self, client:
evaluation_dataset = client.agents.evaluation_datasets.create_file_upload_presigned_urls(
files=[
{
"file_name": '"example name"',
"file_name": "example name",
"file_size": "file_size",
}
],
Expand Down Expand Up @@ -127,11 +127,11 @@ async def test_method_create(self, async_client: AsyncGradient) -> None:
async def test_method_create_with_all_params(self, async_client: AsyncGradient) -> None:
evaluation_dataset = await async_client.agents.evaluation_datasets.create(
file_upload_dataset={
"original_file_name": '"example name"',
"size_in_bytes": '"12345"',
"stored_object_key": '"example string"',
"original_file_name": "example name",
"size_in_bytes": "12345",
"stored_object_key": "example string",
},
name='"example name"',
name="example name",
)
assert_matches_type(EvaluationDatasetCreateResponse, evaluation_dataset, path=["response"])

Expand Down Expand Up @@ -171,7 +171,7 @@ async def test_method_create_file_upload_presigned_urls_with_all_params(self, as
evaluation_dataset = await async_client.agents.evaluation_datasets.create_file_upload_presigned_urls(
files=[
{
"file_name": '"example name"',
"file_name": "example name",
"file_size": "file_size",
}
],
Expand Down
Loading