Groqqle 2.1 is a revolutionary, free AI web search and API that instantly returns ORIGINAL content derived from source articles, websites, videos, and even foreign language sources, for ANY target market of ANY reading comprehension level! It combines the power of large language models with advanced web and news search capabilities, offering a user-friendly web interface, a robust API, and now a powerful Groqqle_web_tool for seamless integration into your projects.
Developers can instantly incorporate Groqqle into their applications, providing a powerful tool for content generation, research, and analysis across various domains and languages.
- 🔍 Advanced search capabilities powered by AI, covering web and news sources
- 📝 Instant generation of ORIGINAL content based on search results
- 🌐 Ability to process and synthesize information from various sources, including articles, websites, videos, and foreign language content
- 🎯 Customizable output for ANY target market or audience
- 📚 Adjustable reading comprehension levels to suit diverse user needs
- 🖥️ Intuitive web interface for easy searching and content generation
- 🚀 Fast and efficient results using Groq's high-speed inference
- 🔌 RESTful API for quick integration into developer projects
- 🛠️ Groqqle_web_tool for direct integration into Python projects
- 🔒 Secure handling of API keys through environment variables
- 📊 Option to view results in JSON format
- 🔄 Extensible architecture for multiple AI providers
- 🔢 Configurable number of search results
- 🔤 Customizable maximum token limit for responses
Groqqle 2.1 stands out as a powerful tool for developers, researchers, content creators, and businesses:
- Instant Original Content: Generate fresh, unique content on any topic, saving time and resources.
- Multilingual Capabilities: Process and synthesize information from foreign language sources, breaking down language barriers.
- Flexible Output: Tailor content to any target market or audience, adjusting complexity and style as needed.
- Easy Integration: Developers can quickly incorporate Groqqle into their projects using the web interface, API, or the new Groqqle_web_tool.
- Customizable Comprehension Levels: Adjust the output to match any reading level, from elementary to expert.
- Diverse Source Processing: Extract insights from various media types, including articles, websites, and videos.
Whether you're building a content aggregation platform, a research tool, or an AI-powered writing assistant, Groqqle 2.1 provides the flexibility and power you need to deliver outstanding results.
-
Clone the repository:
git clone https://github.com/jgravelle/Groqqle.git cd Groqqle
-
Set up a Conda environment:
conda create --name groqqle python=3.11 conda activate groqqle
-
Install the required packages:
pip install -r requirements.txt
-
Set up your environment variables: Create a
.env
file in the project root and add your Groq API key:GROQ_API_KEY=your_api_key_here
-
Install PocketGroq:
pip install pocketgroq
-
Start the Groqqle application using Streamlit:
streamlit run Groqqle.py
-
Open your web browser and navigate to the URL provided in the console output (typically
http://localhost:8501
). -
Enter your search query in the search bar.
-
Choose between "Web" and "News" search using the radio buttons.
-
Click "Groqqle Search" or press Enter.
-
View your results! Toggle the "JSON Results" checkbox to see the raw JSON data.
-
For both web and news results, you can click the "📝" button next to each result to get a summary of the article or webpage.
The Groqqle API allows you to programmatically access search results for both web and news. Here's how to use it:
-
Start the Groqqle application in API mode:
python Groqqle.py api --num_results 20 --max_tokens 4096
-
The API server will start running on
http://127.0.0.1:5000
. -
Send a POST request to
http://127.0.0.1:5000/search
with the following JSON body:{ "query": "your search query", "num_results": 20, "max_tokens": 4096, "search_type": "web" // Use "web" for web search or "news" for news search }
Note: The API key is managed through environment variables, so you don't need to include it in the request.
-
The API will return a JSON response with your search results in the order: title, description, URL, source, and timestamp (for news results).
Example using Python's requests
library:
import requests
url = "http://127.0.0.1:5000/search"
data = {
"query": "Groq",
"num_results": 20,
"max_tokens": 4096,
"search_type": "news" # Change to "web" for web search
}
response = requests.post(url, json=data)
results = response.json()
print(results)
Make sure you have set the GROQ_API_KEY
in your environment variables or .env
file before starting the API server.
The new Groqqle_web_tool allows you to integrate Groqqle's powerful search and content generation capabilities directly into your Python projects. Here's how to use it:
-
Import the necessary modules:
from pocketgroq import GroqProvider from groqqle_web_tool import Groqqle_web_tool
-
Initialize the GroqProvider and Groqqle_web_tool:
groq_provider = GroqProvider(api_key="your_groq_api_key_here") groqqle_tool = Groqqle_web_tool(api_key="your_groq_api_key_here")
-
Define the tool for PocketGroq:
tools = [ { "type": "function", "function": { "name": "groqqle_web_search", "description": "Perform a web search using Groqqle", "parameters": { "type": "object", "properties": { "query": { "type": "string", "description": "The search query" } }, "required": ["query"] } } } ] def groqqle_web_search(query): results = groqqle_tool.run(query) return results
-
Use the tool in your project:
user_message = "Search for the latest developments in quantum computing" system_message = "You are a helpful assistant. Use the Groqqle web search tool to find information." response = groq_provider.generate( system_message, user_message, tools=tools, tool_choice="auto" ) print(response)
This new tool allows for seamless integration of Groqqle's capabilities into your Python projects, enabling powerful search and content generation without the need for a separate API or web interface.
While Groqqle is optimized for use with Groq's lightning-fast inference capabilities, we've also included stubbed-out provider code for Anthropic. This demonstrates how easily other AI providers can be integrated into the system.
To use a different provider, you can modify the provider_name
parameter when initializing the Web_Agent
in the Groqqle.py
file.
Groqqle now supports the following configuration options:
num_results
: Number of search results to return (default: 10)max_tokens
: Maximum number of tokens for the AI model response (default: 4096)model
: The Groq model to use (default: "llama3-8b-8192")temperature
: The temperature setting for content generation (default: 0.0)comprehension_grade
: The target comprehension grade level (default: 8)
These options can be set when running the application, making API requests, or initializing the Groqqle_web_tool.
We welcome contributions to Groqqle! Here's how you can help:
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Please make sure to update tests as appropriate and adhere to the Code of Conduct.
Distributed under the MIT License. See LICENSE
file for more information. Mention J. Gravelle in your docs (README, etc.) and/or code. He's kind of full of himself.
J. Gravelle - j@gravelle.us - https://j.gravelle.us
Project Link: https://github.com/jgravelle/Groqqle
- Groq for their powerful and incredibly fast language models
- Streamlit for the amazing web app framework
- Flask for the lightweight WSGI web application framework
- Beautiful Soup for web scraping capabilities
- PocketGroq for the Groq provider integration
= = = = = = = = =
To install Groqqle 2.1 on your Mac, follow the step-by-step guide below. This installation process involves setting up a Python environment using Conda, installing necessary packages, and configuring environment variables.
Before starting, ensure you have the following installed on your Mac:
- Git: For cloning the Groqqle repository.
- Conda (Anaconda or Miniconda): For managing Python environments.
- Python 3.11: Groqqle requires Python 3.11 (Conda will handle this).
- Groq API Key: You'll need a valid API key from Groq.
Check if Git is installed:
Open Terminal (Finder > Applications > Utilities > Terminal) and run:
git --version
- If Git is installed, you'll see a version number.
- If not installed, you'll be prompted to install the Xcode Command Line Tools. Follow the on-screen instructions.
Alternatively, install Git using Homebrew:
If you prefer using Homebrew (a package manager for macOS):
-
Install Homebrew (if not already installed):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
-
Install Git via Homebrew:
brew install git
Groqqle uses Conda to manage its Python environment.
Option A: Install Miniconda (Recommended for simplicity)
-
Download Miniconda Installer:
- Go to the Miniconda installation page.
- Download the macOS installer matching your Mac's architecture:
- Intel Macs:
Miniconda3-latest-MacOSX-x86_64.sh
- Apple Silicon (M1/M2):
Miniconda3-latest-MacOSX-arm64.sh
- Intel Macs:
-
Run the Installer:
# Navigate to your Downloads folder cd ~/Downloads # Run the installer (replace with your downloaded file's name) bash Miniconda3-latest-MacOSX-x86_64.sh # For Intel Macs # or bash Miniconda3-latest-MacOSX-arm64.sh # For M1/M2 Macs
-
Follow the On-Screen Prompts:
- Press Enter to proceed.
- Type
yes
to agree to the license agreement. - Press Enter to confirm the installation location (default is recommended).
- Type
yes
to initialize Conda.
-
Restart Terminal or Source Conda:
# For Bash shell source ~/.bash_profile # For Zsh shell (default on macOS Catalina and later) source ~/.zshrc
Option B: Install Anaconda
If you prefer a full Anaconda installation (larger download), download it from the Anaconda distribution page.
-
Open Terminal and navigate to your desired directory:
cd ~ # or wherever you want to clone the repository
-
Clone the Repository:
git clone https://github.com/jgravelle/Groqqle.git
-
Navigate into the Project Directory:
cd Groqqle
-
Create a New Environment with Python 3.11:
conda create --name groqqle python=3.11
-
Activate the Environment:
conda activate groqqle
-
Note: If you receive an error about activation, initialize Conda for your shell:
conda init
Then restart Terminal or source your shell configuration:
source ~/.bash_profile # For Bash source ~/.zshrc # For Zsh
-
-
Install Dependencies from
requirements.txt
:pip install -r requirements.txt
- Troubleshooting:
- If you encounter errors, especially on M1/M2 Macs, see the Apple Silicon Compatibility section below.
- Troubleshooting:
-
Create a
.env
File in the Project Root:touch .env
-
Add Your Groq API Key:
Open the
.env
file with a text editor:open .env # Opens the file in the default text editor
Add the following line (replace
your_api_key_here
with your actual API key):GROQ_API_KEY=your_api_key_here
-
Save and Close the File.
-
Alternatively, set the environment variable in Terminal (session-specific):
export GROQ_API_KEY=your_api_key_here
-
-
Install via Pip:
pip install pocketgroq
-
Start the Application:
streamlit run Groqqle.py
-
Access the Interface:
- Open the URL provided in the Terminal output (typically
http://localhost:8501
) in your web browser.
- Open the URL provided in the Terminal output (typically
-
Start the API Server:
python Groqqle.py api --num_results 20 --max_tokens 4096
-
Test the API:
- The API will be running at
http://127.0.0.1:5000
. - You can send POST requests to this endpoint as per the documentation.
- The API will be running at
Some Python packages may have compatibility issues on Apple Silicon. Here's how to address them:
-
Install Rosetta 2 (if not already installed):
softwareupdate --install-rosetta
-
Run Terminal in Rosetta Mode:
- Locate Terminal App:
- Go to
Applications
>Utilities
.
- Go to
- Duplicate Terminal:
- Right-click on
Terminal
and selectDuplicate
. - Rename the duplicated app to
Terminal Rosetta
.
- Right-click on
- Enable Rosetta for the Duplicated Terminal:
- Right-click
Terminal Rosetta
>Get Info
. - Check the box "Open using Rosetta".
- Right-click
- Use Terminal Rosetta:
- Open
Terminal Rosetta
and proceed with the installation steps.
- Open
- Locate Terminal App:
-
Create an x86_64 Conda Environment:
CONDA_SUBDIR=osx-64 conda create --name groqqle python=3.11 conda activate groqqle
-
Proceed with Installation Steps 5 to 8.
-
Ensure Python Version: Verify that Python 3.11 is active in your environment:
python --version
-
Install Xcode Command Line Tools: Some packages require compilation:
xcode-select --install
-
Troubleshooting Package Installation: If
pip install -r requirements.txt
fails:-
Install packages individually to identify the problematic one.
-
Use Conda to install problematic packages:
conda install package-name
-
-
Using Virtual Environments: If you prefer
venv
orvirtualenv
over Conda:python3.11 -m venv groqqle_env source groqqle_env/bin/activate pip install -r requirements.txt
Refer to the Usage section in the documentation for detailed instructions on:
- Web Interface Usage
- API Usage
- Integration with Python Projects using
groqqle_web_tool
-
Streamlit Not Found:
pip install streamlit
-
Environment Activation Fails:
Ensure Conda is initialized for your shell:
conda init source ~/.bash_profile # For Bash source ~/.zshrc # For Zsh
-
Permission Errors:
Run commands with appropriate permissions or adjust file permissions:
sudo chown -R $(whoami) ~/.conda
-
Missing Dependencies:
Install missing system dependencies via Homebrew:
brew install [package-name]
- Groqqle GitHub Repository: https://github.com/jgravelle/Groqqle
- Contact: J. Gravelle - j@gravelle.us
- Issues: If you encounter problems, consider opening an issue on the GitHub repository.
By following these steps, you should have Groqqle 2.1 installed and running on your Mac. If you need further assistance, feel free to ask!