Tavily
This tutorial is a community contribution and is not supported by the Open WebUI team. It serves only as a demonstration on how to customize Open WebUI for your specific use case. Want to contribute? Check out the contributing tutorial.
Overviewβ
Integrating Tavily with Open WebUI allows your language model to perform real-time web searches, providing up-to-date and relevant information. This tutorial guides you through configuring Tavily as a web search provider in Open WebUI.
Tavily is a search API optimized for AI applications, delivering curated and structured results. By following these steps, you can enable Open WebUI to leverage Tavily for web searches within the chat interface.
Prerequisitesβ
Ensure you have:
- Open WebUI Installed: A running instance of Open WebUI (local or Docker). See the Getting Started guide.
- Tavily Account: An account with an API key from Tavily.
- Admin Access: Administrative access to your Open WebUI instance.
- Internet Connection: Required for Tavily API requests.
- WEBUI_URL Environment Variable: Configured to point to your Open WebUI instance. Refer to Environment Variable Configuration.
Step-by-Step Configurationβ
1. Obtain a Tavily API Keyβ
- Log in or sign up at Tavily.
- Go to the Dashboard or API Keys section.
- Copy or generate a new API key. Keep it secure.
Note: Check your Tavily planβs query limits at Tavily Pricing.
2. Configure Open WebUIβ
- Log in to Open WebUI with an admin account.
- Click the user icon (bottom left) and select Settings.
- Go to the Web Search tab.
- Enable Web Search by toggling it On.
- Select tavily from the Web Search Engine dropdown.
- Paste your Tavily API key into the Tavily API Key field.
- (Optional) Adjust settings like maximum search results, if available.
Tip: Verify your API key is correct to avoid configuration errors.
3. Test the Integrationβ
- Save your settings.
- Start a chat session in Open WebUI.
- Click the plus (+) button in the prompt field to enable web search.
- Enter a query (e.g.,
+latest AI news
) and confirm Tavily returns real-time results.
Example:
+latest AI news
triggers a Tavily search, embedding results in the response.
Optional Configurationsβ
- Search Parameters: Explore advanced options (e.g., domain filtering) in the Tavily API Documentation.
- Environment Variables: Set the
TAVILY_API_KEY
in your.env
file or Docker command:See Environment Variable Configuration.-e TAVILY_API_KEY="your_tavily_api_key"
- RAG Integration: Combine Tavily results with local data using Retrieval Augmented Generation. Refer to RAG Documentation.
Troubleshootingβ
- Invalid API Key: Ensure the key is copied correctly, without extra spaces.
- No Results: Confirm the web search toggle (
+
) is enabled and your internet is active. - Quota Exceeded: Check your Tavily plan at Tavily Pricing.
- Settings Not Saved: Verify admin privileges and that
webui.db
is writable.
For further help, visit the Open WebUI Community or Tavily Support.
Additional Resourcesβ
- Tavily API Documentation: API reference and advanced options.
- Open WebUI Features: Details on RAG and web search.
- Contributing to Open WebUI: Share improvements or report issues.
By completing this tutorial, youβve enabled Tavily web search in Open WebUI, enhancing your AI with real-time data. Happy searching!