Skip to content

Commit 7517761

Browse files
authored
refactor(genai): migrate region tags from generative-ai to genai folder (Batch 2) (GoogleCloudPlatform#4336)
1 parent f2465a6 commit 7517761

24 files changed

Lines changed: 24 additions & 835 deletions

genai/safety/safety-with-txt.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
'use strict';
1616

17+
// [START generativeaionvertexai_gemini_safety_settings]
1718
// [START googlegenaisdk_safety_with_txt]
1819
const {GoogleGenAI} = require('@google/genai');
1920

@@ -109,6 +110,7 @@ async function generateWithSafetySettings(
109110
}
110111

111112
// [END googlegenaisdk_safety_with_txt]
113+
// [END generativeaionvertexai_gemini_safety_settings]
112114

113115
module.exports = {
114116
generateWithSafetySettings,

genai/text-generation/textgen-chat-stream-with-txt.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
'use strict';
1616

17+
// [START generativeaionvertexai_gemini_multiturn_chat_stream]
1718
// [START googlegenaisdk_textgen_chat_stream_with_txt]
1819
const {GoogleGenAI} = require('@google/genai');
1920

@@ -48,6 +49,7 @@ async function generateText(
4849
}
4950

5051
// [END googlegenaisdk_textgen_chat_stream_with_txt]
52+
// [END generativeaionvertexai_gemini_multiturn_chat_stream]
5153

5254
module.exports = {
5355
generateText,

genai/text-generation/textgen-chat-with-txt.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
'use strict';
1616

17+
// [START generativeaionvertexai_gemini_multiturn_chat_nonstreaming]
18+
// [START aiplatform_gemini_multiturn_chat_nonstreaming]
1719
// [START googlegenaisdk_textgen_chat_with_txt]
1820
const {GoogleGenAI} = require('@google/genai');
1921

@@ -55,7 +57,8 @@ async function generateText(
5557
}
5658

5759
// [END googlegenaisdk_textgen_chat_with_txt]
58-
60+
// [END aiplatform_gemini_multiturn_chat_nonstreaming]
61+
// [END generativeaionvertexai_gemini_multiturn_chat_nonstreaming]
5962
module.exports = {
6063
generateText,
6164
};

genai/text-generation/textgen-with-mute-video.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
'use strict';
1616

17+
// [START generativeaionvertexai_gemini_single_turn_video]
1718
// [START googlegenaisdk_textgen_with_mute_video]
1819
const {GoogleGenAI} = require('@google/genai');
1920

@@ -62,6 +63,7 @@ async function generateText(
6263
return response.text;
6364
}
6465
// [END googlegenaisdk_textgen_with_mute_video]
66+
// [END generativeaionvertexai_gemini_single_turn_video]
6567

6668
module.exports = {
6769
generateText,

genai/text-generation/textgen-with-txt-img.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
'use strict';
1616

17+
// [START generativeaionvertexai_gemini_get_started]
1718
// [START googlegenaisdk_textgen_with_txt_img]
1819
const {GoogleGenAI} = require('@google/genai');
1920

@@ -47,6 +48,7 @@ async function generateContent(
4748
return response.text;
4849
}
4950
// [END googlegenaisdk_textgen_with_txt_img]
51+
// [END generativeaionvertexai_gemini_get_started]
5052

5153
module.exports = {
5254
generateContent,

genai/text-generation/textgen-with-txt-stream.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
// limitations under the License.
1414

1515
'use strict';
16+
17+
// [START generativeaionvertexai_gemini_content]
18+
// [START aiplatform_gemini_content]
1619
// [START generativeaionvertexai_stream_text_basic]
1720
// [START googlegenaisdk_textgen_with_txt_stream]
1821
const {GoogleGenAI} = require('@google/genai');
@@ -44,6 +47,8 @@ async function generateContent(
4447
}
4548
// [END googlegenaisdk_textgen_with_txt_stream]
4649
// [END generativeaionvertexai_stream_text_basic]
50+
// [END aiplatform_gemini_content]
51+
// [END generativeaionvertexai_gemini_content]
4752

4853
module.exports = {
4954
generateContent,

genai/text-generation/textgen-with-txt.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
// limitations under the License.
1414

1515
'use strict';
16+
17+
// [START generativeaionvertexai_gemini_content_nonstreaming]
18+
// [START aiplatform_gemini_content_nonstreaming]
1619
// [START generativeaionvertexai_gemini_generate_from_text_input]
1720
// [START googlegenaisdk_textgen_with_txt]
1821
const {GoogleGenAI} = require('@google/genai');
@@ -41,6 +44,8 @@ async function generateContent(
4144
}
4245
// [END googlegenaisdk_textgen_with_txt]
4346
// [END generativeaionvertexai_gemini_generate_from_text_input]
47+
// [END aiplatform_gemini_content_nonstreaming]
48+
// [END generativeaionvertexai_gemini_content_nonstreaming]
4449

4550
module.exports = {
4651
generateContent,

genai/text-generation/textgen-with-video.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
'use strict';
1616

17+
// [START generativeaionvertexai_gemini_video_with_audio]
1718
// [START googlegenaisdk_textgen_with_video]
1819
const {GoogleGenAI} = require('@google/genai');
1920

@@ -56,6 +57,7 @@ async function generateContent(
5657
return response.text;
5758
}
5859
// [END googlegenaisdk_textgen_with_video]
60+
// [END generativeaionvertexai_gemini_video_with_audio]
5961

6062
module.exports = {
6163
generateContent,

generative-ai/snippets/gemini-video-audio.js

Lines changed: 0 additions & 55 deletions
This file was deleted.

generative-ai/snippets/nonStreamingChat.js

Lines changed: 0 additions & 56 deletions
This file was deleted.

0 commit comments

Comments
 (0)