local ai spam analysis with ollama + litellm + python + notmuch + prefect

Reply to this note

Please Login to reply.

Discussion

going to see if local ai can efficiently manage my inbox. Thanks for the idea nostr:npub13ql75nq8rldygpkjke47y893akh5tglqtqzs6cspancaxktthsusvfqcg7

Good idea

What local ai can do ? Can someone teach me

email clients like gmail have been trying their best at doing this perpetually

indeed, but i don’t use gmail

true, pros to mimicking those benefits but then having it done locally (non-intrusively). touché.

it takes 20 minutes all together from time stamps analyze email until it actually give your result the email is spam or not

i think use ollama , example prompt : "classify this email as 'spam' or 'ham'. return only the label . Email :{cleaned_text}.

querry ollame with phyton use your api ..is that how it works ?

it's actually very good idea , everything run on your local computer , using ollama , no data leak, no cloud .

simple pipeline, no need to use ML pipeline , the LLM do the heavy lfiting

this probably solve my problem , when gmail said : gmail has scanned your email , i felt a bit stunned ...gmail know i just making purchased sats on primal 😂

please tell me hoe it goes! I downloaded the Llama open source thing and must admit: out of the box it is very crappy.

What hardware is needed for ollama for this use?

I am only using 8gb vram and llama3.2 7b, but more is better obviously

Great, not bad, I might setup a machine to run some of these too soon.

What does the timeline flowchart show? Is it a screenshot of one of the tools you've mentioned?

yeah that's prefect. you decorate python functions and then it adds a workflow graph with generated artifacts

this is my entire script that is currently working:

https://cdn.jb55.com/s/4caaf60e2998fc5a.txt