habulaj commited on
Commit
ec8c2f0
·
verified ·
1 Parent(s): 81945e1

Update gemini_client/utils.py

Browse files
Files changed (1) hide show
  1. gemini_client/utils.py +1 -4
gemini_client/utils.py CHANGED
@@ -18,8 +18,7 @@ console = Console() # Instantiate console for logging
18
  async def upload_file(
19
  file: Union[bytes, str, Path],
20
  proxy: Optional[Union[str, Dict[str, str]]] = None,
21
- impersonate: str = "chrome110",
22
- timeout: int = 300 # Default to 5 minutes
23
  ) -> str:
24
  """
25
  Uploads a file to Google's Gemini server using curl_cffi and returns its identifier.
@@ -28,7 +27,6 @@ async def upload_file(
28
  file (bytes | str | Path): File data in bytes or path to the file to be uploaded.
29
  proxy (str | dict, optional): Proxy URL or dictionary for the request.
30
  impersonate (str, optional): Browser profile for curl_cffi to impersonate. Defaults to "chrome110".
31
- timeout (int, optional): Timeout in seconds. Defaults to 300.
32
 
33
  Returns:
34
  str: Identifier of the uploaded file.
@@ -105,7 +103,6 @@ async def upload_file(
105
  response = await client.post(
106
  url=Endpoint.UPLOAD.value, # Use Endpoint enum
107
  multipart=mp,
108
- timeout=timeout # Pass timeout
109
  )
110
  response.raise_for_status() # Raises HTTPError for bad responses
111
  result = response.text
 
18
  async def upload_file(
19
  file: Union[bytes, str, Path],
20
  proxy: Optional[Union[str, Dict[str, str]]] = None,
21
+ impersonate: str = "chrome110"
 
22
  ) -> str:
23
  """
24
  Uploads a file to Google's Gemini server using curl_cffi and returns its identifier.
 
27
  file (bytes | str | Path): File data in bytes or path to the file to be uploaded.
28
  proxy (str | dict, optional): Proxy URL or dictionary for the request.
29
  impersonate (str, optional): Browser profile for curl_cffi to impersonate. Defaults to "chrome110".
 
30
 
31
  Returns:
32
  str: Identifier of the uploaded file.
 
103
  response = await client.post(
104
  url=Endpoint.UPLOAD.value, # Use Endpoint enum
105
  multipart=mp,
 
106
  )
107
  response.raise_for_status() # Raises HTTPError for bad responses
108
  result = response.text