MCPcopy Create free account

hub / github.com/Koko-boya/Comfyui-GeminiWeb / functions

Functions115 in github.com/Koko-boya/Comfyui-GeminiWeb

↓ 35 callersMethodget
Retrieves a gem by its id and/or name. If both id and name are provided, returns the gem that matches both id and name. If on
gemini_webapi/types/gem.py:49
↓ 32 callersFunctionget_nested_value
Safely get a value from a nested list by a sequence of indices. Parameters ---------- data: `list` The nested list to traver
gemini_webapi/utils/parsing.py:6
↓ 12 callersMethodclose
Close the client after a certain period of inactivity, or call manually to close immediately. Parameters ----------
gemini_webapi/client.py:181
↓ 5 callersFunctionrun_async
Run an async coroutine in a synchronous context. Handles the case where there may or may not be an existing event loop. Uses a persistent
utils.py:114
↓ 4 callersMethod_batch_execute
Execute a batch of requests to Gemini API. Parameters ---------- payloads: `list[GRPC]` List of `gemini_
gemini_webapi/client.py:1249
↓ 4 callersFunctioncheck_dependencies
Check if all required dependencies are available.
gemini_webapi/utils/v20_decrypt.py:370
↓ 4 callersMethodexecute
(self, mode, prompt, auth_method, image_1=None, image_2=None, image_3=None, image_4=None, ima
nodes.py:217
↓ 4 callersMethodgenerate_content
Generates contents with prompt. Parameters ---------- prompt: `str` Prompt provided by user. fil
gemini_webapi/client.py:242
↓ 4 callersFunctionis_admin
Check if running with administrator privileges.
gemini_webapi/utils/v20_decrypt.py:64
↓ 4 callersFunctionsend_request
Send http request with provided cookies.
gemini_webapi/utils/get_access_token.py:15
↓ 3 callersMethod_download_all_images
Download ALL images and return as a batched tensor.
nodes.py:395
↓ 3 callersMethod_get_thinking
Extract thinking/thoughts from the first candidate.
nodes.py:388
↓ 3 callersFunctionextract_edge_cookies
Extract and decrypt v20 cookies from Edge. Returns a dict of {cookie_name: cookie_value}. Requires running as Administrator!
gemini_webapi/utils/v20_decrypt.py:326
↓ 3 callersFunctionget_chromium_browser_paths
Get user data paths for all Chromium-based browsers on Windows.
gemini_webapi/utils/load_browser_cookies.py:27
↓ 3 callersFunctionimpersonate_lsass
Impersonate lsass.exe to get SYSTEM privilege. Required for SYSTEM DPAPI decryption.
gemini_webapi/utils/v20_decrypt.py:73
↓ 3 callersFunctionload_cookies_from_file
Load cookies from a text file. File format (one per line): __Secure-1PSID=value __Secure-1PSIDTS=value Or simpl
gemini_webapi/utils/cookies.py:37
↓ 3 callersMethodsave
Save the image to disk. Parameters ---------- path: `str`, optional Path to save the image, by default w
gemini_webapi/types/image.py:39
↓ 2 callersMethod_filter_images
Filter images based on watermark preference. Images are tagged by client.py based on their position in the response: - Path i
nodes.py:240
↓ 2 callersFunction_get_or_create_event_loop
Get or create an event loop for the current thread. This ensures we reuse the same loop and avoid "Event loop is closed" errors.
utils.py:99
↓ 2 callersFunction_get_v10_key
Get the decryption key for v10/v11 cookies.
gemini_webapi/utils/cookies.py:121
↓ 2 callersFunction_try_v20_decryption
Attempt v20 decryption using PythonForWindows. Requires running as Administrator.
gemini_webapi/utils/cookies.py:89
↓ 2 callersFunctionextract_json_from_response
Clean and extract JSON content from a Google API streaming response. The response contains multiple JSON chunks prefixed by byte counts
gemini_webapi/utils/parsing.py:35
↓ 2 callersMethodinit
Get SNlM0e value as access token. Without this token posting will fail with 400 bad request. Parameters ---------- t
gemini_webapi/client.py:108
↓ 2 callersFunctionpil_to_tensor
Convert PIL Image to ComfyUI IMAGE tensor. Args: pil_image: PIL.Image object Returns: torch.Tensor: Image tenso
utils.py:37
↓ 2 callersMethodreset_close_task
Reset the timer for closing the client when a new request is made.
gemini_webapi/client.py:203
↓ 2 callersFunctionsave_temp_image
Save PIL image to a temporary file and return the path. Args: pil_image: PIL.Image object suffix: File extension (defaul
utils.py:76
↓ 2 callersFunctiontensor_to_pil
Convert ComfyUI IMAGE tensor to PIL Image. ComfyUI uses tensors with shape (batch, height, width, channels) with values in range [0
utils.py:13
↓ 1 callersMethod__init__
( self, geminiclient: GeminiClient, metadata: list[str | None] | None = None,
gemini_webapi/client.py:1328
↓ 1 callersMethod_chat
Chat with Gemini, optionally with multiple image inputs.
nodes.py:340
↓ 1 callersFunction_decrypt_cookie_value
Decrypt a cookie value (v10/v11).
gemini_webapi/utils/cookies.py:160
↓ 1 callersFunction_extract_cookies_v10
Extract cookies using v10/v11 decryption.
gemini_webapi/utils/cookies.py:192
↓ 1 callersMethod_get_client
Get or create a cached Gemini client.
nodes.py:113
↓ 1 callersMethod_image_to_image
Edit images using text prompts. Accepts list of image tensors.
nodes.py:291
↓ 1 callersFunction_load_browser_cookies_fallback
Fallback to browser_cookie3 for non-Windows platforms.
gemini_webapi/utils/load_browser_cookies.py:347
↓ 1 callersMethod_load_cookies_from_file
Load cookies from gemini_cookies.txt file. File format: Line 1: __Secure-1PSID value Line 2: __Secure-1PSIDTS value (
nodes.py:164
↓ 1 callersMethod_text_to_image
Generate images from text prompts.
nodes.py:261
↓ 1 callersFunctionbyte_xor
XOR two byte arrays.
gemini_webapi/utils/v20_decrypt.py:164
↓ 1 callersFunctioncheck_and_install
()
__init__.py:14
↓ 1 callersFunctiondecrypt_cookie_value
Decrypt a cookie value using the browser's encryption key.
gemini_webapi/utils/load_browser_cookies.py:121
↓ 1 callersFunctiondecrypt_v20_cookie
Decrypt a v20 cookie value using AES-256-GCM. Format: v20 (3 bytes) + IV (12 bytes) + Ciphertext + Tag (16 bytes) After decryption,
gemini_webapi/utils/v20_decrypt.py:291
↓ 1 callersFunctiondecrypt_with_cng
Decrypt using CNG (Microsoft Cryptography API) with Google Chrome's key.
gemini_webapi/utils/v20_decrypt.py:127
↓ 1 callersFunctionderive_chrome_v20_master_key
Derive Chrome's v20 master key based on flag.
gemini_webapi/utils/v20_decrypt.py:169
↓ 1 callersFunctionextract_cookies_from_db
Extract and decrypt cookies from a Chromium cookie database.
gemini_webapi/utils/load_browser_cookies.py:161
↓ 1 callersMethodfrom_dict
(cls, model_dict: dict)
gemini_webapi/constants.py:106
↓ 1 callersMethodfrom_name
(cls, name: str)
gemini_webapi/constants.py:96
↓ 1 callersFunctionget_access_token
Send a get request to gemini.google.com for each group of available cookies and return the value of "SNlM0e" as access token on the first suc
gemini_webapi/utils/get_access_token.py:34
↓ 1 callersFunctionget_chromium_profiles
Get all profile directories for a Chromium-based browser. Returns a list of paths to cookie files for all profiles.
gemini_webapi/utils/load_browser_cookies.py:52
↓ 1 callersFunctionget_decryption_key
Get the cookie decryption key for a Chromium browser on Windows.
gemini_webapi/utils/load_browser_cookies.py:80
↓ 1 callersFunctionget_edge_v20_key
Get the v20 master key for Edge browser. Edge uses simpler 2-stage DPAPI (no additional encryption). Requires running as Administrat
gemini_webapi/utils/v20_decrypt.py:197
↓ 1 callersFunctionload_browser_cookies
Load cookies from all supported browsers on Windows. Uses custom implementation that directly decrypts cookies, bypassing browser_co
gemini_webapi/utils/load_browser_cookies.py:203
↓ 1 callersFunctionparse_chrome_key_blob
Parse Chrome's key blob structure (for 3-stage decryption).
gemini_webapi/utils/v20_decrypt.py:96
↓ 1 callersFunctionparse_file_name
Parse the file name from the given path. Parameters ---------- file : `str` | `Path` Path to the file. Returns ----
gemini_webapi/utils/upload_file.py:145
↓ 1 callersFunctionrotate_1psidts
Refresh the __Secure-1PSIDTS cookie and store the refreshed cookie value in cache file. Parameters ---------- cookies : `dict`
gemini_webapi/utils/rotate_1psidts.py:11
↓ 1 callersMethodserialize
Serializes object into formatted payload ready for RPC call.
gemini_webapi/types/grpc.py:29
↓ 1 callersMethodstart_auto_refresh
Start the background task to automatically refresh cookies.
gemini_webapi/client.py:214
↓ 1 callersFunctionupload_file
Upload a file to Google's server using the browser's resumable upload protocol. Parameters ---------- file : `str` | `Path`
gemini_webapi/utils/upload_file.py:9
MethodINPUT_TYPES
(cls)
nodes.py:43
Method__init__
( self, secure_1psid: str | None = None, secure_1psidts: str | None = None, pr
gemini_webapi/client.py:82
Method__init__
(self, name, header, advanced_only)
gemini_webapi/constants.py:90
Method__init__
(self, *args, **kwargs)
gemini_webapi/components/gem_mixin.py:16
Method__iter__
Iter over the gems in the jar.
gemini_webapi/types/gem.py:42
Method__repr__
(self)
gemini_webapi/types/grpc.py:26
Method__repr__
(self)
gemini_webapi/types/candidate.py:34
Method__repr__
(self)
gemini_webapi/types/modeloutput.py:28
Method__setattr__
(self, name: str, value: Any)
gemini_webapi/client.py:1358
Method__str__
(self)
gemini_webapi/client.py:1353
Method__str__
(self)
gemini_webapi/types/image.py:33
Method__str__
(self)
gemini_webapi/types/candidate.py:31
Method__str__
(self)
gemini_webapi/types/gem.py:29
Method__str__
(self)
gemini_webapi/types/modeloutput.py:25
Methodbuild_payload
Build an array of given size with values at specific positions.
gemini_webapi/client.py:361
Functionbytes_to_tensor
Convert raw image bytes to ComfyUI IMAGE tensor. Args: image_bytes: bytes of an image file Returns: torch.Tenso
utils.py:62
Functioncheck_auth_status
Check authentication status and available methods. Returns a status dict useful for debugging.
gemini_webapi/utils/cookies.py:336
Methodchoose_candidate
Choose a candidate from the last `ModelOutput` to control the ongoing conversation flow. Parameters ---------- index
gemini_webapi/client.py:1413
Methodcid
(self)
gemini_webapi/client.py:1456
Methodcreate_gem
Create a new custom gem. Parameters ---------- name: `str` Name of the custom gem. prompt: `str`
gemini_webapi/components/gem_mixin.py:135
Methoddecode_html
Auto unescape HTML entities in text/thoughts if any.
gemini_webapi/types/candidate.py:39
Functiondecorator
(func)
gemini_webapi/utils/decorators.py:18
Methoddelete_gem
Delete a custom gem. Parameters ---------- gem: `Gem | str` Gem to delete, can be either a `gemini_webap
gemini_webapi/components/gem_mixin.py:270
Methoddo_chat
()
nodes.py:355
Methoddo_download
(client: AsyncClient)
gemini_webapi/types/image.py:87
Methoddo_edit
()
nodes.py:305
Methoddo_generate
()
nodes.py:265
Methoddownload_all
()
nodes.py:400
Methodfetch_gems
Get a list of available gems from gemini, including system predefined gems and user-created custom gems. Note that network request w
gemini_webapi/components/gem_mixin.py:45
Methodfilter
Returns a new `GemJar` containing gems that match the given filters. Parameters ---------- predefined: `bool`, optio
gemini_webapi/types/gem.py:103
Methodfind_image_blobs
Recursively find all image blob arrays in a nested structure. Image blob pattern: [null/any, 1, "file
gemini_webapi/client.py:782
Methodfind_image_container
Find the image data container, using hunt-and-peck if the expected index is wrong. Returns the contai
gemini_webapi/client.py:856
Methodgems
Returns a `GemJar` object containing cached gems. Only available after calling `GeminiClient.fetch_gems()`. Returns
gemini_webapi/components/gem_mixin.py:21
Functionget_chrome_v20_key
Get the v20 master key for Chrome browser. Chrome uses 3-stage decryption with additional AES-GCM/ChaCha20. Requires running as Admi
gemini_webapi/utils/v20_decrypt.py:244
Methodget_image_status
Extract image status from container, checking [6] then [7].
gemini_webapi/client.py:1012
Methodimages
(self)
gemini_webapi/types/candidate.py:49
Methodimages
(self)
gemini_webapi/types/modeloutput.py:40
Methodinit_client
()
nodes.py:137
Functionload_gemini_cookies
Load Gemini authentication cookies. Parameters ---------- method : str - "auto" : Try all methods (v20 if admin, v10, co
gemini_webapi/utils/cookies.py:246
Methodmetadata
(self)
gemini_webapi/client.py:1446
Methodnormalize_image_container
Convert object-based image container to list format. Some models (gemini-3-pro) return dict with stri
gemini_webapi/client.py:752
Methodparse_to_clean_json
Parse Google XSSI-protected response into clean JSON.
gemini_webapi/client.py:519
Methodrcid
(self)
gemini_webapi/client.py:1472
Methodrcid
(self)
gemini_webapi/types/modeloutput.py:44
next →1–100 of 115, ranked by callers