Skip to content
This repository was archived by the owner on Oct 14, 2024. It is now read-only.

Commit 4d0f3c2

Browse files
authored
Merge pull request #315 from janhq/0.6.0-docs
Update the Jan Data Folder page
2 parents 3462094 + 3735062 commit 4d0f3c2

File tree

1 file changed

+91
-22
lines changed

1 file changed

+91
-22
lines changed

src/pages/docs/data-folder.mdx

Lines changed: 91 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,6 @@ Jan is stored in the root `~/jan` by default.
8282
/joi-dark
8383
/joi-light
8484
/night-blue
85-
/themes
86-
/dark-dimmed
87-
/joi-dark
88-
/joi-light
89-
/night-blue
9085
/threads
9186
/jan_thread_A
9287
messages.jsonl
@@ -119,50 +114,124 @@ Stores configuration files for various AI assistants. Each assistant within this
119114

120115
Each parameter in the file is defined as follows:
121116

122-
| Parameter | Description |
123-
| --- | --- |
124-
| avatar | Path to the assistant's avatar image, allowing visual customization. |
125-
| id | Unique identifier for the assistant. |
126-
| object | Indicates that this is an assistant configuration. |
127-
| created_at | Timestamp of creation, in milliseconds since the epoch. |
128-
| name | The assistant's name. |
129-
| description | Describes the assistant’s capabilities and intended role. |
130-
| model | Defines accessible models, with "*" representing access to all models. |
131-
| instructions | Specifies queries and commands to tailor Jan's responses for improved interaction effectiveness. |
117+
| Parameter | Description | Type | Default Value |
118+
|-------------------------|-----------------------------------------------------------------------------------------------|---------|----------------------------------------------------|
119+
| id | Identifier for the assistant, defaults to "jan". | string | jan |
120+
| avatar | The avatar image for the assistant. | string | None |
121+
| object | Specifies the assistant type in OpenAI-compatible API responses. | string | None |
122+
| created_at | Timestamp indicating when the assistant was created. | string | None |
123+
| name | Display name for the assistant. | string | Jan |
124+
| description | A description of the assistant's role. | string | A default assistant that can use all downloaded models. |
125+
| model | Defines which models the assistant can use, with * indicating all models are available. | string | * |
126+
| instructions | Default instructions provided to new threads. | string | None |
127+
| file_ids | Field for referencing file IDs in OpenAI-compatible responses. | string | None |
128+
| tools | List of tools available for the assistant, with only the "retrieval" tool supported so far. | array | retrieval |
129+
| type | Specifies the type of tool, default is "retrieval". | string | retrieval |
130+
| enabled | Indicates whether the tool is enabled by default.| boolean | true |
131+
| useTimeWeightedRetriever | Controls if the time-weighted retrieval feature is enabled. | boolean | false |
132+
| settings | Configuration settings for the tool (retrieval tool in this case). | object | None |
133+
| top_k | Number of top results to return in retrieval, with a default of 2. | number | 2 |
134+
| chunk_size | Defines the size of text chunks to process for the retrieval tool. | number | 1024 |
135+
| chunk_overlap | Determines the amount of overlap between text chunks in the retrieval process. | number | 64 |
136+
| retrieval_template | Template for formatting the retrieval tool's responses to queries. | string | None |
137+
132138

133139
### `extensions/`
134140

135141
Extensions enhance Jan's functionality by adding new capabilities or integrating external services.
136142

137-
- **Extension Configuration**: The `extensions.json` in the `/extensions/` directory provides settings for all installed extensions.
138-
- **Specific Extensions**: Subdirectories like `/@janhq/extension_A/` contain `package.json` files that import necessary modules for each extension.
143+
- **@janhq**: The root folder for all extensions by the author. Extensions with organization-level names (e.g., `@janhq/monitoring-extension`) are stored here. If there is no organization, the folder holds the extension directly (e.g., `example-extension`).
144+
145+
- **extensions.json**: A file that lists all installed extensions and their metadata, taken from each extension’s `package.json`. It helps avoid scanning all extension folders, improving performance.
139146

140147
### `logs/`
141148

142-
Logs from the application are stored here. This is useful for troubleshooting and monitoring the application's behavior over time. The file `/logs/app.txt` captures general application activity.
149+
Logs from the application are stored here. This is useful for troubleshooting and monitoring the application's behavior over time. The file `/logs/app.txt` uses prefixes to indicate the source of the logs:
150+
- **[APP]**: App logs
151+
- **[SERVER]**: API server logs
152+
- **[SPECS]**: Hardware information logs
143153

144154
### `models/`
145155

146156
Stores the AI models that the assistants use to process requests and generate responses.
147157

148158
- **Model Configurations**: Each model directory, such as `/models/modelA/`, contains a `model.json` with settings specific to that model.
149159

160+
<Callout type="info">
161+
To see the full list of `model.json` parameters, please see [here](/docs/models/model-parameters).
162+
</Callout>
163+
150164
### `settings/`
151165

152166
General settings for the application are stored here, separate from individual assistant or engine configurations.
153167

154-
- **General Settings**: The `settings.json` in the `/settings/` directory holds application-wide settings.
155-
- **Extension-specific Settings**: Additional settings for extensions are stored in respective subdirectories under `/settings/@janhq/`.
168+
- **Extension-specific Settings**: Additional settings for extensions are stored in respective subdirectories under `/settings/@janhq/`. Each parameter in the file is defined as follows:
169+
170+
| Parameter | Description |
171+
|-----------------|----------------------------------------------------------------------|
172+
| `key` | The setting key. |
173+
| `title` | The setting title. |
174+
| `description` | The setting description. |
175+
| `controllerType`| The type of setting component (checkbox, input, slider, etc.). |
176+
| `controllerProps`| Properties of the controller (e.g., value, placeholder, textAlign). |
177+
| `extensionName` | The extension ID, used to map with the parent extension. |
178+
179+
- **General Settings**: The `settings.json` in the `/settings/` directory holds application settings related to the GPU acceleration. Each parameter in the file is defined as follows:
180+
181+
| Parameter | Description |
182+
|----------------------|---------------------------------------------------------------------------------------------|
183+
| `notify` | Whether notifications are enabled (true/false). |
184+
| `run_mode` | The mode the application is running in (e.g., "cpu"). |
185+
| `nvidia_driver.exist`| Whether the NVIDIA driver is present (true/false). |
186+
| `nvidia_driver.version`| The version of the installed NVIDIA driver. |
187+
| `cuda.exist` | Whether CUDA is available (true/false). |
188+
| `cuda.version` | The version of CUDA installed. |
189+
| `gpus[0].id` | The ID of the GPU (e.g., "0"). |
190+
| `gpus[0].vram` | The amount of VRAM for the GPU (in MB). |
191+
| `gpus[0].name` | The name of the GPU (e.g., "NVIDIA GeForce RTX 3050 Laptop GPU"). |
192+
| `gpus[0].arch` | The architecture of the GPU (e.g., "ampere"). |
193+
| `gpu_highest_vram` | The ID of the GPU with the highest VRAM. |
194+
| `gpus_in_use` | The list of GPU IDs currently in use (e.g., "0"). |
195+
| `is_initial` | Indicates whether it's the initial run (true/false). |
196+
| `vulkan` | Whether Vulkan support is available (true/false). |
197+
198+
156199

157200

158201
### `themes/`
159202

160-
The `themes` directory contains different visual themes for the application, allowing customization of the user interface.
203+
The `themes` directory contains different visual themes for the application, allowing customization of the user interface. Each of theme directory contains the `theme.json` that has the following parameters:
204+
205+
| Parameter | Description |
206+
|----------------------|----------------------------------------------------------------------------------|
207+
| `id` | The theme's ID. |
208+
| `displayName` | Theme display name, as seen in theme settings. |
209+
| `reduceTransparent` | Setting to reduce transparency of the window/background. |
210+
| `nativeTheme` | Indicates whether the theme depends on the OS's light/dark settings. |
211+
| `variables` | Contains all possible component configurations. |
161212

162213
### `threads/`
163214

164-
Threads history is kept in this directory. Each session or thread is stored in a way that makes it easy to review past interactions. Each thread is stored in its subdirectory, such as `/threads/jan_unixstamp/`, with files like `messages.jsonl` and `thread.json` detailing the thread settings.
215+
Threads history is kept in this directory. Each session or thread is stored in a way that makes it easy to review past interactions. Each thread is stored in its subdirectory, such as `/threads/jan_unixstamp/`, with files like `messages.jsonl` and `thread.json` that contains the following parameters:
216+
217+
- `messages.jsonl`: Array of OpenAI compatible message objects belong to the thread. For example:
218+
219+
```jsonl
220+
{"id":"01J6Y6FH8PFTHQB5PNJTHEN27C","thread_id":"jan_1725437954","type":"Thread","role":"assistant","content":
221+
[{"type":"text","text":{"value":"Hello! Is there something I can help you with or would you like to chat?","annotations":
222+
[]}}],"status":"ready","created":1725442802966,"updated":1725442802966,"object":"thread.message"}
223+
```
224+
225+
- `thread.json`: The thread's metadata that contains the following parameters:
165226

227+
| Parameter | Description |
228+
|----------------|---------------------------------------------------------------------------------------------------------------------------------------------|
229+
| `id` | Thread's ID (can be generated by the folder name). |
230+
| `object` | "thread" (OpenAI-compatible field). |
231+
| `title` | Thread's title (editable in the GUI from the Thread List on the left panel). |
232+
| `assistants` | Contains cloned assistant metadata and specialized settings for the thread. Includes all assistant settings mentioned under the Jan assistant section. |
233+
| `model` | The selected model and its settings/parameters for the thread. Changes made by users to thread settings are written here, rather than in model.json. Also contains the ID and engine of the selected model for quick querying by extensions. |
234+
| `metadata` | Additional thread data, such as `lastMessage`, which provides GUI information but does not use OpenAI-compatible fields. |
166235

167236
## Open the Data Folder
168237

0 commit comments

Comments
 (0)