google-genai 1.50.0__tar.gz → 1.50.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {google_genai-1.50.0/google_genai.egg-info → google_genai-1.50.1}/PKG-INFO +1 -1
- {google_genai-1.50.0 → google_genai-1.50.1}/google/genai/_api_client.py +12 -12
- {google_genai-1.50.0 → google_genai-1.50.1}/google/genai/version.py +1 -1
- {google_genai-1.50.0 → google_genai-1.50.1/google_genai.egg-info}/PKG-INFO +1 -1
- {google_genai-1.50.0 → google_genai-1.50.1}/pyproject.toml +1 -1
- {google_genai-1.50.0 → google_genai-1.50.1}/LICENSE +0 -0
- {google_genai-1.50.0 → google_genai-1.50.1}/MANIFEST.in +0 -0
- {google_genai-1.50.0 → google_genai-1.50.1}/README.md +0 -0
- {google_genai-1.50.0 → google_genai-1.50.1}/google/genai/__init__.py +0 -0
- {google_genai-1.50.0 → google_genai-1.50.1}/google/genai/_adapters.py +0 -0
- {google_genai-1.50.0 → google_genai-1.50.1}/google/genai/_api_module.py +0 -0
- {google_genai-1.50.0 → google_genai-1.50.1}/google/genai/_automatic_function_calling_util.py +0 -0
- {google_genai-1.50.0 → google_genai-1.50.1}/google/genai/_base_transformers.py +0 -0
- {google_genai-1.50.0 → google_genai-1.50.1}/google/genai/_base_url.py +0 -0
- {google_genai-1.50.0 → google_genai-1.50.1}/google/genai/_common.py +0 -0
- {google_genai-1.50.0 → google_genai-1.50.1}/google/genai/_extra_utils.py +0 -0
- {google_genai-1.50.0 → google_genai-1.50.1}/google/genai/_live_converters.py +0 -0
- {google_genai-1.50.0 → google_genai-1.50.1}/google/genai/_local_tokenizer_loader.py +0 -0
- {google_genai-1.50.0 → google_genai-1.50.1}/google/genai/_mcp_utils.py +0 -0
- {google_genai-1.50.0 → google_genai-1.50.1}/google/genai/_operations_converters.py +0 -0
- {google_genai-1.50.0 → google_genai-1.50.1}/google/genai/_replay_api_client.py +0 -0
- {google_genai-1.50.0 → google_genai-1.50.1}/google/genai/_test_api_client.py +0 -0
- {google_genai-1.50.0 → google_genai-1.50.1}/google/genai/_tokens_converters.py +0 -0
- {google_genai-1.50.0 → google_genai-1.50.1}/google/genai/_transformers.py +0 -0
- {google_genai-1.50.0 → google_genai-1.50.1}/google/genai/batches.py +0 -0
- {google_genai-1.50.0 → google_genai-1.50.1}/google/genai/caches.py +0 -0
- {google_genai-1.50.0 → google_genai-1.50.1}/google/genai/chats.py +0 -0
- {google_genai-1.50.0 → google_genai-1.50.1}/google/genai/client.py +0 -0
- {google_genai-1.50.0 → google_genai-1.50.1}/google/genai/documents.py +0 -0
- {google_genai-1.50.0 → google_genai-1.50.1}/google/genai/errors.py +0 -0
- {google_genai-1.50.0 → google_genai-1.50.1}/google/genai/file_search_stores.py +0 -0
- {google_genai-1.50.0 → google_genai-1.50.1}/google/genai/files.py +0 -0
- {google_genai-1.50.0 → google_genai-1.50.1}/google/genai/live.py +0 -0
- {google_genai-1.50.0 → google_genai-1.50.1}/google/genai/live_music.py +0 -0
- {google_genai-1.50.0 → google_genai-1.50.1}/google/genai/local_tokenizer.py +0 -0
- {google_genai-1.50.0 → google_genai-1.50.1}/google/genai/models.py +0 -0
- {google_genai-1.50.0 → google_genai-1.50.1}/google/genai/operations.py +0 -0
- {google_genai-1.50.0 → google_genai-1.50.1}/google/genai/pagers.py +0 -0
- {google_genai-1.50.0 → google_genai-1.50.1}/google/genai/py.typed +0 -0
- {google_genai-1.50.0 → google_genai-1.50.1}/google/genai/tokens.py +0 -0
- {google_genai-1.50.0 → google_genai-1.50.1}/google/genai/tunings.py +0 -0
- {google_genai-1.50.0 → google_genai-1.50.1}/google/genai/types.py +0 -0
- {google_genai-1.50.0 → google_genai-1.50.1}/google_genai.egg-info/SOURCES.txt +0 -0
- {google_genai-1.50.0 → google_genai-1.50.1}/google_genai.egg-info/dependency_links.txt +0 -0
- {google_genai-1.50.0 → google_genai-1.50.1}/google_genai.egg-info/requires.txt +0 -0
- {google_genai-1.50.0 → google_genai-1.50.1}/google_genai.egg-info/top_level.txt +0 -0
- {google_genai-1.50.0 → google_genai-1.50.1}/setup.cfg +0 -0
|
@@ -628,15 +628,15 @@ class BaseApiClient:
|
|
|
628
628
|
)
|
|
629
629
|
self.api_key = None
|
|
630
630
|
|
|
631
|
-
if not self.location and not self.api_key:
|
|
632
|
-
self.location = 'global'
|
|
633
|
-
|
|
634
631
|
self.custom_base_url = (
|
|
635
632
|
validated_http_options.base_url
|
|
636
633
|
if validated_http_options.base_url
|
|
637
634
|
else None
|
|
638
635
|
)
|
|
639
636
|
|
|
637
|
+
if not self.location and not self.api_key and not self.custom_base_url:
|
|
638
|
+
self.location = 'global'
|
|
639
|
+
|
|
640
640
|
# Skip fetching project from ADC if base url is provided in http options.
|
|
641
641
|
if (
|
|
642
642
|
not self.project
|
|
@@ -1836,12 +1836,17 @@ class BaseApiClient:
|
|
|
1836
1836
|
|
|
1837
1837
|
def close(self) -> None:
|
|
1838
1838
|
"""Closes the API client."""
|
|
1839
|
-
|
|
1839
|
+
# Let users close the custom client explicitly by themselves. Otherwise,
|
|
1840
|
+
# close the client when the object is garbage collected.
|
|
1841
|
+
if not self._http_options.httpx_client:
|
|
1842
|
+
self._httpx_client.close()
|
|
1840
1843
|
|
|
1841
1844
|
async def aclose(self) -> None:
|
|
1842
1845
|
"""Closes the API async client."""
|
|
1843
|
-
|
|
1844
|
-
|
|
1846
|
+
# Let users close the custom client explicitly by themselves. Otherwise,
|
|
1847
|
+
# close the client when the object is garbage collected.
|
|
1848
|
+
if not self._http_options.httpx_async_client:
|
|
1849
|
+
await self._async_httpx_client.aclose()
|
|
1845
1850
|
if self._aiohttp_session:
|
|
1846
1851
|
await self._aiohttp_session.close()
|
|
1847
1852
|
|
|
@@ -1853,17 +1858,12 @@ class BaseApiClient:
|
|
|
1853
1858
|
"""
|
|
1854
1859
|
|
|
1855
1860
|
try:
|
|
1856
|
-
# Let users close the custom client explicitly by themselves. Otherwise,
|
|
1857
|
-
# close the client when the object is garbage collected.
|
|
1858
1861
|
if not self._http_options.httpx_client:
|
|
1859
1862
|
self.close()
|
|
1860
1863
|
except Exception: # pylint: disable=broad-except
|
|
1861
1864
|
pass
|
|
1862
1865
|
|
|
1863
1866
|
try:
|
|
1864
|
-
|
|
1865
|
-
# close the client when the object is garbage collected.
|
|
1866
|
-
if not self._http_options.httpx_async_client:
|
|
1867
|
-
asyncio.get_running_loop().create_task(self.aclose())
|
|
1867
|
+
asyncio.get_running_loop().create_task(self.aclose())
|
|
1868
1868
|
except Exception: # pylint: disable=broad-except
|
|
1869
1869
|
pass
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{google_genai-1.50.0 → google_genai-1.50.1}/google/genai/_automatic_function_calling_util.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|