Pair a profile's message contacts and transport modified messages that pretend to come from the initial profile
Project description
Chat Portal
This code automates a social media profile and makes it functions as a message exchange portal. It monitors incoming messages, pairs users based on their message content, and then relays each new message between paired users. The current implementation uses Instagram as a social platform and chatGPT to modify relayed messages in a way that makes it seem like they are comming from the automated profile.
Python >= 3.10 is required.
Standalone usage
Follow the below steps to set up this project:
- Clone the repo with
git clone https://github.com/kuco23/Chat-Portal.git
. - Set up your virtual environment with
python -m venv .venv
then runsource .venv/bin/activate
on Linux or.venv/Scripts/activate
on Windows. - Install dependencies with
pip install -r requirements.txt
. - Create
.env
file and fill in the fields specified in.env.template
. - Run the program with
python run.py
.
Note that you can also modify the default configuration parameters inside config.cfg
Use as package
To use this project as a package in your own project, you can install it with pip install chat-portal
.
Code architecture
The code is modular, cosisting of parts described by interfaces inside src/interface.py
. The main code module is the Portal
class with the IPortal
interface, which is initialized by a IDatabase
interfaced class and an ISocialPlatform
interfaced class.
- The
IDatabase
interface is implemented by theDatabase
class, which is a wrapper around anSqlAlchemy
orm. - The
ISocialPlatform
interface is implemented by theInstagram
class, which is a wrapper around the instagrapi library. You can implement more social media platforms inside thesrc/platforms
folder. - The
IPortal
interface is implemented by thePortal
abstract class, which is inherited by theGptPortal
class. You can implement more portals inside thesrc/portals
folder.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for chat_portal-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9af670b3a3f04581faee0c676fc92e30bc56aa37158f4e9450e12c8287b06b97 |
|
MD5 | a43b98731f6b55d615ff99543bd84b42 |
|
BLAKE2b-256 | a245ac6266657f4c45f4684652e422621b5435bb8b5a9fa0086a9a447649785a |