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

Support "Grounding with your own data" in Google provider #4230

Open
sroze opened this issue Dec 30, 2024 · 1 comment
Open

Support "Grounding with your own data" in Google provider #4230

sroze opened this issue Dec 30, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@sroze
Copy link

sroze commented Dec 30, 2024

Feature Description

Following on @shaper's message in #3553 (comment), I'm creating a new issue to track the feature of being able to use Google's grounding-to-your-own data feature (https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/ground-gemini#private-ground-gemini).

Use Cases

I want to ground answers with my own data, using Google's feature for this :)

Additional context

I'd be very happy to send over a PR. Here's what I am thinking:

  1. Add the following setting in the GoogleGenerativeAISettings interface:
  /**
Optional. When enabled, the model will use your own Vertex data store to ground the response.

@see https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/ground-gemini#private-ground-gemini
   */
  useOwnDataGrounding?: {
    datastore: string;
  }
  1. In the google package prepareTool function:
    • Add a useOwnDataGrounding: { datastore: string; } | undefined argument.
    • Make it so that you can use tools and any of the grounding tools
    • Add the { retrieval: { vertexAiSearch: useOwnDataGrounding } } tool if useOwnDataGrounding is not undefined

If broadly aligned, let me know and I'll send a PR.

@tuandoan
Copy link

tuandoan commented Jan 1, 2025

+1. Or possibly an option for RetrievalTool object type?

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

No branches or pull requests

2 participants