pull/5241/head
STetsing 1 month ago
parent 917f562953
commit 9d782ea085
  1. 2
      apps/remix-ide/src/app/plugins/remixAIPlugin.tsx
  2. 4
      apps/remixdesktop/src/lib/InferenceServerManager.ts
  3. 4
      apps/remixdesktop/src/plugins/remixAIDektop.ts

@ -114,7 +114,7 @@ export class RemixAIPlugin extends ViewPlugin {
async code_completion(prompt: string, promptAfter: string): Promise<any> {
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)
}

@ -453,14 +453,14 @@ export class InferenceManager implements ICompletions {
}
}
async code_completion(context: any, params:IParams=CompletionParams): Promise<any> {
async code_completion(prompt, promptAfter, params:IParams=CompletionParams): Promise<any> {
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)
}

@ -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) {

Loading…
Cancel
Save