Skip to content

Commit

Permalink
chore: update to gemini ga calls
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcavazos authored and iennae committed May 8, 2024
1 parent 4a0ce8f commit 3ba2ec8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion generative-ai/snippets/functionCallingStreamChat.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ async function functionCallingStreamChat(
const vertexAI = new VertexAI({project: projectId, location: location});

// Instantiate the model
const generativeModel = vertexAI.preview.getGenerativeModel({
const generativeModel = vertexAI.getGenerativeModel({
model: model,
});

Expand Down
6 changes: 3 additions & 3 deletions generative-ai/snippets/functionCallingStreamContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const functionResponseParts = [
/**
* TODO(developer): Update these variables before running the sample.
*/
async function functionCallingStreamChat(
async function functionCallingStreamContent(
projectId = 'PROJECT_ID',
location = 'us-central1',
model = 'gemini-1.0-pro-002'
Expand All @@ -61,7 +61,7 @@ async function functionCallingStreamChat(
const vertexAI = new VertexAI({project: projectId, location: location});

// Instantiate the model
const generativeModel = vertexAI.preview.getGenerativeModel({
const generativeModel = vertexAI.getGenerativeModel({
model: model,
});

Expand Down Expand Up @@ -90,7 +90,7 @@ async function functionCallingStreamChat(
}
// [END aiplatform_gemini_function_calling_content]

functionCallingStreamChat(...process.argv.slice(2)).catch(err => {
functionCallingStreamContent(...process.argv.slice(2)).catch(err => {
console.error(err.message);
process.exitCode = 1;
});

0 comments on commit 3ba2ec8

Please sign in to comment.