Allow the use of an LLM to determine #592
Open
CosineP wants to merge 1 commit intoproginosko:masterfrom
Open
Conversation
|
Really cool feature! Though I'd personally want to use a local or self-hosted model instead of sending my entire browsing history to OpenAI. Here's some project I quickly found that facilitates in-browser LLM inference: https://webllm.mlc.ai/, but not sure if it's the best solution. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR allows you to query an LLM (currently hardcoded as OpenAI's gpt-4.1-nano, which is super cheap) to determine behavior where a blocklist doesn't explicitly allow or disallow a URL. This allows easily specifying rules such as
"Anything NOT related to my work as a researcher in CS" should be blocked for 60 seconds.More development would be useful here, such as supporting automatically giving in-context examples, overriding the LLMs decisions, and changing the model and API used. But this PR is mostly just gauging interest, partly because I don't want to bother with signing nonsense to get this running on my Firefox.