Skip to content

Commit 2260479

Browse files
author
Guiners
committed
fixing functions names
1 parent 28f2cfd commit 2260479

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

genai/content-cache/content-cache-create-with-txt-gcs-pdf.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const {GoogleGenAI} = require('@google/genai');
2020

2121
const GOOGLE_CLOUD_PROJECT = process.env.GOOGLE_CLOUD_PROJECT;
2222
const GOOGLE_CLOUD_LOCATION = process.env.GOOGLE_CLOUD_LOCATION || 'global';
23-
async function generateContent(
23+
async function generateContentCache(
2424
projectId = GOOGLE_CLOUD_PROJECT,
2525
location = GOOGLE_CLOUD_LOCATION
2626
) {
@@ -83,5 +83,5 @@ async function generateContent(
8383
// [END googlegenaisdk_contentcache_create_with_txt_gcs_pdf]
8484

8585
module.exports = {
86-
generateContent,
86+
generateContentCache,
8787
};

genai/content-cache/content-cache-use-with-txt.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const {GoogleGenAI} = require('@google/genai');
2121
const GOOGLE_CLOUD_PROJECT = process.env.GOOGLE_CLOUD_PROJECT;
2222
const GOOGLE_CLOUD_LOCATION = process.env.GOOGLE_CLOUD_LOCATION || 'global';
2323

24-
async function generateContent(
24+
async function useContentCache(
2525
projectId = GOOGLE_CLOUD_PROJECT,
2626
location = GOOGLE_CLOUD_LOCATION,
2727
cacheName = 'example-cache'
@@ -53,5 +53,5 @@ async function generateContent(
5353
// [END googlegenaisdk_contentcache_use_with_txt]
5454

5555
module.exports = {
56-
generateContent,
56+
useContentCache,
5757
};

genai/test/content-cache-create-use-update-delete.test.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,21 @@ describe('content-cache-create-use-update-delete', async function () {
3333
let contentCacheName;
3434

3535
it('should create content cache', async () => {
36-
contentCacheName = await createSample.generateContent(projectId);
36+
contentCacheName = await createSample.generateContentCache(projectId);
3737
assert.isString(contentCacheName);
3838
assert.isAbove(contentCacheName.length, 0);
3939
});
4040

4141
it('should update content cache', async () => {
42-
await updateSample.updateContentCache(projectId, undefined, contentCacheName);
42+
await updateSample.updateContentCache(
43+
projectId,
44+
undefined,
45+
contentCacheName
46+
);
4347
});
4448

4549
it('should use content cache', async () => {
46-
const response = await useSample.generateContent(
50+
const response = await useSample.useContentCache(
4751
projectId,
4852
undefined,
4953
contentCacheName
@@ -52,6 +56,10 @@ describe('content-cache-create-use-update-delete', async function () {
5256
});
5357

5458
it('should delete content cache', async () => {
55-
await deleteSample.deleteContentCache(projectId, undefined, contentCacheName);
59+
await deleteSample.deleteContentCache(
60+
projectId,
61+
undefined,
62+
contentCacheName
63+
);
5664
});
5765
});

0 commit comments

Comments
 (0)