Skip to content

A Streamlit web app that combines Google Search with Ollama's language model to create an AI-powered search assistant. Features a clean, customizable interface, real-time query processing, and error handling. Built using Streamlit, LangChain, and Ollama. Perfect for enhanced web searching🔍🤖

Notifications You must be signed in to change notification settings

bassemalyyy/LangChain-Google-LLM-Search-Agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Streamlit Search Agent with Ollama 🔍

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.

Features

  • 🎯 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

Prerequisites

  • Python 3.8+
  • Streamlit
  • LangChain
  • Ollama
  • Google Search API credentials

Installation

  1. Clone the repository:
git clone https://github.com/bassemalyyy/LangChain-Google-LLM-Search-Agent.git
  1. Install required packages:
pip install -r requirements.txt
  1. Set up your configuration:
    • Create a .streamlit/config.toml file with your theme preferences
    • Configure your Google Search API credentials

Configuration

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"

Usage

  1. Start the Streamlit application:
streamlit run main.py
  1. Enter your search query in the text input field
  2. Click "Submit Query" to get AI-enhanced search results

Environment Variables

The following environment variables need to be set:

  • GOOGLE_API_KEY: Your Google Search API key
  • GOOGLE_CSE_ID: Your Google Custom Search Engine ID

Acknowledgments

About

A Streamlit web app that combines Google Search with Ollama's language model to create an AI-powered search assistant. Features a clean, customizable interface, real-time query processing, and error handling. Built using Streamlit, LangChain, and Ollama. Perfect for enhanced web searching🔍🤖

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages