fixed ci idents

pull/5370/head
Stéphane Tetsing 10 months ago
parent 7586dc5a1e
commit 0a83764737
  1. 1
      apps/remix-ide/src/app/plugins/copilot/suggestion-service/worker.js
  2. 49
      apps/remix-ide/src/app/plugins/solcoderAI.tsx
  3. 2
      libs/remix-ui/editor/src/lib/providers/inlineCompletionProvider.ts

@ -3,7 +3,6 @@ import { pipeline, env } from '@xenova/transformers';
env.allowLocalModels = true;
const instance = null
/**
* This class uses the Singleton pattern to ensure that only one instance of the pipeline is loaded.
*/

@ -74,31 +74,30 @@ export class SolCoder extends Plugin {
try {
result = await(
await fetch(this.api_url.concat("code_completion"), {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({"data": !options? [
prompt, // string in 'context_code' Textbox component
"", // string in 'comment' Textbox component
false, // boolean in 'stream_result' Checkbox component
200, // number (numeric value between 0 and 2000) in 'max_new_tokens' Slider component
0.9, // number (numeric value between 0.01 and 1) in 'temperature' Slider component
0.90, // number (numeric value between 0 and 1) in 'top_p' Slider component
50, // number (numeric value between 1 and 200) in 'top_k' Slider component
] : [
prompt,
"",
options.stream_result,
options.max_new_tokens,
options.temperature,
options.top_p,
options.top_k
]
}),
})
).json()
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({"data": !options? [
prompt, // string in 'context_code' Textbox component
"", // string in 'comment' Textbox component
false, // boolean in 'stream_result' Checkbox component
200, // number (numeric value between 0 and 2000) in 'max_new_tokens' Slider component
0.9, // number (numeric value between 0.01 and 1) in 'temperature' Slider component
0.90, // number (numeric value between 0 and 1) in 'top_p' Slider component
50, // number (numeric value between 1 and 200) in 'top_k' Slider component
] : [
prompt,
"",
options.stream_result,
options.max_new_tokens,
options.temperature,
options.top_p,
options.top_k
]}),
})
).json()
return result.data
} catch (e) {

@ -82,7 +82,7 @@ export class RemixInLineCompletionProvider implements monacoTypes.languages.Inli
}
const generatedText = (result as any).output[0].generated_text as string
let clean = generatedText
const clean = generatedText
console.log('solcoder inline data:\n', clean)
const item: monacoTypes.languages.InlineCompletion = {

Loading…
Cancel
Save