gemini-webapi 1.12.0__py3-none-any.whl → 1.12.1__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/types/candidate.py +13 -1
- {gemini_webapi-1.12.0.dist-info → gemini_webapi-1.12.1.dist-info}/METADATA +1 -1
- {gemini_webapi-1.12.0.dist-info → gemini_webapi-1.12.1.dist-info}/RECORD +6 -6
- {gemini_webapi-1.12.0.dist-info → gemini_webapi-1.12.1.dist-info}/WHEEL +1 -1
- {gemini_webapi-1.12.0.dist-info → gemini_webapi-1.12.1.dist-info}/licenses/LICENSE +0 -0
- {gemini_webapi-1.12.0.dist-info → gemini_webapi-1.12.1.dist-info}/top_level.txt +0 -0
gemini_webapi/types/candidate.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import html
|
|
2
|
+
from pydantic import BaseModel, field_validator
|
|
2
3
|
|
|
3
4
|
from .image import Image, WebImage, GeneratedImage
|
|
4
5
|
|
|
@@ -33,6 +34,17 @@ class Candidate(BaseModel):
|
|
|
33
34
|
def __repr__(self):
|
|
34
35
|
return f"Candidate(rcid='{self.rcid}', text='{len(self.text) <= 20 and self.text or self.text[:20] + '...'}', images={self.images})"
|
|
35
36
|
|
|
37
|
+
@field_validator("text", "thoughts")
|
|
38
|
+
@classmethod
|
|
39
|
+
def decode_html(cls, value: str) -> str:
|
|
40
|
+
"""
|
|
41
|
+
Auto unescape HTML entities in text/thoughts if any.
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
if value:
|
|
45
|
+
value = html.unescape(value)
|
|
46
|
+
return value
|
|
47
|
+
|
|
36
48
|
@property
|
|
37
49
|
def images(self) -> list[Image]:
|
|
38
50
|
return self.web_images + self.generated_images
|
|
@@ -3,7 +3,7 @@ gemini_webapi/client.py,sha256=sxzFXfi4OGn2yLuPywVLyWo40LcHNdSWL3YXivTaJ1o,25398
|
|
|
3
3
|
gemini_webapi/constants.py,sha256=xQloL6yHngniVEX5UnrsEKGTmMAieqxH7UUceefUVd8,2530
|
|
4
4
|
gemini_webapi/exceptions.py,sha256=qkXrIpr0L7LtGbq3VcTO8D1xZ50pJtt0dDRp5I3uDSg,1038
|
|
5
5
|
gemini_webapi/types/__init__.py,sha256=d2kvXnE004s2E2KDmPPLi5N-BQ59FgDSlrGrO3Wphww,163
|
|
6
|
-
gemini_webapi/types/candidate.py,sha256=
|
|
6
|
+
gemini_webapi/types/candidate.py,sha256=67BhY75toE5mVuB21cmHcTFtw332V_KmCjr3-9VTbJo,1477
|
|
7
7
|
gemini_webapi/types/image.py,sha256=4BC8hxAWJrYFwzA60CivF1di4RZkzPKjcaSPPFKmRdY,5237
|
|
8
8
|
gemini_webapi/types/modeloutput.py,sha256=h07kQOkL5r-oPLvZ59uVtO1eP4FGy5ZpzuYQzAeQdr8,1196
|
|
9
9
|
gemini_webapi/utils/__init__.py,sha256=tO6Sx-3fcPeyITZcvUmcFKBFlR5XW87xUFbNrIh3_mE,374
|
|
@@ -12,8 +12,8 @@ gemini_webapi/utils/load_browser_cookies.py,sha256=A5n_VsB7Rm8ck5lpy856UNJEhv30l
|
|
|
12
12
|
gemini_webapi/utils/logger.py,sha256=PF4ROQq7scRRrWzeYdeYiYs2S2Jqr0bgjyrPbXVOCqE,816
|
|
13
13
|
gemini_webapi/utils/rotate_1psidts.py,sha256=NyQ9OYPLBOcvpc8bodvEYDIVFrsYN0kdfc831lPEctM,1680
|
|
14
14
|
gemini_webapi/utils/upload_file.py,sha256=SJOMr6kryK_ClrKmqI96fqZBNFOMPsyAvFINAGAU3rk,1468
|
|
15
|
-
gemini_webapi-1.12.
|
|
16
|
-
gemini_webapi-1.12.
|
|
17
|
-
gemini_webapi-1.12.
|
|
18
|
-
gemini_webapi-1.12.
|
|
19
|
-
gemini_webapi-1.12.
|
|
15
|
+
gemini_webapi-1.12.1.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
|
|
16
|
+
gemini_webapi-1.12.1.dist-info/METADATA,sha256=z6FZ2c65srVp3ALyXBkqBLp2SBja-w8vNUr1yTSL83M,57167
|
|
17
|
+
gemini_webapi-1.12.1.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
|
|
18
|
+
gemini_webapi-1.12.1.dist-info/top_level.txt,sha256=dtWtug_ZrmnUqCYuu8NmGzTgWglHeNzhHU_hXmqZGWE,14
|
|
19
|
+
gemini_webapi-1.12.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|