Update the Jan Platform

This commit is contained in:
hahuyhoang411 2023-11-03 14:58:30 +07:00
parent 3bd80fecf0
commit 3a5063008c
3 changed files with 48 additions and 7 deletions

View File

@ -1,9 +1,9 @@
--- ---
sidebar_position: 2 sidebar_position: 2
title: Anatomy of 👋Jan.ai title: Anatomy of 👋Jan
--- ---
This page explains all the architecture of [Jan.ai](https://jan.ai/). This page explains all the architecture of [Jan](https://Jan/).
## Synchronous architecture ## Synchronous architecture
@ -11,7 +11,7 @@ This page explains all the architecture of [Jan.ai](https://jan.ai/).
### Overview ### Overview
The architecture of the Jan.ai application is designed to provide a seamless experience for the users while also being modular and extensible. The architecture of the Jan application is designed to provide a seamless experience for the users while also being modular and extensible.
### BackEnd and FrontEnd ### BackEnd and FrontEnd
@ -56,7 +56,7 @@ Apps are basically Plugin-like. However, Apps can be built by users for their ow
> For example, users can build a `Personal Document RAG App` to chat with specific documents or articles. > For example, users can build a `Personal Document RAG App` to chat with specific documents or articles.
With **Plugins and Apps**, users can build a broader ecosystem surrounding Jan.ai. With **Plugins and Apps**, users can build a broader ecosystem surrounding Jan.
## Asynchronous architecture ## Asynchronous architecture
@ -101,7 +101,7 @@ These are modular components or extensions designed to enhance the application's
### Overview ### Overview
The architecture of the Jan.ai desktop application is structured into four primary modules: "Prompt Template," "Language Model," "Output Parser," and "Apps." Let's break down each module and understand its components. The architecture of the Jan desktop application is structured into four primary modules: "Prompt Template," "Language Model," "Output Parser," and "Apps." Let's break down each module and understand its components.
### Prompt Template ### Prompt Template
@ -141,7 +141,7 @@ To use OpenAI models, you must have an OpenAI account and secret key. You can ge
- **Custom Agents:** - **Custom Agents:**
These are user-defined or third-party models that can be integrated into the Jan.ai system for specific tasks. These are user-defined or third-party models that can be integrated into the Jan system for specific tasks.
### Output Parser ### Output Parser
@ -159,4 +159,45 @@ This represents applications or extensions that can be integrated with Jan.
- **Models:** Different Large Language Models, Large Multimodal Models, and Stable Diffusion models that the apps might use. - **Models:** Different Large Language Models, Large Multimodal Models, and Stable Diffusion models that the apps might use.
- **RAG:** Represents a "Retrieval Augmented Generation" functionality, which helps in fetching relevant data and generating responses based on it. - **RAG:** Represents a "Retrieval Augmented Generation" functionality, which helps in fetching relevant data and generating responses based on it.
## Jan Platform
![Platform](img/arch-connection.drawio.png)
### Overview
The architecture of Jan can be thought of as a layered system, comprising of the FrontEnd, Middleware, and BackEnd. Each layer has distinct components and responsibilities, ensuring a modular and scalable approach.
#### FrontEnd
The **FrontEnd** is the visible part of Jan that interacts directly with the user.
- **Controller:** This is the main control unit of the FrontEnd. It processes the user's inputs, handles UI events, and communicates with other layers to fetch or send data.
- **Apps:** This represents applications or extensions that can be integrated with Jan.
- **Execute Request** act as the initial triggers to initiate processes within the application.
#### Middleware
It's a bridge between the FrontEnd and BackEnd. It's responsible for translating requests and ensuring smooth data flow.
- **SDK:** Stands for Software Development Kit. It provides a set of tools, libraries, and guidelines for developers to build and integrate custom applications or features with Jan.
- **Core:** It's tasked with managing the connections between the FrontEnd and BackEnd. It ensures data is routed correctly and efficiently between the two.
- **Local Native:** Refers to the connectors that enable communication with local services or applications. This will use your own hardware to ddeploy models.
- **Cloud Native:** As the name suggests, these connectors are tailored for cloud-based interactions, allowing Jan to leverage cloud services or interact with other cloud-based applications.
:::info
The Middleware communicates with the BackEnd primarily through **IPC** for Local and **Http** for Cloud.
:::
#### BackEnd
It is responsible for data processing, storage, and other core functionalities.
- **Plugins:** Extendable modules that can be added to the Jan system to provide additional functionalities or integrations with third-party applications.
- **Nitro:** This is a high-performance engine or a set of services that power specific functionalities within Jan. Given its placement in the architecture, it's reasonable to assume that Nitro provides acceleration or optimization capabilities for tasks.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB