Skip to content

Feature Request: Enable Web Search (Google Search) for Gemini Models #6716

@kkgs-32

Description

@kkgs-32

🥰 Feature Description

Currently, the Gemini models in NextChat operate based on their pre-trained knowledge and do not have access to real-time information. To improve the accuracy and utility of the assistant, I would like to request the integration of a Web Search (Google Search) capability for Gemini.

This feature would allow the model to:

Access up-to-date information and news.

Verify facts and provide citations for its responses.

Enhance the overall quality of answers for time-sensitive queries.

🧐 Proposed Solution

I suggest implementing this by utilizing the Google Search tool provided by the Google Gemini API (Vertex AI / Google AI Studio).

Toggle Switch: Add a setting to enable/disable "Web Search" for Gemini models in the model settings or chat interface.

Tool Calling: Leverage Gemini's native tool-calling capabilities to trigger searches when the model determines that real-time data is necessary.

Response Formatting: Ensure that search results and source links are rendered clearly within the chat UI.

📝 Additional Information

// Example: Adding Google Search tool to Gemini request const geminiRequestPayload = { contents: [ { role: 'user', parts: [{ text: "What is the latest version of Next.js?" }] } ], tools: [ { google_search: {} // This enables the built-in Google Search tool } ], };

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions