Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'Seed' parameter to GenerationConfig model #28

Open
taurit opened this issue Sep 14, 2024 · 0 comments
Open

Add 'Seed' parameter to GenerationConfig model #28

taurit opened this issue Sep 14, 2024 · 0 comments

Comments

@taurit
Copy link

taurit commented Sep 14, 2024

Is your feature request related to a problem? Please describe.
By default, the responses from the Generative AI APIs are non-deterministic and change with each request. This poses a problem, for instance, in automated tests, which become flaky - sometimes they pass and sometimes fail without any changes in code.

Describe the solution you'd like
I want to be able to seed the random seed value in the client. The API already supports it. It should be enough to add the Seed property to the GenerationConfig model:

 public class GenerationConfig
 {
   // ... existing properties

   [JsonProperty("seed")]
   public int Seed { get; set; }
 }

Describe alternatives you've considered
Persisting/caching responses on the application side, but it's hardly an alternative, just a workaround.

Additional context
N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant