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.03k stars 1.27k forks source link

Discussion: Jan Data Structures #3541

Closed dan-homebrew closed 1 week ago

dan-homebrew commented 1 week ago

Overview

We need to document what current Jan "data structures" are:

We also need to define what our future state looks like:

Decisions to make

Linked Issues

louis-jan commented 1 week ago

Here is the current Jan Data Folder structure:

jan 📁

louis-jan commented 1 week ago

Findings:

  1. There are unused (e.g. file_ids, avatar) or computed fields (e.g. ID, object, format, extensions.json) that could be stripped out.
  2. Some are not being used properly, e.g., instructions, and need to be fixed during migration or removed if no longer used. E.g. There is save instructions setting provided.
louis-jan commented 1 week ago

0.6.0 migrations

Important parts that can be managed by Cortex from version 0.6.0

Data folders:

Jan's application level parts that should not be moved:

Concerns:

  1. How can Jan and Cortex extensions coexist in the same folder (future feature support)? The same as settings.

    There should be different extensions.json but if we scan extensions folder instead of reading metadata file we can consider package.json engine field where it could work with Jan or Cortex.

WIP

0xSage commented 1 week ago

What's the end goal for Jan application state?

  1. User data, e.g. threads, assistants.

    • Does this move towards the SQLite DB?
    • Legacy folders like /threads and /assistants would just track legacy data
  2. Cortex level data, e.g. models, engine configs?

    • Does this also move towards a DB?
    • Or do we replicate data from ~/.cortexcpp into ~/.jan
    • Do we make users manually import cortex models or autoscan?
  3. Will Jan have separate folders for stable vs nightly, similar to cortex/

marknguyen1302 commented 1 week ago

hi @0xSage ,