Skip to content

Commit 5ef6e06

Browse files
committed
feat(genai): Update samples to use latest version of GenAI SDK
1 parent 917ec7a commit 5ef6e06

File tree

16 files changed

+28
-24
lines changed

16 files changed

+28
-24
lines changed

genai/README.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,39 +16,43 @@ To run these samples, we recommend using either Google Cloud Shell, Cloud Code I
1616

1717
The samples are organized into the following categories:
1818

19-
### Batch Prediction (`batch_prediction`)
19+
### [Batch Prediction](https://github.com/GoogleCloudPlatform/python-docs-samples/tree/main/genai/batch_prediction/)
2020

2121
Demonstrates how to use batch prediction with Generative AI models. This allows efficient processing of large datasets. See the [Batch Prediction documentation](https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/batch-prediction-gemini) for more details.
2222

23-
### Content Cache (`content_cache`)
23+
### [Bounding Box](https://github.com/GoogleCloudPlatform/python-docs-samples/tree/main/genai/bounding_box/)
24+
25+
Demonstrates how to use Bounding Box with Generative AI models. This allows for object detection and localization within images and video. see the [Bounding Box documentation](https://cloud.google.com/vertex-ai/generative-ai/docs/bounding-box-detection) for more details.
26+
27+
### [Content Cache](https://github.com/GoogleCloudPlatform/python-docs-samples/tree/main/genai/content_cache/)
2428

2529
Illustrates how to create, update, use, and delete content caches. Caches store frequently used content to improve performance and reduce costs. See the [Content Cache documentation](https://cloud.google.com/vertex-ai/generative-ai/docs/context-cache/context-cache-overview) for more information.
2630

27-
### Controlled Generation (`controlled_generation`)
31+
### [Controlled Generation](https://github.com/GoogleCloudPlatform/python-docs-samples/tree/main/genai/controlled_generation/)
2832

2933
Provides examples of how to control various aspects of the generated content, such as length, format, safety attributes, and more. This allows for tailoring the output to specific requirements and constraints. See the [Controlled Generation documentation](https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/control-generated-output) for details.
3034

31-
### Count Tokens (`count_tokens`)
35+
### [Count Tokens](https://github.com/GoogleCloudPlatform/python-docs-samples/tree/main/genai/count_tokens/)
3236

3337
Shows how to estimate token usage for inputs and outputs of Generative AI models. Understanding token consumption is crucial for managing costs and optimizing performance. See the [Token Counting documentation](https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/list-token) for more details.
3438

35-
### Express Mode (`express_mode`)
39+
### [Express Mode](https://github.com/GoogleCloudPlatform/python-docs-samples/tree/main/genai/express_mode/)
3640

3741
Demonstrates how to use Express Mode for simpler and faster interactions with Generative AI models using an API key. This mode is ideal for quick prototyping and experimentation. See the [Express Mode documentation](https://cloud.google.com/vertex-ai/generative-ai/docs/start/express-mode/overview) for details.
3842

39-
### Live API (`live_api`)
43+
### [Live API](https://github.com/GoogleCloudPlatform/python-docs-samples/tree/main/genai/live_api/)
4044

4145
Provides examples of using the Generative AI [Live API](https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal-live-api). This allows for real-time interactions and dynamic content generation.
4246

43-
### Safety (`safety`)
47+
### [Safety](https://github.com/GoogleCloudPlatform/python-docs-samples/tree/main/genai/safety/)
4448

4549
Provides examples demonstrating how to configure and apply safety settings to Generative AI models. This includes techniques for content filtering and moderation to ensure responsible AI usage. See the [Safety documentation](https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/configure-safety-attributes) for details.
4650

47-
### Text Generation (`text_generation`)
51+
### [Text Generation](https://github.com/GoogleCloudPlatform/python-docs-samples/tree/main/genai/text_generation/)
4852

4953
Provides examples of generating text using various input modalities (text, images, audio, video) and features like asynchronous generation, chat, and text streaming. See the [Text Generation documentation](https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/send-chat-prompts-gemini) for details.
5054

51-
### Tools (`tools`)
55+
### [Tools](https://github.com/GoogleCloudPlatform/python-docs-samples/tree/main/genai/tools/)
5256

5357
Showcases how to use tools like function calling, code execution, and grounding with Google Search to enhance Generative AI interactions. See the [Tools documentation](https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/function-calling) for more information.
5458

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
google-genai==1.2.0
1+
google-genai==1.7.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
google-genai==1.2.0
1+
google-genai==1.7.0
22
pillow==11.1.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
google-genai==1.2.0
1+
google-genai==1.7.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
google-genai==1.2.0
1+
google-genai==1.7.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
google-genai==1.2.0
1+
google-genai==1.7.0

genai/embeddings/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
google-genai==1.2.0
1+
google-genai==1.7.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
google-genai==1.2.0
1+
google-genai==1.7.0

genai/live/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
google-genai==1.2.0
1+
google-genai==1.7.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
google-genai==1.3.0
1+
google-genai==1.7.0

0 commit comments

Comments
 (0)