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

Commit

Permalink
Merge pull request #315 from janhq/0.6.0-docs
Browse files Browse the repository at this point in the history
Update the Jan Data Folder page
  • Loading branch information
urmauur authored Sep 9, 2024
2 parents 3462094 + 3735062 commit 4d0f3c2
Showing 1 changed file with 91 additions and 22 deletions.
113 changes: 91 additions & 22 deletions src/pages/docs/data-folder.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,6 @@ Jan is stored in the root `~/jan` by default.
/joi-dark
/joi-light
/night-blue
/themes
/dark-dimmed
/joi-dark
/joi-light
/night-blue
/threads
/jan_thread_A
messages.jsonl
Expand Down Expand Up @@ -119,50 +114,124 @@ Stores configuration files for various AI assistants. Each assistant within this

Each parameter in the file is defined as follows:

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


### `extensions/`

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

- **Extension Configuration**: The `extensions.json` in the `/extensions/` directory provides settings for all installed extensions.
- **Specific Extensions**: Subdirectories like `/@janhq/extension_A/` contain `package.json` files that import necessary modules for each extension.
- **@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`).

- **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.

### `logs/`

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.
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:
- **[APP]**: App logs
- **[SERVER]**: API server logs
- **[SPECS]**: Hardware information logs

### `models/`

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

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

<Callout type="info">
To see the full list of `model.json` parameters, please see [here](/docs/models/model-parameters).
</Callout>

### `settings/`

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

- **General Settings**: The `settings.json` in the `/settings/` directory holds application-wide settings.
- **Extension-specific Settings**: Additional settings for extensions are stored in respective subdirectories under `/settings/@janhq/`.
- **Extension-specific Settings**: Additional settings for extensions are stored in respective subdirectories under `/settings/@janhq/`. Each parameter in the file is defined as follows:

| Parameter | Description |
|-----------------|----------------------------------------------------------------------|
| `key` | The setting key. |
| `title` | The setting title. |
| `description` | The setting description. |
| `controllerType`| The type of setting component (checkbox, input, slider, etc.). |
| `controllerProps`| Properties of the controller (e.g., value, placeholder, textAlign). |
| `extensionName` | The extension ID, used to map with the parent extension. |

- **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:

| Parameter | Description |
|----------------------|---------------------------------------------------------------------------------------------|
| `notify` | Whether notifications are enabled (true/false). |
| `run_mode` | The mode the application is running in (e.g., "cpu"). |
| `nvidia_driver.exist`| Whether the NVIDIA driver is present (true/false). |
| `nvidia_driver.version`| The version of the installed NVIDIA driver. |
| `cuda.exist` | Whether CUDA is available (true/false). |
| `cuda.version` | The version of CUDA installed. |
| `gpus[0].id` | The ID of the GPU (e.g., "0"). |
| `gpus[0].vram` | The amount of VRAM for the GPU (in MB). |
| `gpus[0].name` | The name of the GPU (e.g., "NVIDIA GeForce RTX 3050 Laptop GPU"). |
| `gpus[0].arch` | The architecture of the GPU (e.g., "ampere"). |
| `gpu_highest_vram` | The ID of the GPU with the highest VRAM. |
| `gpus_in_use` | The list of GPU IDs currently in use (e.g., "0"). |
| `is_initial` | Indicates whether it's the initial run (true/false). |
| `vulkan` | Whether Vulkan support is available (true/false). |




### `themes/`

The `themes` directory contains different visual themes for the application, allowing customization of the user interface.
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:

| Parameter | Description |
|----------------------|----------------------------------------------------------------------------------|
| `id` | The theme's ID. |
| `displayName` | Theme display name, as seen in theme settings. |
| `reduceTransparent` | Setting to reduce transparency of the window/background. |
| `nativeTheme` | Indicates whether the theme depends on the OS's light/dark settings. |
| `variables` | Contains all possible component configurations. |

### `threads/`

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.
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:

- `messages.jsonl`: Array of OpenAI compatible message objects belong to the thread. For example:

```jsonl
{"id":"01J6Y6FH8PFTHQB5PNJTHEN27C","thread_id":"jan_1725437954","type":"Thread","role":"assistant","content":
[{"type":"text","text":{"value":"Hello! Is there something I can help you with or would you like to chat?","annotations":
[]}}],"status":"ready","created":1725442802966,"updated":1725442802966,"object":"thread.message"}
```

- `thread.json`: The thread's metadata that contains the following parameters:

| Parameter | Description |
|----------------|---------------------------------------------------------------------------------------------------------------------------------------------|
| `id` | Thread's ID (can be generated by the folder name). |
| `object` | "thread" (OpenAI-compatible field). |
| `title` | Thread's title (editable in the GUI from the Thread List on the left panel). |
| `assistants` | Contains cloned assistant metadata and specialized settings for the thread. Includes all assistant settings mentioned under the Jan assistant section. |
| `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. |
| `metadata` | Additional thread data, such as `lastMessage`, which provides GUI information but does not use OpenAI-compatible fields. |

## Open the Data Folder

Expand Down

0 comments on commit 4d0f3c2

Please sign in to comment.