Skip to content

Commit

Permalink
refactor: replace hardcoded location with environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
pattishin committed Dec 20, 2023
1 parent 897582c commit 02b6a82
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion generative-ai/snippets/test/countTokens.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const cp = require('child_process');
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});

const projectId = process.env.CAIP_PROJECT_ID;
const location = 'europe-west4';
const location = process.env.LOCATION;
const model = 'gemini-pro';

describe('Count tokens', async () => {
Expand Down
2 changes: 1 addition & 1 deletion generative-ai/snippets/test/nonStreamingChat.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const cp = require('child_process');
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});

const projectId = process.env.CAIP_PROJECT_ID;
const location = 'europe-west4';
const location = process.env.LOCATION;
const model = 'gemini-pro';

describe('Generative AI NonStreaming Chat', async () => {
Expand Down
2 changes: 1 addition & 1 deletion generative-ai/snippets/test/nonStreamingContent.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const cp = require('child_process');
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});

const projectId = process.env.CAIP_PROJECT_ID;
const location = 'europe-west4';
const location = process.env.LOCATION;
const model = 'gemini-pro';

describe('Generative AI NonStreaming Content', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const cp = require('child_process');
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});

const projectId = process.env.CAIP_PROJECT_ID;
const location = 'europe-west4';
const location = process.env.LOCATION;
const model = 'gemini-pro-vision';

describe('Generative AI NonStreaming Multipart Content', () => {
Expand Down
2 changes: 1 addition & 1 deletion generative-ai/snippets/test/safetySettings.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const cp = require('child_process');
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});

const projectId = process.env.CAIP_PROJECT_ID;
const location = 'europe-west4';
const location = process.env.LOCATION;
const model = 'gemini-pro';

describe('Safety settings', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const cp = require('child_process');
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});

const projectId = process.env.CAIP_PROJECT_ID;
const location = 'europe-west4';
const location = process.env.LOCATION;
const model = 'gemini-pro-vision';

describe('Generative AI Stream MultiModal with Image', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const cp = require('child_process');
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});

const projectId = process.env.CAIP_PROJECT_ID;
const location = 'europe-west4';
const location = process.env.LOCATION;
const model = 'gemini-pro-vision';

describe('Generative AI Stream MultiModal with Video', () => {
Expand Down
2 changes: 1 addition & 1 deletion generative-ai/snippets/test/streamChat.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const cp = require('child_process');
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});

const projectId = process.env.CAIP_PROJECT_ID;
const location = 'europe-west4';
const location = process.env.LOCATION;
const model = 'gemini-pro';

describe('Generative AI Stream Chat', () => {
Expand Down
2 changes: 1 addition & 1 deletion generative-ai/snippets/test/streamContent.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const cp = require('child_process');
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});

const projectId = process.env.CAIP_PROJECT_ID;
const location = 'europe-west4';
const location = process.env.LOCATION;
const model = 'gemini-pro';

describe('Generative AI Stream Content', () => {
Expand Down
2 changes: 1 addition & 1 deletion generative-ai/snippets/test/streamMultipartContent.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const cp = require('child_process');
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});

const projectId = process.env.CAIP_PROJECT_ID;
const location = 'europe-west4';
const location = process.env.LOCATION;
const model = 'gemini-pro-vision';

describe('Generative AI Stream Multipart Content', () => {
Expand Down

0 comments on commit 02b6a82

Please sign in to comment.