commit
f3e30790b1
@ -1,3 +0,0 @@
|
|||||||
---
|
|
||||||
title: Thread
|
|
||||||
---
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
---
|
|
||||||
title: Chat
|
|
||||||
---
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
---
|
|
||||||
title: File
|
|
||||||
---
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
---
|
|
||||||
title: Message
|
|
||||||
---
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
---
|
|
||||||
title: Model
|
|
||||||
---
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
---
|
|
||||||
title: Overview
|
|
||||||
position: 1
|
|
||||||
---
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
---
|
|
||||||
title: Chat
|
|
||||||
---
|
|
||||||
@ -1,3 +1,9 @@
|
|||||||
---
|
---
|
||||||
title: Extending Jan
|
title: Extending Jan
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
- Jan exports a developer SDK which lets you customize assistants, Jan app, and more.
|
||||||
|
- Jan exports a AI-friendly UI kit which lets people customize the [Jan UI](/specs/user-interface).
|
||||||
|
- Jan provisions a local AI server which lets you built external applications on other platforms.
|
||||||
|
|||||||
@ -8,10 +8,19 @@ This page is still under construction, and should be read as a scratchpad
|
|||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
- Jan is built using modules
|
## Overview
|
||||||
- Plugin architecture (on Pluggable-Electron)
|
|
||||||
|
|
||||||
Jan is comprised of system-level modules that mirror OpenAI’s, exposing similar APIs and objects
|
- Jan built a modular infrastructure on top of Electron, in order to support extensions and AI functionality.
|
||||||
|
- Jan is largely built on top of its own modules.
|
||||||
|
- Jan uses a local [file-based approach](/specs/file-based) for data persistence.
|
||||||
|
|
||||||
|
## Modules
|
||||||
|
|
||||||
|
Modules are low level, system services. It is similar to OS kernel modules, in that `modules` provide abstractions to device level, basic functionality like the filesystem, device system, databases, AI inference engines, etc.
|
||||||
|
|
||||||
|
## Pluggable Modules
|
||||||
|
|
||||||
|
Jan exports modules that mirror OpenAI’s, exposing similar APIs and objects:
|
||||||
|
|
||||||
- Modules are modular, atomic implementations of a single OpenAI-compatible endpoint
|
- Modules are modular, atomic implementations of a single OpenAI-compatible endpoint
|
||||||
- Modules can be swapped out for alternate implementations
|
- Modules can be swapped out for alternate implementations
|
||||||
@ -26,24 +35,10 @@ Jan is comprised of system-level modules that mirror OpenAI’s, exposing simila
|
|||||||
| Threads | Conversations | [/thread](/api/thread) |
|
| Threads | Conversations | [/thread](/api/thread) |
|
||||||
| Messages | Messages | [/message](/api/message) |
|
| Messages | Messages | [/message](/api/message) |
|
||||||
|
|
||||||
## Concepts
|
<!-- TODO: link npm modules -->
|
||||||
|
|
||||||
```mermaid
|
## Extensions
|
||||||
graph LR
|
|
||||||
A1[("A User Integrators")] -->|uses| B1[assistant]
|
Extensions are feature level services that include both UI and logic implementation.
|
||||||
B1 -->|persist conversational history| C1[("thread A")]
|
|
||||||
B1 -->|executes| D1[("built-in tools as module")]
|
<!-- TODO[@linh]: add all of @linh's specs here -->
|
||||||
B1 -.->|uses| E1[model]
|
|
||||||
E1 -.->|model.json| D1
|
|
||||||
D1 --> F1[retrieval]
|
|
||||||
F1 -->|belongs to| G1[("web browsing")]
|
|
||||||
G1 --> H1[Google]
|
|
||||||
G1 --> H2[Duckduckgo]
|
|
||||||
F1 -->|belongs to| I1[("API calling")]
|
|
||||||
F1 --> J1[("knowledge files")]
|
|
||||||
```
|
|
||||||
- User/ Integrator
|
|
||||||
- Assistant object
|
|
||||||
- Model object
|
|
||||||
- Thread object
|
|
||||||
- Built-in tool object
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
title: Data Structures
|
title: File-based Approach
|
||||||
---
|
---
|
||||||
|
|
||||||
:::warning
|
:::warning
|
||||||
@ -41,3 +41,26 @@ janroot/ # Jan's root folder (e.g. ~/jan)
|
|||||||
/threads # Assistants remember conversations in the future
|
/threads # Assistants remember conversations in the future
|
||||||
/models # Users can upload custom models
|
/models # Users can upload custom models
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Data Dependencies
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
graph LR
|
||||||
|
A1[("A User Integrators")] -->|uses| B1[assistant]
|
||||||
|
B1 -->|persist conversational history| C1[("thread A")]
|
||||||
|
B1 -->|executes| D1[("built-in tools as module")]
|
||||||
|
B1 -.->|uses| E1[model]
|
||||||
|
E1 -.->|model.json| D1
|
||||||
|
D1 --> F1[retrieval]
|
||||||
|
F1 -->|belongs to| G1[("web browsing")]
|
||||||
|
G1 --> H1[Google]
|
||||||
|
G1 --> H2[Duckduckgo]
|
||||||
|
F1 -->|belongs to| I1[("API calling")]
|
||||||
|
F1 --> J1[("knowledge files")]
|
||||||
|
```
|
||||||
|
|
||||||
|
- User/ Integrator
|
||||||
|
- Assistant object
|
||||||
|
- Model object
|
||||||
|
- Thread object
|
||||||
|
- Built-in tool object
|
||||||
@ -53,14 +53,14 @@ Here's a standard example `model.json` for a GGUF model.
|
|||||||
- `source_url`: https://huggingface.co/TheBloke/zephyr-7B-beta-GGUF/.
|
- `source_url`: https://huggingface.co/TheBloke/zephyr-7B-beta-GGUF/.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
"id": "zephyr-7b" // Defaults to foldername
|
"id": "zephyr-7b", // Defaults to foldername
|
||||||
"object": "model", // Defaults to "model"
|
"object": "model", // Defaults to "model"
|
||||||
"source_url": "https://huggingface.co/TheBloke/zephyr-7B-beta-GGUF/blob/main/zephyr-7b-beta.Q4_K_M.gguf",
|
"source_url": "https://huggingface.co/TheBloke/zephyr-7B-beta-GGUF/blob/main/zephyr-7b-beta.Q4_K_M.gguf",
|
||||||
"name": "Zephyr 7B" // Defaults to foldername
|
"name": "Zephyr 7B", // Defaults to foldername
|
||||||
"owned_by": "you" // Defaults to you
|
"owned_by": "you", // Defaults to "you"
|
||||||
"version": "1", // Defaults to 1
|
"version": "1", // Defaults to 1
|
||||||
"created": 1231231 // Defaults to file creation time
|
"created": 1231231, // Defaults to file creation time
|
||||||
"description": ""
|
"description": null, // Defaults to null
|
||||||
"state": enum[null, "downloading", "ready", "starting", "stopping", ...]
|
"state": enum[null, "downloading", "ready", "starting", "stopping", ...]
|
||||||
"format": "ggufv3", // Defaults to "ggufv3"
|
"format": "ggufv3", // Defaults to "ggufv3"
|
||||||
"settings": { // Models are initialized with settings
|
"settings": { // Models are initialized with settings
|
||||||
@ -68,7 +68,7 @@ Here's a standard example `model.json` for a GGUF model.
|
|||||||
"ngl": "100",
|
"ngl": "100",
|
||||||
"embedding": "true",
|
"embedding": "true",
|
||||||
"n_parallel": "4",
|
"n_parallel": "4",
|
||||||
}
|
},
|
||||||
"parameters": { // Models are called parameters
|
"parameters": { // Models are called parameters
|
||||||
"temperature": "0.7",
|
"temperature": "0.7",
|
||||||
"token_limit": "2048",
|
"token_limit": "2048",
|
||||||
@ -76,7 +76,7 @@ Here's a standard example `model.json` for a GGUF model.
|
|||||||
"top_p": "1",
|
"top_p": "1",
|
||||||
"stream": "true"
|
"stream": "true"
|
||||||
},
|
},
|
||||||
"metadata": {} // Defaults to {}
|
"metadata": {}, // Defaults to {}
|
||||||
"assets": [ // Defaults to current dir
|
"assets": [ // Defaults to current dir
|
||||||
"file://.../zephyr-7b-q4_k_m.bin",
|
"file://.../zephyr-7b-q4_k_m.bin",
|
||||||
]
|
]
|
||||||
|
|||||||
@ -52,37 +52,17 @@ const sidebars = {
|
|||||||
"docs/modules",
|
"docs/modules",
|
||||||
],
|
],
|
||||||
|
|
||||||
apiSidebar: [
|
|
||||||
"api/overview",
|
|
||||||
{
|
|
||||||
type: "category",
|
|
||||||
label: "Endpoints",
|
|
||||||
collapsible: true,
|
|
||||||
collapsed: false,
|
|
||||||
items: [
|
|
||||||
{
|
|
||||||
type: "autogenerated",
|
|
||||||
dirName: "api",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
|
|
||||||
specsSidebar: [
|
specsSidebar: [
|
||||||
{
|
{
|
||||||
type: "category",
|
type: "category",
|
||||||
label: "Overview",
|
label: "Overview",
|
||||||
collapsible: true,
|
collapsible: true,
|
||||||
collapsed: false,
|
collapsed: false,
|
||||||
items: [
|
items: ["specs/architecture", "specs/file-based", "specs/user-interface"],
|
||||||
"specs/architecture",
|
|
||||||
"specs/data-structures",
|
|
||||||
"specs/user-interface",
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "category",
|
type: "category",
|
||||||
label: "Product",
|
label: "Product Specs",
|
||||||
collapsible: true,
|
collapsible: true,
|
||||||
collapsed: false,
|
collapsed: false,
|
||||||
items: [
|
items: [
|
||||||
@ -95,7 +75,7 @@ const sidebars = {
|
|||||||
|
|
||||||
{
|
{
|
||||||
type: "category",
|
type: "category",
|
||||||
label: "Engineering",
|
label: "Engineering Specs",
|
||||||
collapsible: true,
|
collapsible: true,
|
||||||
collapsed: false,
|
collapsed: false,
|
||||||
items: [
|
items: [
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user