|
|
@ -40,12 +40,10 @@ class RemixAIDesktopPluginClient extends ElectronBasePluginClient { |
|
|
|
desktopInferencer:InferenceManager | RemoteInferencer = null |
|
|
|
desktopInferencer:InferenceManager | RemoteInferencer = null |
|
|
|
|
|
|
|
|
|
|
|
constructor (webContentsId: number, profile: Profile){ |
|
|
|
constructor (webContentsId: number, profile: Profile){ |
|
|
|
console.log("loading the remix plugin client ........................") |
|
|
|
|
|
|
|
super(webContentsId, profile) |
|
|
|
super(webContentsId, profile) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async onActivation(): Promise<void> { |
|
|
|
async onActivation(): Promise<void> { |
|
|
|
console.log("Activation", "loaded the remix plugin client application side") |
|
|
|
|
|
|
|
this.onload(() => { |
|
|
|
this.onload(() => { |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
@ -57,16 +55,13 @@ class RemixAIDesktopPluginClient extends ElectronBasePluginClient { |
|
|
|
|
|
|
|
|
|
|
|
async initializeModelBackend(local, generalModel?, completionModel?){ |
|
|
|
async initializeModelBackend(local, generalModel?, completionModel?){ |
|
|
|
if (!local){ |
|
|
|
if (!local){ |
|
|
|
console.log('RemixAI remote enpoints') |
|
|
|
|
|
|
|
this.desktopInferencer = new RemoteInferencer() |
|
|
|
this.desktopInferencer = new RemoteInferencer() |
|
|
|
} else if (generalModel || completionModel){ |
|
|
|
} else if (generalModel || completionModel){ |
|
|
|
if (!this.desktopInferencer){ |
|
|
|
if (!this.desktopInferencer){ |
|
|
|
console.log('RemixAI local enpoints') |
|
|
|
|
|
|
|
this.desktopInferencer = InferenceManager.getInstance(this.modelCacheDir) |
|
|
|
this.desktopInferencer = InferenceManager.getInstance(this.modelCacheDir) |
|
|
|
if (this.desktopInferencer instanceof InferenceManager && generalModel) await this.desktopInferencer.init(generalModel) |
|
|
|
if (this.desktopInferencer instanceof InferenceManager && generalModel) await this.desktopInferencer.init(generalModel) |
|
|
|
if (this.desktopInferencer instanceof InferenceManager && completionModel) await this.desktopInferencer.init(completionModel) |
|
|
|
if (this.desktopInferencer instanceof InferenceManager && completionModel) await this.desktopInferencer.init(completionModel) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
console.log('Inference model already initialized') |
|
|
|
|
|
|
|
return false // do not set event listener twice
|
|
|
|
return false // do not set event listener twice
|
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|