Skip to content

Commit

Permalink
rename get_cached_content to get
Browse files Browse the repository at this point in the history
  • Loading branch information
mayureshagashe2105 committed May 22, 2024
1 parent a4ac7a5 commit 6fafe6b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion google/generativeai/caching.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def get_cached_content(name: str, client: glm.CacheServiceClient | None = None)
Returns:
`CachedContent` resource with specified name.
"""
return CachedContent.get_cached_content(name=name, client=client)
return CachedContent.get(name=name, client=client)


def delete_cached_content(name: str, client: glm.CacheServiceClient | None = None) -> None:
Expand Down
4 changes: 1 addition & 3 deletions google/generativeai/types/caching_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,7 @@ def create(
return decode_cached_content(response)

@classmethod
def get_cached_content(
cls, name: str, client: glm.CacheServiceClient | None = None
) -> CachedContent:
def get(cls, name: str, client: glm.CacheServiceClient | None = None) -> CachedContent:
"""Gets a `CachedContent` resource."""
if client is None:
client = get_default_cache_client()
Expand Down

0 comments on commit 6fafe6b

Please sign in to comment.