Open chrisraygill opened 3 weeks ago
@pavelgj from a design perspective, any thoughts on how we might do this?
Maybe just making them custom configuration parameters for the Vertex Gemini models rather than tools? Not sure if that would have odd downstream effects when it comes to tool handling stuff like forced function calling.
@pr-Mais any proposals from you on how this might look?
@chrisraygill I was thinking, we could turn it into a generic tool, as a start it will only support vertex ai models through this API, later we add a custom implementation for it to be used with other models.
Update: after looking deeper into genkit's tools, this could be tricky. As you mentioned, a better solution is to add it as a custom param in the generate request specific to vertexai plugin. Something like:
const GeminiConfigSchema = GenerationCommonConfigSchema.extend({
safetySettings: z.array(SafetySettingsSchema).optional(),
vertexRetriever: z
.object({
vertexAiSearch: z
.object({
datastore: z.string(),
})
.optional(),
googleSearchRetrieval: z.boolean().optional(),
disableAttribution: z.boolean().optional(),
})
.optional(),
});
Is your feature request related to a problem? Please describe.
Vertex AI offers the ability to ground responses for Gemini models using Google Search or your own data in within Vertex AI Search datas stores.
It appears to supported in the Python and Node.js SDK, but not yet in the Go SDK.
In the Vertex AI Gemini API, it works by passing in the grounding mechanism as a tool to the model, like so (Node.js):
I'm not sure how this would work with Genkit's current design for specifying tools in a generation request.