Import google.generativeai as genai

I am using this library in Python. I want this library to connect to AI through a proxy
How should I set it up? I tried this:
os.environ[‘HTTP_PROXY’] = ‘socks5://127.0.0.1:7890’
os.environ[‘HTTPS_PROXY’] = ‘socks5://127.0.0.1:7890’
But it didn’t work.

PySocks veya requests[socks] denedin mi? İstersen bu kütüphaneler ile bir deneme yapabilirsin

Hi @user1141, Could you please try by configuring the gemini by passing the transport=“rest” and then define the environmental variables. please refer to this GitHub comment for more information. Thank You.