gemini-webapi 1.15.0__py3-none-any.whl → 1.15.2__py3-none-any.whl
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/client.py +6 -1
- gemini_webapi/constants.py +3 -2
- {gemini_webapi-1.15.0.dist-info → gemini_webapi-1.15.2.dist-info}/METADATA +1 -1
- {gemini_webapi-1.15.0.dist-info → gemini_webapi-1.15.2.dist-info}/RECORD +7 -7
- {gemini_webapi-1.15.0.dist-info → gemini_webapi-1.15.2.dist-info}/WHEEL +0 -0
- {gemini_webapi-1.15.0.dist-info → gemini_webapi-1.15.2.dist-info}/licenses/LICENSE +0 -0
- {gemini_webapi-1.15.0.dist-info → gemini_webapi-1.15.2.dist-info}/top_level.txt +0 -0
gemini_webapi/client.py
CHANGED
|
@@ -118,7 +118,7 @@ class GeminiClient(GemMixin):
|
|
|
118
118
|
|
|
119
119
|
async def init(
|
|
120
120
|
self,
|
|
121
|
-
timeout: float =
|
|
121
|
+
timeout: float = 300,
|
|
122
122
|
auto_close: bool = False,
|
|
123
123
|
close_delay: float = 300,
|
|
124
124
|
auto_refresh: bool = True,
|
|
@@ -371,6 +371,11 @@ class GeminiClient(GemMixin):
|
|
|
371
371
|
raise UsageLimitExceeded(
|
|
372
372
|
f"Failed to generate contents. Usage limit of {model.model_name} model has exceeded. Please try switching to another model."
|
|
373
373
|
)
|
|
374
|
+
case ErrorCode.MODEL_INCONSISTENT:
|
|
375
|
+
raise ModelInvalid(
|
|
376
|
+
"Failed to generate contents. The specified model is inconsistent with the chat history. Please make sure to pass the same "
|
|
377
|
+
"`model` parameter when starting a chat session with previous metadata."
|
|
378
|
+
)
|
|
374
379
|
case ErrorCode.MODEL_HEADER_INVALID:
|
|
375
380
|
raise ModelInvalid(
|
|
376
381
|
"Failed to generate contents. The specified model is not available. Please update gemini_webapi to the latest version. "
|
gemini_webapi/constants.py
CHANGED
|
@@ -44,12 +44,12 @@ class Model(Enum):
|
|
|
44
44
|
UNSPECIFIED = ("unspecified", {}, False)
|
|
45
45
|
G_2_5_FLASH = (
|
|
46
46
|
"gemini-2.5-flash",
|
|
47
|
-
{"x-goog-ext-525001261-jspb": '[1,null,null,null,"71c2d248d3b102ff"]'},
|
|
47
|
+
{"x-goog-ext-525001261-jspb": '[1,null,null,null,"71c2d248d3b102ff",null,null,0,[4]]'},
|
|
48
48
|
False,
|
|
49
49
|
)
|
|
50
50
|
G_2_5_PRO = (
|
|
51
51
|
"gemini-2.5-pro",
|
|
52
|
-
{"x-goog-ext-525001261-jspb": '[1,null,null,null,"
|
|
52
|
+
{"x-goog-ext-525001261-jspb": '[1,null,null,null,"4af6c7f5da75d65d",null,null,0,[4]]'},
|
|
53
53
|
False,
|
|
54
54
|
)
|
|
55
55
|
G_2_0_FLASH = (
|
|
@@ -84,5 +84,6 @@ class ErrorCode(IntEnum):
|
|
|
84
84
|
"""
|
|
85
85
|
|
|
86
86
|
USAGE_LIMIT_EXCEEDED = 1037
|
|
87
|
+
MODEL_INCONSISTENT = 1050
|
|
87
88
|
MODEL_HEADER_INVALID = 1052
|
|
88
89
|
IP_TEMPORARILY_BLOCKED = 1060
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
gemini_webapi/__init__.py,sha256=7ELCiUoI10ea3daeJxnv0UwqLVKpM7rxsgOZsPMstO8,150
|
|
2
|
-
gemini_webapi/client.py,sha256=
|
|
3
|
-
gemini_webapi/constants.py,sha256=
|
|
2
|
+
gemini_webapi/client.py,sha256=WIAy0vTmjpDuJNhVFbNEl1g1RG8TcY11sXIjJ1rY_y4,27270
|
|
3
|
+
gemini_webapi/constants.py,sha256=iVT429Tfz5UVc04962jxWDL_IP8KAtf6z-4-KC2qV_A,2659
|
|
4
4
|
gemini_webapi/exceptions.py,sha256=qkXrIpr0L7LtGbq3VcTO8D1xZ50pJtt0dDRp5I3uDSg,1038
|
|
5
5
|
gemini_webapi/components/__init__.py,sha256=wolxuAJJ32-jmHOKgpsesexP7hXea1JMo5vI52wysTI,48
|
|
6
6
|
gemini_webapi/components/gem_mixin.py,sha256=WPJkYDS4yQpLMBNQ94LQo5w59RgkllWaSiHsFG1k5GU,8795
|
|
@@ -17,8 +17,8 @@ gemini_webapi/utils/load_browser_cookies.py,sha256=A5n_VsB7Rm8ck5lpy856UNJEhv30l
|
|
|
17
17
|
gemini_webapi/utils/logger.py,sha256=0VcxhVLhHBRDQutNCpapP1y_MhPoQ2ud1uIFLqxC3Z8,958
|
|
18
18
|
gemini_webapi/utils/rotate_1psidts.py,sha256=NyQ9OYPLBOcvpc8bodvEYDIVFrsYN0kdfc831lPEctM,1680
|
|
19
19
|
gemini_webapi/utils/upload_file.py,sha256=SJOMr6kryK_ClrKmqI96fqZBNFOMPsyAvFINAGAU3rk,1468
|
|
20
|
-
gemini_webapi-1.15.
|
|
21
|
-
gemini_webapi-1.15.
|
|
22
|
-
gemini_webapi-1.15.
|
|
23
|
-
gemini_webapi-1.15.
|
|
24
|
-
gemini_webapi-1.15.
|
|
20
|
+
gemini_webapi-1.15.2.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
|
|
21
|
+
gemini_webapi-1.15.2.dist-info/METADATA,sha256=JEvwvyJhfIVmhqKzxxduFD6YaZQmbNXxoNd_6zSQ5SE,61279
|
|
22
|
+
gemini_webapi-1.15.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
23
|
+
gemini_webapi-1.15.2.dist-info/top_level.txt,sha256=dtWtug_ZrmnUqCYuu8NmGzTgWglHeNzhHU_hXmqZGWE,14
|
|
24
|
+
gemini_webapi-1.15.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|