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.
Groqqle 2.1 stands out as a powerful tool for developers, researchers, content creators, and businesses:
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:
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)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
= = = = = = = = =
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:
Check if Git is installed:
Open Terminal (Finder > Applications > Utilities > Terminal) and run:
git --version
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:
Miniconda3-latest-MacOSX-x86_64.sh
Miniconda3-latest-MacOSX-arm64.sh
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:
yes
to agree to the license agreement.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
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:
http://localhost:8501
) in your web browser.Start the API Server:
python Groqqle.py api --num_results 20 --max_tokens 4096
Test the API:
http://127.0.0.1:5000
.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:
Applications
> Utilities
.Terminal
and select Duplicate
.Terminal Rosetta
.Terminal Rosetta
> Get Info
.Terminal Rosetta
and proceed with the installation steps.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:
conda install package-name
Using Virtual Environments: If you prefer venv
or virtualenv
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:
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]
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!