A chatbot that performs web searches and retrieves information based on user queries.
- Generates precise search queries from user questions.
- Retrieves top web search results.
- Extracts and displays relevant information from chosen web pages.
- Supports streaming responses for real-time feedback.
- Python 3.x
ollama
libraryrequests
library
1. Clone the repository:
git clone https://github.com/garyku0/ollama-web-search.git
cd ollama-web-search
2. Install the required libraries:
pip install ollama requests
Run the chatbot:
python main.py
Enter your query when prompted, and the chatbot will provide web search results and retrieve information from the selected result.
Before running the chatbot, set your SearxNG instance URL in the BrowseWeb
function:
EngineURL = "https://YOUR-SEARXNG-INSTANCE/search?q={query}&format=json".format(query=query)
You can find a list of SearxNG instances here or search for "SearxNG instances" online.
Feel free to open issues or submit pull requests for any enhancements or bug fixes.
This project is licensed under the MIT License.