Skip to content

Commit c7f4ae1

Browse files
committed
docs(genai): update readme pages
1 parent d85f2bd commit c7f4ae1

File tree

2 files changed

+28
-25
lines changed

2 files changed

+28
-25
lines changed

genai/README.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# Generative AI Samples on Google Cloud
22

3-
This directory contains Python code samples demonstrating how to use Google Cloud's Generative AI capabilities on Vertex AI. These samples accompany the [Google Cloud Generative AI documentation](https://cloud.google.com/ai/generative-ai) and provide practical examples of various features and use cases.
3+
This directory contains Python code samples demonstrating how to use Google Cloud's Generative AI capabilities on Vertex AI. These samples accompany the [Google Cloud Generative AI documentation](https://cloud.google.com/ai/generative-ai) and provide practical examples of various features and use cases.
44

55
## Getting Started
66

7-
To run these samples, we recommend using either Google Cloud Shell, Cloud Code IDE, or Google Colab. You'll need a Google Cloud Project and appropriate credentials.
7+
To run these samples, we recommend using either Google Cloud Shell, Cloud Code IDE, or Google Colab. You'll need a Google Cloud Project and appropriate credentials.
88

99
**Prerequisites:**
1010

11-
* **Google Cloud Project:** Create or select a project in the [Google Cloud Console](https://console.cloud.google.com).
12-
* **Authentication:** Ensure you've authenticated with your Google Cloud account. See the [authentication documentation](https://cloud.google.com/docs/authentication) for details.
13-
* **Enable the Vertex AI API:** Enable the API in your project through the [Cloud Console](https://console.cloud.google.com/apis/library/aiplatform.googleapis.com).
11+
- **Google Cloud Project:** Create or select a project in the [Google Cloud Console](https://console.cloud.google.com).
12+
- **Authentication:** Ensure you've authenticated with your Google Cloud account. See the [authentication documentation](https://cloud.google.com/docs/authentication) for details.
13+
- **Enable the Vertex AI API:** Enable the API in your project through the [Cloud Console](https://console.cloud.google.com/apis/library/aiplatform.googleapis.com).
1414

1515
## Sample Categories
1616

@@ -30,21 +30,27 @@ Provides examples of how to control various aspects of the generated content, su
3030

3131
### Count Tokens (`count_tokens`)
3232

33-
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.
33+
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.
3434

35-
### Text Generation (`text_generation`)
35+
### Express Mode (`express_mode`)
3636

37-
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.
37+
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.
3838

39-
### Tools (`tools`)
39+
### Live API (`live_api`)
4040

41-
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.
41+
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.
4242

4343
### Safety (`safety`)
4444

4545
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.
4646

47+
### Text Generation (`text_generation`)
48+
49+
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.
50+
51+
### Tools (`tools`)
4752

53+
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.
4854

4955
## Contributing
5056

@@ -56,4 +62,4 @@ For questions, feedback, or bug reports, please use the [issues page](https://gi
5662

5763
## Disclaimer
5864

59-
This repository is not an officially supported Google product. The code is provided for demonstrative purposes only.
65+
This repository is not an officially supported Google product. The code is provided for demonstrative purposes only.

genai/template_folder/README.md

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ This assumes you're familiar with basic Python development and Git.
1212
When adding a new feature, replicate the structure of the template_folder directory.
1313
This standardized structure ensures consistency and maintainability across the projec
1414

15-
1615
**Recommended Folder-File Structure:**
1716

1817
```
@@ -25,14 +24,14 @@ genai/
2524
└── test_<new_feature_name>_examples.py
2625
```
2726

28-
* `<new_feature_folder`>: A descriptive name for your feature (e.g., custom_models).
29-
* `<newfeature_shortname>_with_<input_type>.py`: The file demonstrating your feature.
30-
Replace <new_feature_name> with the name of your feature and <input_type> with the type of input it uses (e.g., txt, pdf, etc.).
27+
- `<new_feature_folder`>: A descriptive name for your feature (e.g., custom_models).
28+
- `<newfeature_shortname>_with_<input_type>.py`: The file demonstrating your feature.
29+
Replace \<new_feature_name> with the name of your feature and \<input_type> with the type of input it uses (e.g., txt, pdf, etc.).
3130
This file should contain well-commented code and demonstrate the core functionality of your feature using a practical example.
32-
* `test_<new_feature_name>_examples.py`: Unit tests for your feature using pytest. Ensure comprehensive test coverage.
33-
* `noxfile_config.py`: Configuration file for running CICD tests.
34-
* `requirements.txt`: Lists the all dependencies for your feature. Include google-genai and any other necessary libraries.
35-
* `requirements-test.txt`: Lists dependencies required for testing your feature. Include packages like pytest.
31+
- `test_<new_feature_name>_examples.py`: Unit tests for your feature using pytest. Ensure comprehensive test coverage.
32+
- `noxfile_config.py`: Configuration file for running CICD tests.
33+
- `requirements.txt`: Lists the all dependencies for your feature. Include google-genai and any other necessary libraries.
34+
- `requirements-test.txt`: Lists dependencies required for testing your feature. Include packages like pytest.
3635

3736
If the feature name is `Hello World` and it has example that takes username input to greet user, then the structure would look like this:
3837

@@ -46,13 +45,11 @@ genai/
4645
└── test_hello_world_examples.py
4746
```
4847

49-
5048
Notable:
51-
* The folder name and test file use the full feature name as `hello_world`
52-
* The sample file use the feature `helloworld` but in a short condensed form.
53-
(This is required for internal automation purposes.)
49+
50+
- The folder name and test file use the full feature name as `hello_world`
51+
- The sample file use the feature `helloworld` but in a short condensed form.
52+
(This is required for internal automation purposes.)
5453

5554
To improve your understanding, refer to the existing folders lik [count_tokens](../count_tokens) and
5655
[text_generation](../text_generation).
57-
58-
## Deve

0 commit comments

Comments
 (0)