This is not an officially supported Google product
This requires code generation from : dart run build_runner build
Steps to generate the SDK:
- Ensure you're on dart version
^3.2.3
- Run
cd gem-community-edition
- Run
dart pub get
- Run
dart run build_runner build
To run the code sample:
- Generate the SDK as shown above
- Insert a valid Gemini API key into
example/API_KEY
- Run
dart run example/gemini_community_edition_example.dart
To run the image analyzer sampple:
- Generate the SDK as shown above
- Insert a valid Gemini API key into
example/API_KEY
- Run
dart run example/analyze_image.dart "What is in this picture?" example/xmas_tree.jpeg "Is it real?" "Is it good?"
You can post multiple string prompts and files to the invocation and it will just pass them to Gemini, and print the results.