fjosue4 / google-gemini-ui

Basic UI to chat with Google Gemini AI
https://google-gemini-ui.vercel.app
MIT License
49 stars 22 forks source link

Thank you for your amazing work, but instead of putting your name, is it possible to make it put a forward proxy instead? #3

Closed khfung closed 8 months ago

fjosue4 commented 8 months ago

Hey @khfung,

Sure thing, I'll keep the name since the idea is to add an initial prompt (not visible) welcoming you with your name which will also work as an API Key validator, but the name will remain optional so no worries. But I'll add a proxy option also optional, I'll try to handle this for today.

fjosue4 commented 8 months ago

@khfung What's the expected URL you would like to point with a proxy?

https://${proxy ? proxy + '.' : ''}generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent?key=${apiKey}

would it be a dot or a slash before the Google API?

khfung commented 8 months ago

Some of the country are not on the list of supporting country So, I would like to have a proxy to bypass regional restrictions Like allowing user to put an api endpoint proxy instead of the default one

fjosue4 commented 8 months ago

@khfung I added the proxy feature, as well as an example of what to add in that input. Let me know if that works.