Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.
enhancement: send params mmptoj_path for optimize setting
Faisal Amirbc29046c06e7
diff --git a/web-app/src/containers/ModelSetting.tsx b/web-app/src/containers/ModelSetting.tsxindex fcb61048d..bcbd3dbd8 100644--- a/web-app/src/containers/ModelSetting.tsx+++ b/web-app/src/containers/ModelSetting.tsx@@ -46,15 +46,20 @@ export function ModelSetting({}setIsPlanning(true)try {- // Read the model config to get the actual model path+ // Read the model config to get the actual model path and mmproj pathconst modelConfig = await serviceHub.app().readYaml<{model_path: string+ mmproj_path?: string}>(`llamacpp/models/${model.id}/model.yml`)if (modelConfig && modelConfig.model_path) {const result = await serviceHub.models()- .planModelLoad(modelConfig.model_path)+ .planModelLoad(+ modelConfig.model_path,+ undefined,+ modelConfig.mmproj_path+ )// Apply the recommended settings to the model sequentially to avoid race conditionsconst settingsToUpdate: Array<{diff --git a/web-app/src/services/models/types.ts b/web-app/src/services/models/types.tsindex 920cbfe81..d889e41ba 100644--- a/web-app/src/services/models/types.ts+++ b/web-app/src/services/models/types.ts@@ -136,5 +136,9 @@ export interface ModelsService {ctxSize?: number): Promise<'RED' | 'YELLOW' | 'GREEN' | 'GREY'>validateGgufFile(filePath: string): Promise<ModelValidationResult>- planModelLoad(modelPath: string, requestedCtx?: number): Promise<ModelPlan>+ planModelLoad(+ modelPath: string,+ requestedCtx?: number,+ mmprojPath?: string+ ): Promise<ModelPlan>}