gpt4free
gpt4free copied to clipboard
An error occurred when generating a picture
error:
raise client_error(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host gemini.google.com:443 ssl:default [Connect call failed ('142.251.43.14', 443)]
my code:
from g4f.cookies import set_cookies from g4f.client import Client
set_cookies(".bing.com", { "_U": "..." })
set_cookies(".google.com", { "__Secure-1PSID": "...", "__Secure-1PSIDCC":"...", "__Secure-1PSIDTS":"..." })
client = Client()
response = client.images.generate( model="gemini", prompt="a white siamese cat", ) image_url = response.data[0].url
The internet isn't working. Did you use a proxy? Maybe try a different provider.
Bumping this issue because it has been open for 7 days with no activity. Closing automatically in 7 days unless it becomes active again.