google-genai 1.6.0__tar.gz → 1.8.0__tar.gz

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.
Files changed (33) hide show
  1. {google_genai-1.6.0/google_genai.egg-info → google_genai-1.8.0}/PKG-INFO +11 -9
  2. {google_genai-1.6.0 → google_genai-1.8.0}/README.md +7 -6
  3. {google_genai-1.6.0 → google_genai-1.8.0}/google/genai/_api_client.py +229 -185
  4. {google_genai-1.6.0 → google_genai-1.8.0}/google/genai/_common.py +7 -5
  5. {google_genai-1.6.0 → google_genai-1.8.0}/google/genai/_replay_api_client.py +28 -17
  6. {google_genai-1.6.0 → google_genai-1.8.0}/google/genai/_transformers.py +23 -14
  7. {google_genai-1.6.0 → google_genai-1.8.0}/google/genai/batches.py +60 -294
  8. {google_genai-1.6.0 → google_genai-1.8.0}/google/genai/caches.py +545 -525
  9. {google_genai-1.6.0 → google_genai-1.8.0}/google/genai/chats.py +149 -51
  10. {google_genai-1.6.0 → google_genai-1.8.0}/google/genai/client.py +5 -3
  11. {google_genai-1.6.0 → google_genai-1.8.0}/google/genai/errors.py +46 -23
  12. {google_genai-1.6.0 → google_genai-1.8.0}/google/genai/files.py +90 -306
  13. {google_genai-1.6.0 → google_genai-1.8.0}/google/genai/live.py +4 -4
  14. {google_genai-1.6.0 → google_genai-1.8.0}/google/genai/models.py +2124 -2311
  15. {google_genai-1.6.0 → google_genai-1.8.0}/google/genai/operations.py +103 -123
  16. {google_genai-1.6.0 → google_genai-1.8.0}/google/genai/tunings.py +255 -271
  17. {google_genai-1.6.0 → google_genai-1.8.0}/google/genai/types.py +207 -74
  18. {google_genai-1.6.0 → google_genai-1.8.0}/google/genai/version.py +1 -1
  19. {google_genai-1.6.0 → google_genai-1.8.0/google_genai.egg-info}/PKG-INFO +11 -9
  20. {google_genai-1.6.0 → google_genai-1.8.0}/google_genai.egg-info/requires.txt +1 -1
  21. {google_genai-1.6.0 → google_genai-1.8.0}/pyproject.toml +2 -2
  22. {google_genai-1.6.0 → google_genai-1.8.0}/LICENSE +0 -0
  23. {google_genai-1.6.0 → google_genai-1.8.0}/MANIFEST.in +0 -0
  24. {google_genai-1.6.0 → google_genai-1.8.0}/google/genai/__init__.py +0 -0
  25. {google_genai-1.6.0 → google_genai-1.8.0}/google/genai/_api_module.py +0 -0
  26. {google_genai-1.6.0 → google_genai-1.8.0}/google/genai/_automatic_function_calling_util.py +0 -0
  27. {google_genai-1.6.0 → google_genai-1.8.0}/google/genai/_extra_utils.py +0 -0
  28. {google_genai-1.6.0 → google_genai-1.8.0}/google/genai/_test_api_client.py +0 -0
  29. {google_genai-1.6.0 → google_genai-1.8.0}/google/genai/pagers.py +0 -0
  30. {google_genai-1.6.0 → google_genai-1.8.0}/google_genai.egg-info/SOURCES.txt +0 -0
  31. {google_genai-1.6.0 → google_genai-1.8.0}/google_genai.egg-info/dependency_links.txt +0 -0
  32. {google_genai-1.6.0 → google_genai-1.8.0}/google_genai.egg-info/top_level.txt +0 -0
  33. {google_genai-1.6.0 → google_genai-1.8.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: google-genai
3
- Version: 1.6.0
3
+ Version: 1.8.0
4
4
  Summary: GenAI Python SDK
5
5
  Author-email: Google LLC <googleapis-packages@google.com>
6
6
  License: Apache-2.0
@@ -25,8 +25,9 @@ Requires-Dist: google-auth<3.0.0,>=2.14.1
25
25
  Requires-Dist: httpx<1.0.0,>=0.28.1
26
26
  Requires-Dist: pydantic<3.0.0,>=2.0.0
27
27
  Requires-Dist: requests<3.0.0,>=2.28.1
28
- Requires-Dist: websockets<15.0.0,>=13.0.0
28
+ Requires-Dist: websockets<15.1.0,>=13.0.0
29
29
  Requires-Dist: typing-extensions<5.0.0,>=4.11.0
30
+ Dynamic: license-file
30
31
 
31
32
  # Google Gen AI SDK
32
33
 
@@ -41,7 +42,7 @@ Google Gen AI Python SDK provides an interface for developers to integrate Googl
41
42
 
42
43
  ## Installation
43
44
 
44
- ```cmd
45
+ ```sh
45
46
  pip install google-genai
46
47
  ```
47
48
 
@@ -72,16 +73,16 @@ client = genai.Client(
72
73
  **(Optional) Using environment variables:**
73
74
 
74
75
  You can create a client by configuring the necessary environment variables.
75
- Configuration setup instructions depends on whether you're using the Gemini API
76
- on Vertex AI or the ML Dev Gemini API.
76
+ Configuration setup instructions depends on whether you're using the Gemini
77
+ Developer API or the Gemini API in Vertex AI.
77
78
 
78
- **ML Dev Gemini API:** Set `GOOGLE_API_KEY` as shown below:
79
+ **Gemini Developer API:** Set `GOOGLE_API_KEY` as shown below:
79
80
 
80
81
  ```bash
81
82
  export GOOGLE_API_KEY='your-api-key'
82
83
  ```
83
84
 
84
- **Vertex AI API:** Set `GOOGLE_GENAI_USE_VERTEXAI`, `GOOGLE_CLOUD_PROJECT`
85
+ **Gemini API on Vertex AI:** Set `GOOGLE_GENAI_USE_VERTEXAI`, `GOOGLE_CLOUD_PROJECT`
85
86
  and `GOOGLE_CLOUD_LOCATION`, as shown below:
86
87
 
87
88
  ```bash
@@ -142,7 +143,7 @@ response = client.models.generate_content(
142
143
  print(response.text)
143
144
  ```
144
145
 
145
- #### with uploaded file (Gemini API only)
146
+ #### with uploaded file (Gemini Developer API only)
146
147
  download the file in console.
147
148
 
148
149
  ```sh
@@ -347,6 +348,7 @@ The SDK will convert the list of parts into a content with a `user` role
347
348
  ```
348
349
 
349
350
  ##### Mix types in contents
351
+
350
352
  You can also provide a list of `types.ContentUnion`. The SDK leaves items of
351
353
  `types.Content` as is, it groups consecutive non function call parts into a
352
354
  single `types.UserContent`, and it groups consecutive function call parts into
@@ -11,7 +11,7 @@ Google Gen AI Python SDK provides an interface for developers to integrate Googl
11
11
 
12
12
  ## Installation
13
13
 
14
- ```cmd
14
+ ```sh
15
15
  pip install google-genai
16
16
  ```
17
17
 
@@ -42,16 +42,16 @@ client = genai.Client(
42
42
  **(Optional) Using environment variables:**
43
43
 
44
44
  You can create a client by configuring the necessary environment variables.
45
- Configuration setup instructions depends on whether you're using the Gemini API
46
- on Vertex AI or the ML Dev Gemini API.
45
+ Configuration setup instructions depends on whether you're using the Gemini
46
+ Developer API or the Gemini API in Vertex AI.
47
47
 
48
- **ML Dev Gemini API:** Set `GOOGLE_API_KEY` as shown below:
48
+ **Gemini Developer API:** Set `GOOGLE_API_KEY` as shown below:
49
49
 
50
50
  ```bash
51
51
  export GOOGLE_API_KEY='your-api-key'
52
52
  ```
53
53
 
54
- **Vertex AI API:** Set `GOOGLE_GENAI_USE_VERTEXAI`, `GOOGLE_CLOUD_PROJECT`
54
+ **Gemini API on Vertex AI:** Set `GOOGLE_GENAI_USE_VERTEXAI`, `GOOGLE_CLOUD_PROJECT`
55
55
  and `GOOGLE_CLOUD_LOCATION`, as shown below:
56
56
 
57
57
  ```bash
@@ -112,7 +112,7 @@ response = client.models.generate_content(
112
112
  print(response.text)
113
113
  ```
114
114
 
115
- #### with uploaded file (Gemini API only)
115
+ #### with uploaded file (Gemini Developer API only)
116
116
  download the file in console.
117
117
 
118
118
  ```sh
@@ -317,6 +317,7 @@ The SDK will convert the list of parts into a content with a `user` role
317
317
  ```
318
318
 
319
319
  ##### Mix types in contents
320
+
320
321
  You can also provide a list of `types.ContentUnion`. The SDK leaves items of
321
322
  `types.Content` as is, it groups consecutive non function call parts into a
322
323
  single `types.UserContent`, and it groups consecutive function call parts into