From 146bd4579ecad109737a3fb3593d54472a3c29a4 Mon Sep 17 00:00:00 2001 From: yann300 Date: Fri, 17 Nov 2023 22:50:48 +0100 Subject: [PATCH] show error message --- apps/remix-ide/src/app/plugins/openaigpt.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/remix-ide/src/app/plugins/openaigpt.tsx b/apps/remix-ide/src/app/plugins/openaigpt.tsx index e95babe00a..9785fce43e 100644 --- a/apps/remix-ide/src/app/plugins/openaigpt.tsx +++ b/apps/remix-ide/src/app/plugins/openaigpt.tsx @@ -39,6 +39,8 @@ export class OpenAIGpt extends Plugin { if (result && result.choices && result.choices.length) { this.call('terminal', 'log', { type: 'typewritersuccess', value: result.choices[0].message.content }) + } else if (result.error) { + this.call('terminal', 'log', { type: 'typewritersuccess', value: result.error }) } else { this.call('terminal', 'log', { type: 'typewritersuccess', value: 'No response...' }) }