enhancement: send params mmptoj_path for optimize setting
This commit is contained in:
parent
791563e6ba
commit
bc29046c06
@ -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 path
|
||||
const 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 conditions
|
||||
const settingsToUpdate: Array<{
|
||||
|
||||
@ -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>
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user