Skip to content

Commit 85d11ff

Browse files
author
Guiners
committed
hardcoded values fix
1 parent 681c62e commit 85d11ff

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

genai/live/live-ground-ragengine-with-txt.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,19 @@ const GOOGLE_CLOUD_PROJECT = process.env.GOOGLE_CLOUD_PROJECT;
2222
const GOOGLE_CLOUD_LOCATION = process.env.GOOGLE_CLOUD_LOCATION || 'global';
2323

2424
// (DEVELOPER) put here your memory corpus
25-
const MEMORY_CORPUS =
26-
'projects/cloud-ai-devrel-softserve/locations/us-central1/ragCorpora/2305843009213693952';
25+
const RAG_CORPUS_ID = '';
2726

2827
async function generateLiveRagTextResponse(
29-
memoryCorpus = MEMORY_CORPUS,
3028
projectId = GOOGLE_CLOUD_PROJECT,
31-
location = GOOGLE_CLOUD_LOCATION
29+
location = GOOGLE_CLOUD_LOCATION,
30+
rag_corpus_id = RAG_CORPUS_ID
3231
) {
3332
const client = new GoogleGenAI({
3433
vertexai: true,
3534
project: projectId,
3635
location: location,
3736
});
38-
37+
const memoryCorpus = `projects/${projectId}/locations/${location}/ragCorpora/${rag_corpus_id}`;
3938
const modelId = 'gemini-2.0-flash-live-preview-04-09';
4039

4140
// RAG store config

genai/tools/tools-vais-with-txt.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ const {GoogleGenAI} = require('@google/genai');
2020
const GOOGLE_CLOUD_PROJECT = process.env.GOOGLE_CLOUD_PROJECT;
2121
const GOOGLE_CLOUD_LOCATION = process.env.GOOGLE_CLOUD_LOCATION || 'global';
2222
// (Developer) put your path Data Store
23-
const DATASTORE =
24-
'projects/cloud-ai-devrel-softserve/locations/global/collections/default_collection/dataStores/example-adk-website-datastore_1755611010401';
23+
const DATASTORE = `projects/${GOOGLE_CLOUD_PROJECT}/locations/${GOOGLE_CLOUD_LOCATION}/collections/default_collection/dataStores/data-store-id `;
2524

2625
async function generateContent(
2726
datastore = DATASTORE,

0 commit comments

Comments
 (0)