android / socialite

Apache License 2.0
385 stars 68 forks source link

Add chatbot implementation via Gemini #78

Closed lethargicpanda closed 3 months ago

lethargicpanda commented 4 months ago

Add chatbot implementation using the Gemini API

Chatbot in action Toggle button in settings
image image
donovanfm commented 4 months ago

I discussed this with @lethargicpanda and we decided that he would update this to work without an API key. Currently, the project won't build if you don't provide a Gemini API Key. In the update, if a developer doesn't provide an API key, then the smart chatbot feature will be disabled on the Settings page with a note explaining why. This change is meant to reduce developer friction, especially if someone wants to use SociaLite without the Gemini functionality.

lethargicpanda commented 3 months ago

I discussed this with @lethargicpanda and we decided that he would update this to work without an API key. Currently, the project won't build if you don't provide a Gemini API Key. In the update, if a developer doesn't provide an API key, then the smart chatbot feature will be disabled on the Settings page with a note explaining why. This change is meant to reduce developer friction, especially if someone wants to use SociaLite without the Gemini functionality.

Updated!

Jaehwa-Noh commented 3 months ago

I think it would be better to use secrets for security issues as you do before, and add this secrets.defaults.properties file rather than remove secrets. https://github.com/android/nowinandroid/blob/main/secrets.defaults.properties

donovanfm commented 3 months ago

This looks good to me to merge. There are a few follow ups that would make this feature more polished. @madebymozart for viz.

1) Move the API key out of a standard string. (I think this one is already on your radar.) 2) Improve feedback to the user when GenAI fails, including if there's no network connection on the phone. 3) Add some documentation on this feature to the README since it's a flagship Google feature.