jan/web/shared/coreService.ts
Louis a57dfe743b
fixes: #247 - inference plugin should check nitro service available (#313)
* fix: #247 - inference plugin should check nitro service available

* fix: #247 check service status and emit error if any

* chore: error handling

* chore: typo

* fix: open conversation does not work when model is deleted

* chore: reload plugins in development mode without exiting the process

* chore: move model file check to inference plugin

* update package-lock.json

---------

Co-authored-by: Hien To <>
2023-10-10 18:24:33 +07:00

52 lines
1.4 KiB
TypeScript

export type CoreService =
| DataService
| ModelService
| InferenceService
| ModelManagementService
| SystemMonitoringService
| PreferenceService;
export enum DataService {
GET_CONVERSATIONS = "getConversations",
CREATE_CONVERSATION = "createConversation",
DELETE_CONVERSATION = "deleteConversation",
CREATE_MESSAGE = "createMessage",
UPDATE_MESSAGE = "updateMessage",
GET_CONVERSATION_MESSAGES = "getConversationMessages",
STORE_MODEL = "storeModel",
UPDATE_FINISHED_DOWNLOAD = "updateFinishedDownloadAt",
GET_UNFINISHED_DOWNLOAD_MODELS = "getUnfinishedDownloadModels",
GET_FINISHED_DOWNLOAD_MODELS = "getFinishedDownloadModels",
DELETE_DOWNLOAD_MODEL = "deleteDownloadModel",
GET_MODEL_BY_ID = "getModelById",
}
export enum ModelService {
GET_MODELS = "getModels",
}
export enum InferenceService {
INFERENCE_URL = "inferenceUrl",
INIT_MODEL = "initModel",
STOP_MODEL = "stopModel",
}
export enum ModelManagementService {
GET_DOWNLOADED_MODELS = "getDownloadedModels",
GET_AVAILABLE_MODELS = "getAvailableModels",
DELETE_MODEL = "deleteModel",
DOWNLOAD_MODEL = "downloadModel",
SEARCH_MODELS = "searchModels",
}
export enum PreferenceService {
GET_EXPERIMENT_COMPONENT = "experimentComponent",
}
export enum SystemMonitoringService {
GET_RESOURCES_INFORMATION = "getResourcesInfo",
GET_CURRENT_LOAD_INFORMATION = "getCurrentLoad",
}