diff --git a/src/services/assistant.ts b/src/services/assistant.ts index 13ed308..fd5e0b0 100644 --- a/src/services/assistant.ts +++ b/src/services/assistant.ts @@ -180,6 +180,8 @@ export default class { if (error.name !== 'AbortError') { if (error.status === 401 || error.message.includes('401') || error.message.toLowerCase().includes('apikey')) { message.setText('You need to enter your API key in the Models tab of Settings in order to chat.') + } else if (error.status === 400 && (error.message.includes('credit') || error.message.includes('balance'))) { + message.setText('Sorry, it seems you have run out of credits. Check the balance of your LLM provider account.') } else if (message.content === '') { message.setText('Sorry, I could not generate text for that prompt.') } else {