Skip to content

Commit 1464d23

Browse files
author
Guiners
committed
adding samples, test, lints
1 parent f2de576 commit 1464d23

2 files changed

Lines changed: 13 additions & 10 deletions

File tree

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,13 @@ async function generateContent(
7272
console.log(contentCache);
7373
console.log(contentCache.name);
7474

75+
// Example response:
76+
// projects/111111111111/locations/us-central1/cachedContents/1111111111111111111
77+
// CachedContentUsageMetadata(audio_duration_seconds=None, image_count=167,
78+
// text_count=153, total_token_count=43130, video_duration_seconds=None)
79+
7580
return contentCache.name;
7681
}
77-
// Example response:
78-
// projects/111111111111/locations/us-central1/cachedContents/1111111111111111111
79-
// CachedContentUsageMetadata(audio_duration_seconds=None, image_count=167,
80-
// text_count=153, total_token_count=43130, video_duration_seconds=None)
8182

8283
// [END googlegenaisdk_contentcache_create_with_txt_gcs_pdf]
8384

genai/content-cache/content-cache-list.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,16 @@ async function generateContent(
4747
}
4848
console.log(contentCacheNames);
4949

50+
// Example response:
51+
// * Cache `projects/111111111111/locations/us-central1/cachedContents/1111111111111111111` for
52+
// model `projects/111111111111/locations/us-central1/publishers/google/models/gemini-XXX-pro-XXX`
53+
// * Last updated at: 2025-02-13 14:46:42.620490+00:00
54+
// * CachedContentUsageMetadata(audio_duration_seconds=None, image_count=167, text_count=153, total_token_count=43130, video_duration_seconds=None)
55+
// ...
56+
5057
return contentCacheNames;
5158
}
52-
// Example response:
53-
// * Cache `projects/111111111111/locations/us-central1/cachedContents/1111111111111111111` for
54-
// model `projects/111111111111/locations/us-central1/publishers/google/models/gemini-XXX-pro-XXX`
55-
// * Last updated at: 2025-02-13 14:46:42.620490+00:00
56-
// * CachedContentUsageMetadata(audio_duration_seconds=None, image_count=167, text_count=153, total_token_count=43130, video_duration_seconds=None)
57-
// ...
59+
5860
// [END googlegenaisdk_contentcache_list]
5961

6062
module.exports = {

0 commit comments

Comments
 (0)