gemini-webapi 1.8.0__tar.gz → 1.8.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.
- {gemini_webapi-1.8.0 → gemini_webapi-1.8.1}/.github/workflows/pypi-publish.yml +1 -1
- {gemini_webapi-1.8.0 → gemini_webapi-1.8.1}/PKG-INFO +3 -2
- {gemini_webapi-1.8.0 → gemini_webapi-1.8.1}/README.md +1 -0
- {gemini_webapi-1.8.0 → gemini_webapi-1.8.1}/src/gemini_webapi/constants.py +10 -2
- {gemini_webapi-1.8.0 → gemini_webapi-1.8.1}/src/gemini_webapi.egg-info/PKG-INFO +3 -2
- {gemini_webapi-1.8.0 → gemini_webapi-1.8.1}/tests/test_client_features.py +4 -0
- {gemini_webapi-1.8.0 → gemini_webapi-1.8.1}/.github/dependabot.yml +0 -0
- {gemini_webapi-1.8.0 → gemini_webapi-1.8.1}/.github/workflows/github-release.yml +0 -0
- {gemini_webapi-1.8.0 → gemini_webapi-1.8.1}/.gitignore +0 -0
- {gemini_webapi-1.8.0 → gemini_webapi-1.8.1}/.vscode/launch.json +0 -0
- {gemini_webapi-1.8.0 → gemini_webapi-1.8.1}/.vscode/settings.json +0 -0
- {gemini_webapi-1.8.0 → gemini_webapi-1.8.1}/LICENSE +0 -0
- {gemini_webapi-1.8.0 → gemini_webapi-1.8.1}/assets/banner.png +0 -0
- {gemini_webapi-1.8.0 → gemini_webapi-1.8.1}/assets/favicon.png +0 -0
- {gemini_webapi-1.8.0 → gemini_webapi-1.8.1}/assets/logo.svg +0 -0
- {gemini_webapi-1.8.0 → gemini_webapi-1.8.1}/pyproject.toml +0 -0
- {gemini_webapi-1.8.0 → gemini_webapi-1.8.1}/setup.cfg +0 -0
- {gemini_webapi-1.8.0 → gemini_webapi-1.8.1}/src/gemini_webapi/__init__.py +0 -0
- {gemini_webapi-1.8.0 → gemini_webapi-1.8.1}/src/gemini_webapi/client.py +0 -0
- {gemini_webapi-1.8.0 → gemini_webapi-1.8.1}/src/gemini_webapi/exceptions.py +0 -0
- {gemini_webapi-1.8.0 → gemini_webapi-1.8.1}/src/gemini_webapi/types/__init__.py +0 -0
- {gemini_webapi-1.8.0 → gemini_webapi-1.8.1}/src/gemini_webapi/types/candidate.py +0 -0
- {gemini_webapi-1.8.0 → gemini_webapi-1.8.1}/src/gemini_webapi/types/image.py +0 -0
- {gemini_webapi-1.8.0 → gemini_webapi-1.8.1}/src/gemini_webapi/types/modeloutput.py +0 -0
- {gemini_webapi-1.8.0 → gemini_webapi-1.8.1}/src/gemini_webapi/utils/__init__.py +0 -0
- {gemini_webapi-1.8.0 → gemini_webapi-1.8.1}/src/gemini_webapi/utils/get_access_token.py +0 -0
- {gemini_webapi-1.8.0 → gemini_webapi-1.8.1}/src/gemini_webapi/utils/load_browser_cookies.py +0 -0
- {gemini_webapi-1.8.0 → gemini_webapi-1.8.1}/src/gemini_webapi/utils/logger.py +0 -0
- {gemini_webapi-1.8.0 → gemini_webapi-1.8.1}/src/gemini_webapi/utils/rotate_1psidts.py +0 -0
- {gemini_webapi-1.8.0 → gemini_webapi-1.8.1}/src/gemini_webapi/utils/upload_file.py +0 -0
- {gemini_webapi-1.8.0 → gemini_webapi-1.8.1}/src/gemini_webapi.egg-info/SOURCES.txt +0 -0
- {gemini_webapi-1.8.0 → gemini_webapi-1.8.1}/src/gemini_webapi.egg-info/dependency_links.txt +0 -0
- {gemini_webapi-1.8.0 → gemini_webapi-1.8.1}/src/gemini_webapi.egg-info/requires.txt +0 -0
- {gemini_webapi-1.8.0 → gemini_webapi-1.8.1}/src/gemini_webapi.egg-info/top_level.txt +0 -0
- {gemini_webapi-1.8.0 → gemini_webapi-1.8.1}/tests/test_rotate_cookies.py +0 -0
- {gemini_webapi-1.8.0 → gemini_webapi-1.8.1}/tests/test_save_image.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: gemini-webapi
|
|
3
|
-
Version: 1.8.
|
|
3
|
+
Version: 1.8.1
|
|
4
4
|
Summary: ✨ An elegant async Python wrapper for Google Gemini web app
|
|
5
5
|
Author: UZQueen
|
|
6
6
|
License: GNU AFFERO GENERAL PUBLIC LICENSE
|
|
@@ -947,6 +947,7 @@ Currently available models (as of Dec 21, 2024):
|
|
|
947
947
|
- `unspecified` - Default model (Gemini 1.5 Flash)
|
|
948
948
|
- `gemini-1.5-flash` - Gemini 1.5 Flash
|
|
949
949
|
- `gemini-2.0-flash-exp` - Gemini 2.0 Flash Experimental
|
|
950
|
+
- `gemini-2.0-exp-advanced` - Gemini 2.0 Experimental Advanced (requires Gemini Advanced account)
|
|
950
951
|
|
|
951
952
|
```python
|
|
952
953
|
from gemini_webapi.constants import Model
|
|
@@ -265,6 +265,7 @@ Currently available models (as of Dec 21, 2024):
|
|
|
265
265
|
- `unspecified` - Default model (Gemini 1.5 Flash)
|
|
266
266
|
- `gemini-1.5-flash` - Gemini 1.5 Flash
|
|
267
267
|
- `gemini-2.0-flash-exp` - Gemini 2.0 Flash Experimental
|
|
268
|
+
- `gemini-2.0-exp-advanced` - Gemini 2.0 Experimental Advanced (requires Gemini Advanced account)
|
|
268
269
|
|
|
269
270
|
```python
|
|
270
271
|
from gemini_webapi.constants import Model
|
|
@@ -24,19 +24,27 @@ class Headers(Enum):
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
class Model(Enum):
|
|
27
|
-
UNSPECIFIED = ("unspecified", {})
|
|
27
|
+
UNSPECIFIED = ("unspecified", {}, False)
|
|
28
28
|
G_1_5_FLASH = (
|
|
29
29
|
"gemini-1.5-flash",
|
|
30
30
|
{"x-goog-ext-525001261-jspb": '[null,null,null,null,"7daceb7ef88130f5"]'},
|
|
31
|
+
False,
|
|
31
32
|
)
|
|
32
33
|
G_2_0_FLASH_EXP = (
|
|
33
34
|
"gemini-2.0-flash-exp",
|
|
34
35
|
{"x-goog-ext-525001261-jspb": '[null,null,null,null,"948b866104ccf484"]'},
|
|
36
|
+
False,
|
|
37
|
+
)
|
|
38
|
+
G_2_0_EXP_ADVANCED = (
|
|
39
|
+
"gemini-2.0-exp-advanced",
|
|
40
|
+
{"x-goog-ext-525001261-jspb": '[null,null,null,null,"b1e46a6037e6aa9f"]'},
|
|
41
|
+
True,
|
|
35
42
|
)
|
|
36
43
|
|
|
37
|
-
def __init__(self, name, header):
|
|
44
|
+
def __init__(self, name, header, advanced_only):
|
|
38
45
|
self.model_name = name
|
|
39
46
|
self.model_header = header
|
|
47
|
+
self.advanced_only = advanced_only
|
|
40
48
|
|
|
41
49
|
@classmethod
|
|
42
50
|
def from_name(cls, name: str):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: gemini-webapi
|
|
3
|
-
Version: 1.8.
|
|
3
|
+
Version: 1.8.1
|
|
4
4
|
Summary: ✨ An elegant async Python wrapper for Google Gemini web app
|
|
5
5
|
Author: UZQueen
|
|
6
6
|
License: GNU AFFERO GENERAL PUBLIC LICENSE
|
|
@@ -947,6 +947,7 @@ Currently available models (as of Dec 21, 2024):
|
|
|
947
947
|
- `unspecified` - Default model (Gemini 1.5 Flash)
|
|
948
948
|
- `gemini-1.5-flash` - Gemini 1.5 Flash
|
|
949
949
|
- `gemini-2.0-flash-exp` - Gemini 2.0 Flash Experimental
|
|
950
|
+
- `gemini-2.0-exp-advanced` - Gemini 2.0 Experimental Advanced (requires Gemini Advanced account)
|
|
950
951
|
|
|
951
952
|
```python
|
|
952
953
|
from gemini_webapi.constants import Model
|
|
@@ -31,6 +31,10 @@ class TestGeminiClient(unittest.IsolatedAsyncioTestCase):
|
|
|
31
31
|
@logger.catch(reraise=True)
|
|
32
32
|
async def test_switch_model(self):
|
|
33
33
|
for model in Model:
|
|
34
|
+
if model.advanced_only:
|
|
35
|
+
logger.debug(f"Model {model.model_name} requires an advanced account")
|
|
36
|
+
continue
|
|
37
|
+
|
|
34
38
|
response = await self.geminiclient.generate_content(
|
|
35
39
|
"What's you language model version? Reply version number only.",
|
|
36
40
|
model=model,
|
|
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
|