docs: ui service
This commit is contained in:
parent
b0fb268428
commit
ade325c1ea
@ -25,5 +25,41 @@ Modular Architecture w/ Plugins:
|
||||
|
||||
What becomes easier or more difficult to do because of this change?
|
||||
|
||||
## Reference
|
||||
[Plugin APIs](./adr-003-jan-plugins.md)
|
||||
## CoreService API
|
||||
|
||||
Jan frontend components will communicate with plugin functions via Service Interfaces:
|
||||
|
||||
All of the available APIs are listed in [CoreService](../web/shared/coreService.ts)
|
||||
|
||||
- Data Service:
|
||||
|
||||
- GET_CONVERSATIONS: retrieve all of the conversations
|
||||
- CREATE_CONVERSATION: start a new conversation
|
||||
- DELETE_CONVERSATION: delete an existing conversation
|
||||
- GET_CONVERSATION_MESSAGES: retrieve a certain conversation messages
|
||||
- CREATE_MESSAGE: store a new message (both sent & received)
|
||||
- UPDATE_MESSAGE: update an existing message (streaming)
|
||||
- STORE_MODEL: store new model information (when clicking download)
|
||||
- UPDATE_FINISHED_DOWNLOAD: mark a model as downloaded
|
||||
- GET_UNFINISHED_DOWNLOAD_MODELS: retrieve all unfinished downloading model (TBD)
|
||||
- GET_FINISHED_DOWNLOAD_MODELS: retrieve all finished downloading model (TBD)
|
||||
- DELETE_DOWNLOAD_MODEL: delete a model (TBD)
|
||||
- GET_MODEL_BY_ID: retrieve model information by its ID
|
||||
|
||||
- Inference Service:
|
||||
|
||||
- INFERENCE_URL: retrieve inference endpoint served by plugin
|
||||
- INIT_MODEL: runs a model
|
||||
- STOP_MODEL: stop a running model
|
||||
|
||||
- Model Management Service: (TBD)
|
||||
|
||||
- GET_AVAILABLE_MODELS: retrieve available models (deprecate soon)
|
||||
- GET_DOWNLOADED_MODELS: (deprecated)
|
||||
- DELETE_MODEL: (deprecated)
|
||||
- DOWNLOAD_MODEL: start to download a model
|
||||
- SEARCH_MODELS: explore models with search query on HuggingFace (TBD)
|
||||
|
||||
- Monitoring service:
|
||||
- GET_RESOURCES_INFORMATION: retrieve total & used memory information
|
||||
- GET_CURRENT_LOAD_INFORMATION: retrieve CPU load information
|
||||
|
||||
@ -1,24 +1,52 @@
|
||||
# ADR {ADR-NUM}: {TITLE}
|
||||
# ADR 005: UiService
|
||||
|
||||
## Changelog
|
||||
- {date}: {changelog}
|
||||
|
||||
- 10 Oct 2023: @dan-jan @0xSage
|
||||
|
||||
## Status
|
||||
|
||||
What is the status, such as proposed, accepted, rejected, deprecated, superseded, etc.?
|
||||
|
||||
{Proposed|Accepted|Rejected}
|
||||
Proposed
|
||||
|
||||
## Context
|
||||
|
||||
What is the issue that we're seeing that is motivating this decision or change?
|
||||
Plugin devs need an API to change the Jan UI. Before we layer on more features, let's ensure good devex for feature building.
|
||||
|
||||
## Decision
|
||||
|
||||
What is the change that we're proposing and/or doing?
|
||||

|
||||
|
||||
- Side-Ribbon: Jan Apps
|
||||
|
||||
- This is a protected area, for Apps
|
||||
- Apps can define Left Panel, Center, and Right Panel
|
||||
- We will only have 1 App for now (no need to build this abstraction yet)
|
||||
- Future: Server mode (see LMStudio), Art Studio (Stable Diffusion)
|
||||
|
||||
- Side-Ribbon: Global Settings
|
||||
|
||||
- These will all open in a modal
|
||||
- Currently: Model Store, Running Models
|
||||
- Currently: User Login, Settings
|
||||
|
||||
- Main Window and Right Panel
|
||||
|
||||
- These will mainly be session-based
|
||||
|
||||
- Console: production logs
|
||||
|
||||
## UiService API
|
||||
|
||||
We need a UI API for Plugins
|
||||
|
||||
- e.g. Model Store plugin -> Registers "Global Settings" Icon, defines what will show up in the Modal
|
||||
- e.g. Model Runner plugin -> Inference Parameters
|
||||
|
||||
## Consequences
|
||||
|
||||
What becomes easier or more difficult to do because of this change?
|
||||
- Increased code complexity
|
||||
|
||||
## Reference
|
||||
|
||||
- VSCode
|
||||
- Obsidian
|
||||
|
||||
@ -1,37 +0,0 @@
|
||||
## JAN service & plugin APIs
|
||||
|
||||
Jan frontend components will communicate with plugin functions via Service Interfaces:
|
||||
|
||||
|
||||
All of the available APIs are listed in [CoreService](../../web/shared/coreService.ts)
|
||||
|
||||
- Data Service:
|
||||
- GET_CONVERSATIONS: retrieve all of the conversations
|
||||
- CREATE_CONVERSATION: start a new conversation
|
||||
- DELETE_CONVERSATION: delete an existing conversation
|
||||
- GET_CONVERSATION_MESSAGES: retrieve a certain conversation messages
|
||||
- CREATE_MESSAGE: store a new message (both sent & received)
|
||||
- UPDATE_MESSAGE: update an existing message (streaming)
|
||||
- STORE_MODEL: store new model information (when clicking download)
|
||||
- UPDATE_FINISHED_DOWNLOAD: mark a model as downloaded
|
||||
- GET_UNFINISHED_DOWNLOAD_MODELS: retrieve all unfinished downloading model (TBD)
|
||||
- GET_FINISHED_DOWNLOAD_MODELS: retrieve all finished downloading model (TBD)
|
||||
- DELETE_DOWNLOAD_MODEL: delete a model (TBD)
|
||||
- GET_MODEL_BY_ID: retrieve model information by its ID
|
||||
|
||||
- Inference Service:
|
||||
- INFERENCE_URL: retrieve inference endpoint served by plugin
|
||||
- INIT_MODEL: runs a model
|
||||
- STOP_MODEL: stop a running model
|
||||
|
||||
- Model Management Service: (TBD)
|
||||
- GET_AVAILABLE_MODELS: retrieve available models (deprecate soon)
|
||||
- GET_DOWNLOADED_MODELS: (deprecated)
|
||||
- DELETE_MODEL: (deprecated)
|
||||
- DOWNLOAD_MODEL: start to download a model
|
||||
- SEARCH_MODELS: explore models with search query on HuggingFace (TBD)
|
||||
|
||||
- Monitoring service:
|
||||
- GET_RESOURCES_INFORMATION: retrieve total & used memory information
|
||||
- GET_CURRENT_LOAD_INFORMATION: retrieve CPU load information
|
||||
|
||||
BIN
adr/images/jan-ui-framework.png
Normal file
BIN
adr/images/jan-ui-framework.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 253 KiB |
Loading…
x
Reference in New Issue
Block a user