compass-ai-travel-planning-sample-flutter icon indicating copy to clipboard operation
compass-ai-travel-planning-sample-flutter copied to clipboard

Add Gemma mode

Open emagda97 opened this issue 4 months ago • 2 comments

The earliest version of Genkit that has the Gemma models in it is 1.14.1.

Seems that their implementation doesn't support JSON mode yet.

image

So there's slight parsing that needed to be done.

Seems like other folks were having the same problem:

https://discuss.ai.google.dev/t/gemma-3-missing-features-despite-announcement/71692/14

emagda97 avatar Jul 17 '25 01:07 emagda97

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

google-cla[bot] avatar Jul 17 '25 01:07 google-cla[bot]

@nohe427 - I think we resolved it in the chat, but yes - it looks like structured output isn't currently supported for Gemma in Genkit (at the moment?).

I agree that this is not ideal and potentially a little fragile, but including the response schema in the prompt seems to be working quite well for the current version of Gemma (based on my limited testing).

Happy for this to get merged, but let's put it in its own branch (gemma ?) - could you create it and switch the PR over to it @nohe427 ? Thank you for your help! 😄

jfschmakeit avatar Jul 18 '25 03:07 jfschmakeit