Skip to content

Commit 1795262

Browse files
committed
fix: using v1beta1 instead of v1
1 parent baa1563 commit 1795262

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

genai/content_cache/contentcache_create_with_txt_gcs_pdf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def create_content_cache() -> str:
1818
from google import genai
1919
from google.genai.types import Content, CreateCachedContentConfig, HttpOptions, Part
2020

21-
client = genai.Client(http_options=HttpOptions(api_version="v1"))
21+
client = genai.Client(http_options=HttpOptions(api_version="v1beta1"))
2222

2323
system_instruction = """
2424
You are an expert researcher. You always stick to the facts in the sources provided, and never make up new facts.

genai/content_cache/contentcache_delete.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def delete_context_caches(cache_name: str) -> str:
1818
from google import genai
1919
from google.genai.types import HttpOptions
2020

21-
client = genai.Client(http_options=HttpOptions(api_version="v1"))
21+
client = genai.Client(http_options=HttpOptions(api_version="v1beta1"))
2222

2323
# Delete content cache using name
2424
# E.g cache_name = 'projects/111111111111/locations/us-central1/cachedContents/1111111111111111111'

genai/content_cache/contentcache_list.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def list_context_caches() -> str:
1818
from google import genai
1919
from google.genai.types import HttpOptions
2020

21-
client = genai.Client(http_options=HttpOptions(api_version="v1"))
21+
client = genai.Client(http_options=HttpOptions(api_version="v1beta1"))
2222

2323
content_cache_list = client.caches.list()
2424

genai/content_cache/contentcache_update.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def update_content_cache(cache_name: str) -> str:
2222
from google import genai
2323
from google.genai.types import HttpOptions, UpdateCachedContentConfig
2424

25-
client = genai.Client(http_options=HttpOptions(api_version="v1"))
25+
client = genai.Client(http_options=HttpOptions(api_version="v1beta1"))
2626

2727
# Get content cache by name
2828
# cache_name = "projects/111111111111/locations/us-central1/cachedContents/1111111111111111111"

genai/content_cache/contentcache_use_with_txt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def generate_content(cache_name: str) -> str:
1818
from google import genai
1919
from google.genai.types import GenerateContentConfig, HttpOptions
2020

21-
client = genai.Client(http_options=HttpOptions(api_version="v1"))
21+
client = genai.Client(http_options=HttpOptions(api_version="v1beta1"))
2222

2323
# Use content cache to generate text response
2424
# E.g cache_name = 'projects/111111111111/locations/us-central1/cachedContents/1111111111111111111'

0 commit comments

Comments
 (0)