GoogleGPT is a comprehensive Python program and web application that combines the power of Google search, web scraping, and OpenAI's GPT-3.5-turbo model to provide users with detailed and coherent summaries for their queries. The project is divided into two components: a Python program for command-line usage and a Flask-based web application for a more user-friendly interaction.
This project is intended for educational purposes only. Any other use of it, including commercial, personal, or non-educational use, is not accepted!
-
Search and Summarize: Conducts a Google search based on user input and retrieves relevant information from the web. It then uses OpenAI's GPT-3.5-turbo to generate a coherent summary.
-
Webpage Parsing: Utilizes BeautifulSoup for parsing webpages, handling potential edge cases to ensure relevant content extraction.
-
Caching Mechanism: Implements a caching mechanism to store GPT responses, reducing redundant API calls and improving performance.
Make sure to install the required dependencies before running the Python program:
pip install requests beautifulsoup4 openai google nltk
-
Obtain API Key: Replace
'YOUR API HERE
with your OpenAI API key in theopenai_client
initialization. -
Run the Program: Execute the
main_program()
function ingoogle_gpt.py
to start the program. Enter a query when prompted and optionally provide a website URL for more specific results. -
View Results: The program will display relevant information fetched from webpages and the generated summary by GPT-3.5-turbo.
-
User-friendly Interface: The web application offers a simple and intuitive interface where users can enter queries and optional website URLs to retrieve search results.
-
Real-time GPT Summarization: The application leverages the GPT-3.5-turbo model to generate real-time summaries for user queries, enhancing the efficiency of information retrieval.
-
Result URL Display: After submitting a query, the web app displays the URL of the top search result, allowing users to directly access the source for more details.
Ensure you have the necessary dependencies installed before running the web application:
pip install Flask requests beautifulsoup4 openai google nltk
-
Open
app.py
and replace the placeholder'YOUR API KEY'
with your OpenAI API key in theopenai_client
initialization. -
Run the Web App: Execute
python app.py
in the terminal to start the Flask development server. -
Access the Web App: Open your web browser and navigate to
http://127.0.0.1:5000/
. The GoogleGPT web application should be accessible.
-
Enter Query: Input your query in the designated field.
-
Optional Website URL: Provide a specific website URL (optional) to narrow down the search results.
-
Submit: Click the submit button to trigger the summarization process.
-
View Results: The application will display the top search result URL along with the GPT-generated summaries for the provided query.
- Enhanced Frontend: Improve the frontend by adding more styling, responsiveness, and potentially incorporating AJAX for a smoother user experience.
- Deployment: Explore deployment options to make the web application accessible online, allowing users to access it from anywhere.
A simplified Python program using OpenAI's GPT-4 (GeekGPT) through the G4F library. Fetches and summarizes information from the web with minimal user interaction.
-
Search and Summarize: Utilizes GPT-4 (GeekGPT) for generating summaries based on Google search results.
-
Webpage Parsing: Extracts relevant content from webpages using BeautifulSoup.
-
Caching Mechanism: Stores GPT responses to reduce redundant API calls.
-
Run the Program: Execute
main_program()
ingoogle_gpt_free.py
. -
Enter Query: Input your query.
-
Optional Website URL: Provide a specific website URL (optional).
-
View Results: Displays relevant information fetched from webpages and GPT-4 generated summaries.
pip install requests beautifulsoup4 g4f google nltk
Feel free to contribute, report issues, or suggest improvements to make the GoogleGPT project even more user-friendly and reliable.