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

feat(google-common): Google Search grounding tool formatter #7448

Merged
merged 12 commits into from
Dec 31, 2024

Conversation

afirstenberg
Copy link
Contributor

Based on results provided by the Google Search Grounding tool, format the result text.

There is a BaseGoogleSearchOutputParser which is abstract and which handles a lot of the work.

Two specific output formatters are provided:

  • SimpleGoogleSearchOutputParser which is just a simple implementation
  • MarkdownGoogleSearchOutputParser which returns (mostly) markdown that matches how AI Studio tends to format search grounded results.

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

vercel bot commented Dec 30, 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 Dec 31, 2024 5:25pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
langchainjs-api-refs ⬜️ Ignored (Inspect) Dec 31, 2024 5:25pm

@dosubot dosubot bot added the auto:enhancement A large net-new component, integration, or chain. Use sparingly. The largest features label Dec 30, 2024
Copy link
Collaborator

@jacoblee93 jacoblee93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some small nits but otherwise looks nice!

Is this the commonly accepted way to show sources vs. just having the developer do it themselves?

@afirstenberg
Copy link
Contributor Author

Some small nits but otherwise looks nice!

Nits addressed.

Is this the commonly accepted way to show sources vs. just having the developer do it themselves?

The markdown one mimics what AI Studio provides, but the base class makes it pretty flexible so people can create their own formats if necessary (such as a pure HTML one).

@dosubot dosubot bot added the lgtm PRs that are ready to be merged as-is label Dec 31, 2024
@jacoblee93
Copy link
Collaborator

Thanks!

@jacoblee93 jacoblee93 merged commit e10699b into langchain-ai:main Dec 31, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto:enhancement A large net-new component, integration, or chain. Use sparingly. The largest features lgtm PRs that are ready to be merged as-is size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants