GenerationConfig Error: 'seed' Field Missing in Protocol Message but Present in GenerationConfig Class #605
Labels
component:python sdk
Issue/PR related to Python SDK
status:awaiting user response
Awaiting a response from the author
type:question
Support-related issues
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
The text was updated successfully, but these errors were encountered: