Skip to content

Commit 7562fdd

Browse files
committed
Merge 'integration_2025-08-14_1032949698818' into 'master'
merge branch integration_2025-08-14_1032949698818 into master See merge request: !753
2 parents c86dd7d + 7a336a4 commit 7562fdd

File tree

100 files changed

+16233
-120
lines changed

Some content is hidden

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

100 files changed

+16233
-120
lines changed

meta.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"lasted": "4.0.10",
3-
"meta_commit": "3986ef5bde77f0161fd6e41f1d35d20bb4560594"
2+
"lasted": "4.0.11",
3+
"meta_commit": "7fb9a36e60874a2464bf34408ac0a7f5291aea0d"
44
}

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from setuptools import setup, find_packages # noqa: H301
44

55
NAME = "volcengine-python-sdk"
6-
VERSION = "4.0.10"
6+
VERSION = "4.0.11"
77
# To install the library, run the following
88
#
99
# python setup.py install

volcenginesdkarkruntime/resources/content_generation/tasks.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ def create(
3434
model: str,
3535
content: Iterable[CreateTaskContentParam],
3636
callback_url: Optional[str] = None,
37+
return_last_frame: Optional[bool] = None,
3738
extra_headers: Headers | None = None,
3839
extra_query: Query | None = None,
3940
extra_body: Body | None = None,
@@ -45,6 +46,7 @@ def create(
4546
"model": model,
4647
"content": content,
4748
"callback_url": callback_url,
49+
"return_last_frame": return_last_frame,
4850
},
4951
options=make_request_options(
5052
extra_headers=extra_headers,
@@ -153,6 +155,7 @@ async def create(
153155
model: str,
154156
content: Iterable[CreateTaskContentParam],
155157
callback_url: Optional[str] = None,
158+
return_last_frame: Optional[bool] = None,
156159
extra_headers: Headers | None = None,
157160
extra_query: Query | None = None,
158161
extra_body: Body | None = None,
@@ -164,6 +167,7 @@ async def create(
164167
"model": model,
165168
"content": content,
166169
"callback_url": callback_url,
170+
"return_last_frame": return_last_frame,
167171
},
168172
options=make_request_options(
169173
extra_headers=extra_headers,

volcenginesdkarkruntime/resources/multimodal_embeddings.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@
1313
)
1414
from .._utils._utils import with_sts_token, async_with_sts_token
1515
from ..types.multimodal_embedding import EmbeddingInputParam
16-
from ..types.multimodal_embedding import MultimodalEmbeddingResponse
16+
from ..types.multimodal_embedding import (
17+
MultimodalEmbeddingResponse,
18+
SparseEmbeddingInput,
19+
)
1720

1821
__all__ = ["MultimodalEmbeddings", "AsyncMultimodalEmbeddings"]
1922

@@ -31,6 +34,7 @@ def create(
3134
model: str,
3235
encoding_format: Literal["float", "base64"] = "float",
3336
dimensions: int | None = None,
37+
sparse_embedding: SparseEmbeddingInput | None = None,
3438
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
3539
# The extra values given here take precedence over values defined on the client or passed to this method.
3640
extra_headers: Headers | None = None,
@@ -45,6 +49,7 @@ def create(
4549
"model": model,
4650
"encoding_format": encoding_format,
4751
"dimensions": dimensions,
52+
"sparse_embedding": sparse_embedding,
4853
},
4954
options=make_request_options(
5055
extra_headers=extra_headers,
@@ -69,6 +74,7 @@ async def create(
6974
model: str,
7075
encoding_format: Literal["float", "base64"] = "float",
7176
dimensions: int | None = None,
77+
sparse_embedding: SparseEmbeddingInput | None = None,
7278
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
7379
# The extra values given here take precedence over values defined on the client or passed to this method.
7480
extra_headers: Headers | None = None,
@@ -83,6 +89,7 @@ async def create(
8389
"model": model,
8490
"encoding_format": encoding_format,
8591
"dimensions": dimensions,
92+
"sparse_embedding": sparse_embedding,
8693
},
8794
options=make_request_options(
8895
extra_headers=extra_headers,

volcenginesdkarkruntime/types/completion_usage.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,15 @@
99
class PromptTokensDetails(BaseModel):
1010
cached_tokens: int
1111
"""Number of tokens hit cache."""
12+
provisioned_tokens: Optional[int] = None
13+
"""Number of tokens provisioned in the prompt."""
1214

1315

1416
class CompletionTokensDetails(BaseModel):
1517
reasoning_tokens: Optional[int] = None
1618
"""Tokens generated by the model for reasoning."""
17-
19+
provisioned_tokens: Optional[int] = None
20+
"""Number of tokens provisioned in the generated completion."""
1821

1922
class CompletionUsage(BaseModel):
2023
completion_tokens: int

volcenginesdkarkruntime/types/content_generation/content_generation_task.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ class Content(BaseModel):
1212
video_url: str
1313
"""The URL of the generated video, if any."""
1414

15+
last_frame_url: str
16+
"""The URL of the last frame of the generated video, if any."""
17+
1518

1619
class ContentGenerationError(BaseModel):
1720
message: str
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
from .images import ImagesResponse
2+
3+
__all__ = ["ImagesResponse"]

volcenginesdkarkruntime/types/multimodal_embedding/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@
44
from .embedding_content_part_text_param import MultimodalEmbeddingContentPartTextParam
55
from .embedding_content_part_image_param import MultimodalEmbeddingContentPartImageParam
66
from .embedding_input import EmbeddingInputParam
7-
from .embedding_data import MultimodalEmbedding
7+
from .embedding_data import MultimodalEmbedding, SparseEmbedding
8+
from .sparse_embedding_input import SparseEmbeddingInput
89

910
__all__ = [
1011
"MultimodalEmbeddingResponse",
1112
"MultimodalEmbeddingContentPartTextParam",
1213
"MultimodalEmbeddingContentPartImageParam",
1314
"EmbeddingInputParam",
1415
"MultimodalEmbedding",
16+
"SparseEmbeddingInput",
17+
"SparseEmbedding",
1518
]
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
from __future__ import annotations
2+
3+
from typing_extensions import Literal, Required, TypedDict
4+
5+
__all__ = ["MultimodalEmbeddingContentPartVideoParam", "VideoURL"]
6+
7+
8+
class VideoURL(TypedDict, total=False):
9+
url: Required[str]
10+
"""Either a URL of the video or the base64 encoded video data."""
11+
fps: float
12+
"""The sampling fps of the video."""
13+
14+
15+
class MultimodalEmbeddingContentPartVideoParam(TypedDict, total=False):
16+
video_url: Required[VideoURL]
17+
18+
type: Required[Literal["video_url"]]
19+
"""The type of the content part."""
Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
1-
from typing import List
1+
from typing import List, Optional
22
from typing_extensions import Literal
33

44
from ..._models import BaseModel
55

6-
__all__ = ["MultimodalEmbedding"]
6+
__all__ = ["MultimodalEmbedding", "SparseEmbedding"]
7+
8+
9+
class SparseEmbedding(BaseModel):
10+
index: int
11+
"""The token index of the embedding."""
12+
value: float
13+
"""The value of the embedding."""
714

815

916
class MultimodalEmbedding(BaseModel):
@@ -12,3 +19,6 @@ class MultimodalEmbedding(BaseModel):
1219

1320
object: Literal["embedding"]
1421
"""The object type, which is always "embedding"."""
22+
23+
sparse_embedding: Optional[SparseEmbedding] = None
24+
"""The sparse embeddings generated by the model."""

0 commit comments

Comments
 (0)