posix4e / puppet

MIT License
8 stars 8 forks source link

Llm adblock #43

Closed urbit-pilled closed 1 year ago

urbit-pilled commented 1 year ago

This PR implements LLM based by using VPNservice to allow or block on the domain level. It works by intercepting packets on the android phone using a local VPN and sending a POST request to the puppet backend (/adblock_filter endpoint) with the domain name, the puppet backend then uses the LLM and responds with a JSON object

{"data":[{"allow":false,"full_response":"no the domain ads.google.com should not be allowed","error":null}],"is_generating":false,"duration":5.0021200180053710938,"average_duration":5.5438201588171499746}

The json is then parsed by the android app and then the network request is either blocked or allowed.

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.

urbit-pilled commented 1 year ago

solves #35

posix4e commented 1 year ago

@urbit-pilled can you rebase and squash the fixes into the previous commits?

urbit-pilled commented 1 year ago

rebased back to second commit on this PR, is this fine, or do you want me to squash back to the first?

posix4e commented 1 year ago

rebase/squash is already better unless breaking it into different commits makes it more clear

posix4e commented 1 year ago

@urbit-pilled it would be great if you could add a test