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

google-common [Feature]: Grounding with Google Search and Vertex AI Search #7280

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

renathossain
Copy link

We’ve implemented grounding with Google Search and Vertex AI Search. To use this feature, simply call .bindTools([searchRetrievalTool]) on the model and pass in the appropriate searchRetrievalTool object, as defined in the Google Cloud documentation on grounding, depending on the type of grounding you want to use.

Here are the implementation details:

  • We’ve added the necessary googleSearchRetrieval and retrieval parameters to GeminiTool.
  • convertToGeminiTools and formatTools previously supported only one tool type (functionDeclarations), but we’ve refactored them to handle these two new tools.
  • The structuredToolsToGeminiTools function has been removed; its logic is now consolidated within formatTools.

We've also added test cases and documentation changes.

Twitter handle: @renathossain

Fixes #5073

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Nov 27, 2024
Copy link

vercel bot commented Nov 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langchainjs-docs ✅ Ready (Inspect) Visit Preview Nov 27, 2024 3:44am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
langchainjs-api-refs ⬜️ Ignored (Inspect) Nov 27, 2024 3:44am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto:improvement Medium size change to existing code to handle new use-cases size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

google-common [Feature]: Grounding with Google Search and Vertex AI Search
2 participants