diff --git a/generative-ai/snippets/count-tokens/countTokens.js b/generative-ai/snippets/count-tokens/countTokens.js index 84909ef792..ccbe6e106b 100644 --- a/generative-ai/snippets/count-tokens/countTokens.js +++ b/generative-ai/snippets/count-tokens/countTokens.js @@ -22,7 +22,7 @@ const {VertexAI} = require('@google-cloud/vertexai'); async function countTokens( projectId = 'PROJECT_ID', location = 'us-central1', - model = 'gemini-1.0-pro-002' + model = 'gemini-1.5-flash-001' ) { // Initialize Vertex with your Cloud project and location const vertexAI = new VertexAI({project: projectId, location: location}); diff --git a/generative-ai/snippets/count-tokens/countTokensAdvanced.js b/generative-ai/snippets/count-tokens/countTokensAdvanced.js index cdd2238a22..c14108dd18 100644 --- a/generative-ai/snippets/count-tokens/countTokensAdvanced.js +++ b/generative-ai/snippets/count-tokens/countTokensAdvanced.js @@ -21,7 +21,7 @@ const {VertexAI} = require('@google-cloud/vertexai'); async function countTokens( projectId = 'PROJECT_ID', location = 'us-central1', - model = 'gemini-1.5-pro-preview-0409' + model = 'gemini-1.5-flash-001' ) { // Initialize Vertex with your Cloud project and location const vertexAI = new VertexAI({project: projectId, location: location}); diff --git a/generative-ai/snippets/function-calling/functionCallingAdvanced.js b/generative-ai/snippets/function-calling/functionCallingAdvanced.js index 8a4c54e68c..3baed88224 100644 --- a/generative-ai/snippets/function-calling/functionCallingAdvanced.js +++ b/generative-ai/snippets/function-calling/functionCallingAdvanced.js @@ -65,7 +65,7 @@ const generationConfig = { async function functionCallingAdvanced( projectId = 'PROJECT_ID', location = 'us-central1', - model = 'gemini-1.0-pro-001' + model = 'gemini-1.5-flash-001' ) { // Initialize Vertex with your Cloud project and location const vertexAI = new VertexAI({project: projectId, location: location}); diff --git a/generative-ai/snippets/function-calling/functionCallingBasic.js b/generative-ai/snippets/function-calling/functionCallingBasic.js index 406ef84a8f..e8d8affe86 100644 --- a/generative-ai/snippets/function-calling/functionCallingBasic.js +++ b/generative-ai/snippets/function-calling/functionCallingBasic.js @@ -46,7 +46,7 @@ const functionDeclarations = [ async function functionCallingBasic( projectId = 'PROJECT_ID', location = 'us-central1', - model = 'gemini-1.0-pro-001' + model = 'gemini-1.5-flash-001' ) { // Initialize Vertex with your Cloud project and location const vertexAI = new VertexAI({project: projectId, location: location}); diff --git a/generative-ai/snippets/function-calling/functionCallingStreamChat.js b/generative-ai/snippets/function-calling/functionCallingStreamChat.js index 8f8b4f846f..38f0da8643 100644 --- a/generative-ai/snippets/function-calling/functionCallingStreamChat.js +++ b/generative-ai/snippets/function-calling/functionCallingStreamChat.js @@ -55,7 +55,7 @@ const functionResponseParts = [ async function functionCallingStreamChat( projectId = 'PROJECT_ID', location = 'us-central1', - model = 'gemini-1.0-pro-002' + model = 'gemini-1.5-flash-001' ) { // Initialize Vertex with your Cloud project and location const vertexAI = new VertexAI({project: projectId, location: location}); diff --git a/generative-ai/snippets/function-calling/functionCallingStreamContent.js b/generative-ai/snippets/function-calling/functionCallingStreamContent.js index b8ef823208..f71bd26913 100644 --- a/generative-ai/snippets/function-calling/functionCallingStreamContent.js +++ b/generative-ai/snippets/function-calling/functionCallingStreamContent.js @@ -55,7 +55,7 @@ const functionResponseParts = [ async function functionCallingStreamContent( projectId = 'PROJECT_ID', location = 'us-central1', - model = 'gemini-1.0-pro-002' + model = 'gemini-1.5-flash-001' ) { // Initialize Vertex with your Cloud project and location const vertexAI = new VertexAI({project: projectId, location: location}); diff --git a/generative-ai/snippets/gemini-text-input.js b/generative-ai/snippets/gemini-text-input.js index 1489b1ab67..79209fa3ea 100644 --- a/generative-ai/snippets/gemini-text-input.js +++ b/generative-ai/snippets/gemini-text-input.js @@ -22,7 +22,7 @@ async function generate_from_text_input(projectId = 'PROJECT_ID') { const vertexAI = new VertexAI({project: projectId, location: 'us-central1'}); const generativeModel = vertexAI.getGenerativeModel({ - model: 'gemini-1.0-pro-002', + model: 'gemini-1.5-flash-001', }); const prompt = diff --git a/generative-ai/snippets/inference/nonStreamMultiModalityBasic.js b/generative-ai/snippets/inference/nonStreamMultiModalityBasic.js index a9c551a0e9..50d6fa3300 100644 --- a/generative-ai/snippets/inference/nonStreamMultiModalityBasic.js +++ b/generative-ai/snippets/inference/nonStreamMultiModalityBasic.js @@ -21,7 +21,7 @@ const {VertexAI} = require('@google-cloud/vertexai'); async function generateContent( projectId = 'PROJECT_ID', location = 'us-central1', - model = 'gemini-1.5-pro-preview-0409' + model = 'gemini-1.5-flash-001' ) { // Initialize Vertex AI const vertexAI = new VertexAI({project: projectId, location: location}); diff --git a/generative-ai/snippets/inference/nonStreamTextBasic.js b/generative-ai/snippets/inference/nonStreamTextBasic.js index 4499eaa39d..a70b4c0cad 100644 --- a/generative-ai/snippets/inference/nonStreamTextBasic.js +++ b/generative-ai/snippets/inference/nonStreamTextBasic.js @@ -21,7 +21,7 @@ const {VertexAI} = require('@google-cloud/vertexai'); async function generateContent( projectId = 'PROJECT_ID', location = 'us-central1', - model = 'gemini-1.0-pro-002' + model = 'gemini-1.5-flash-001' ) { // Initialize Vertex with your Cloud project and location const vertexAI = new VertexAI({project: projectId, location: location}); diff --git a/generative-ai/snippets/inference/streamMultiModalityBasic.js b/generative-ai/snippets/inference/streamMultiModalityBasic.js index 773ea9c088..495aa8620f 100644 --- a/generative-ai/snippets/inference/streamMultiModalityBasic.js +++ b/generative-ai/snippets/inference/streamMultiModalityBasic.js @@ -21,7 +21,7 @@ const {VertexAI} = require('@google-cloud/vertexai'); async function generateContent( projectId = 'PROJECT_ID', location = 'us-central1', - model = 'gemini-1.5-pro-preview-0409' + model = 'gemini-1.5-flash-001' ) { // Initialize Vertex AI const vertexAI = new VertexAI({project: projectId, location: location}); diff --git a/generative-ai/snippets/inference/streamTextBasic.js b/generative-ai/snippets/inference/streamTextBasic.js index 2496e03713..169e9c9bd7 100644 --- a/generative-ai/snippets/inference/streamTextBasic.js +++ b/generative-ai/snippets/inference/streamTextBasic.js @@ -21,7 +21,7 @@ const {VertexAI} = require('@google-cloud/vertexai'); async function generateContent( projectId = 'PROJECT_ID', location = 'us-central1', - model = 'gemini-1.0-pro-002' + model = 'gemini-1.5-flash-001' ) { // Initialize Vertex with your Cloud project and location const vertexAI = new VertexAI({project: projectId, location: location}); diff --git a/generative-ai/snippets/nonStreamingChat.js b/generative-ai/snippets/nonStreamingChat.js index 1e2d84bc68..57c21d0721 100644 --- a/generative-ai/snippets/nonStreamingChat.js +++ b/generative-ai/snippets/nonStreamingChat.js @@ -21,7 +21,7 @@ const {VertexAI} = require('@google-cloud/vertexai'); async function createNonStreamingChat( projectId = 'PROJECT_ID', location = 'us-central1', - model = 'gemini-1.0-pro-002' + model = 'gemini-1.5-flash-001' ) { // Initialize Vertex with your Cloud project and location const vertexAI = new VertexAI({project: projectId, location: location}); diff --git a/generative-ai/snippets/nonStreamingContent.js b/generative-ai/snippets/nonStreamingContent.js index 63244ef106..154902b44f 100644 --- a/generative-ai/snippets/nonStreamingContent.js +++ b/generative-ai/snippets/nonStreamingContent.js @@ -21,7 +21,7 @@ const {VertexAI} = require('@google-cloud/vertexai'); async function createNonStreamingContent( projectId = 'PROJECT_ID', location = 'us-central1', - model = 'gemini-1.0-pro-002' + model = 'gemini-1.5-flash-001' ) { // Initialize Vertex with your Cloud project and location const vertexAI = new VertexAI({project: projectId, location: location}); diff --git a/generative-ai/snippets/safetySettings.js b/generative-ai/snippets/safetySettings.js index 98a8db1e6f..5d37ce8fbf 100644 --- a/generative-ai/snippets/safetySettings.js +++ b/generative-ai/snippets/safetySettings.js @@ -25,7 +25,7 @@ const { async function setSafetySettings( projectId = 'PROJECT_ID', location = 'us-central1', - model = 'gemini-1.0-pro-001' + model = 'gemini-1.5-flash-001' ) { // Initialize Vertex with your Cloud project and location const vertexAI = new VertexAI({project: projectId, location: location}); diff --git a/generative-ai/snippets/streamChat.js b/generative-ai/snippets/streamChat.js index b4f4f8ecb2..6b5d833262 100644 --- a/generative-ai/snippets/streamChat.js +++ b/generative-ai/snippets/streamChat.js @@ -21,7 +21,7 @@ const {VertexAI} = require('@google-cloud/vertexai'); async function createStreamChat( projectId = 'PROJECT_ID', location = 'us-central1', - model = 'gemini-1.0-pro-002' + model = 'gemini-1.5-flash-001' ) { // Initialize Vertex with your Cloud project and location const vertexAI = new VertexAI({project: projectId, location: location}); diff --git a/generative-ai/snippets/streamContent.js b/generative-ai/snippets/streamContent.js index 06976c2477..1921cfcc8c 100644 --- a/generative-ai/snippets/streamContent.js +++ b/generative-ai/snippets/streamContent.js @@ -21,7 +21,7 @@ const {VertexAI} = require('@google-cloud/vertexai'); async function createStreamContent( projectId = 'PROJECT_ID', location = 'us-central1', - model = 'gemini-1.0-pro-002' + model = 'gemini-1.5-flash-001' ) { // Initialize Vertex with your Cloud project and location const vertexAI = new VertexAI({project: projectId, location: location}); diff --git a/generative-ai/snippets/test/count-tokens/countTokens.test.js b/generative-ai/snippets/test/count-tokens/countTokens.test.js index a993aaf26f..738553a29e 100644 --- a/generative-ai/snippets/test/count-tokens/countTokens.test.js +++ b/generative-ai/snippets/test/count-tokens/countTokens.test.js @@ -21,7 +21,7 @@ const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); const projectId = process.env.CAIP_PROJECT_ID; const location = process.env.LOCATION; -const model = 'gemini-1.0-pro-002'; +const model = 'gemini-1.5-flash-001'; describe('Count tokens', async () => { /** @@ -30,7 +30,7 @@ describe('Count tokens', async () => { */ // const projectId = 'YOUR_PROJECT_ID'; // const location = 'YOUR_LOCATION'; - // const model = 'gemini-1.0-pro'; + // const model = 'gemini-1.5-flash-001'; it('should count tokens', async () => { const output = execSync( diff --git a/generative-ai/snippets/test/count-tokens/countTokensAdvanced.test.js b/generative-ai/snippets/test/count-tokens/countTokensAdvanced.test.js index 0acef25ace..a2449331ae 100644 --- a/generative-ai/snippets/test/count-tokens/countTokensAdvanced.test.js +++ b/generative-ai/snippets/test/count-tokens/countTokensAdvanced.test.js @@ -21,7 +21,7 @@ const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); const projectId = process.env.CAIP_PROJECT_ID; const location = process.env.LOCATION; -const model = 'gemini-1.5-pro-preview-0409'; +const model = 'gemini-1.5-flash-001'; describe('Count tokens advanced', async () => { /** @@ -30,7 +30,7 @@ describe('Count tokens advanced', async () => { */ // const projectId = 'YOUR_PROJECT_ID'; // const location = 'YOUR_LOCATION'; - // const model = 'gemini-1.0-pro'; + // const model = 'gemini-1.5-flash-001'; it('should count tokens in a multimodal prompt', async () => { const output = execSync( diff --git a/generative-ai/snippets/test/function-calling/functionCallingAdvanced.test.js b/generative-ai/snippets/test/function-calling/functionCallingAdvanced.test.js index 23d4b442b0..7e117c6770 100644 --- a/generative-ai/snippets/test/function-calling/functionCallingAdvanced.test.js +++ b/generative-ai/snippets/test/function-calling/functionCallingAdvanced.test.js @@ -21,7 +21,7 @@ const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); const projectId = process.env.CAIP_PROJECT_ID; const location = process.env.LOCATION; -const model = 'gemini-1.0-pro-001'; +const model = 'gemini-1.5-flash-001'; describe('Generative AI Function Calling Advanced', () => { /** @@ -30,7 +30,7 @@ describe('Generative AI Function Calling Advanced', () => { */ // const projectId = 'YOUR_PROJECT_ID'; // const location = 'YOUR_LOCATION'; - // const model = 'gemini-1.0-pro'; + // const model = 'gemini-1.5-flash-001'; it('should define multiple functions and have the model invoke the specified one', async () => { const output = execSync( diff --git a/generative-ai/snippets/test/function-calling/functionCallingBasic.test.js b/generative-ai/snippets/test/function-calling/functionCallingBasic.test.js index 481c4f4069..4375f1e56d 100644 --- a/generative-ai/snippets/test/function-calling/functionCallingBasic.test.js +++ b/generative-ai/snippets/test/function-calling/functionCallingBasic.test.js @@ -21,7 +21,7 @@ const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); const projectId = process.env.CAIP_PROJECT_ID; const location = process.env.LOCATION; -const model = 'gemini-1.0-pro-001'; +const model = 'gemini-1.5-flash-001'; describe('Generative AI Function Calling', () => { /** @@ -30,7 +30,7 @@ describe('Generative AI Function Calling', () => { */ // const projectId = 'YOUR_PROJECT_ID'; // const location = 'YOUR_LOCATION'; - // const model = 'gemini-1.0-pro'; + // const model = 'gemini-1.5-flash-001'; it('should define a function and have the model invoke it', async () => { const output = execSync( diff --git a/generative-ai/snippets/test/function-calling/functionCallingStreamChat.test.js b/generative-ai/snippets/test/function-calling/functionCallingStreamChat.test.js index 91e46d214d..e430ea4a77 100644 --- a/generative-ai/snippets/test/function-calling/functionCallingStreamChat.test.js +++ b/generative-ai/snippets/test/function-calling/functionCallingStreamChat.test.js @@ -21,7 +21,7 @@ const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); const projectId = process.env.CAIP_PROJECT_ID; const location = process.env.LOCATION; -const model = 'gemini-1.5-pro-preview-0409'; +const model = 'gemini-1.5-flash-001'; describe('Generative AI Function Calling Stream Chat', () => { /** @@ -30,7 +30,7 @@ describe('Generative AI Function Calling Stream Chat', () => { */ // const projectId = 'YOUR_PROJECT_ID'; // const location = 'YOUR_LOCATION'; - // const model = 'gemini-1.5-pro-preview-0409'; + // const model = 'gemini-1.5-flash-001'; it('should create stream chat and begin the conversation the same in each instance', async () => { const output = execSync( diff --git a/generative-ai/snippets/test/function-calling/functionCallingStreamContent.test.js b/generative-ai/snippets/test/function-calling/functionCallingStreamContent.test.js index 6c6b483f22..1804bcfbf5 100644 --- a/generative-ai/snippets/test/function-calling/functionCallingStreamContent.test.js +++ b/generative-ai/snippets/test/function-calling/functionCallingStreamContent.test.js @@ -21,7 +21,7 @@ const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); const projectId = process.env.CAIP_PROJECT_ID; const location = process.env.LOCATION; -const model = 'gemini-1.0-pro-002'; +const model = 'gemini-1.5-flash-001'; describe('Generative AI Function Calling Stream Content', () => { /** @@ -30,7 +30,7 @@ describe('Generative AI Function Calling Stream Content', () => { */ // const projectId = 'YOUR_PROJECT_ID'; // const location = 'YOUR_LOCATION'; - // const model = 'gemini-1.0-pro'; + // const model = 'gemini-1.5-flash-001'; it('should create stream chat and begin the conversation the same in each instance', async () => { const output = execSync( diff --git a/generative-ai/snippets/test/gemini-system-instruction.test.js b/generative-ai/snippets/test/gemini-system-instruction.test.js index caebfd81a5..dcd59687c6 100644 --- a/generative-ai/snippets/test/gemini-system-instruction.test.js +++ b/generative-ai/snippets/test/gemini-system-instruction.test.js @@ -21,8 +21,8 @@ const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); const projectId = process.env.CAIP_PROJECT_ID; -describe('Set sytem instruction', async () => { - it('should set sytem instruction', async () => { +describe('Set system instruction', async () => { + it('should set system instruction', async () => { const output = execSync(`node ./gemini-system-instruction.js ${projectId}`); assert(output.length > 0); diff --git a/generative-ai/snippets/test/grounding/groundingPrivateDataBasic.test.js b/generative-ai/snippets/test/grounding/groundingPrivateDataBasic.test.js index 521dc44617..f806fa92a3 100644 --- a/generative-ai/snippets/test/grounding/groundingPrivateDataBasic.test.js +++ b/generative-ai/snippets/test/grounding/groundingPrivateDataBasic.test.js @@ -31,7 +31,7 @@ describe('Private data grounding', async () => { */ // const projectId = 'YOUR_PROJECT_ID'; // const location = 'YOUR_LOCATION'; - // const model = 'gemini-1.0-pro'; + // const model = 'gemini-1.0-pro-002'; it('should ground results in private VertexAI search data', async () => { const output = execSync( diff --git a/generative-ai/snippets/test/grounding/groundingPublicDataBasic.test.js b/generative-ai/snippets/test/grounding/groundingPublicDataBasic.test.js index 6be7a783e1..5e98415081 100644 --- a/generative-ai/snippets/test/grounding/groundingPublicDataBasic.test.js +++ b/generative-ai/snippets/test/grounding/groundingPublicDataBasic.test.js @@ -30,12 +30,12 @@ describe('Google search grounding', async () => { */ // const projectId = 'YOUR_PROJECT_ID'; // const location = 'YOUR_LOCATION'; - // const model = 'gemini-1.0-pro'; + // const model = 'gemini-1.0-pro-002'; it('should ground results in public search data', async () => { const output = execSync( `node ./grounding/groundingPublicDataBasic.js ${projectId} ${location} ${model}` ); - assert(output.match(/webSearchQueries.*Why is the sky blue?/)); + assert(output.match(/webSearchQueries.*why is the sky blue?/)); }); }); diff --git a/generative-ai/snippets/test/inference/nonStreamMultiModalityBasic.test.js b/generative-ai/snippets/test/inference/nonStreamMultiModalityBasic.test.js index 433a6cf1ce..b1b5686f1e 100644 --- a/generative-ai/snippets/test/inference/nonStreamMultiModalityBasic.test.js +++ b/generative-ai/snippets/test/inference/nonStreamMultiModalityBasic.test.js @@ -30,7 +30,7 @@ describe('Generative AI Multimodal Text Inference', () => { */ // const projectId = 'YOUR_PROJECT_ID'; // const location = 'YOUR_LOCATION'; - // const model = 'gemini-1.5-pro-preview-0409'; + // const model = 'gemini-1.5-flash-001'; it('should generate text based on a prompt containing text, a video, and an image', async () => { const output = execSync( diff --git a/generative-ai/snippets/test/inference/nonStreamTextBasic.test.js b/generative-ai/snippets/test/inference/nonStreamTextBasic.test.js index c5b4b62fb6..3fdb25bada 100644 --- a/generative-ai/snippets/test/inference/nonStreamTextBasic.test.js +++ b/generative-ai/snippets/test/inference/nonStreamTextBasic.test.js @@ -21,7 +21,7 @@ const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); const projectId = process.env.CAIP_PROJECT_ID; const location = process.env.LOCATION; -const model = 'gemini-1.0-pro-002'; +const model = 'gemini-1.5-flash-001'; describe('Generative AI Basic Text Inference', () => { /** @@ -30,7 +30,7 @@ describe('Generative AI Basic Text Inference', () => { */ // const projectId = 'YOUR_PROJECT_ID'; // const location = 'YOUR_LOCATION'; - // const model = 'gemini-1.0-pro'; + // const model = 'gemini-1.5-flash-001'; it('should create a generative text model and infer text from a prompt', async () => { const output = execSync( diff --git a/generative-ai/snippets/test/inference/streamMultiModalityBasic.test.js b/generative-ai/snippets/test/inference/streamMultiModalityBasic.test.js index 68a81ce0c7..ec2b165166 100644 --- a/generative-ai/snippets/test/inference/streamMultiModalityBasic.test.js +++ b/generative-ai/snippets/test/inference/streamMultiModalityBasic.test.js @@ -21,7 +21,7 @@ const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); const projectId = process.env.CAIP_PROJECT_ID; const location = process.env.LOCATION; -const model = 'gemini-1.5-pro-preview-0409'; +const model = 'gemini-1.5-flash-001'; describe('Generative AI Basic Multimodal Text Inference Streaming', () => { /** @@ -30,7 +30,7 @@ describe('Generative AI Basic Multimodal Text Inference Streaming', () => { */ // const projectId = 'YOUR_PROJECT_ID'; // const location = 'YOUR_LOCATION'; - // const model = 'gemini-1.5-pro-preview-0409'; + // const model = 'gemini-1.5-flash-001'; it('should create a generative text model and infer text from a prompt, streaming the results', async () => { const output = execSync( diff --git a/generative-ai/snippets/test/inference/streamTextBasic.test.js b/generative-ai/snippets/test/inference/streamTextBasic.test.js index 24762b1743..bcaebac7b5 100644 --- a/generative-ai/snippets/test/inference/streamTextBasic.test.js +++ b/generative-ai/snippets/test/inference/streamTextBasic.test.js @@ -21,7 +21,7 @@ const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); const projectId = process.env.CAIP_PROJECT_ID; const location = process.env.LOCATION; -const model = 'gemini-1.0-pro-002'; +const model = 'gemini-1.5-flash-001'; describe('Generative AI Basic Text Inference Streaming', () => { /** @@ -30,7 +30,7 @@ describe('Generative AI Basic Text Inference Streaming', () => { */ // const projectId = 'YOUR_PROJECT_ID'; // const location = 'YOUR_LOCATION'; - // const model = 'gemini-1.0-pro'; + // const model = 'gemini-1.5-flash-001'; it('should create a generative text model and infer text from a prompt, streaming the results', async () => { const output = execSync( diff --git a/generative-ai/snippets/test/nonStreamingChat.test.js b/generative-ai/snippets/test/nonStreamingChat.test.js index 6493beb861..673b38107e 100644 --- a/generative-ai/snippets/test/nonStreamingChat.test.js +++ b/generative-ai/snippets/test/nonStreamingChat.test.js @@ -21,7 +21,7 @@ const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); const projectId = process.env.CAIP_PROJECT_ID; const location = process.env.LOCATION; -const model = 'gemini-1.0-pro-002'; +const model = 'gemini-1.5-flash-001'; describe('Generative AI NonStreaming Chat', async () => { /** @@ -30,7 +30,7 @@ describe('Generative AI NonStreaming Chat', async () => { */ // const projectId = 'YOUR_PROJECT_ID'; // const location = 'YOUR_LOCATION'; - // const model = 'gemini-1.0-pro'; + // const model = 'gemini-1.5-flash-001'; it('should create nonstreaming chat and begin the conversation the same in each instance', async () => { const output = execSync( diff --git a/generative-ai/snippets/test/nonStreamingContent.test.js b/generative-ai/snippets/test/nonStreamingContent.test.js index b1fce65293..46d04e3ee9 100644 --- a/generative-ai/snippets/test/nonStreamingContent.test.js +++ b/generative-ai/snippets/test/nonStreamingContent.test.js @@ -21,7 +21,7 @@ const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); const projectId = process.env.CAIP_PROJECT_ID; const location = process.env.LOCATION; -const model = 'gemini-1.0-pro-002'; +const model = 'gemini-1.5-flash-001'; describe('Generative AI NonStreaming Content', () => { /** diff --git a/generative-ai/snippets/test/safetySettings.test.js b/generative-ai/snippets/test/safetySettings.test.js index ce422b344d..180dc0c824 100644 --- a/generative-ai/snippets/test/safetySettings.test.js +++ b/generative-ai/snippets/test/safetySettings.test.js @@ -21,7 +21,7 @@ const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); const projectId = process.env.CAIP_PROJECT_ID; const location = process.env.LOCATION; -const model = 'gemini-1.0-pro-001'; +const model = 'gemini-1.5-flash-001'; describe('Safety settings', async () => { /** diff --git a/generative-ai/snippets/test/streamChat.test.js b/generative-ai/snippets/test/streamChat.test.js index 4d9611a1cb..05a184e136 100644 --- a/generative-ai/snippets/test/streamChat.test.js +++ b/generative-ai/snippets/test/streamChat.test.js @@ -21,7 +21,7 @@ const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); const projectId = process.env.CAIP_PROJECT_ID; const location = process.env.LOCATION; -const model = 'gemini-1.0-pro-002'; +const model = 'gemini-1.5-flash-001'; describe('Generative AI Stream Chat', () => { /** diff --git a/generative-ai/snippets/test/streamContent.test.js b/generative-ai/snippets/test/streamContent.test.js index 5e30f05593..bab1ccb5e3 100644 --- a/generative-ai/snippets/test/streamContent.test.js +++ b/generative-ai/snippets/test/streamContent.test.js @@ -21,7 +21,7 @@ const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); const projectId = process.env.CAIP_PROJECT_ID; const location = process.env.LOCATION; -const model = 'gemini-1.0-pro-002'; +const model = 'gemini-1.5-flash-001'; describe('Generative AI Stream Content', () => { /**