Skip to content

Commit 8a6366d

Browse files
committed
Merge "integration_2026-02-27_1118277572610" into "vpn-Python-2020-04-01-online-2272-2026_02_10_20_20_48"
Conflicts: pyproject.toml
2 parents 7aaf8a4 + 0245bb3 commit 8a6366d

434 files changed

Lines changed: 51128 additions & 5047 deletions

File tree

Some content is hidden

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

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "volcengine-python-sdk"
3-
version = "5.0.10"
3+
version = "5.0.12"
44
authors = [
55
{name = "volc-engine", email = "volc-sdk-team@bytedance.com"},
66
]

volcenginesdkarkruntime/resources/files.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def create(
6565
*,
6666
file: FileTypes,
6767
purpose: FilePurpose,
68-
expires_at: datetime.datetime | int | None = None,
68+
expire_at: datetime.datetime | int | None = None,
6969
preprocess_configs: PreprocessConfigs | None = None,
7070
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
7171
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -83,7 +83,7 @@ def create(
8383
8484
purpose: The intended purpose of the uploaded file. Only `user_data` is supported.
8585
86-
expires_at: The expiration time for a file in Unix timestamp format. By default, files expires after 7 days.
86+
expire_at: The expiration time for a file in Unix timestamp format. By default, files expires after 7 days.
8787
8888
extra_headers: Send extra headers
8989
@@ -97,7 +97,7 @@ def create(
9797
{
9898
"file": file,
9999
"purpose": purpose,
100-
"expires_at": expires_at,
100+
"expire_at": expire_at,
101101
"preprocess_configs": preprocess_configs,
102102
}
103103
)

volcenginesdkarkruntime/resources/images/images.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
OptimizePromptOptions,
2525
SequentialImageGenerationOptions,
2626
ImagesResponse,
27+
ContentGenerationTool
2728
)
2829
from ...types.images.image_gen_stream_event import ImageGenStreamEvent
2930
from ..._types import Body, Query, Headers
@@ -53,6 +54,8 @@ def generate(
5354
sequential_image_generation: str | None = None,
5455
sequential_image_generation_options: SequentialImageGenerationOptions
5556
| None = None,
57+
tools: list[ContentGenerationTool] | None = None,
58+
output_format: str | None = None,
5659
stream: Optional[Literal[False]] | NotGiven = NOT_GIVEN,
5760
) -> ImagesResponse:
5861
...
@@ -86,6 +89,8 @@ def generate(
8689
sequential_image_generation: str | None = None,
8790
sequential_image_generation_options: SequentialImageGenerationOptions
8891
| None = None,
92+
tools: list[ContentGenerationTool] | None = None,
93+
output_format: str | None = None,
8994
stream: Literal[True],
9095
) -> Stream[ImageGenStreamEvent]: ...
9196

@@ -110,6 +115,8 @@ def generate(
110115
sequential_image_generation: str | None = None,
111116
sequential_image_generation_options: SequentialImageGenerationOptions
112117
| None = None,
118+
tools: list[ContentGenerationTool] | None = None,
119+
output_format: str | None = None,
113120
stream: bool,
114121
) -> ImagesResponse | Stream[ImageGenStreamEvent]: ...
115122

@@ -134,6 +141,8 @@ def generate(
134141
sequential_image_generation: str | None = None,
135142
sequential_image_generation_options: SequentialImageGenerationOptions
136143
| None = None,
144+
tools: list[ContentGenerationTool] | None = None,
145+
output_format: str | None = None,
137146
stream: Optional[Literal[False]] | Literal[True] | NotGiven = NOT_GIVEN,
138147
) -> ImagesResponse | Stream[ImageGenStreamEvent]:
139148
resp = self._post(
@@ -159,6 +168,12 @@ def generate(
159168
if sequential_image_generation_options is not None
160169
else None
161170
),
171+
"tools": (
172+
[t.model_dump(mode="json") for t in tools]
173+
if tools is not None
174+
else None
175+
),
176+
"output_format": output_format,
162177
"stream": stream,
163178
},
164179
options=make_request_options(
@@ -197,6 +212,8 @@ async def generate(
197212
sequential_image_generation: str | None = None,
198213
sequential_image_generation_options: SequentialImageGenerationOptions
199214
| None = None,
215+
tools: list[ContentGenerationTool] | None = None,
216+
output_format: str | None = None,
200217
stream: Optional[Literal[False]] | NotGiven = NOT_GIVEN,
201218
) -> ImagesResponse: ...
202219

@@ -221,6 +238,8 @@ async def generate(
221238
sequential_image_generation: str | None = None,
222239
sequential_image_generation_options: SequentialImageGenerationOptions
223240
| None = None,
241+
tools: list[ContentGenerationTool] | None = None,
242+
output_format: str | None = None,
224243
stream: Literal[True],
225244
) -> AsyncStream[ImageGenStreamEvent]: ...
226245

@@ -245,6 +264,8 @@ async def generate(
245264
sequential_image_generation: str | None = None,
246265
sequential_image_generation_options: SequentialImageGenerationOptions
247266
| None = None,
267+
tools: list[ContentGenerationTool] | None = None,
268+
output_format: str | None = None,
248269
stream: bool,
249270
) -> ImagesResponse | AsyncStream[ImageGenStreamEvent]: ...
250271

@@ -269,6 +290,8 @@ async def generate(
269290
sequential_image_generation: str | None = None,
270291
sequential_image_generation_options: SequentialImageGenerationOptions
271292
| None = None,
293+
tools: list[ContentGenerationTool] | None = None,
294+
output_format: str | None = None,
272295
stream: Optional[Literal[False]] | Literal[True] | NotGiven = NOT_GIVEN,
273296
) -> ImagesResponse | AsyncStream[ImageGenStreamEvent]:
274297
return await self._post(
@@ -294,6 +317,12 @@ async def generate(
294317
if sequential_image_generation_options is not None
295318
else None
296319
),
320+
"tools": (
321+
[t.model_dump(mode="json") for t in tools]
322+
if tools is not None
323+
else None
324+
),
325+
"output_format": output_format,
297326
"stream": stream,
298327
},
299328
options=make_request_options(

volcenginesdkarkruntime/types/images/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@
1313
OptimizePromptOptions,
1414
SequentialImageGenerationOptions,
1515
ImagesResponse,
16+
ContentGenerationTool
1617
)
1718

1819

1920
__all__ = [
2021
"OptimizePromptOptions",
2122
"SequentialImageGenerationOptions",
2223
"ImagesResponse",
24+
"ContentGenerationTool"
2325
]

volcenginesdkarkruntime/types/images/image_gen_completed_event.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,25 @@
1010
# This modified file is released under the same license.
1111

1212

13+
from typing import List, Optional
1314
from volcenginesdkarkruntime._models import BaseModel
1415

1516
__all__ = ["ImageGenCompletedEvent"]
1617

1718

19+
class ToolUsage(BaseModel):
20+
web_search: Optional[int] = None
21+
"""The number of web search."""
22+
1823
class Usage(BaseModel):
1924
generated_images: int
2025
"""The number of images generated."""
2126
output_tokens: int
2227
"""The number of output tokens."""
2328
total_tokens: int
2429
"""The total number of tokens."""
30+
tool_usage: Optional[ToolUsage] = None
31+
"""The total number of images generated by this request."""
2532

2633

2734
class Error(BaseModel):

volcenginesdkarkruntime/types/images/images.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"OptimizePromptOptions",
1818
"SequentialImageGenerationOptions",
1919
"ImagesResponse",
20+
"ContentGenerationTool"
2021
]
2122

2223

@@ -30,9 +31,20 @@ class SequentialImageGenerationOptions(BaseModel):
3031
""" Maximum number of images to generate in this request; effective only when the multi-image feature is enabled """
3132

3233

34+
class ToolUsage(BaseModel):
35+
web_search: Optional[int] = None
36+
"""The number of web search."""
37+
38+
3339
class Usage(BaseModel):
3440
generated_images: int
3541
"""The number of images generated."""
42+
output_tokens: Optional[int] = None
43+
"""The number of images generated by this request."""
44+
total_tokens: Optional[int] = None
45+
"""The total number of images generated by this request."""
46+
tool_usage: Optional[ToolUsage] = None
47+
"""The total number of images generated by this request."""
3648

3749

3850
class Image(BaseModel):
@@ -54,6 +66,11 @@ class Error(BaseModel):
5466
"""The error code for failed image generation"""
5567

5668

69+
class ContentGenerationTool(BaseModel):
70+
type: str
71+
"""The content generation tool used to generate the images."""
72+
73+
5774
class ImagesResponse(BaseModel):
5875
model: str
5976
"""The model used to generated the images."""
@@ -69,3 +86,6 @@ class ImagesResponse(BaseModel):
6986

7087
created_at: int
7188
"""The Unix timestamp when the image was generated."""
89+
90+
tool: List[ContentGenerationTool]
91+
""" The tool used to generate the image."""

volcenginesdkbilling/models/list_for_list_amortized_cost_bill_daily_output.py

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ class ListForListAmortizedCostBillDailyOutput(object):
132132
'real_value': 'str',
133133
'region': 'str',
134134
'region_code': 'str',
135+
'resource_id': 'str',
135136
'round_amount': 'str',
136137
'saving_plan_original_amount': 'str',
137138
'seller_customer_name': 'str',
@@ -257,6 +258,7 @@ class ListForListAmortizedCostBillDailyOutput(object):
257258
'real_value': 'RealValue',
258259
'region': 'Region',
259260
'region_code': 'RegionCode',
261+
'resource_id': 'ResourceID',
260262
'round_amount': 'RoundAmount',
261263
'saving_plan_original_amount': 'SavingPlanOriginalAmount',
262264
'seller_customer_name': 'SellerCustomerName',
@@ -282,7 +284,7 @@ class ListForListAmortizedCostBillDailyOutput(object):
282284
'zone_code': 'ZoneCode'
283285
}
284286

285-
def __init__(self, amortized_begin_time=None, amortized_day=None, amortized_end_time=None, amortized_month=None, amortized_type=None, bill_category=None, bill_id=None, bill_period=None, billing_function=None, billing_method_code=None, billing_mode=None, busi_period=None, business_mode=None, config_name=None, configuration_code=None, count=None, country_region=None, coupon_amount=None, currency=None, currency_settlement=None, daily_amortized_coupon_amount=None, daily_amortized_discount_bill_amount=None, daily_amortized_original_bill_amount=None, daily_amortized_paid_amount=None, daily_amortized_payable_amount=None, daily_amortized_posttax_amount=None, daily_amortized_pre_tax_payable_amount=None, daily_amortized_pre_tax_real_value=None, daily_amortized_preferential_bill_amount=None, daily_amortized_pretax_amount=None, daily_amortized_real_value=None, daily_amortized_round_amount=None, daily_amortized_saving_plan_original_amount=None, daily_amortized_settle_payable_amount=None, daily_amortized_settle_posttax_amount=None, daily_amortized_settle_pre_tax_payable_amount=None, daily_amortized_settle_pre_tax_real_value=None, daily_amortized_settle_pretax_amount=None, daily_amortized_settle_real_value=None, daily_amortized_settle_tax_amount=None, daily_amortized_tax_amount=None, deduction_use_duration=None, discount_bill_amount=None, discount_biz_billing_function=None, effective_factor=None, element=None, element_code=None, expand_field=None, expense_time=None, factor=None, factor_code=None, instance_name=None, instance_no=None, main_contract_number=None, now_amortized_coupon_amount=None, now_amortized_discount_bill_amount=None, now_amortized_original_bill_amount=None, now_amortized_paid_amount=None, now_amortized_payable_amount=None, now_amortized_posttax_amount=None, now_amortized_pre_tax_payable_amount=None, now_amortized_pre_tax_real_value=None, now_amortized_preferential_bill_amount=None, now_amortized_pretax_amount=None, now_amortized_real_value=None, now_amortized_round_amount=None, now_amortized_saving_plan_original_amount=None, now_amortized_settle_payable_amount=None, now_amortized_settle_posttax_amount=None, now_amortized_settle_pre_tax_payable_amount=None, now_amortized_settle_pre_tax_real_value=None, now_amortized_settle_pretax_amount=None, now_amortized_settle_real_value=None, now_amortized_settle_tax_amount=None, now_amortized_tax_amount=None, original_bill_amount=None, original_order_no=None, owner_customer_name=None, owner_id=None, owner_user_name=None, paid_amount=None, payable_amount=None, payer_customer_name=None, payer_id=None, payer_user_name=None, posttax_amount=None, pre_tax_payable_amount=None, pre_tax_real_value=None, preferential_bill_amount=None, pretax_amount=None, price=None, price_unit=None, product=None, product_zh=None, project=None, project_display_name=None, real_value=None, region=None, region_code=None, round_amount=None, saving_plan_original_amount=None, seller_customer_name=None, seller_id=None, seller_user_name=None, settle_payable_amount=None, settle_posttax_amount=None, settle_pre_tax_payable_amount=None, settle_pre_tax_real_value=None, settle_pretax_amount=None, settle_real_value=None, settle_tax_amount=None, split_item_id=None, split_item_name=None, subject_name=None, tag=None, tax=None, tax_rate=None, unit=None, use_duration=None, use_duration_unit=None, zone=None, zone_code=None, _configuration=None): # noqa: E501
287+
def __init__(self, amortized_begin_time=None, amortized_day=None, amortized_end_time=None, amortized_month=None, amortized_type=None, bill_category=None, bill_id=None, bill_period=None, billing_function=None, billing_method_code=None, billing_mode=None, busi_period=None, business_mode=None, config_name=None, configuration_code=None, count=None, country_region=None, coupon_amount=None, currency=None, currency_settlement=None, daily_amortized_coupon_amount=None, daily_amortized_discount_bill_amount=None, daily_amortized_original_bill_amount=None, daily_amortized_paid_amount=None, daily_amortized_payable_amount=None, daily_amortized_posttax_amount=None, daily_amortized_pre_tax_payable_amount=None, daily_amortized_pre_tax_real_value=None, daily_amortized_preferential_bill_amount=None, daily_amortized_pretax_amount=None, daily_amortized_real_value=None, daily_amortized_round_amount=None, daily_amortized_saving_plan_original_amount=None, daily_amortized_settle_payable_amount=None, daily_amortized_settle_posttax_amount=None, daily_amortized_settle_pre_tax_payable_amount=None, daily_amortized_settle_pre_tax_real_value=None, daily_amortized_settle_pretax_amount=None, daily_amortized_settle_real_value=None, daily_amortized_settle_tax_amount=None, daily_amortized_tax_amount=None, deduction_use_duration=None, discount_bill_amount=None, discount_biz_billing_function=None, effective_factor=None, element=None, element_code=None, expand_field=None, expense_time=None, factor=None, factor_code=None, instance_name=None, instance_no=None, main_contract_number=None, now_amortized_coupon_amount=None, now_amortized_discount_bill_amount=None, now_amortized_original_bill_amount=None, now_amortized_paid_amount=None, now_amortized_payable_amount=None, now_amortized_posttax_amount=None, now_amortized_pre_tax_payable_amount=None, now_amortized_pre_tax_real_value=None, now_amortized_preferential_bill_amount=None, now_amortized_pretax_amount=None, now_amortized_real_value=None, now_amortized_round_amount=None, now_amortized_saving_plan_original_amount=None, now_amortized_settle_payable_amount=None, now_amortized_settle_posttax_amount=None, now_amortized_settle_pre_tax_payable_amount=None, now_amortized_settle_pre_tax_real_value=None, now_amortized_settle_pretax_amount=None, now_amortized_settle_real_value=None, now_amortized_settle_tax_amount=None, now_amortized_tax_amount=None, original_bill_amount=None, original_order_no=None, owner_customer_name=None, owner_id=None, owner_user_name=None, paid_amount=None, payable_amount=None, payer_customer_name=None, payer_id=None, payer_user_name=None, posttax_amount=None, pre_tax_payable_amount=None, pre_tax_real_value=None, preferential_bill_amount=None, pretax_amount=None, price=None, price_unit=None, product=None, product_zh=None, project=None, project_display_name=None, real_value=None, region=None, region_code=None, resource_id=None, round_amount=None, saving_plan_original_amount=None, seller_customer_name=None, seller_id=None, seller_user_name=None, settle_payable_amount=None, settle_posttax_amount=None, settle_pre_tax_payable_amount=None, settle_pre_tax_real_value=None, settle_pretax_amount=None, settle_real_value=None, settle_tax_amount=None, split_item_id=None, split_item_name=None, subject_name=None, tag=None, tax=None, tax_rate=None, unit=None, use_duration=None, use_duration_unit=None, zone=None, zone_code=None, _configuration=None): # noqa: E501
286288
"""ListForListAmortizedCostBillDailyOutput - a model defined in Swagger""" # noqa: E501
287289
if _configuration is None:
288290
_configuration = Configuration()
@@ -387,6 +389,7 @@ def __init__(self, amortized_begin_time=None, amortized_day=None, amortized_end_
387389
self._real_value = None
388390
self._region = None
389391
self._region_code = None
392+
self._resource_id = None
390393
self._round_amount = None
391394
self._saving_plan_original_amount = None
392395
self._seller_customer_name = None
@@ -610,6 +613,8 @@ def __init__(self, amortized_begin_time=None, amortized_day=None, amortized_end_
610613
self.region = region
611614
if region_code is not None:
612615
self.region_code = region_code
616+
if resource_id is not None:
617+
self.resource_id = resource_id
613618
if round_amount is not None:
614619
self.round_amount = round_amount
615620
if saving_plan_original_amount is not None:
@@ -2736,6 +2741,27 @@ def region_code(self, region_code):
27362741

27372742
self._region_code = region_code
27382743

2744+
@property
2745+
def resource_id(self):
2746+
"""Gets the resource_id of this ListForListAmortizedCostBillDailyOutput. # noqa: E501
2747+
2748+
2749+
:return: The resource_id of this ListForListAmortizedCostBillDailyOutput. # noqa: E501
2750+
:rtype: str
2751+
"""
2752+
return self._resource_id
2753+
2754+
@resource_id.setter
2755+
def resource_id(self, resource_id):
2756+
"""Sets the resource_id of this ListForListAmortizedCostBillDailyOutput.
2757+
2758+
2759+
:param resource_id: The resource_id of this ListForListAmortizedCostBillDailyOutput. # noqa: E501
2760+
:type: str
2761+
"""
2762+
2763+
self._resource_id = resource_id
2764+
27392765
@property
27402766
def round_amount(self):
27412767
"""Gets the round_amount of this ListForListAmortizedCostBillDailyOutput. # noqa: E501

0 commit comments

Comments
 (0)