google-genai 1.32.0__py3-none-any.whl → 1.34.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- google/genai/_api_client.py +32 -9
- google/genai/_common.py +5 -1
- google/genai/_extra_utils.py +5 -8
- google/genai/_live_converters.py +100 -44
- google/genai/_replay_api_client.py +15 -0
- google/genai/_tokens_converters.py +24 -3
- google/genai/_transformers.py +55 -15
- google/genai/batches.py +680 -142
- google/genai/caches.py +50 -6
- google/genai/files.py +2 -0
- google/genai/local_tokenizer.py +29 -1
- google/genai/models.py +127 -191
- google/genai/types.py +431 -278
- google/genai/version.py +1 -1
- {google_genai-1.32.0.dist-info → google_genai-1.34.0.dist-info}/METADATA +18 -1
- {google_genai-1.32.0.dist-info → google_genai-1.34.0.dist-info}/RECORD +19 -19
- {google_genai-1.32.0.dist-info → google_genai-1.34.0.dist-info}/WHEEL +0 -0
- {google_genai-1.32.0.dist-info → google_genai-1.34.0.dist-info}/licenses/LICENSE +0 -0
- {google_genai-1.32.0.dist-info → google_genai-1.34.0.dist-info}/top_level.txt +0 -0
google/genai/version.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: google-genai
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.34.0
|
4
4
|
Summary: GenAI Python SDK
|
5
5
|
Author-email: Google LLC <googleapis-packages@google.com>
|
6
6
|
License: Apache-2.0
|
@@ -30,6 +30,9 @@ Requires-Dist: websockets<15.1.0,>=13.0.0
|
|
30
30
|
Requires-Dist: typing-extensions<5.0.0,>=4.11.0
|
31
31
|
Provides-Extra: aiohttp
|
32
32
|
Requires-Dist: aiohttp<4.0.0; extra == "aiohttp"
|
33
|
+
Provides-Extra: local-tokenizer
|
34
|
+
Requires-Dist: sentencepiece>=0.2.0; extra == "local-tokenizer"
|
35
|
+
Requires-Dist: protobuf; extra == "local-tokenizer"
|
33
36
|
Dynamic: license-file
|
34
37
|
|
35
38
|
# Google Gen AI SDK
|
@@ -1063,6 +1066,20 @@ response = await client.aio.models.count_tokens(
|
|
1063
1066
|
print(response)
|
1064
1067
|
```
|
1065
1068
|
|
1069
|
+
#### Local Count Tokens
|
1070
|
+
|
1071
|
+
```python
|
1072
|
+
tokenizer = genai.LocalTokenizer(model_name='gemini-2.0-flash-001')
|
1073
|
+
result = tokenizer.count_tokens("What is your name?")
|
1074
|
+
```
|
1075
|
+
|
1076
|
+
#### Local Compute Tokens
|
1077
|
+
|
1078
|
+
```python
|
1079
|
+
tokenizer = genai.LocalTokenizer(model_name='gemini-2.0-flash-001')
|
1080
|
+
result = tokenizer.compute_tokens("What is your name?")
|
1081
|
+
```
|
1082
|
+
|
1066
1083
|
### Embed Content
|
1067
1084
|
|
1068
1085
|
```python
|
@@ -1,39 +1,39 @@
|
|
1
1
|
google/genai/__init__.py,sha256=SKz_9WQKA3R4OpJIDJlgssVfizLNDG2tuWtOD9pxrPE,729
|
2
2
|
google/genai/_adapters.py,sha256=Kok38miNYJff2n--l0zEK_hbq0y2rWOH7k75J7SMYbQ,1744
|
3
|
-
google/genai/_api_client.py,sha256=
|
3
|
+
google/genai/_api_client.py,sha256=zk-X1JnZ2C5dwe9Huqwtdd8LGdrIfZP3ILR_vQcu9oI,61269
|
4
4
|
google/genai/_api_module.py,sha256=lj8eUWx8_LBGBz-49qz6_ywWm3GYp3d8Bg5JoOHbtbI,902
|
5
5
|
google/genai/_automatic_function_calling_util.py,sha256=xXNkJR-pzSMkeSXMz3Jw-kMHFbTJEiRJ3wocuwtWW4I,11627
|
6
6
|
google/genai/_base_transformers.py,sha256=wljA6m4tLl4XLGlBC2DNOls5N9-X9tffBq0M7i8jgpw,1034
|
7
7
|
google/genai/_base_url.py,sha256=E5H4dew14Y16qfnB3XRnjSCi19cJVlkaMNoM_8ip-PM,1597
|
8
|
-
google/genai/_common.py,sha256=
|
9
|
-
google/genai/_extra_utils.py,sha256=
|
10
|
-
google/genai/_live_converters.py,sha256=
|
8
|
+
google/genai/_common.py,sha256=VziliVbesmNtke6Fh2wk-kQlCOxEpmkqYb0y4qfKIo4,20074
|
9
|
+
google/genai/_extra_utils.py,sha256=myEPyU_-RXExXtMGitJUKEMWUPiDudScgTN9LqFC8h4,20468
|
10
|
+
google/genai/_live_converters.py,sha256=OBKnJD7zgrfG6TOVSXoo9TkVHwXvLzudod0U40MqtZw,103192
|
11
11
|
google/genai/_local_tokenizer_loader.py,sha256=cGN1F0f7hNjRIGCGTLeox7IGAZf_YcvZjSp2rCyhUak,7465
|
12
12
|
google/genai/_mcp_utils.py,sha256=HuWJ8FUjquv40Mf_QjcL5r5yXWrS-JjINsjlOSbbyAc,3870
|
13
13
|
google/genai/_operations_converters.py,sha256=I1b46qhGCeB5uHNuyrMxpFqmzWuvSFQ5pS52csd1J4E,9080
|
14
|
-
google/genai/_replay_api_client.py,sha256=
|
14
|
+
google/genai/_replay_api_client.py,sha256=hXs5NuCpcZU-e6rfeWBStZmF33_2vn1dAo3NeTA8P2o,22413
|
15
15
|
google/genai/_test_api_client.py,sha256=4ruFIy5_1qcbKqqIBu3HSQbpSOBrxiecBtDZaTGFR1s,4797
|
16
|
-
google/genai/_tokens_converters.py,sha256=
|
17
|
-
google/genai/_transformers.py,sha256=
|
18
|
-
google/genai/batches.py,sha256=
|
19
|
-
google/genai/caches.py,sha256=
|
16
|
+
google/genai/_tokens_converters.py,sha256=42xx5Inv3YMqEdarb3lmt-w54D2tpb9QEBy0DSUATQk,24963
|
17
|
+
google/genai/_transformers.py,sha256=rtaCagL4htyu8MzuxqQJ_xnJqRwwuQKR7CWXYpydBZ4,40260
|
18
|
+
google/genai/batches.py,sha256=UJ-zc2UXqQfej8bqqtgeNrepc7zDQBzRlmkRf4Wlr4U,102880
|
19
|
+
google/genai/caches.py,sha256=0LVzGcF1t5tHq5QUZzstEGfOqbUPV3B8eywknqFWKD8,67650
|
20
20
|
google/genai/chats.py,sha256=pIBw8d13llupLn4a7vP6vnpbzDcvCCrZZ-Q2r8Cvo7g,16652
|
21
21
|
google/genai/client.py,sha256=wXnfZBSv9p-yKtX_gabUrfBXoYHuqHhzK_VgwRttMgY,10777
|
22
22
|
google/genai/errors.py,sha256=GlEvypbRgF3h5BxlocmWVf-S9kzERA_lwGLCMyAvpcY,5714
|
23
|
-
google/genai/files.py,sha256=
|
23
|
+
google/genai/files.py,sha256=T8uDgqCQheFwYYYJdN4lax4NOR_q6bJyr0jQf079VeE,40607
|
24
24
|
google/genai/live.py,sha256=BUyIOt-PON4SuJtKXA6l3ujzA3GUbYWMGSgZvsyKjrg,39674
|
25
25
|
google/genai/live_music.py,sha256=3GG9nsto8Vhkohcs-4CPMS4DFp1ZtMuLYzHfvEPYAeg,6971
|
26
|
-
google/genai/local_tokenizer.py,sha256=
|
27
|
-
google/genai/models.py,sha256=
|
26
|
+
google/genai/local_tokenizer.py,sha256=ZYOdZFS2nJbgDGOMrVzn2hZ_1G8I4_PuVsh6HU8jEgo,14055
|
27
|
+
google/genai/models.py,sha256=84KEXFWSVaE9vLgPwUWZCE-MXldBZUlHAiI3WBoW7qM,267291
|
28
28
|
google/genai/operations.py,sha256=Ccm4EW13cT_EtCq8Fa3n8jlQySyy9KqJ98ZK4pF0DDA,12815
|
29
29
|
google/genai/pagers.py,sha256=m0SfWWn1EJs2k1On3DZx371qb8g2BRm_188ExsicIRc,7098
|
30
30
|
google/genai/py.typed,sha256=RsMFoLwBkAvY05t6izop4UHZtqOPLiKp3GkIEizzmQY,40
|
31
31
|
google/genai/tokens.py,sha256=8RbZ0kgvyKT3SwbgIUOHr6TTZL24v4fqYarhlA8r1ac,12503
|
32
32
|
google/genai/tunings.py,sha256=vVV9NvrtzoWDLzcTLSrgD5lzFeSRJdCB1QtfzL3yj3c,63275
|
33
|
-
google/genai/types.py,sha256=
|
34
|
-
google/genai/version.py,sha256=
|
35
|
-
google_genai-1.
|
36
|
-
google_genai-1.
|
37
|
-
google_genai-1.
|
38
|
-
google_genai-1.
|
39
|
-
google_genai-1.
|
33
|
+
google/genai/types.py,sha256=X_EJw9XImkNUV-kei6sX_EyamVh3ZcllCyhDY6oGIKg,537135
|
34
|
+
google/genai/version.py,sha256=pq67EsG5-MVW2erGgNTP2s1tkENaUdCa412taBfzfhM,627
|
35
|
+
google_genai-1.34.0.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
36
|
+
google_genai-1.34.0.dist-info/METADATA,sha256=hfQsErEKbSrvHuHNO9w49pDdJnDcjIdj5mDKNAst85o,43556
|
37
|
+
google_genai-1.34.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
38
|
+
google_genai-1.34.0.dist-info/top_level.txt,sha256=_1QvSJIhFAGfxb79D6DhB7SUw2X6T4rwnz_LLrbcD3c,7
|
39
|
+
google_genai-1.34.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|