Kotlin/Compose Multiplatform sample to demonstrate Gemini Generative AI APIs (text and image based queries). Uses Generative AI SDK.
Running on
- iOS
- Android
- Wear OS (contributed by https://github.com/yschimke)
- Desktop
- Web (Wasm)
Set your Gemini API key (gemini_api_key
) in local.properties
Related posts:
![Screenshot 2024-01-19 at 19 03 52](https://private-user-images.githubusercontent.com/6302/298171819-7435e8c4-7e1f-4851-91b5-52db90a39d46.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ1Mjc1NjAsIm5iZiI6MTcyNDUyNzI2MCwicGF0aCI6Ii82MzAyLzI5ODE3MTgxOS03NDM1ZThjNC03ZTFmLTQ4NTEtOTFiNS01MmRiOTBhMzlkNDYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgyNCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MjRUMTkyMTAwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NmYwNmY5NTllM2E4ODc5OTM3ODczM2QxZjQ2NTYzN2UyYTBmYTU0ODRhYzBiN2JlZjE4NTBkZDJhZjZjODc0NCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.lrTqOKLhqo5PMYd_GNsZX5f0_olQhN5mvHpkBx3VAy8)
![Screenshot 2024-01-14 at 17 41 26](https://private-user-images.githubusercontent.com/6302/296612728-22176939-80a1-45df-878c-c75807f85a10.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodW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