janhq / jan

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer. Multiple engine support (llama.cpp, TensorRT-LLM)
https://jan.ai/
GNU Affero General Public License v3.0
22.04k stars 1.27k forks source link

feat: Implement 'Local Mode' toggles for enhanced privacy and offline use #3518

Open imtuyethan opened 2 weeks ago

imtuyethan commented 2 weeks ago

Background

https://discord.com/channels/1107178041848909847/1280103773867606016 Users are increasingly concerned about privacy and data security when using AI assistants. Some may want to ensure their interactions remain entirely local and offline for sensitive work or personal preference. Currently, Jan doesn't have a simple way to guarantee fully offline, private operation.

Feature request

Implement a "Local Mode" toggle in Jan with two levels of privacy:

Proposed Implementation

  1. Add a new "Privacy Mode" section in Jan's settings.
  2. Implement the "Local AI" toggle:
    • When enabled, force use of only local models
    • Disable "preserve model settings" option
    • Temporarily disable all API-related extensions
  3. Implement the "Fully Offline" toggle:
    • When enabled, completely cut off Jan's internet access at the application level
    • This should override and include all "Local AI" settings
  4. Add clear UI indicators when either mode is active
  5. Implement graceful handling of features that require internet when in these modes (e.g. greying out options, informative tooltips)

Additional Notes

0xSage commented 1 week ago

Hm do any other apps do this? It's more that they show you are in offline mode. e.g. a broken cloud, when you are in offline mode.

I think introduce an "offline feature" to toggle off features will introduce complicated app / ui logic and lead to many user tickets. I think the best demonstration is just the fact that Jan can run without wifi... which it currently does.