Closed emersoftware closed 3 weeks ago
Hi @emersoftware.
Seed attribute is still not present in Gemini API SDK, but it is present in VertexAI SDK. The team is working to have this attribute in the Gemini API SDK as well.
We have a similar GitHub discussion. If you wanna refer please go through this #536
Yeah, we thought this was going to make it into the last release of the API, and then it didn't. Let's remove it from the SDK until it's supported.
Description of the feature request:
I'm trying to set the seed for Gemini using the 'google-generativeai' library:
However, I'm getting the following error:
"ValueError: Protocol message GenerationConfig has no \"seed\" field."
I understand that this happens because the
GenerationConfig(proto.Message)
class fromgoogle.generativeai.types
doesn't have a seed attribute. However, this attribute does exist in theGenerationConfig
class, which is accepted as a type inGenerationConfigType = Union[protos.GenerationConfig, GenerationConfigDict, GenerationConfig]
fromgoogle.generativeai.types.
I believe this is an inconsistency
What problem are you trying to solve with this feature?
I would like to set a seed value in the
GenerationConfig
when using the Gemini API to ensure reproducibility of the generated output. Since the seed attribute already exists in theGenerationConfig
class, adding support for it inprotos.GenerationConfig
would provide a more consistent experienceAny other information you'd like to share?
No response