Skip to content

Support seed parameter for google_genai #1355

@Odessit007

Description

@Odessit007

Package (Required)

  • langchain-google-genai
  • langchain-google-vertexai
  • langchain-google-community
  • Other / not sure / general

Checked other resources

  • I added a descriptive title to this issue
  • I searched the LangChain documentation and API reference (linked above)
  • I used the GitHub search to find a similar issue and didn't find it
  • I am sure this is a feature request and not a bug report or question

Feature Description

Google Gen AI SDK exposes a seed parameter for more reproducible generations that langchain-google-genai currently doesn't support.

Since this is a relatively minor parameter I don't consider it a bug report but rather a feature request. I'm also providing a PR to add it.

Use Case

A specific use case that I encountered is when creating MVPs or educational materials where high degree of reproducibility is highly important.

Proposed Solution

Add parameter to _BaseGoogleGenerativeAI and ensure that it's used downstream.

Alternatives Considered

I'm not sure which alternatives to try.

Additional Context

As a side note, seed parameter is already supported in langchain-google-vertexai so this is not a completely new request for langchain-google package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgenaiGemini API

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions