A powerful web application that combines Google Search capabilities with Ollama's LLM to provide AI-enhanced search responses. Built with Streamlit and LangChain, this application offers an intuitive interface for users to search and receive AI-processed answers.
- 🎯 Google Search integration through LangChain
- 🤖 Ollama LLM integration for intelligent response processing
- 💻 Clean, modern Streamlit interface with customizable theming
- ⚡ Real-time query processing and response generation
- 🛠️ Error handling and retry mechanisms
- ⚙️ Configurable search parameters and agent behavior
- Python 3.8+
- Streamlit
- LangChain
- Ollama
- Google Search API credentials
- Clone the repository:
git clone https://github.com/bassemalyyy/LangChain-Google-LLM-Search-Agent.git
- Install required packages:
pip install -r requirements.txt
- Set up your configuration:
- Create a
.streamlit/config.toml
file with your theme preferences - Configure your Google Search API credentials
- Create a
Create a config.toml
file in the .streamlit
directory with the following structure:
[theme]
primaryColor = "#YOUR_PRIMARY_COLOR"
backgroundColor = "#YOUR_BACKGROUND_COLOR"
secondaryBackgroundColor = "#YOUR_SECONDARY_BACKGROUND_COLOR"
- Start the Streamlit application:
streamlit run main.py
- Enter your search query in the text input field
- Click "Submit Query" to get AI-enhanced search results
The following environment variables need to be set:
GOOGLE_API_KEY
: Your Google Search API keyGOOGLE_CSE_ID
: Your Google Custom Search Engine ID