Skip to content

Commit b6845ed

Browse files
committed
feat(genai): Add generate content with routing option
1 parent d0321ce commit b6845ed

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

genai/content_cache/contentcache_create_with_txt_gcs_pdf.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func createContentCache(w io.Writer) (string, error) {
6666
},
6767
},
6868
DisplayName: "example-cache",
69-
TTL: time.Duration(86400),
69+
TTL: time.Duration(time.Duration.Seconds(86400)),
7070
}
7171

7272
res, err := client.Caches.Create(ctx, modelName, config)

genai/content_cache/contentcache_update.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func updateContentCache(w io.Writer, cacheName string) error {
3838

3939
// Update expire time using TTL
4040
resp, err := client.Caches.Update(ctx, cacheName, &genai.UpdateCachedContentConfig{
41-
TTL: time.Duration(36000),
41+
TTL: time.Duration(time.Duration.Seconds(36000)),
4242
})
4343
if err != nil {
4444
return fmt.Errorf("failed to update content cache exp. time with TTL: %w", err)

0 commit comments

Comments
 (0)