Closed pharringtonp19 closed 8 months ago
@pharringtonp19 You can set the seed in the Vertex AI API as illustrated here for PaLM Text Generation
It doesn't look like Gemini currently supports providing a seed.
any news on that?
Yeah Google Gemini isn't a viable software engineering API if you can't fix the seed to get deterministic output.
I think it's possible now. Tested with gemini-1.5-flash
and older gemini-1.0-pro
. Both seem to respond deterministically with this parameter set:
// POST https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash:generateContent
{
"contents": [ { "parts": [ { "text": "What are the capitals of France, Spain, Poland?" } ] } ],
"generationConfig": {
"seed": 123456
}
}
API Reference here.
OpenAI has a way to set the seed. Is there a way to do this with gemini models?