isafulf / inbox_cleaner

A python script to help manage a Gmail inbox by filtering out promotional emails using GPT-3 or GPT-4.
417 stars 24 forks source link

Possible Open Source models? #4

Open karanravindra opened 11 months ago

karanravindra commented 11 months ago

This would, in theory, work with non OpenAI Models as well right? It would be cool to use a model like LLAMA for it.

tempdeltavalue commented 11 months ago

you can check evaluate_email function and replace this

  completion = client.chat.completions.create(
      model="gpt-4", # switch to gpt-3.5-turbo for faster/ cheaper results (might be slightly less accurate)
      messages=[system_message, user_message],
      max_tokens=1,
      temperature=0.0,
  )

with your things, but completion should have same type and if you will run locally (сonsidering that giving away such personal data to OpenAI or anywhere else just seems strange.) maybe you need to think about batches and multiprocessing , etc ..