Tavily
For a comprehensive list of all environment variables related to Web Search (including concurrency settings, result counts, and more), please refer to the Environment Configuration documentation.
Having issues with web search? Check out the Web Search Troubleshooting Guide for solutions to common problems like proxy configuration, connection timeouts, and empty content.
Overviewβ
Integrating Tavily with HridaAI 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 HridaAI.
Tavily is a search API optimized for AI applications, delivering curated and structured results. By following these steps, you can enable HridaAI to leverage Tavily for web searches within the chat interface.
Prerequisitesβ
Ensure you have:
- HridaAI Installed: A running instance of HridaAI (local or Docker). See the Getting Started guide.
- Tavily Account: An account with an API key from Tavily.
- Admin Access: Administrative access to your HridaAI instance.
- Internet Connection: Required for Tavily API requests.
- HRIDAAI_URL Environment Variable: Configured to point to your HridaAI 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 HridaAIβ
- Log in to HridaAI 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 HridaAI.
- 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 newstriggers 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_KEYin your.envfile or Docker command:-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
hridaai.dbis writable.
For further help, visit the Zlabs Innovation or Tavily Support.
Additional Resourcesβ
- Tavily API Documentation: API reference and advanced options.
- HridaAI Features: Details on RAG and web search.
- Contributing to HridaAI: Share improvements or report issues.
By completing this tutorial, youβve enabled Tavily web search in HridaAI, enhancing your AI with real-time data. Happy searching!