This extension enhances SillyTavern by giving your AI characters the ability to access real-time information from the internet via Google Search. It operates in two powerful modes: Automatic and Manual (Forced Search).
This repository contains two parts that must be installed correctly: a backend plugin to handle search requests and a frontend extension for the user interface and logic.
- Real-time Information: Allows AI to answer questions about current events, facts, and data beyond its training knowledge.
- Automatic Mode: The AI intelligently decides when it needs to perform a web search to answer a user's query.
- Manual (Forced) Mode: Forces the AI to perform a web search before every response, ensuring all its answers are based on the latest information.
- Highly Customizable: You can configure:
- The regex command the AI uses to trigger a search.
- The number of search results to use.
- The prompt templates used to present search results to the AI.
- Built-in Tester: A UI tool to test your trigger regex directly in the settings panel.
You must install both the backend and frontend parts for the extension to work.
The backend plugin is a single file that handles the connection to the Google Search API.
- Navigate to your SillyTavern
pluginsdirectory. - Create a new folder named
google-search. - Copy the file from
backend-plugin/index.jsin this repository into the newgoogle-searchfolder. - Ensure you have server plugins enabled in your
config.yaml:enableServerPlugins: true.
The frontend extension provides the user interface in the "Extensions" panel and contains all the logic for interacting with the AI.
- Navigate to your
public/scripts/extensionsdirectory inside your SillyTavern installation. - Create a new folder named
google-search-tool. - Copy all the files from the
frontend-extensiondirectory of this repository (manifest.json,settings.html,script.js,style.css) into the newgoogle-search-toolfolder.
After installing both parts, restart your SillyTavern server and hard-refresh the web UI (Ctrl+F5).
- Go to the "Extensions" panel (the puzzle piece icon) in SillyTavern.
- Find Web Search (via Google) in the settings list.
- Configure the modes and templates to your liking:
- Automatic Mode: For this to work, you must instruct your AI (e.g., in its system prompt or character card) that it can use the search command. For example, add to your system prompt: "When you need information from the internet, you can search by outputting
(search:"your query")." - Manual Mode: Simply enable this toggle. The AI will be automatically prompted to search before every reply.
- Automatic Mode: For this to work, you must instruct your AI (e.g., in its system prompt or character card) that it can use the search command. For example, add to your system prompt: "When you need information from the internet, you can search by outputting
This extension was developed with the assistance of the Gemini AI model.