pull/5370/head
Stéphane Tetsing 9 months ago
parent 878328b313
commit 749c218c0e
  1. 3
      apps/remix-ide/src/app/plugins/solcoderAI.tsx

@ -35,7 +35,6 @@ export class SolCoder extends Plugin {
body: JSON.stringify({"data":[prompt, "code_generation", false,1000,0.2,0.8,50]}), body: JSON.stringify({"data":[prompt, "code_generation", false,1000,0.2,0.8,50]}),
}) })
).json() ).json()
console.log
return "error" in result? result.error : result.data[0] return "error" in result? result.error : result.data[0]
} catch (e) { } catch (e) {
this.call('terminal', 'log', { type: 'typewritererror', value: `Unable to get a response ${e.message}` }) this.call('terminal', 'log', { type: 'typewritererror', value: `Unable to get a response ${e.message}` })
@ -92,7 +91,7 @@ export class SolCoder extends Plugin {
}) })
).json() ).json()
if (result) { if (result) {
this.call('terminal', 'log', { type: 'typewriterwarning', value: result.data[0]}) this.call('terminal', 'log', { type: 'typewriterwarning', value: "\n"+result.data[0]})
} }
return result.data[0] return result.data[0]
} catch (e) { } catch (e) {

Loading…
Cancel
Save