Skip to content

Commit

Permalink
Update api.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
AthanaD authored Jan 1, 2024
1 parent f79ec7c commit c666c61
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/api/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ export const getChatCompletionStream = async (
if (text.includes('model_not_found')) {
throw new Error(
text +
'\nMessage from Better ChatGPT:\nPlease ensure that you have access to the GPT-4 API!'
'\nMessage from Devin ChatGPT:\nPlease ensure that you have access to the GPT-4 API!'
);
} else {
throw new Error(
'Message from Better ChatGPT:\nInvalid API endpoint! We recommend you to check your free API endpoint.'
'Message from Devin ChatGPT:\nInvalid API endpoint! We recommend you to check your free API endpoint.'
);
}
}
Expand All @@ -124,7 +124,7 @@ export const getChatCompletionStream = async (
let error = text;
if (text.includes('insufficient_quota')) {
error +=
'\nMessage from Better ChatGPT:\nWe recommend changing your API endpoint or API key';
'\nMessage from Devin ChatGPT:\nWe recommend changing your API endpoint or API key';
} else if (response.status === 429) {
error += '\nRate limited!';
}
Expand Down

0 comments on commit c666c61

Please sign in to comment.