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 google search retrieval as builtin tool #669

Conversation

Grogdunn
Copy link
Contributor

@Grogdunn Grogdunn commented May 2, 2024

Added in Vertex client configuration the possibility to use GoogleSearchRetrieval as tool as grounding feature

https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/grounding

next up (on other PR) grounding support with "retrieval" tool, more studies needed.

@Grogdunn Grogdunn force-pushed the vertex-google-search-retrieval branch from d937c4d to 70cb780 Compare May 13, 2024 09:35
@Grogdunn
Copy link
Contributor Author

aligned with main

List<Tool> tools = this.getFunctionTools(functionsForThisRequest);
tools.addAll(this.getFunctionTools(functionsForThisRequest));
}
if (((VertexAiGeminiChatOptions) prompt.getOptions()).getGoogleSearchRetrieval()) {
Copy link
Member

Choose a reason for hiding this comment

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

There is a NPE here when running the tests. I have fixed it, but it means this code wasn't really verified.

In future, please add a test to verify the behavior.

* Use Google search Grounding feature
*/
@JsonIgnore
private boolean googleSearchRetrieval = false;
Copy link
Member

Choose a reason for hiding this comment

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

also needs to be part of the fromOptions method.

@markpollack
Copy link
Member

merged in 793052c

I had a bad merge conflict somehow and ended up redoing the changes and adding a test on another branch. Sorry I forgot to add your name in the commit message. next time! ;)

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

Successfully merging this pull request may close these issues.

3 participants