Add Intro
This commit is contained in:
parent
55d8aba03a
commit
88ea34a7d3
3
docs/docs/guide/extensions.md
Normal file
3
docs/docs/guide/extensions.md
Normal file
@ -0,0 +1,3 @@
|
||||
---
|
||||
title: Extending Jan
|
||||
---
|
||||
@ -3,102 +3,33 @@ title: Introduction
|
||||
slug: /docs
|
||||
---
|
||||
|
||||
Jan can be used to build a variety of AI use cases, at every level of the stack:
|
||||
Jan is a ChatGPT-alternative that runs on your own computer.
|
||||
|
||||
- An OpenAI compatible API, with feature parity for `models`, `assistants`, `files` and more
|
||||
- A standard data format on top of the user's local filesystem, allowing for transparency and composability
|
||||
- Automatically package and distribute to Mac, Windows and Linux. Cloud coming soon
|
||||
- An UI kit to customize user interactions with `assistants` and more
|
||||
- A standalone inference engine for low level use cases
|
||||
Jan uses [open-source AI models](/guide/models), stores data in [open file formats](/specs/data-structures) and is is highly customizable via [extensions](/guide/extensions).
|
||||
|
||||
## Resources
|
||||
Jan ships with an [OpenAI-compatible API](/api) and a powerful [Assistant framework](/guide/assistants) to create custom AIs.
|
||||
|
||||
<!-- (@Rex: to add some quickstart tutorials) -->
|
||||
## Why Jan?
|
||||
|
||||
- Create an AI assistant
|
||||
- Run an OpenAI compatible API endpoint
|
||||
- Build a VSCode plugin with a local model
|
||||
- Build a Jan platform module
|
||||
💻 **Own your AI**<br />
|
||||
Jan runs 100% on your own machine, [predictably](https://www.reddit.com/r/LocalLLaMA/comments/17mghqr/comment/k7ksti6/?utm_source=share&utm_medium=web2x&context=3), privately and even offline. No one else can see your conversations, not even us.
|
||||
|
||||
## Key Concepts
|
||||
🏗️ **Customizability**<br />
|
||||
Jan ships with a powerful [extension framework](/guide/extensions), which allows developers to extend and customize Jan's functionality. In fact, most core modules of Jan are [built as extensions](/specs/architecture) and use the same extensions API.
|
||||
|
||||
### Modules
|
||||
🗂️ **Open File Formats**<br />
|
||||
Jan stores data in a [local folder of non-proprietary files](/specs/data-structures). You're never locked-in and can do what you want with your data with extensions, or even a different app.
|
||||
|
||||
Jan is comprised of system-level modules that mirror OpenAI’s, exposing similar APIs and objects
|
||||
🌍 **Open Source**<br />
|
||||
Both Jan and [Nitro](https://nitro.jan.ai), our lightweight inference engine, are open source via the [AGPLv3 license](https://github.com/janhq/jan/blob/main/LICENSE).
|
||||
|
||||
- Modules are modular, atomic implementations of a single OpenAI-compatible endpoint
|
||||
- Modules can be swapped out for alternate implementations
|
||||
- The default `messages` module persists messages in thread-specific `.json`
|
||||
- `messages-postgresql` uses Postgres for production-grade cloud-native environments
|
||||
<!-- ## Design Principles -->
|
||||
|
||||
| Jan Module | Description | API Docs |
|
||||
| ---------- | ------------- | ---------------------------- |
|
||||
| Chat | Inference | [/chat](/api/chat) |
|
||||
| Models | Models | [/model](/api/model) |
|
||||
| Assistants | Apps | [/assistant](/api/assistant) |
|
||||
| Threads | Conversations | [/thread](/api/thread) |
|
||||
| Messages | Messages | [/message](/api/message) |
|
||||
<!-- OpenAI meets VSCode meets Obsidian.
|
||||
|
||||
### Local Filesystem
|
||||
|
||||
Jan use the local filesystem for data persistence, similar to VSCode. This allows for composability and tinkerability.
|
||||
Minimalism: https://docusaurus.io/docs#design-principles. Not having abstractions is better than having the wrong abstractions. Assistants as code. Only including features that are absolutely necessary in the Jan API.
|
||||
|
||||
```sh=
|
||||
/janroot # Jan's root folder (e.g. ~/jan)
|
||||
/models # For raw AI models
|
||||
/threads # For conversation history
|
||||
/assistants # For AI assistants' configs, knowledge, etc.
|
||||
```
|
||||
File-based: User should be able to look at a Jan directory and intuit how it works. Transparency. Editing things via a text editor, vs. needing a database tool for SQLite.
|
||||
|
||||
```sh=
|
||||
/models
|
||||
/modelA
|
||||
model.json # Default model settings
|
||||
llama-7b-q4.gguf # Model binaries
|
||||
llama-7b-q5.gguf # Include different quantizations
|
||||
/threads
|
||||
/jan-unixstamp-salt
|
||||
model.json # Overrides assistant/model-level model settings
|
||||
thread.json # thread metadata (e.g. subject)
|
||||
messages.json # messages
|
||||
content.json # What is this?
|
||||
files/ # Future for RAG
|
||||
/assistants
|
||||
/jan
|
||||
assistant.json # Assistant configs (see below)
|
||||
|
||||
# For any custom code
|
||||
package.json # Import npm modules
|
||||
# e.g. Langchain, Llamaindex
|
||||
/src # Supporting files (needs better name)
|
||||
index.js # Entrypoint
|
||||
process.js # For electron IPC processes (needs better name)
|
||||
|
||||
# `/threads` at root level
|
||||
# `/models` at root level
|
||||
/shakespeare
|
||||
assistant.json
|
||||
model.json # Creator chooses model and settings
|
||||
package.json
|
||||
/src
|
||||
index.js
|
||||
process.js
|
||||
|
||||
/threads # Assistants remember conversations in the future
|
||||
/models # Users can upload custom models
|
||||
/finetuned-model
|
||||
```
|
||||
|
||||
### Jan: a "global" assistant
|
||||
|
||||
Jan ships with a default assistant "Jan" that lets users chat with any open source model out-of-the-box.
|
||||
|
||||
This assistant is defined in `/jan`. It is a generic assistant to illustrate power of Jan. In the future, it will support additional features e.g. multi-assistant conversations
|
||||
|
||||
- Your Assistant "Jan" lets you pick any model that is in the root /models folder
|
||||
- Right panel: pick LLM model and set model parameters
|
||||
- Jan’s threads will be at root level
|
||||
- `model.json` will reflect model chosen for that session
|
||||
- Be able to “add” other assistants in the future
|
||||
- Jan’s files will be at thread level
|
||||
- Jan is not a persistent memory assistant
|
||||
Participatory: https://www.getlago.com/blog/the-5-reasons-why-we-chose-open-source -->
|
||||
|
||||
@ -2,6 +2,9 @@
|
||||
title: Architecture
|
||||
---
|
||||
|
||||
- Jan is built using modules
|
||||
- Plugin architecture (on Pluggable-Electron)
|
||||
|
||||
## Concepts
|
||||
|
||||
```mermaid
|
||||
@ -23,19 +26,3 @@ graph LR
|
||||
- Model object
|
||||
- Thread object
|
||||
- Built-in tool object
|
||||
|
||||
## File system
|
||||
```sh
|
||||
janroot/
|
||||
assistants/
|
||||
assistant-a/
|
||||
assistant.json
|
||||
src/
|
||||
index.ts
|
||||
threads/
|
||||
thread-a/
|
||||
thread-b
|
||||
models/
|
||||
model-a/
|
||||
model.json
|
||||
```
|
||||
@ -1,3 +1,69 @@
|
||||
---
|
||||
title: Data Structures
|
||||
---
|
||||
---
|
||||
|
||||
|
||||
```sh
|
||||
janroot/
|
||||
assistants/
|
||||
assistant-a/
|
||||
assistant.json
|
||||
src/
|
||||
index.ts
|
||||
threads/
|
||||
thread-a/
|
||||
thread-b
|
||||
models/
|
||||
model-a/
|
||||
model.json
|
||||
```
|
||||
|
||||
|
||||
|
||||
Jan use the local filesystem for data persistence, similar to VSCode. This allows for composability and tinkerability.
|
||||
|
||||
```sh=
|
||||
/janroot # Jan's root folder (e.g. ~/jan)
|
||||
/models # For raw AI models
|
||||
/threads # For conversation history
|
||||
/assistants # For AI assistants' configs, knowledge, etc.
|
||||
```
|
||||
|
||||
```sh=
|
||||
/models
|
||||
/modelA
|
||||
model.json # Default model settings
|
||||
llama-7b-q4.gguf # Model binaries
|
||||
llama-7b-q5.gguf # Include different quantizations
|
||||
/threads
|
||||
/jan-unixstamp-salt
|
||||
model.json # Overrides assistant/model-level model settings
|
||||
thread.json # thread metadata (e.g. subject)
|
||||
messages.json # messages
|
||||
content.json # What is this?
|
||||
files/ # Future for RAG
|
||||
/assistants
|
||||
/jan
|
||||
assistant.json # Assistant configs (see below)
|
||||
|
||||
# For any custom code
|
||||
package.json # Import npm modules
|
||||
# e.g. Langchain, Llamaindex
|
||||
/src # Supporting files (needs better name)
|
||||
index.js # Entrypoint
|
||||
process.js # For electron IPC processes (needs better name)
|
||||
|
||||
# `/threads` at root level
|
||||
# `/models` at root level
|
||||
/shakespeare
|
||||
assistant.json
|
||||
model.json # Creator chooses model and settings
|
||||
package.json
|
||||
/src
|
||||
index.js
|
||||
process.js
|
||||
|
||||
/threads # Assistants remember conversations in the future
|
||||
/models # Users can upload custom models
|
||||
/finetuned-model
|
||||
```
|
||||
|
||||
@ -1,3 +1,17 @@
|
||||
---
|
||||
title: Jan
|
||||
---
|
||||
---
|
||||
|
||||
## Jan: a "global" assistant
|
||||
|
||||
Jan ships with a default assistant "Jan" that lets users chat with any open source model out-of-the-box.
|
||||
|
||||
This assistant is defined in `/jan`. It is a generic assistant to illustrate power of Jan. In the future, it will support additional features e.g. multi-assistant conversations
|
||||
|
||||
- Your Assistant "Jan" lets you pick any model that is in the root /models folder
|
||||
- Right panel: pick LLM model and set model parameters
|
||||
- Jan’s threads will be at root level
|
||||
- `model.json` will reflect model chosen for that session
|
||||
- Be able to “add” other assistants in the future
|
||||
- Jan’s files will be at thread level
|
||||
- Jan is not a persistent memory assistant
|
||||
|
||||
3
docs/docs/specs/settings.md
Normal file
3
docs/docs/specs/settings.md
Normal file
@ -0,0 +1,3 @@
|
||||
---
|
||||
title: .jan
|
||||
---
|
||||
@ -19,7 +19,7 @@ const sidebars = {
|
||||
label: "Introduction",
|
||||
link: { type: "doc", id: "intro/introduction" },
|
||||
collapsible: true,
|
||||
collapsed: false,
|
||||
collapsed: true,
|
||||
items: ["intro/quickstart", "intro/how-jan-works"],
|
||||
},
|
||||
{
|
||||
@ -39,6 +39,7 @@ const sidebars = {
|
||||
{
|
||||
type: "category",
|
||||
label: "Extending Jan",
|
||||
link: { type: "doc", id: "guide/extensions" },
|
||||
collapsible: true,
|
||||
collapsed: true,
|
||||
items: [
|
||||
@ -71,6 +72,7 @@ const sidebars = {
|
||||
"specs/files",
|
||||
"specs/jan",
|
||||
"specs/fine-tuning",
|
||||
"specs/settings",
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user