diff --git a/apps/remix-ide/src/app/plugins/remixAIPlugin.tsx b/apps/remix-ide/src/app/plugins/remixAIPlugin.tsx index aad61e2a0f..5461e6d93f 100644 --- a/apps/remix-ide/src/app/plugins/remixAIPlugin.tsx +++ b/apps/remix-ide/src/app/plugins/remixAIPlugin.tsx @@ -114,7 +114,7 @@ export class RemixAIPlugin extends ViewPlugin { async code_completion(prompt: string, promptAfter: string): Promise { if (this.isOnDesktop) { - return await this.call(this.remixDesktopPluginName, 'code_completion', prompt) + return await this.call(this.remixDesktopPluginName, 'code_completion', prompt, promptAfter) } else { return await this.remoteInferencer.code_completion(prompt, promptAfter) } diff --git a/apps/remixdesktop/src/lib/InferenceServerManager.ts b/apps/remixdesktop/src/lib/InferenceServerManager.ts index 741295cba8..fb180a26d6 100644 --- a/apps/remixdesktop/src/lib/InferenceServerManager.ts +++ b/apps/remixdesktop/src/lib/InferenceServerManager.ts @@ -453,14 +453,14 @@ export class InferenceManager implements ICompletions { } } - async code_completion(context: any, params:IParams=CompletionParams): Promise { + async code_completion(prompt, promptAfter, params:IParams=CompletionParams): Promise { if (!this.isReady) { console.log('model not ready yet') return } // as of now no prompt required - const payload = { context_code: context, ...params } + const payload = { prompt, 'context':promptAfter, ...params } return this._makeInferenceRequest('code_completion', payload, AIRequestType.COMPLETION) } diff --git a/apps/remixdesktop/src/plugins/remixAIDektop.ts b/apps/remixdesktop/src/plugins/remixAIDektop.ts index 30e58a8e4e..8497874cfe 100644 --- a/apps/remixdesktop/src/plugins/remixAIDektop.ts +++ b/apps/remixdesktop/src/plugins/remixAIDektop.ts @@ -81,9 +81,9 @@ class RemixAIDesktopPluginClient extends ElectronBasePluginClient { return true } - async code_completion(context: any) { + async code_completion(prompt: string, promptAfter: string) { // use general purpose model - return this.desktopInferencer.code_completion(context) + return this.desktopInferencer.code_completion(prompt, promptAfter) } async code_insertion(msg_pfx: string, msg_sfx: string) {