A full report on my Google Summer of Code 2023 work with AOSSIE
Project: "Social Street Smart" 👨💻
With the advent of Internet, the problems faced by the people have also grown. These include abusive languages, fake news articles, click-baits, malicious websites and security attacks. Fake news has become increasingly prevalent over the last few years. Fake news's adverse effect can be seen more and more as people’s reach to social media and to the internet is been increasing.
This was the fifth year for Social Street Smart. Building upon the work done in the previous year, this year's GSoC tasks were aimed to integrate the extension with GPT-3 and implement a rating mechanism for websites to improve their experience.
Here is a quick summary of the work done over this year:
- 👷 A CI / CD Pipeline has been added with
- ✅ Unit Tests for all Newly Created APIs
- 🚀 Deployment through the GitLab Pipeline
- ✨ New Features -
- OpenAI GPT-3 API.
- Rating mechanism for website.
- 🍱 Addition of a new front-end where ever needed
- 🐛 Fixing bugs
- 🚀 Deployed the Updated Chrome Extension to the Chrome Webstore.
The integration of the OpenAI GPT-3 API provides users with a powerful tool to gain deeper insights into specific news articles they wish to verify. To access this functionality, users are required to input their unique API key in the settings page of the Chrome extension. The API key is securely stored in the local storage of the Chrome browser and serves as the input for generating prompts for the GPT-3 model.
Once the API key is set up, users can generate up to 30 prompts using their authorized API key.The generated responses are displayed to the user, offering valuable insights and analysis regarding the news article in question.
I have implemented Unit Testing into the project, that makes it much easier to validate that all the APIs are functioning properly. The tests run in GitLab's CI/CD Pipeline. Unittest was used to run the tests for the APIs.
This can be run locally in the same way as they were before GSoC 2023. The steps are as follows
# Go to the directory of the API
cd /server/Context Analysis
# Install all the requirements
pip install -r requirements.txt
# Run the server
flask run
To access the OpenAI API and use services like GPT-3, you need to obtain an API key. Here's how you can get one:
-
Open your web browser and visit the OpenAI website.
-
Sign in to your OpenAI account or create a new account if you don't have one.
-
Once logged in, navigate to the API section or developer portal.
-
Look for the option to "Generate API Key" or something similar.
-
Click on the button to generate a new API key.
-
Follow any additional prompts or instructions provided by the OpenAI platform.
-
Your API key should be generated and displayed on the screen.
Important: Treat your API key as sensitive information, similar to a password. Do not share it publicly or in unencrypted formats, as it grants access to your OpenAI account and services.
Unit testing for the APIs was done using unittest
.
To run the tests locally
cd /server/<directory_of_the_API>
pip install -r requirements.txt
python -m unittest test_file.py
The rating mechanism empowers users to provide credibility ratings for websites they visit. These ratings are collected and combined to generate a credibility score for each website. By utilizing this system, users gain valuable insights into the reliability of the sources they encounter during their browsing activities. This information enables users to make more informed decisions about the credibility of the content they consume and the websites they trust. The aggregation of user ratings helps create a collective understanding of website trustworthiness
Manifest version 2 (MV2) and Manifest version 3 (MV3) are two versions for Chrome extensions. MV3 aims to make extensions safer and more private for users. MV3 uses event-driven scripts instead of always-on background pages, saving resources. It also offers tighter control over permissions, so extensions can't easily misuse them. MV3 has separate environments for content scripts, making data more secure. Also, MV3 prefers the declarativeNetRequest API over the old 'blocking' webRequest API. This change means extensions see less of a user's data, making browsing safer.
Using Serverless, Flask APIs are deployed to AWS Lambda, ensuring scalability without the need for server maintenance.
-
Report API : (https://vsvpgs5rl3.execute-api.us-east-2.amazonaws.com/dev/{proxy+})
-
SSL API :
-
Security Header API :
-
Hate Speech API :
-
Disinformation in Images API (ImageAPI) :
-
Context Analysis API (GPT-3 API) :
-
Click Bait API :
-
Fake News API :
- Download the Extension (Chrome Webstore)
- Social Street Smart Chrome Extension Repository
- Social Street Smart API Repository
The following merge requests were made to the project during GSoC 2023.
- Could enhance extension credibility by implementing a content filtering mechanism with AI-driven credibility scoring, user feedback loop, transparency, and educational resources.