GoogleCloudPlatform / java-docs-samples

Java and Kotlin Code samples used on cloud.google.com
https://cloud.google.com/java
Apache License 2.0
1.75k stars 2.82k forks source link

chore: cleanup unused region tags #9421

Closed msampathkumar closed 1 week ago

msampathkumar commented 1 month ago

Adding generativeaionvertexai_ region tags to replace old aiplatform_

In near future GenAI code samples, will only use generativeaionvertexai_ region tag prefix.

Description

Fixes b/355457593

Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.

Checklist

msampathkumar commented 1 month ago

Update: Waiting for CICD check to complete

snippet-bot[bot] commented 1 month ago
You are about to delete the following sample browser pages. - [vertexai/snippets/src/main/java/vertexai/gemini/ChatDiscussion.java:20](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/80c0fca6a71e6f6fe5d70e350fb742df323e2a8b/vertexai/snippets/src/main/java/vertexai/gemini/ChatDiscussion.java#L20), tag `aiplatform_gemini_multiturn_chat`(usage: [page 1](https://cloud.google.com/vertex-ai/docs/samples/aiplatform-gemini-multiturn-chat)). - [vertexai/snippets/src/main/java/vertexai/gemini/GetTokenCount.java:19](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/80c0fca6a71e6f6fe5d70e350fb742df323e2a8b/vertexai/snippets/src/main/java/vertexai/gemini/GetTokenCount.java#L19), tag `aiplatform_gemini_token_count`(usage: [page 1](https://cloud.google.com/vertex-ai/docs/samples/aiplatform-gemini-token-count)). - [vertexai/snippets/src/main/java/vertexai/gemini/MultimodalMultiImage.java:20](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/80c0fca6a71e6f6fe5d70e350fb742df323e2a8b/vertexai/snippets/src/main/java/vertexai/gemini/MultimodalMultiImage.java#L20), tag `aiplatform_gemini_single_turn_multi_image`(usage: [page 1](https://cloud.google.com/vertex-ai/docs/samples/aiplatform-gemini-single-turn-multi-image)). - [vertexai/snippets/src/main/java/vertexai/gemini/MultimodalVideoInput.java:20](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/80c0fca6a71e6f6fe5d70e350fb742df323e2a8b/vertexai/snippets/src/main/java/vertexai/gemini/MultimodalVideoInput.java#L20), tag `aiplatform_gemini_single_turn_video`(usage: [page 1](https://cloud.google.com/vertex-ai/docs/samples/aiplatform-gemini-single-turn-video)). - [vertexai/snippets/src/main/java/vertexai/gemini/Quickstart.java:20](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/80c0fca6a71e6f6fe5d70e350fb742df323e2a8b/vertexai/snippets/src/main/java/vertexai/gemini/Quickstart.java#L20), tag `aiplatform_gemini_get_started`(usage: [page 1](https://cloud.google.com/vertex-ai/docs/samples/aiplatform-gemini-get-started)). - [vertexai/snippets/src/main/java/vertexai/gemini/WithSafetySettings.java:20](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/80c0fca6a71e6f6fe5d70e350fb742df323e2a8b/vertexai/snippets/src/main/java/vertexai/gemini/WithSafetySettings.java#L20), tag `aiplatform_gemini_safety_settings`(usage: [page 1](https://cloud.google.com/vertex-ai/docs/samples/aiplatform-gemini-safety-settings)).

Here is the summary of changes.

You are about to delete 8 region tags. - [vertexai/snippets/src/main/java/vertexai/gemini/ChatDiscussion.java:20](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/80c0fca6a71e6f6fe5d70e350fb742df323e2a8b/vertexai/snippets/src/main/java/vertexai/gemini/ChatDiscussion.java#L20), tag `aiplatform_gemini_multiturn_chat` - [vertexai/snippets/src/main/java/vertexai/gemini/FunctionCalling.java:20](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/80c0fca6a71e6f6fe5d70e350fb742df323e2a8b/vertexai/snippets/src/main/java/vertexai/gemini/FunctionCalling.java#L20), tag `aiplatform_gemini_function_calling` - [vertexai/snippets/src/main/java/vertexai/gemini/GetTokenCount.java:19](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/80c0fca6a71e6f6fe5d70e350fb742df323e2a8b/vertexai/snippets/src/main/java/vertexai/gemini/GetTokenCount.java#L19), tag `aiplatform_gemini_token_count` - [vertexai/snippets/src/main/java/vertexai/gemini/MultimodalMultiImage.java:20](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/80c0fca6a71e6f6fe5d70e350fb742df323e2a8b/vertexai/snippets/src/main/java/vertexai/gemini/MultimodalMultiImage.java#L20), tag `aiplatform_gemini_single_turn_multi_image` - [vertexai/snippets/src/main/java/vertexai/gemini/MultimodalQuery.java:20](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/80c0fca6a71e6f6fe5d70e350fb742df323e2a8b/vertexai/snippets/src/main/java/vertexai/gemini/MultimodalQuery.java#L20), tag `aiplatform_gemini_pro_example` - [vertexai/snippets/src/main/java/vertexai/gemini/MultimodalVideoInput.java:20](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/80c0fca6a71e6f6fe5d70e350fb742df323e2a8b/vertexai/snippets/src/main/java/vertexai/gemini/MultimodalVideoInput.java#L20), tag `aiplatform_gemini_single_turn_video` - [vertexai/snippets/src/main/java/vertexai/gemini/Quickstart.java:20](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/80c0fca6a71e6f6fe5d70e350fb742df323e2a8b/vertexai/snippets/src/main/java/vertexai/gemini/Quickstart.java#L20), tag `aiplatform_gemini_get_started` - [vertexai/snippets/src/main/java/vertexai/gemini/WithSafetySettings.java:20](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/80c0fca6a71e6f6fe5d70e350fb742df323e2a8b/vertexai/snippets/src/main/java/vertexai/gemini/WithSafetySettings.java#L20), tag `aiplatform_gemini_safety_settings`

This comment is generated by snippet-bot. If you find problems with this result, please file an issue at: https://github.com/googleapis/repo-automation-bots/issues. To update this comment, add snippet-bot:force-run label or use the checkbox below:

msampathkumar commented 1 month ago

Hi @minherz - Updated the summary with bug ticket.

I don't understand something here! I believed that snippet-bot test @ https://github.com/GoogleCloudPlatform/java-docs-samples/pull/9421/checks?check_run_id=28104747679 is to prevent that degradation of user experience. Kindly help me understand.

minherz commented 4 weeks ago

Hi @minherz - Updated the summary with bug ticket.

I don't understand something here! I believed that snippet-bot test @ https://github.com/GoogleCloudPlatform/java-docs-samples/pull/9421/checks?check_run_id=28104747679 is to prevent that degradation of user experience. Kindly help me understand.

Thank you for providing the reasoning behind this change. The description of the linked issue states "After updating the Cloud Docs pages, we need to identify & clear unwanted region tags.".

I did a quick check and indeed majority of the region tags with the generativeaionvertexai_ prefix are represented in the document while the region tags with the suffix aiplatform_ appear only in the Sample Browser. However, I found that the generativeaionvertexai_gemini_single_turn_multi_image region tag does not appear in any documentation. Removing its older version (aiplatform_gemini_single_turn_multi_image) means the documentation degrades.

I also see that the region tag generativeaionvertexai_gemini_get_started is not mentioned in the documentation nor in Sample Browser.

Please, address these two region tags before removing their older versions. There are two options to handle it:

  1. Rollback changes to the two files with these region tags. Merge this PR and then address the changes to these two files in a separate PR.
  2. Verify and fix use of these two region tags in the documentation and merge this PR.
minherz commented 1 week ago

Reassigning to @msampathkumar to remaining address comments.

msampathkumar commented 1 week ago

Update: I have marked the following region tags for deprecation.

region tags with the suffix aiplatform_ appear only in the Sample Browser.

Working on a fresh PR with more changes.