How to use Google Generatve AI using Palm API in Android App using Jetpack Compose.
- Currently generative ai sdk is not published to maven central, So we will have to use it locally
- Download generative ai sdk from here
- Extract the files:
tar -xzvf google-cloud-ai-generativelanguage-v1beta2-java.tar.gz cd google-cloud-ai-generativelanguage-v1beta2-java
- install them in mavenLocal:
./gradlew publishToMavenLocal
- Get An API KEY for PALM API from here
- Set the env variable with key: PALM_API_KEY and set that PALM API KEY as value for this env variable
- And its done, you can build now and run the app