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